@squidcloud/client 1.0.64 → 1.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/common/src/ai-assistant.context.d.ts +12 -11
  2. package/dist/common/src/ai-assistant.schemas.d.ts +1 -210
  3. package/dist/common/src/ai-assistant.types.d.ts +2 -81
  4. package/dist/common/src/api-call.context.d.ts +13 -12
  5. package/dist/common/src/api.types.d.ts +4 -24
  6. package/dist/common/src/application.schemas.d.ts +1 -1060
  7. package/dist/common/src/application.types.d.ts +184 -224
  8. package/dist/common/src/auth.types.d.ts +1 -4
  9. package/dist/common/src/backend-function.schemas.d.ts +1 -3
  10. package/dist/common/src/backend-function.types.d.ts +1 -7
  11. package/dist/common/src/backend-run.types.d.ts +2 -53
  12. package/dist/common/src/bundle-api.types.d.ts +36 -68
  13. package/dist/common/src/bundle-data.types.d.ts +4 -59
  14. package/dist/common/src/communication.types.d.ts +22 -4
  15. package/dist/common/src/context.types.d.ts +32 -32
  16. package/dist/common/src/distributed-lock.context.d.ts +5 -5
  17. package/dist/common/src/document.types.d.ts +22 -37
  18. package/dist/common/src/graphql.context.d.ts +7 -6
  19. package/dist/common/src/graphql.types.d.ts +9 -11
  20. package/dist/common/src/http-status.enum.d.ts +50 -50
  21. package/dist/common/src/index.d.ts +54 -54
  22. package/dist/common/src/integrations/ai_assistant.types.d.ts +30 -30
  23. package/dist/common/src/integrations/api.types.d.ts +80 -80
  24. package/dist/common/src/integrations/auth.types.d.ts +22 -22
  25. package/dist/common/src/integrations/database.types.d.ts +236 -236
  26. package/dist/common/src/integrations/index.d.ts +97 -97
  27. package/dist/common/src/integrations/observability.types.d.ts +22 -22
  28. package/dist/common/src/logger.types.d.ts +21 -21
  29. package/dist/common/src/metrics.types.d.ts +1 -58
  30. package/dist/common/src/mutation.context.d.ts +12 -10
  31. package/dist/common/src/mutation.schemas.d.ts +1 -5
  32. package/dist/common/src/mutation.types.d.ts +53 -72
  33. package/dist/common/src/named-query.context.d.ts +4 -4
  34. package/dist/common/src/named-query.schemas.d.ts +1 -3
  35. package/dist/common/src/named-query.types.d.ts +1 -9
  36. package/dist/common/src/query/index.d.ts +2 -2
  37. package/dist/common/src/query/query-context.d.ts +37 -37
  38. package/dist/common/src/query/simple-query-builder.d.ts +137 -137
  39. package/dist/common/src/query.schemas.d.ts +1 -5
  40. package/dist/common/src/query.types.d.ts +51 -118
  41. package/dist/common/src/regions.d.ts +1 -22
  42. package/dist/common/src/schema/schema.types.d.ts +54 -54
  43. package/dist/common/src/secret.schemas.d.ts +1 -6
  44. package/dist/common/src/secret.types.d.ts +8 -49
  45. package/dist/common/src/security.types.d.ts +1 -3
  46. package/dist/common/src/socket.schemas.d.ts +1 -3
  47. package/dist/common/src/socket.types.d.ts +1 -108
  48. package/dist/common/src/time-units.d.ts +1 -5
  49. package/dist/common/src/trigger.types.d.ts +1 -15
  50. package/dist/common/src/types.d.ts +8 -15
  51. package/dist/common/src/utils/array.d.ts +1 -8
  52. package/dist/common/src/utils/assert.d.ts +1 -8
  53. package/dist/common/src/utils/error.d.ts +4 -4
  54. package/dist/common/src/utils/http.d.ts +2 -2
  55. package/dist/common/src/utils/id.d.ts +2 -2
  56. package/dist/common/src/utils/lock.manager.d.ts +14 -14
  57. package/dist/common/src/utils/nullish.d.ts +1 -1
  58. package/dist/common/src/utils/object.d.ts +6 -6
  59. package/dist/common/src/utils/serialization.d.ts +6 -6
  60. package/dist/common/src/utils/transforms.d.ts +18 -18
  61. package/dist/common/src/utils/url.d.ts +1 -1
  62. package/dist/common/src/utils/validation.d.ts +30 -30
  63. package/dist/common/src/webhook-response.d.ts +1 -7
  64. package/dist/index.js +2 -2
  65. package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
  66. package/dist/typescript-client/src/ai-assistant-client.d.ts +66 -66
  67. package/dist/typescript-client/src/ai-client.factory.d.ts +13 -13
  68. package/dist/typescript-client/src/api.manager.d.ts +15 -15
  69. package/dist/typescript-client/src/auth.manager.d.ts +23 -23
  70. package/dist/typescript-client/src/backend-function.manager.d.ts +13 -13
  71. package/dist/typescript-client/src/client-id.service.d.ts +24 -24
  72. package/dist/typescript-client/src/collection-reference.d.ts +81 -81
  73. package/dist/typescript-client/src/collection-reference.factory.d.ts +16 -16
  74. package/dist/typescript-client/src/data.manager.d.ts +172 -172
  75. package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
  76. package/dist/typescript-client/src/distributed-lock.manager.d.ts +19 -19
  77. package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
  78. package/dist/typescript-client/src/document-reference.d.ts +134 -134
  79. package/dist/typescript-client/src/document-reference.factory.d.ts +9 -9
  80. package/dist/typescript-client/src/document-store.d.ts +11 -11
  81. package/dist/typescript-client/src/graphql-client.d.ts +12 -12
  82. package/dist/typescript-client/src/graphql-client.factory.d.ts +9 -9
  83. package/dist/typescript-client/src/index.d.ts +8 -8
  84. package/dist/typescript-client/src/mutation/mutation-sender.d.ts +12 -12
  85. package/dist/typescript-client/src/named-query.manager.d.ts +14 -14
  86. package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +72 -72
  87. package/dist/typescript-client/src/query/query-builder.factory.d.ts +83 -83
  88. package/dist/typescript-client/src/query/query-subscription.manager.d.ts +64 -64
  89. package/dist/typescript-client/src/query/query.types.d.ts +14 -14
  90. package/dist/typescript-client/src/rpc.manager.d.ts +28 -28
  91. package/dist/typescript-client/src/socket.manager.d.ts +32 -32
  92. package/dist/typescript-client/src/squid.d.ts +196 -188
  93. package/dist/typescript-client/src/state/action.applier.d.ts +7 -7
  94. package/dist/typescript-client/src/state/actions.d.ts +29 -29
  95. package/dist/typescript-client/src/state/path_trie.d.ts +27 -27
  96. package/dist/typescript-client/src/state/state.service.d.ts +22 -22
  97. package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
  98. package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
  99. package/dist/typescript-client/src/types.d.ts +2 -2
  100. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5,8 +5,8 @@
5
5
  || ${a} === "boolean" || ${i} === null`).assign(u,s._`[${i}]`)}}n.else(),h(e),n.endIf(),n.if(s._`${u} !== undefined`,(()=>{n.assign(i,u),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,u)}))}(e,t,a):h(e)}))}return c};const l=new Set(["string","number","integer","boolean","null"]);function f(e,t,r,n=u.Correct){const i=n===u.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${i} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return s._`typeof ${t} ${i} ${e}`}return n===u.Correct?o:(0,s.not)(o);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function p(e,t,r,n){if(1===e.length)return f(e[0],t,r,n);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const e in o)i=(0,s.and)(i,f(e,t,r,n));return i}t.checkDataType=f,t.checkDataTypes=p;const d={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,d)}t.reportTypeError=h},1481:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(5669),i=r(8936);function o(e,t,r){const{gen:o,compositeRule:s,data:a,opts:u}=e;if(void 0===r)return;const c=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let l=n._`${c} === undefined`;"empty"===u.useDefaults&&(l=n._`${l} || ${c} === null || ${c} === ""`),o.if(l,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)o(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>o(e,r,t.default)))}},1686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(2171),i=r(7332),o=r(9073),s=r(7332),a=r(1481),u=r(5782),c=r(8878),l=r(5669),f=r(5247),p=r(6696),d=r(8936),h=r(6930);function y({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,l._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(l._`"use strict"; ${v(r,i)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,l._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,l._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,l._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,l._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,l._`""`),e.var(f.default.parentData,l._`undefined`),e.var(f.default.parentDataProperty,l._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`{}`)}))}(e,i),e.code(o)})):e.func(t,l._`${f.default.data}, ${function(e){return l._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?l._`, ${f.default.dynamicAnchors}={}`:l.nil}}={}`}(i)}`,n.$async,(()=>e.code(v(r,i)).code(o)))}function v(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?l._`/*# sourceURL=${r} */`:l.nil}function m({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function g(e){(0,d.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return O(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);O(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(!0===i.$comment)e.code(l._`${f.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const r=l.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(l._`${f.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function O(e,t,r,n){const{gen:i,schema:a,data:u,allErrors:c,opts:p,self:h}=e,{RULES:y}=h;function v(d){(0,o.shouldUseGroup)(a,d)&&(d.type?(i.if((0,s.checkDataType)(d.type,u,p.strictNumbers)),S(e,d),1===t.length&&t[0]===d.type&&r&&(i.else(),(0,s.reportTypeError)(e)),i.endIf()):S(e,d),c||i.if(l._`${f.default.errors} === ${n||0}`))}!a.$ref||!p.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(a,y)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{E(e.dataTypes,t)||I(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)E(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&I(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&I(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of y.rules)v(e);v(y.post)}))):i.block((()=>j(e,"$ref",y.all.$ref.definition)))}function S(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(n,r)&&j(e,r.keyword,r.definition,t.type)}))}function E(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function I(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(g(e),m(e))?function(e){const{schema:t,opts:r,gen:n}=e;y(e,(()=>{r.$comment&&t.$comment&&w(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,d.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",l._`${r}.evaluated`),t.if(l._`${e.evaluated}.dynamicProps`,(()=>t.assign(l._`${e.evaluated}.props`,l._`undefined`))),t.if(l._`${e.evaluated}.dynamicItems`,(()=>t.assign(l._`${e.evaluated}.items`,l._`undefined`)))}(e),_(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if(l._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(l._`new ${i}(${f.default.vErrors})`))):(t.assign(l._`${n}.errors`,f.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof l.Name&&e.assign(l._`${t}.props`,r),n instanceof l.Name&&e.assign(l._`${t}.items`,n)}(e),t.return(l._`${f.default.errors} === 0`))}(e)}))}(e):y(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class T{constructor(e,t,r){if((0,u.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,r,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",A(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,u.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,r){this.failResult((0,l.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():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,l.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(l._`${t} !== undefined && (${(0,l.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_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,r=l.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,l.or)(l._`${n} === undefined`,t)),e!==l.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,l.or)(function(){if(r.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return l._`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return l.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return l._`!${r}(${t})`}return l.nil}())}subschema(e,t){const r=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(r,this.it,e),(0,c.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return function(e,t){b(e)&&(g(e),m(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&w(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.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 o=n.const("_errs",f.default.errors);_(e,o),n.var(t,l._`${o} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=d.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=d.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,l.Name))),!0}}function j(e,t,r,n){const i=new T(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,u.funcKeywordCode)(i,r):"macro"in r?(0,u.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,u.funcKeywordCode)(i,r)}t.KeywordCxt=T;const P=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function A(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return f.default.rootData;if("/"===e[0]){if(!P.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=f.default.rootData}else{const s=x.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(i=s[2],"#"===i){if(a>=t)throw new Error(u("property/index",a));return n[t-a]}if(a>t)throw new Error(u("data",a));if(o=r[t-a],!i)return o}let s=o;const a=i.split("/");for(const e of a)e&&(o=l._`${o}${(0,l.getProperty)((0,d.unescapeJsonPointer)(e))}`,s=l._`${s} && ${o}`);return s;function u(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=A},5782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(5669),i=r(5247),o=r(3499),s=r(6930);function a(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function u(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:o,parentSchema:s,it:a}=e,c=t.macro.call(a.self,o,s,a),l=u(r,i,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const f=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:l,schema:f,parentSchema:p,$data:d,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const y=!d&&t.compile?t.compile.call(h.self,f,p,h):t.validate,v=u(c,l,y),m=c.let("valid");function b(r=(t.async?n._`await `:n.nil)){const s=h.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!d||!1===t.schema);c.assign(m,n._`${r}${(0,o.callValidateCode)(e,v,s,a)}`,t.modifying)}function g(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:m),e)}e.block$data(m,(function(){if(!1===t.errors)b(),t.modifying&&a(e),g((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>b(n._`await `)),(t=>c.assign(m,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${v}.errors`;return c.assign(e,null),b(n.nil),e}();t.modifying&&a(e),g((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:m)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const s=i.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},8878:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(5669),i=r(8936);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:u}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:u,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:s,dataTypes:a,propertyName:u}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:u}=t;l(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,i.getErrorPath)(r,o,u.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function l(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==s&&(l(s instanceof n.Name?s:c.let("data",s,!0)),void 0!==u&&(e.propertyName=u)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},8355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(1686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(5669);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 o=r(6448),s=r(1578),a=r(2881),u=r(7382),c=r(5669),l=r(6696),f=r(7332),p=r(8936),d=r(1143),h=r(407),y=(e,t)=>new RegExp(e,t);y.code="new RegExp";const v=["removeAdditional","useDefaults","coerceTypes"],m=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 _(e){var t,r,n,i,o,s,a,u,c,l,f,p,d,v,m,b,g,_,w,O,S,E,I,T,j;const P=e.strict,x=null===(t=e.code)||void 0===t?void 0:t.optimize,A=!0===x||void 0===x?1:x||0,N=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:y,M=null!==(i=e.uriResolver)&&void 0!==i?i:h.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:P)||void 0===s||s,strictNumbers:null===(u=null!==(a=e.strictNumbers)&&void 0!==a?a:P)||void 0===u||u,strictTypes:null!==(l=null!==(c=e.strictTypes)&&void 0!==c?c:P)&&void 0!==l?l:"log",strictTuples:null!==(p=null!==(f=e.strictTuples)&&void 0!==f?f:P)&&void 0!==p?p:"log",strictRequired:null!==(v=null!==(d=e.strictRequired)&&void 0!==d?d:P)&&void 0!==v&&v,code:e.code?{...e.code,optimize:A,regExp:N}:{optimize:A,regExp:N},loopRequired:null!==(m=e.loopRequired)&&void 0!==m?m:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(g=e.meta)||void 0===g||g,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(O=e.schemaId)&&void 0!==O?O:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===(I=e.validateFormats)||void 0===I||I,unicodeRegExp:null===(T=e.unicodeRegExp)||void 0===T||T,int32range:null===(j=e.int32range)||void 0===j||j,uriResolver:M}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return P;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 n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),O.call(this,b,e,"NOT SUPPORTED"),O.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=j.call(this),e.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&T.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=d;"id"===r&&(n={...d},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!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 r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await u.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function u(e){const r=await c.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);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,l.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new u.SchemaEnv({schema:{},schemaId:r});if(t=u.resolveSchema.call(this,n,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=S.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 r=e[this.opts.schemaId];return r&&(r=(0,l.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),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 r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(A.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>N.call(this,e))),this;k.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>N.call(this,e,n):e=>n.type.forEach((t=>N.call(this,e,n,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 r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.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:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,o=i[e];n&&o&&(i[e]=R(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:s}=this.opts;if("object"==typeof e)o=e[s];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 a=this._cache.get(e);if(void 0!==a)return a;r=(0,l.normalizeId)(o||r);const c=l.getSchemaRefs.call(this,e,r);return a=new u.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_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):u.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{u.compileSchema.call(this,e)}finally{this.opts=t}}}function O(e,t,r,n="error"){for(const i in e){const o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function S(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){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 I(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function T(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 r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function j(){const e={...this.opts};for(const t of v)delete e[t];return e}t.default=w,w.ValidationError=o.default,w.MissingRefError=s.default;const P={log(){},warn(){},error(){}},x=/^[a-z_$][a-z0-9_$:-]*$/i;function A(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!x.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 N(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=i?o.post:o.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?M.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function M(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function k(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,D]}}},4285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6471);n.code='require("ajv/dist/runtime/equal").default',t.default=n},9161:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,i=0;for(;i<t;)n++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<t&&(r=e.charCodeAt(i),56320==(64512&r)&&i++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},407:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2371);n.code='require("ajv/dist/runtime/uri").default',t.default=n},6448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},8891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(5669),i=r(8936),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:o,data:s,keyword:a,it:u}=e;u.items=!0;const c=r.const("len",n._`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(u,o)){const o=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(o),(()=>function(o){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},o),u.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=s,t.default=o},4943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(5247),s=r(8936),a={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:r,parentSchema:a,data:u,errsCount:c,it:l}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:f,opts:p}=l;if(l.props=!0,"all"!==p.removeAdditional&&(0,s.alwaysValidSchema)(l,r))return;const d=(0,n.allSchemaProperties)(a.properties),h=(0,n.allSchemaProperties)(a.patternProperties);function y(e){t.code(i._`delete ${u}[${e}]`)}function v(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)y(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===p.removeAdditional?(m(n,r,!1),t.if((0,i.not)(r),(()=>{e.reset(),y(n)}))):(m(n,r),f||t.if((0,i.not)(r),(()=>t.break())))}}}function m(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",u,(r=>{d.length||h.length?t.if(function(r){let o;if(d.length>8){const e=(0,s.schemaRefOrVal)(l,a.properties,"properties");o=(0,n.isOwnProperty)(t,e,r)}else o=d.length?(0,i.or)(...d.map((e=>i._`${r} === ${e}`))):i.nil;return h.length&&(o=(0,i.or)(o,...h.map((t=>i._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,i.not)(o)}(r),(()=>v(r))):v(r)})),e.ok(i._`${c} === ${o.default.errors}`)}};t.default=a},2609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(s)}))}};t.default=i},4279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(3499).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},5609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:s,it:a}=e;let u,c;const{minContains:l,maxContains:f}=o;a.opts.next?(u=void 0===l?1:l,c=f):u=1;const p=t.const("len",n._`${s}.length`);if(e.setParams({min:u,max:c}),void 0===c&&0===u)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&u>c)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,r)){let t=n._`${p} >= ${u}`;return void 0!==c&&(t=n._`${t} && ${p} <= ${c}`),void e.pass(t)}a.items=!0;const d=t.name("valid");function h(){const e=t.name("_valid"),r=t.let("count",0);y(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${u}`,(()=>t.assign(d,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(d,!1).break())),1===u?t.assign(d,!0):t.if(n._`${e} >= ${u}`,(()=>t.assign(d,!0))))}(r)))))}function y(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===u?y(d,(()=>t.if(d,(()=>t.break())))):0===u?(t.let(d,!0),void 0!==c&&t.if(n._`${s}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,(()=>e.reset()))}};t.default=o},5747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(5669),i=r(8936),o=r(3499);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e},
6
6
  missingProperty: ${i},
7
7
  depsCount: ${t},
8
- deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),u(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const u in t){const c=t[u];if(0===c.length)continue;const l=(0,o.propertyInData)(r,i,u,s.opts.ownProperties);e.setParams({property:u,depsCount:c.length,deps:c.join(", ")}),s.allErrors?r.if(l,(()=>{for(const t of c)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,o.checkMissingProp)(e,c,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function u(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,u=r.name("valid");for(const c in t)(0,i.alwaysValidSchema)(a,t[c])||(r.if((0,o.propertyInData)(r,n,c,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:c},u);e.mergeValidEvaluated(t,u)}),(()=>r.var(u,!0))),e.ok(u))}t.validatePropertyDeps=a,t.validateSchemaDeps=u,t.default=s},76:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),u=s(o,"else");if(!a&&!u)return;const c=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&u){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,f("then",r),f("else",r))}else a?t.if(l,f("then")):t.if((0,n.not)(l),f("else"));function f(r,i){return()=>{const o=e.subschema({keyword:r},l);t.assign(c,l),e.mergeValidEvaluated(o,c),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},6951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8891),i=r(1162),o=r(8634),s=r(5151),a=r(5609),u=r(5747),c=r(3021),l=r(4943),f=r(4243),p=r(8103),d=r(2869),h=r(4279),y=r(4880),v=r(2609),m=r(76),b=r(5316);t.default=function(e=!1){const t=[d.default,h.default,y.default,v.default,m.default,b.default,c.default,l.default,u.default,f.default,p.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},8634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(5669),i=r(8936),o=r(3499),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:u,it:c}=e;!function(e){const{opts:n,errSchemaPath:o}=c,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${u}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(c,e,n.strictTuples)}}(s),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(o,r.length,c.items));const l=o.name("valid"),f=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(o.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=a,t.default=s},5151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(3499),s=r(8891),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},2869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},4880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,u=t.let("valid",!1),c=t.let("passing",null),l=t.name("_valid");e.setParams({passing:c}),t.block((function(){a.forEach(((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(n._`${l} && ${u}`).assign(u,!1).assign(c,n._`[${c}, ${o}]`).else(),t.if(l,(()=>{t.assign(u,!0),t.assign(c,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(u,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},8103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),s=r(8936),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:u,it:c}=e,{opts:l}=c,f=(0,n.allSchemaProperties)(r),p=f.filter((e=>(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length||p.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const d=l.strictSchema&&!l.allowMatchingProperties&&u.properties,h=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,s.evaluatedPropsToName)(t,c.props));const{props:y}=c;function v(e){for(const t in d)new RegExp(e).test(t)&&(0,o.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function m(r){t.forIn("key",a,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},h),c.opts.unevaluated&&!0!==y?t.assign(i._`${y}[${o}]`,!0):n||c.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of f)d&&v(e),c.allErrors?m(e):(t.var(h,!0),m(e),t.if(h))}()}};t.default=a},1162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8634),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},4243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1686),i=r(3499),o=r(8936),s=r(4943),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:u,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(c,s.default,"additionalProperties"));const l=(0,i.allSchemaProperties)(r);for(const e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),c.props));const f=l.filter((e=>!(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length)return;const p=t.name("valid");for(const r of f)d(r)?h(r):(t.if((0,i.propertyInData)(t,u,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function d(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=a},3021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},5316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},3499:(e,t,r)=>{"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 n=r(5669),i=r(8936),o=r(5247),s=r(8936);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function u(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function c(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(u(e,t,r))):o}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:o}=e;r.if(c(r,i,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,o){return(0,n.or)(...i.map((i=>(0,n.and)(c(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=u,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${u(e,t,r)}`:o},t.noPropertyInData=c,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:u},c,l,f){const p=f?n._`${e}, ${t}, ${i}${s}`:t,d=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,u.parentData],[o.default.parentDataProperty,u.parentDataProperty],[o.default.rootData,o.default.rootData]];u.opts.dynamicRef&&d.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${p}, ${r.object(...d)}`;return l!==n.nil?n._`${c}.call(${l}, ${h})`:n._`${c}(${h})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?f:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return u((()=>t.assign(e,!1))),e}return t.var(a,!0),u((()=>t.break())),a;function u(s){const u=t.const("len",n._`${r}.length`);t.forRange("i",0,u,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),u=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},u);t.assign(a,n._`${a} || ${u}`),e.mergeValidEvaluated(s,u)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},1018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},2101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1018),i=r(1939),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},1939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(1578),i=r(3499),o=r(5669),s=r(5247),a=r(7382),u=r(8936),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:u,validateName:c,opts:p,self:d}=i,{root:h}=u;if(("#"===r||"#/"===r)&&s===h.baseId)return function(){if(u===h)return f(e,c,u,u.$async);const r=t.scopeValue("root",{ref:h});return f(e,o._`${r}.validate`,h,h.$async)}();const y=a.resolveRef.call(d,h,s,r);if(void 0===y)throw new n.default(i.opts.uriResolver,s,r);return y instanceof a.SchemaEnv?function(t){const r=l(e,t);f(e,r,t,t.$async)}(y):function(n){const i=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(y)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:a,it:c}=e,{allErrors:l,schemaEnv:f,opts:p}=c,d=p.passContext?s.default.this:o.nil;function h(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function y(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=u.mergeEvaluated.props(a,n.props,c.props));else{const t=a.var("props",o._`${e}.evaluated.props`);c.props=u.mergeEvaluated.props(a,t,c.props,o.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=u.mergeEvaluated.items(a,n.items,c.items));else{const t=a.var("items",o._`${e}.evaluated.items`);c.items=u.mergeEvaluated.items(a,t,c.items,o.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,d)}`),y(t),l||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${c.ValidationError})`,(()=>a.throw(e))),h(e),l||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,d),(()=>y(t)),(()=>h(t)))}t.getValidate=l,t.callRef=f,t.default=c},2:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(7421),o=r(7382),s=r(8936),a={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:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:u,it:c}=e,{oneOf:l}=u;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=a.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(f)}`);function h(r){const i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=i(u);let n=!0;for(let t=0;t<l.length;t++){let u=l[t];(null==u?void 0:u.$ref)&&!(0,s.schemaHasRulesButRef)(u,c.self.RULES)&&(u=o.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==u?void 0:u.$ref),u instanceof o.SchemaEnv&&(u=u.schema));const p=null===(e=null==u?void 0:u.properties)||void 0===e?void 0:e[f];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(r||i(u)),a(p,t)}if(!n)throw new Error(`discriminator: "${f}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(f)}function a(e,t){if(e.const)p(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)p(r,t)}}function p(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${d} === ${e}`),t.assign(p,h(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:d,tagName:f}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:d,tagName:f}))),e.ok(p)}};t.default=a},7421:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},5671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2101),i=r(7499),o=r(6951),s=r(4480),a=r(2480),u=[n.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=u},3599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:p}=u;c.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),u=r.let("fType"),l=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(u,n._`${s}.type || "string"`).assign(l,n._`${s}.validate`)),(()=>r.assign(u,n._`"string"`).assign(l,s))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${a} && !${l}`,function(){const e=f.$async?n._`(${s}.async ? await ${l}(${i}) : ${l}(${i}))`:n._`${l}(${i})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${i}))`;return n._`${l} && ${l} !== true && ${u} === ${t} && !${r}`}()))}():function(){const o=p.formats[s];if(!o)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}p.logger.warn(e())}();if(!0===o)return;const[a,u,d]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${d}(${i})`}return"function"==typeof u?n._`${d}(${i})`:n._`${d}.test(${i})`}())}())}};t.default=i},4480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(3599).default];t.default=n},2480:(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"]},8549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:u}=e;s||u&&"object"==typeof u?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${u} !== ${r}`)}};t.default=s},9450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:u,it:c}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=c.opts.loopEnum;let f;const p=()=>null!=f?f:f=(0,i.useFunc)(t,o.default);let d;if(l||s)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",u,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",u);d=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(d)}};t.default=s},7499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1337),i=r(9706),o=r(9507),s=r(1216),a=r(34),u=r(6962),c=r(1135),l=r(194),f=r(8549),p=r(9450),d=[n.default,i.default,o.default,s.default,a.default,u.default,c.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,p.default];t.default=d},1135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${i}`)}};t.default=i},9507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(9161),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,u="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${c} ${u} ${s}`)}};t.default=s},1337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=n.operators,o={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}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},34:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${i}`)}};t.default=i},9706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),u=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${u}))`)}};t.default=i},1216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o={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:r,schema:o,schemaCode:s,it:a}=e,u=a.opts.unicodeRegExp?"u":"",c=r?i._`(new RegExp(${s}, ${u}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${c}.test(${t})`)}};t.default=o},6962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),s={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:r,schemaCode:s,data:a,$data:u,it:c}=e,{opts:l}=c;if(!u&&0===r.length)return;const f=r.length>=l.loopRequired;if(c.allErrors?function(){if(f||u)e.block$data(i.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(f||u){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,l.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(c,t,c.opts.strictRequired)}}function p(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=s},194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7332),i=r(5669),o=r(8936),s=r(4285),a={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}}`},u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:a,code(e){const{gen:t,data:r,$data:a,schema:u,parentSchema:c,schemaCode:l,it:f}=e;if(!a&&!u)return;const p=t.let("valid"),d=c.items?(0,n.getSchemaTypes)(c.items):[];function h(o,s){const a=t.name("item"),u=(0,n.checkDataTypes)(d,a,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${r}[${o}]`),t.if(u,i._`continue`),d.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${c}[${a}] == "number"`,(()=>{t.assign(s,i._`${c}[${a}]`),e.error(),t.assign(p,!1).break()})).code(i._`${c}[${a}] = ${o}`)}))}function y(n,a){const u=(0,o.useFunc)(t,s.default),c=t.name("outer");t.label(c).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${u}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(c)}))))))}e.block$data(p,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(p,!0),t.if(i._`${n} > 1`,(()=>(d.length>0&&!d.some((e=>"object"===e||"array"===e))?h:y)(n,o)))}),i._`${l} === false`),e.ok(p)}};t.default=u},8682:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,s,a,u,c,l,f){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var p in n(o,s,a,u,c,l,f),o){var d=o[p];if(Array.isArray(d)){if(p in t.arrayKeywords)for(var h=0;h<d.length;h++)r(e,n,i,d[h],s+"/"+p+"/"+h,a,s,p,o,h)}else if(p in t.propsKeywords){if(d&&"object"==typeof d)for(var y in d)r(e,n,i,d[y],s+"/"+p+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,p,o,y)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,i,d,s+"/"+p,a,s,p,o)}i(o,s,a,u,c,l,f)}}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}},5382:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BSONError:()=>w,BSONRegExp:()=>rt,BSONSymbol:()=>nt,BSONTypeError:()=>O,BSON_BINARY_SUBTYPE_BYTE_ARRAY:()=>ve,BSON_BINARY_SUBTYPE_COLUMN:()=>we,BSON_BINARY_SUBTYPE_DEFAULT:()=>he,BSON_BINARY_SUBTYPE_ENCRYPTED:()=>_e,BSON_BINARY_SUBTYPE_FUNCTION:()=>ye,BSON_BINARY_SUBTYPE_MD5:()=>ge,BSON_BINARY_SUBTYPE_USER_DEFINED:()=>Oe,BSON_BINARY_SUBTYPE_UUID:()=>me,BSON_BINARY_SUBTYPE_UUID_NEW:()=>be,BSON_DATA_ARRAY:()=>G,BSON_DATA_BINARY:()=>J,BSON_DATA_BOOLEAN:()=>ee,BSON_DATA_CODE:()=>oe,BSON_DATA_CODE_W_SCOPE:()=>ae,BSON_DATA_DATE:()=>te,BSON_DATA_DBPOINTER:()=>ie,BSON_DATA_DECIMAL128:()=>fe,BSON_DATA_INT:()=>ue,BSON_DATA_LONG:()=>le,BSON_DATA_MAX_KEY:()=>de,BSON_DATA_MIN_KEY:()=>pe,BSON_DATA_NULL:()=>re,BSON_DATA_NUMBER:()=>W,BSON_DATA_OBJECT:()=>K,BSON_DATA_OID:()=>X,BSON_DATA_REGEXP:()=>ne,BSON_DATA_STRING:()=>H,BSON_DATA_SYMBOL:()=>se,BSON_DATA_TIMESTAMP:()=>ce,BSON_DATA_UNDEFINED:()=>Z,BSON_INT32_MAX:()=>B,BSON_INT32_MIN:()=>U,BSON_INT64_MAX:()=>V,BSON_INT64_MIN:()=>z,Binary:()=>Se,Code:()=>Ie,DBRef:()=>je,Decimal128:()=>We,Double:()=>He,EJSON:()=>yt,Int32:()=>Ke,Long:()=>De,LongWithoutOverridesClass:()=>it,Map:()=>vt,MaxKey:()=>Ge,MinKey:()=>Je,ObjectID:()=>tt,ObjectId:()=>tt,Timestamp:()=>ot,UUID:()=>Ee,calculateObjectSize:()=>vr,default:()=>br,deserialize:()=>yr,deserializeStream:()=>mr,serialize:()=>dr,serializeWithBufferAndIndex:()=>hr,setInternalBufferSize:()=>pr});for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,s=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63;var l,f,p=function(e){var t,r,n=u(e),s=n[0],a=n[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},d=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,u=r-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")},h=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,p=r?-1:1,d=e[t+f];for(f+=p,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},y=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,h=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=h,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=h,s/=256,c-=8);e[r+d-h]|=128*y},v=(l=function(e,t){var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;var n=2147483647;function i(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|v(e,t),n=i(r),s=n.write(e,t);return s!==r&&(n=n.slice(0,s)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(U(e,Uint8Array)){var t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e));if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return l(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return l(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var s=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?i(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e))}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return a(e),i(e<0?0:0|f(e))}function c(e){for(var t=e.length<0?0:0|f(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,o.prototype),n}function f(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function v(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(i)return n?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return j(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,p=0;p<u;p++)if(c(e,o+p)!==c(t,p)){f=!1;break}if(f)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(V(a))return s;e[r+s]=a}return s}function O(e,t,r,n){return B(q(t,e.length-r),e,r,n)}function S(e,t,r,n){return B(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return B(L(t),e,r,n)}function I(e,t,r,n){return B(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?d(e):d(e.slice(t,r))}function j(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=P));return r}(n)}t.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},o.allocUnsafe=function(e){return u(e)},o.allocUnsafeSlow=function(e){return u(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(U(s,Uint8Array))i+s.length>n.length?o.from(s).copy(n,i):Uint8Array.prototype.set.call(n,s,i);else{if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i)}i+=s.length}return n},o.byteLength=v,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?j(this,0,e):m.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),f=0;f<u;++f)if(c[f]!==l[f]){s=c[f],a=l[f];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return O(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=z[e[o]];return i}function M(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function k(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,4),y(e,t,r,n,23,4),r+4}function $(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,8),y(e,t,r,n,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),h(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),h(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),h(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),h(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:o.from(e,n),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=a[s%u]}return this};var F=/[^+/0-9A-Za-z-_]/g;function q(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(e){return p(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}var z=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},l(f={exports:{}},f.exports),f.exports),m=v.Buffer;v.SlowBuffer,v.INSPECT_MAX_BYTES,v.kMaxLength;var b=function(e,t){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},b(e,t)};function g(e,t){function r(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var _=function(){return _=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},w=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),O=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function S(e){return e&&e.Math==Math&&e}function E(){return S("object"==typeof globalThis&&globalThis)||S("object"==typeof window&&window)||S("object"==typeof self&&self)||S("object"==typeof r.g&&r.g)||Function("return this")()}function I(e){return e.toString().replace("function(","function (")}var T=function(e){var t,r="object"==typeof(t=E()).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(r);for(var n=m.alloc(e),i=0;i<e;++i)n[i]=Math.floor(256*Math.random());return n},j=function(){if("undefined"!=typeof window){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(m.alloc(t))}}return void 0!==r.g&&r.g.crypto&&r.g.crypto.getRandomValues?function(e){return r.g.crypto.getRandomValues(m.alloc(e))}:T}();function P(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function x(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function A(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function N(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function M(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function k(e){return D(e)&&"[object Date]"===Object.prototype.toString.call(e)}function D(e){return"object"==typeof e&&null!==e}function R(e,t){var r=!1;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return r||(console.warn(t),r=!0),e.apply(this,n)}}function C(e){if(ArrayBuffer.isView(e))return m.from(e.buffer,e.byteOffset,e.byteLength);if(P(e))return m.from(e);throw new O("Must use either Buffer or TypedArray")}var $=/^(?:[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,F=function(e){return"string"==typeof e&&$.test(e)},q=function(e){if(!F(e))throw new O('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 m.from(t,"hex")},L=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")},B=2147483647,U=-2147483648,V=Math.pow(2,63)-1,z=-Math.pow(2,63),Q=Math.pow(2,53),Y=-Math.pow(2,53),W=1,H=2,K=3,G=4,J=5,Z=6,X=7,ee=8,te=9,re=10,ne=11,ie=12,oe=13,se=14,ae=15,ue=16,ce=17,le=18,fe=19,pe=255,de=127,he=0,ye=1,ve=2,me=3,be=4,ge=5,_e=6,we=7,Oe=128,Se=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new O("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=r?r:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=m.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=m.from(t,"binary"):Array.isArray(t)?this.buffer=m.from(t):this.buffer=C(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new O("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new O("only accepts single character Uint8Array or Array");var r;if((r="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||r>255)throw new O("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=m.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var r=m.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(C(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"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===r.length?"0"+r:r}:{$binary:{base64:t,subType:1===r.length?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new Ee(this.buffer.slice(0,this.position));throw new w('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,r){var n,i;if(r=r||{},"$binary"in t?r.legacy&&"string"==typeof t.$binary&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,n=m.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,n=m.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,n=q(t.$uuid)),!n)throw new O("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===be?new Ee(n):new e(n,i)},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(Se.prototype,"_bsontype",{value:"Binary"});var Ee=function(e){function t(r){var n,i,o=this;if(null==r)n=t.generate();else if(r instanceof t)n=m.from(r.buffer),i=r.__id;else if(ArrayBuffer.isView(r)&&16===r.byteLength)n=C(r);else{if("string"!=typeof r)throw new O("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).");n=q(r)}return(o=e.call(this,n,be)||this).__id=i,o}return g(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(e){this.buffer=e,t.cacheHexString&&(this.__id=L(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var r=L(this.id,e);return t.cacheHexString&&(this.__id=r),r},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 Se(this.id,Se.SUBTYPE_UUID)},t.generate=function(){var e=j(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,m.from(e)},t.isValid=function(e){return!!e&&(e instanceof t||("string"==typeof e?F(e):!!x(e)&&16===e.length&&64==(240&e[6])&&128==(128&e[8])))},t.createFromHexString=function(e){return new t(q(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Se),Ie=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);this.code=t,this.scope=r}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 Te(e){return D(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty(Ie.prototype,"_bsontype",{value:"Code"});var je=function(){function e(t,r,n,i){if(!(this instanceof e))return new e(t,r,n,i);var o=t.split(".");2===o.length&&(n=o.shift(),t=o.shift()),this.collection=t,this.oid=r,this.db=n,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 r=Object.assign({},t);return delete r.$ref,delete r.$id,delete r.$db,new e(t.$ref,t.$id,t.$db,r)},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(je.prototype,"_bsontype",{value:"DBRef"});var Pe=void 0;try{Pe=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 xe=4294967296,Ae=0x10000000000000000,Ne=Ae/2,Me={},ke={},De=function(){function e(t,r,n){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,r,n);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!r)):"string"==typeof t?Object.assign(this,e.fromString(t,!!r)):(this.low=0|t,this.high=0|r,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromInt=function(t,r){var n,i,o;return r?(o=0<=(t>>>=0)&&t<256)&&(i=ke[t])?i:(n=e.fromBits(t,(0|t)<0?-1:0,!0),o&&(ke[t]=n),n):(o=-128<=(t|=0)&&t<128)&&(i=Me[t])?i:(n=e.fromBits(t,t<0?-1:0,!1),o&&(Me[t]=n),n)},e.fromNumber=function(t,r){if(isNaN(t))return r?e.UZERO:e.ZERO;if(r){if(t<0)return e.UZERO;if(t>=Ae)return e.MAX_UNSIGNED_VALUE}else{if(t<=-Ne)return e.MIN_VALUE;if(t+1>=Ne)return e.MAX_VALUE}return t<0?e.fromNumber(-t,r).neg():e.fromBits(t%xe|0,t/xe|0,r)},e.fromBigInt=function(t,r){return e.fromString(t.toString(),r)},e.fromString=function(t,r,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof r?(n=r,r=!1):r=!!r,(n=n||10)<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),r,n).neg();for(var o=e.fromNumber(Math.pow(n,8)),s=e.ZERO,a=0;a<t.length;a+=8){var u=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+u),n);if(u<8){var l=e.fromNumber(Math.pow(n,u));s=s.mul(l).add(e.fromNumber(c))}else s=(s=s.mul(o)).add(e.fromNumber(c))}return s.unsigned=r,s},e.fromBytes=function(t,r,n){return n?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){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,r)},e.fromBytesBE=function(t,r){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],r)},e.isLong=function(e){return D(e)&&!0===e.__isLong__},e.fromValue=function(t,r){return"number"==typeof t?e.fromNumber(t,r):"string"==typeof t?e.fromString(t,r):e.fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,u=t.low>>>16,c=0,l=0,f=0,p=0;return f+=(p+=o+(65535&t.low))>>>16,p&=65535,l+=(f+=i+u)>>>16,f&=65535,c+=(l+=n+a)>>>16,l&=65535,c+=r+s,c&=65535,e.fromBits(f<<16|p,c<<16|l,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 r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?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(Pe){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var r=(this.unsigned?Pe.div_u:Pe.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;o=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:(n=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(n)),o=n.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();o=e.ZERO}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:Math.pow(2,s-48),u=e.fromNumber(n),c=u.mul(t);c.isNegative()||c.gt(i);)n-=a,c=(u=e.fromNumber(n,this.unsigned)).mul(t);u.isZero()&&(u=e.ONE),o=o.add(u),i=i.sub(c)}return o},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,r=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(r&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)),Pe){var r=(this.unsigned?Pe.rem_u:Pe.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.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)),Pe){var r=Pe.mul(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.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 n=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,l=65535&t.low,f=0,p=0,d=0,h=0;return d+=(h+=s*l)>>>16,h&=65535,p+=(d+=o*l)>>>16,d&=65535,p+=(d+=s*c)>>>16,d&=65535,f+=(p+=i*l)>>>16,p&=65535,f+=(p+=o*c)>>>16,p&=65535,f+=(p+=s*u)>>>16,p&=65535,f+=n*l+i*c+o*u+s*a,f&=65535,e.fromBits(d<<16|h,f<<16|p,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 r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>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)*xe+(this.low>>>0):this.high*xe+(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 r=e.fromNumber(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=e.fromNumber(Math.pow(t,6),this.unsigned),s=this,a="";;){var u=s.div(o),c=(s.sub(u.mul(o)).toInt()>>>0).toString(t);if((s=u).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},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,r){var n=e.fromString(t.$numberLong);return r&&r.relaxed?n.toNumber():n},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(De.prototype,"__isLong__",{value:!0}),Object.defineProperty(De.prototype,"_bsontype",{value:"Long"});var Re=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Ce=/^(\+|-)?(Infinity|inf)$/i,$e=/^(\+|-)?NaN$/i,Fe=6111,qe=-6176,Le=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Be=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ue=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ve=/^([-+])?(\d+)?$/;function ze(e){return!isNaN(parseInt(e,10))}function Qe(e){var t=De.fromNumber(1e9),r=De.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:r};for(var n=0;n<=3;n++)r=(r=r.shiftLeft(32)).add(new De(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function Ye(e,t){throw new O('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var We=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!x(t))throw new O("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new O("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var r,n=!1,i=!1,o=!1,s=0,a=0,u=0,c=0,l=0,f=[0],p=0,d=0,h=0,y=0,v=0,b=0,g=new De(0,0),_=new De(0,0),w=0;if(t.length>=7e3)throw new O(t+" not a valid Decimal128 string");var S=t.match(Re),E=t.match(Ce),I=t.match($e);if(!S&&!E&&!I||0===t.length)throw new O(t+" not a valid Decimal128 string");if(S){var T=S[2],j=S[4],P=S[5],x=S[6];j&&void 0===x&&Ye(t,"missing exponent power"),j&&void 0===T&&Ye(t,"missing exponent base"),void 0===j&&(P||x)&&Ye(t,"missing e before exponent")}if("+"!==t[w]&&"-"!==t[w]||(n="-"===t[w++]),!ze(t[w])&&"."!==t[w]){if("i"===t[w]||"I"===t[w])return new e(m.from(n?Be:Ue));if("N"===t[w])return new e(m.from(Le))}for(;ze(t[w])||"."===t[w];)"."!==t[w]?(p<34&&("0"!==t[w]||o)&&(o||(l=a),o=!0,f[d++]=parseInt(t[w],10),p+=1),o&&(u+=1),i&&(c+=1),a+=1,w+=1):(i&&Ye(t,"contains multiple periods"),i=!0,w+=1);if(i&&!a)throw new O(t+" not a valid Decimal128 string");if("e"===t[w]||"E"===t[w]){var A=t.substr(++w).match(Ve);if(!A||!A[2])return new e(m.from(Le));v=parseInt(A[0],10),w+=A[0].length}if(t[w])return new e(m.from(Le));if(h=0,p){if(y=p-1,1!==(s=u))for(;0===f[l+s-1];)s-=1}else h=0,y=0,f[0]=0,u=1,p=1,s=0;for(v<=c&&c-v>16384?v=qe:v-=c;v>Fe;){if((y+=1)-h>34){if(f.join("").match(/^0+$/)){v=Fe;break}Ye(t,"overflow")}v-=1}for(;v<qe||p<u;){if(0===y&&s<p){v=qe,s=0;break}if(p<u?u-=1:y-=1,v<Fe)v+=1;else{if(f.join("").match(/^0+$/)){v=Fe;break}Ye(t,"overflow")}}if(y-h+1<s){var N=a;i&&(l+=1,N+=1),n&&(l+=1,N+=1);var M=parseInt(t[l+y+1],10),k=0;if(M>=5&&(k=1,5===M))for(k=f[y]%2==1?1:0,b=l+y+2;b<N;b++)if(parseInt(t[b],10)){k=1;break}if(k)for(var D=y;D>=0;D--)if(++f[D]>9&&(f[D]=0,0===D)){if(!(v<Fe))return new e(m.from(n?Be:Ue));v+=1,f[D]=1}}if(g=De.fromNumber(0),_=De.fromNumber(0),0===s)g=De.fromNumber(0),_=De.fromNumber(0);else if(y-h<17)for(D=h,_=De.fromNumber(f[D++]),g=new De(0,0);D<=y;D++)_=(_=_.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]));else{for(D=h,g=De.fromNumber(f[D++]);D<=y-17;D++)g=(g=g.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]));for(_=De.fromNumber(f[D++]);D<=y;D++)_=(_=_.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]))}var R,C,$,F,q=function(e,t){if(!e&&!t)return{high:De.fromNumber(0),low:De.fromNumber(0)};var r=e.shiftRightUnsigned(32),n=new De(e.getLowBits(),0),i=t.shiftRightUnsigned(32),o=new De(t.getLowBits(),0),s=r.multiply(i),a=r.multiply(o),u=n.multiply(i),c=n.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new De(a.getLowBits(),0).add(u).add(c.shiftRightUnsigned(32)),{high:s=s.add(a.shiftRightUnsigned(32)),low:c=a.shiftLeft(32).add(new De(c.getLowBits(),0))}}(g,De.fromString("100000000000000000"));q.low=q.low.add(_),C=_,(($=(R=q.low).high>>>0)<(F=C.high>>>0)||$===F&&R.low>>>0<C.low>>>0)&&(q.high=q.high.add(De.fromNumber(1))),r=v+6176;var L={low:De.fromNumber(0),high:De.fromNumber(0)};q.high.shiftRightUnsigned(49).and(De.fromNumber(1)).equals(De.fromNumber(1))?(L.high=L.high.or(De.fromNumber(3).shiftLeft(61)),L.high=L.high.or(De.fromNumber(r).and(De.fromNumber(16383).shiftLeft(47))),L.high=L.high.or(q.high.and(De.fromNumber(0x7fffffffffff)))):(L.high=L.high.or(De.fromNumber(16383&r).shiftLeft(49)),L.high=L.high.or(q.high.and(De.fromNumber(562949953421311)))),L.low=q.low,n&&(L.high=L.high.or(De.fromString("9223372036854775808")));var B=m.alloc(16);return w=0,B[w++]=255&L.low.low,B[w++]=L.low.low>>8&255,B[w++]=L.low.low>>16&255,B[w++]=L.low.low>>24&255,B[w++]=255&L.low.high,B[w++]=L.low.high>>8&255,B[w++]=L.low.high>>16&255,B[w++]=L.low.high>>24&255,B[w++]=255&L.high.low,B[w++]=L.high.low>>8&255,B[w++]=L.high.low>>16&255,B[w++]=L.high.low>>24&255,B[w++]=255&L.high.high,B[w++]=L.high.high>>8&255,B[w++]=L.high.high>>16&255,B[w++]=L.high.high>>24&255,new e(B)},e.prototype.toString=function(){for(var e,t=0,r=new Array(36),n=0;n<r.length;n++)r[n]=0;var i,o,s,a=0,u=!1,c={parts:[0,0,0,0]},l=[];a=0;var f=this.bytes,p=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,d=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,h=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,y=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24;a=0,(new De(p,d),new De(h,y)).lessThan(De.ZERO)&&l.push("-");var v=y>>26&31;if(v>>3==3){if(30===v)return l.join("")+"Infinity";if(31===v)return"NaN";e=y>>15&16383,i=8+(y>>14&1)}else i=y>>14&7,e=y>>17&16383;var m=e-6176;if(c.parts[0]=(16383&y)+((15&i)<<14),c.parts[1]=h,c.parts[2]=d,c.parts[3]=p,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])u=!0;else for(s=3;s>=0;s--){var b=0,g=Qe(c);if(c=g.quotient,b=g.rem.low)for(o=8;o>=0;o--)r[9*s+o]=b%10,b=Math.floor(b/10)}if(u)t=1,r[a]=0;else for(t=36;!r[a];)t-=1,a+=1;var _=t-1+m;if(_>=34||_<=-7||m>0){if(t>34)return l.push("".concat(0)),m>0?l.push("E+".concat(m)):m<0&&l.push("E".concat(m)),l.join("");for(l.push("".concat(r[a++])),(t-=1)&&l.push("."),n=0;n<t;n++)l.push("".concat(r[a++]));l.push("E"),_>0?l.push("+".concat(_)):l.push("".concat(_))}else if(m>=0)for(n=0;n<t;n++)l.push("".concat(r[a++]));else{var w=t+m;if(w>0)for(n=0;n<w;n++)l.push("".concat(r[a++]));else l.push("0");for(l.push(".");w++<0;)l.push("0");for(n=0;n<t-Math.max(w-1,0);n++)l.push("".concat(r[a++]))}return l.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(We.prototype,"_bsontype",{value:"Decimal128"});var He=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,r){var n=parseFloat(t.$numberDouble);return r&&r.relaxed?n:new e(n)},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(He.prototype,"_bsontype",{value:"Double"});var Ke=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,r){return r&&r.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(Ke.prototype,"_bsontype",{value:"Int32"});var Ge=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(Ge.prototype,"_bsontype",{value:"MaxKey"});var Je=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(Je.prototype,"_bsontype",{value:"MinKey"});var Ze=new RegExp("^[0-9a-fA-F]{24}$"),Xe=null,et=Symbol("id"),tt=function(){function e(t){if(!(this instanceof e))return new e(t);var r;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new O("Argument passed in must have an id that is of type string or Buffer");r="toHexString"in t&&"function"==typeof t.toHexString?m.from(t.toHexString(),"hex"):t.id}else r=t;if(null==r||"number"==typeof r)this[et]=e.generate("number"==typeof r?r:void 0);else if(ArrayBuffer.isView(r)&&12===r.byteLength)this[et]=r instanceof m?r:C(r);else{if("string"!=typeof r)throw new O("Argument passed in does not match the accepted types");if(12===r.length){var n=m.from(r);if(12!==n.byteLength)throw new O("Argument passed in must be a string of 12 bytes");this[et]=n}else{if(24!==r.length||!Ze.test(r))throw new O("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[et]=m.from(r,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[et]},set:function(t){this[et]=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 r=e.getInc(),n=m.alloc(12);return n.writeUInt32BE(t,0),null===Xe&&(Xe=j(5)),n[4]=Xe[0],n[5]=Xe[1],n[6]=Xe[2],n[7]=Xe[3],n[8]=Xe[4],n[11]=255&r,n[10]=r>>8&255,n[9]=r>>16&255,n},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[et][11]===t[et][11]&&this[et].equals(t[et]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&x(this.id))return t===m.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 m.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var r=t.toHexString(),n=this.toHexString().toLowerCase();return"string"==typeof r&&r.toLowerCase()===n}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 r=m.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(t,0),new e(r)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new O("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(m.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(tt.prototype,"generate",{value:R((function(e){return tt.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(tt.prototype,"getInc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt.prototype,"get_inc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt,"get_inc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt.prototype,"_bsontype",{value:"ObjectID"});var rt=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this.pattern=t,this.options=(null!=r?r:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new w("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new w("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if("i"!==this.options[n]&&"m"!==this.options[n]&&"x"!==this.options[n]&&"l"!==this.options[n]&&"s"!==this.options[n]&&"u"!==this.options[n])throw new w("The regular expression option [".concat(this.options[n],"] 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 O("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(rt.prototype,"_bsontype",{value:"BSONRegExp"});var nt=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(nt.prototype,"_bsontype",{value:"Symbol"});var it=De,ot=function(e){function t(r,n){var i=this;return i instanceof t?(i=De.isLong(r)?e.call(this,r.low,r.high,!0)||this:D(r)&&void 0!==r.t&&void 0!==r.i?e.call(this,r.i,r.t,!0)||this:e.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(r,n)}return g(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(De.fromInt(e,!0))},t.fromNumber=function(e){return new t(De.fromNumber(e,!0))},t.fromBits=function(e,r){return new t(e,r)},t.fromString=function(e,r){return new t(De.fromString(e,!0,r))},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=De.MAX_UNSIGNED_VALUE,t}(it);function st(e){return D(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var at=2147483647,ut=-2147483648,ct=0x8000000000000000,lt=-0x8000000000000000,ft={$oid:tt,$binary:Se,$uuid:Se,$symbol:nt,$numberInt:Ke,$numberDecimal:We,$numberDouble:He,$numberLong:De,$minKey:Je,$maxKey:Ge,$regex:rt,$regularExpression:rt,$timestamp:ot};function pt(e,t){if(void 0===t&&(t={}),"number"==typeof e){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=ut&&e<=at)return new Ke(e);if(e>=lt&&e<=ct)return De.fromNumber(e)}return new He(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;for(var r=Object.keys(e).filter((function(t){return t.startsWith("$")&&null!=e[t]})),n=0;n<r.length;n++){var i=ft[r[n]];if(i)return i.fromExtendedJSON(e,t)}if(null!=e.$date){var o=e.$date,s=new Date;return t.legacy?"number"==typeof o?s.setTime(o):"string"==typeof o&&s.setTime(Date.parse(o)):"string"==typeof o?s.setTime(Date.parse(o)):De.isLong(o)?s.setTime(o.toNumber()):"number"==typeof o&&t.relaxed&&s.setTime(o),s}if(null!=e.$code){var a=Object.assign({},e);return e.$scope&&(a.$scope=pt(e.$scope)),Ie.fromExtendedJSON(e)}if(Te(e)||e.$dbPointer){var u=e.$ref?e:e.$dbPointer;if(u instanceof je)return u;var c=Object.keys(u).filter((function(e){return e.startsWith("$")})),l=!0;if(c.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(l=!1)})),l)return je.fromExtendedJSON(u)}return e}function dt(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function ht(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var r=t.seenObjects.findIndex((function(t){return t.obj===e}));if(-1!==r){var n=t.seenObjects.map((function(e){return e.propertyName})),i=n.slice(0,r).map((function(e){return"".concat(e," -> ")})).join(""),o=n[r],s=" -> "+n.slice(r+1,n.length-1).map((function(e){return"".concat(e," -> ")})).join(""),a=n[n.length-1],u=" ".repeat(i.length+o.length/2),c="-".repeat(s.length+(o.length+a.length)/2-1);throw new O("Converting circular structure to EJSON:\n"+" ".concat(i).concat(o).concat(s).concat(a,"\n")+" ".concat(u,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return ht(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||k(e)){var l=e.getTime(),f=l>-1&&l<2534023188e5;return t.legacy?t.relaxed&&f?{$date:e.getTime()}:{$date:dt(e)}:t.relaxed&&f?{$date:dt(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var p=e>=lt&&e<=ct;if(e>=ut&&e<=at)return{$numberInt:e.toString()};if(p)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||M(e)){var d=e.flags;if(void 0===d){var h=e.toString().match(/[gimuy]*$/);h&&(d=h[0])}return new rt(e.source,d).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new w("not an object instance");var r=e._bsontype;if(void 0===r){var n={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var o=ht(e[i],t);"__proto__"===i?Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):n[i]=o}finally{t.seenObjects.pop()}}return n}if(st(e)){var s=e;if("function"!=typeof s.toExtendedJSON){var a=mt[e._bsontype];if(!a)throw new O("Unrecognized or invalid _bsontype: "+e._bsontype);s=a(s)}return"Code"===r&&s.scope?s=new Ie(s.code,ht(s.scope,t)):"DBRef"===r&&s.oid&&(s=new je(ht(s.collection,t),ht(s.oid,t),ht(s.db,t),ht(s.fields,t))),s.toExtendedJSON(t)}throw new w("_bsontype must be a string, but was: "+typeof r)}(e,t):e}var yt,vt,mt={Binary:function(e){return new Se(e.value(),e.sub_type)},Code:function(e){return new Ie(e.code,e.scope)},DBRef:function(e){return new je(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new We(e.bytes)},Double:function(e){return new He(e.value)},Int32:function(e){return new Ke(e.value)},Long:function(e){return De.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 Ge},MinKey:function(){return new Je},ObjectID:function(e){return new tt(e)},ObjectId:function(e){return new tt(e)},BSONRegExp:function(e){return new rt(e.pattern,e.options)},Symbol:function(e){return new nt(e.value)},Timestamp:function(e){return ot.fromBits(e.low,e.high)}};!function(e){function t(e,t){var r=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof r.relaxed&&(r.strict=!r.relaxed),"boolean"==typeof r.strict&&(r.relaxed=!r.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new w("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return pt(t,r)}))}function r(e,t,r,n){null!=r&&"object"==typeof r&&(n=r,r=0),null==t||"object"!=typeof t||Array.isArray(t)||(n=t,t=void 0,r=0);var i=ht(e,Object.assign({relaxed:!0,legacy:!1},n,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,r)}e.parse=t,e.stringify=r,e.serialize=function(e,t){return t=t||{},JSON.parse(r(e,t))},e.deserialize=function(e,r){return r=r||{},t(JSON.stringify(e),r)}}(yt||(yt={}));var bt=E();function gt(e,t,r){var n=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)n+=_t(i.toString(),e[i],t,!0,r);else for(var o in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)n+=_t(o,e[o],t,!1,r);return n}function _t(e,t,r,n,i){switch(void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+m.byteLength(e,"utf8")+1+4+m.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=Y&&t<=Q&&t>=U&&t<=B?(null!=e?m.byteLength(e,"utf8")+1:0)+5:(null!=e?m.byteLength(e,"utf8")+1:0)+9;case"undefined":return n||!i?(null!=e?m.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?m.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||k(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||P(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+4+m.byteLength(t.code.toString(),"utf8")+1+gt(t.scope,r,i):(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+m.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var o=t;return o.sub_type===Se.SUBTYPE_BYTE_ARRAY?(null!=e?m.byteLength(e,"utf8")+1:0)+(o.position+1+4+1+4):(null!=e?m.byteLength(e,"utf8")+1:0)+(o.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+m.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?m.byteLength(e,"utf8")+1:0)+1+gt(s,r,i)}return t instanceof RegExp||M(t)?(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.pattern,"utf8")+1+m.byteLength(t.options,"utf8")+1:(null!=e?m.byteLength(e,"utf8")+1:0)+gt(t,r,i)+1;case"function":if(t instanceof RegExp||M(t)||"[object RegExp]"===String.call(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(r&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+4+m.byteLength(I(t),"utf8")+1+gt(t.scope,r,i);if(r)return(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+m.byteLength(I(t),"utf8")+1}return 0}vt=bt.Map?bt.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 r=e[t],n=r[0],i=r[1];this._keys.push(n),this._values[n]={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 r=e._keys[t++];return{value:void 0!==r?[r,e._values[r].v]:void 0,done:void 0===r}}}},e.prototype.forEach=function(e,t){t=t||this;for(var r=0;r<this._keys.length;r++){var n=this._keys[r];e.call(t,this._values[n].v,n,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 r=e._keys[t++];return{value:void 0!==r?r:void 0,done:void 0===r}}}},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 r=e._keys[t++];return{value:void 0!==r?e._values[r].v:void 0,done:void 0===r}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var wt=128,Ot=192,St=224,Et=240,It=248,Tt=192,jt=224,Pt=240,xt=128;function At(e,t,r){for(var n=0,i=t;i<r;i+=1){var o=e[i];if(n){if((o&Ot)!==xt)return!1;n-=1}else if(o&wt)if((o&St)===Tt)n=1;else if((o&Et)===jt)n=2;else{if((o&It)!==Pt)return!1;n=3}}return!n}var Nt=De.fromNumber(Q),Mt=De.fromNumber(Y),kt={};function Dt(e,t,r){var n=(t=null==t?{}:t)&&t.index?t.index:0,i=e[n]|e[n+1]<<8|e[n+2]<<16|e[n+3]<<24;if(i<5)throw new w("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new w("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new w("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+n>e.byteLength)throw new w("(bson size ".concat(i," + options.index ").concat(n," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[n+i-1])throw new w("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return Ct(e,n,t,r)}var Rt=/^\$ref$|^\$id$|^\$db$/;function Ct(e,t,r,n){void 0===n&&(n=!1);var i,o=null!=r.evalFunctions&&r.evalFunctions,s=null!=r.cacheFunctions&&r.cacheFunctions,a=null==r.fieldsAsRaw?null:r.fieldsAsRaw,u=null!=r.raw&&r.raw,c="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,l=null!=r.promoteBuffers&&r.promoteBuffers,f=null==r.promoteLongs||r.promoteLongs,p=null==r.promoteValues||r.promoteValues,d=null==r.validation?{utf8:!0}:r.validation,h=!0,y=new Set,v=d.utf8;if("boolean"==typeof v)i=v;else{h=!1;var b=Object.keys(v).map((function(e){return v[e]}));if(0===b.length)throw new w("UTF-8 validation setting cannot be empty");if("boolean"!=typeof b[0])throw new w("Invalid UTF-8 validation option, must specify boolean values");if(i=b[0],!b.every((function(e){return e===i})))throw new w("Invalid UTF-8 validation option - keys must be all true or all false")}if(!h)for(var g=0,O=Object.keys(v);g<O.length;g++){var S=O[g];y.add(S)}var E=t;if(e.length<5)throw new w("corrupt bson message < 5 bytes long");var I=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(I<5||I>e.length)throw new w("corrupt bson message");for(var T=n?[]:{},j=0,P=!n&&null,x=new DataView(e.buffer,e.byteOffset,e.byteLength);;){var A=e[t++];if(0===A)break;for(var N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.byteLength)throw new w("Bad BSON Document: illegal CString");var M,k=n?j++:e.toString("utf8",t,N);M=h||y.has(k)?i:!i,!1!==P&&"$"===k[0]&&(P=Rt.test(k));var D=void 0;if(t=N+1,A===H){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");D=Ft(e,t,t+Ae-1,M),t+=Ae}else if(A===X){var R=m.alloc(12);e.copy(R,0,t,t+12),D=new tt(R),t+=12}else if(A===ue&&!1===p)D=new Ke(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24);else if(A===ue)D=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;else if(A===W&&!1===p)D=new He(x.getFloat64(t,!0)),t+=8;else if(A===W)D=x.getFloat64(t,!0),t+=8;else if(A===te){var C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;D=new Date(new De(C,$).toNumber())}else if(A===ee){if(0!==e[t]&&1!==e[t])throw new w("illegal boolean type value");D=1===e[t++]}else if(A===K){var F=t;if((Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)<=0||Pe>e.length-t)throw new w("bad embedded document length in bson");if(u)D=e.slice(t,t+Pe);else{var q=r;h||(q=_(_({},r),{validation:{utf8:M}})),D=Ct(e,F,q,!1)}t+=Pe}else if(A===G){F=t;var L=r,B=t+(Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24);if(a&&a[k]){for(var U in L={},r)L[U]=r[U];L.raw=!0}if(h||(L=_(_({},L),{validation:{utf8:M}})),D=Ct(e,F,L,!0),0!==e[(t+=Pe)-1])throw new w("invalid array terminator byte");if(t!==B)throw new w("corrupted array bson")}else if(A===Z)D=void 0;else if(A===re)D=null;else if(A===le){C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;var V=new De(C,$);D=f&&!0===p&&V.lessThanOrEqual(Nt)&&V.greaterThanOrEqual(Mt)?V.toNumber():V}else if(A===fe){var z=m.alloc(16);e.copy(z,0,t,t+16),t+=16;var Q=new We(z);D="toObject"in Q&&"function"==typeof Q.toObject?Q.toObject():Q}else if(A===J){var Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,he=Y,ye=e[t++];if(Y<0)throw new w("Negative binary type element size found");if(Y>e.byteLength)throw new w("Binary type size larger than document size");if(null!=e.slice){if(ye===Se.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new w("Negative binary type element size found for subtype 0x02");if(Y>he-4)throw new w("Binary type with subtype 0x02 contains too long binary size");if(Y<he-4)throw new w("Binary type with subtype 0x02 contains too short binary size")}l&&p?D=e.slice(t,t+Y):(D=new Se(e.slice(t,t+Y),ye),ye===be&&(D=D.toUUID()))}else{var ve=m.alloc(Y);if(ye===Se.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new w("Negative binary type element size found for subtype 0x02");if(Y>he-4)throw new w("Binary type with subtype 0x02 contains too long binary size");if(Y<he-4)throw new w("Binary type with subtype 0x02 contains too short binary size")}for(N=0;N<Y;N++)ve[N]=e[t+N];D=l&&p?ve:ye===be?new Se(e.slice(t,t+Y),ye).toUUID():new Se(e.slice(t,t+Y),ye)}t+=Y}else if(A===ne&&!1===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");var me=e.toString("utf8",t,N);for(N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");var ge=e.toString("utf8",t,N);t=N+1;var _e=new Array(ge.length);for(N=0;N<ge.length;N++)switch(ge[N]){case"m":_e[N]="m";break;case"s":_e[N]="g";break;case"i":_e[N]="i"}D=new RegExp(me,_e.join(""))}else if(A===ne&&!0===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");for(me=e.toString("utf8",t,N),N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");ge=e.toString("utf8",t,N),t=N+1,D=new rt(me,ge)}else if(A===se){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");var we=Ft(e,t,t+Ae-1,M);D=p?we:new nt(we),t+=Ae}else if(A===ce)C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,D=new ot(C,$);else if(A===pe)D=new Je;else if(A===de)D=new Ge;else if(A===oe){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");var Oe=Ft(e,t,t+Ae-1,M);D=o?s?$t(Oe,kt,T):$t(Oe):new Ie(Oe),t+=Ae}else if(A===ae){var Ee=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(Ee<13)throw new w("code_w_scope total size shorter minimum expected length");if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");Oe=Ft(e,t,t+Ae-1,M),F=t+=Ae;var Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,xe=Ct(e,F,r,!1);if(t+=Pe,Ee<8+Pe+Ae)throw new w("code_w_scope total size is too short, truncating scope");if(Ee>8+Pe+Ae)throw new w("code_w_scope total size is too long, clips outer document");o?(D=s?$t(Oe,kt,T):$t(Oe)).scope=xe:D=new Ie(Oe,xe)}else{if(A!==ie)throw new w("Detected unknown BSON type ".concat(A.toString(16),' for fieldname "').concat(k,'"'));var Ae;if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");if(null!=d&&d.utf8&&!At(e,t,t+Ae-1))throw new w("Invalid UTF-8 string in BSON document");var Ne=e.toString("utf8",t,t+Ae-1);t+=Ae;var Me=m.alloc(12);e.copy(Me,0,t,t+12),R=new tt(Me),t+=12,D=new je(Ne,R)}"__proto__"===k?Object.defineProperty(T,k,{value:D,writable:!0,enumerable:!0,configurable:!0}):T[k]=D}if(I!==t-E){if(n)throw new w("corrupt array bson");throw new w("corrupt object bson")}if(!P)return T;if(Te(T)){var ke=Object.assign({},T);return delete ke.$ref,delete ke.$id,delete ke.$db,new je(T.$ref,T.$id,T.$db,ke)}return T}function $t(e,t,r){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(r)):new Function(e)}function Ft(e,t,r,n){var i=e.toString("utf8",t,r);if(n)for(var o=0;o<i.length;o++)if(65533===i.charCodeAt(o)){if(!At(e,t,r))throw new w("Invalid UTF-8 string in BSON document");break}return i}var qt=/\x00/,Lt=new Set(["$db","$ref","$id","$clusterTime"]);function Bt(e,t,r,n,i){e[n++]=H;var o=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8");e[(n=n+o+1)-1]=0;var s=e.write(r,n+4,void 0,"utf8");return e[n+3]=s+1>>24&255,e[n+2]=s+1>>16&255,e[n+1]=s+1>>8&255,e[n]=s+1&255,n=n+4+s,e[n++]=0,n}var Ut=new Uint8Array(8),Vt=new DataView(Ut.buffer,Ut.byteOffset,Ut.byteLength);function zt(e,t,r,n,i){return Number.isInteger(r)&&r>=U&&r<=B?(e[n++]=ue,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255):(e[n++]=W,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Vt.setFloat64(0,r,!0),e.set(Ut,n),n+=8),n}function Qt(e,t,r,n,i){return e[n++]=re,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Yt(e,t,r,n,i){return e[n++]=ee,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=r?1:0,n}function Wt(e,t,r,n,i){e[n++]=te,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=De.fromNumber(r.getTime()),s=o.getLowBits(),a=o.getHighBits();return e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=255&a,e[n++]=a>>8&255,e[n++]=a>>16&255,e[n++]=a>>24&255,n}function Ht(e,t,r,n,i){if(e[n++]=ne,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,r.source&&null!=r.source.match(qt))throw Error("value "+r.source+" must not contain null bytes");return n+=e.write(r.source,n,void 0,"utf8"),e[n++]=0,r.ignoreCase&&(e[n++]=105),r.global&&(e[n++]=115),r.multiline&&(e[n++]=109),e[n++]=0,n}function Kt(e,t,r,n,i){if(e[n++]=ne,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,null!=r.pattern.match(qt))throw Error("pattern "+r.pattern+" must not contain null bytes");return n+=e.write(r.pattern,n,void 0,"utf8"),e[n++]=0,n+=e.write(r.options.split("").sort().join(""),n,void 0,"utf8"),e[n++]=0,n}function Gt(e,t,r,n,i){return null===r?e[n++]=re:"MinKey"===r._bsontype?e[n++]=pe:e[n++]=de,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Jt(e,t,r,n,i){if(e[n++]=X,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,"string"==typeof r.id)e.write(r.id,n,void 0,"binary");else{if(!x(r.id))throw new O("object ["+JSON.stringify(r)+"] is not a valid ObjectId");e.set(r.id.subarray(0,12),n)}return n+12}function Zt(e,t,r,n,i){e[n++]=J,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.length;return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=he,e.set(C(r),n),n+o}function Xt(e,t,r,n,i,o,s,a,u,c){void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),void 0===c&&(c=[]);for(var l=0;l<c.length;l++)if(c[l]===r)throw new w("cyclic dependency detected");c.push(r),e[n++]=Array.isArray(r)?G:K,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var f=cr(e,r,i,n,o+1,s,a,c);return c.pop(),f}function er(e,t,r,n,i){return e[n++]=fe,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e.set(r.bytes.subarray(0,16),n),n+16}function tr(e,t,r,n,i){e[n++]="Long"===r._bsontype?le:ce,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.getLowBits(),s=r.getHighBits();return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,n}function rr(e,t,r,n,i){return r=r.valueOf(),e[n++]=ue,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255,n}function nr(e,t,r,n,i){return e[n++]=W,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Vt.setFloat64(0,r.value,!0),e.set(Ut,n),n+8}function ir(e,t,r,n,i,o,s){e[n++]=oe,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=I(r),u=e.write(a,n+4,void 0,"utf8")+1;return e[n]=255&u,e[n+1]=u>>8&255,e[n+2]=u>>16&255,e[n+3]=u>>24&255,n=n+4+u-1,e[n++]=0,n}function or(e,t,r,n,i,o,s,a,u){if(void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),r.scope&&"object"==typeof r.scope){e[n++]=ae,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var c=n,l="string"==typeof r.code?r.code:r.code.toString();n+=4;var f=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&f,e[n+1]=f>>8&255,e[n+2]=f>>16&255,e[n+3]=f>>24&255,e[n+4+f-1]=0,n=n+f+4;var p=cr(e,r.scope,i,n,o+1,s,a);n=p-1;var d=p-c;e[c++]=255&d,e[c++]=d>>8&255,e[c++]=d>>16&255,e[c++]=d>>24&255,e[n++]=0}else{e[n++]=oe,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,l=r.code.toString();var h=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&h,e[n+1]=h>>8&255,e[n+2]=h>>16&255,e[n+3]=h>>24&255,n=n+4+h-1,e[n++]=0}return n}function sr(e,t,r,n,i){e[n++]=J,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.value(!0),s=r.position;return r.sub_type===Se.SUBTYPE_BYTE_ARRAY&&(s+=4),e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=r.sub_type,r.sub_type===Se.SUBTYPE_BYTE_ARRAY&&(s-=4,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255),e.set(o,n),n+r.position}function ar(e,t,r,n,i){e[n++]=se,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=e.write(r.value,n+4,void 0,"utf8")+1;return e[n]=255&o,e[n+1]=o>>8&255,e[n+2]=o>>16&255,e[n+3]=o>>24&255,n=n+4+o-1,e[n++]=0,n}function ur(e,t,r,n,i,o,s){e[n++]=K,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=n,u={$ref:r.collection||r.namespace,$id:r.oid};null!=r.db&&(u.$db=r.db);var c=cr(e,u=Object.assign(u,r.fields),!1,n,i+1,o),l=c-a;return e[a++]=255&l,e[a++]=l>>8&255,e[a++]=l>>16&255,e[a++]=l>>24&255,c}function cr(e,t,r,n,i,o,s,a){void 0===r&&(r=!1),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=!1),void 0===s&&(s=!0),void 0===a&&(a=[]),n=n||0,(a=a||[]).push(t);var u,c=n+4;if(Array.isArray(t))for(var l=0;l<t.length;l++){var f="".concat(l);if("function"==typeof(null==(v=t[l])?void 0:v.toBSON)&&(v=v.toBSON()),"string"==typeof v)c=Bt(e,f,v,c,!0);else if("number"==typeof v)c=zt(e,f,v,c,!0);else{if("bigint"==typeof v)throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof v)c=Yt(e,f,v,c,!0);else if(v instanceof Date||k(v))c=Wt(e,f,v,c,!0);else if(void 0===v)c=Qt(e,f,0,c,!0);else if(null===v)c=Qt(e,f,0,c,!0);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c,!0);else if(x(v))c=Zt(e,f,v,c,!0);else if(v instanceof RegExp||M(v))c=Ht(e,f,v,c,!0);else if("object"==typeof v&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!0,a);else if("object"==typeof v&&st(v)&&"Decimal128"===v._bsontype)c=er(e,f,v,c,!0);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c,!0);else if("Double"===v._bsontype)c=nr(e,f,v,c,!0);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,!0);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s,!0);else if("Binary"===v._bsontype)c=sr(e,f,v,c,!0);else if("Symbol"===v._bsontype)c=ar(e,f,v,c,!0);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o,!0);else if("BSONRegExp"===v._bsontype)c=Kt(e,f,v,c,!0);else if("Int32"===v._bsontype)c=rr(e,f,v,c,!0);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c,!0);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}else if(t instanceof vt||(u=t,"[object Map]"===Object.prototype.toString.call(u)))for(var p=t.entries(),d=!1;!d;){var h=p.next();if(!(d=!!h.done)){f=h.value[0];var y=typeof(v=h.value[1]);if("string"==typeof f&&!Lt.has(f)){if(null!=f.match(qt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Bt(e,f,v,c);else if("number"===y)c=zt(e,f,v,c);else{if("bigint"===y||A(v)||N(v))throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Yt(e,f,v,c);else if(v instanceof Date||k(v))c=Wt(e,f,v,c);else if(null===v||void 0===v&&!1===s)c=Qt(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c);else if(x(v))c=Zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Ht(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===v._bsontype)c=er(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c);else if("Double"===v._bsontype)c=nr(e,f,v,c);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=sr(e,f,v,c);else if("Symbol"===v._bsontype)c=ar(e,f,v,c);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Kt(e,f,v,c);else if("Int32"===v._bsontype)c=rr(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new O("toBSON function did not return an object");for(var f in t){var v;if("function"==typeof(null==(v=t[f])?void 0:v.toBSON)&&(v=v.toBSON()),y=typeof v,"string"==typeof f&&!Lt.has(f)){if(null!=f.match(qt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Bt(e,f,v,c);else if("number"===y)c=zt(e,f,v,c);else{if("bigint"===y)throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Yt(e,f,v,c);else if(v instanceof Date||k(v))c=Wt(e,f,v,c);else if(void 0===v)!1===s&&(c=Qt(e,f,0,c));else if(null===v)c=Qt(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c);else if(x(v))c=Zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Ht(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===v._bsontype)c=er(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c);else if("Double"===v._bsontype)c=nr(e,f,v,c);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=sr(e,f,v,c);else if("Symbol"===v._bsontype)c=ar(e,f,v,c);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Kt(e,f,v,c);else if("Int32"===v._bsontype)c=rr(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}a.pop(),e[c++]=0;var m=c-n;return e[n++]=255&m,e[n++]=m>>8&255,e[n++]=m>>16&255,e[n++]=m>>24&255,c}var lr=17825792,fr=m.alloc(lr);function pr(e){fr.length<e&&(fr=m.alloc(e))}function dr(e,t){void 0===t&&(t={});var r="boolean"==typeof t.checkKeys&&t.checkKeys,n="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,o="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:lr;fr.length<o&&(fr=m.alloc(o));var s=cr(fr,e,r,0,0,n,i,[]),a=m.alloc(s);return fr.copy(a,0,0,a.length),a}function hr(e,t,r){void 0===r&&(r={});var n="boolean"==typeof r.checkKeys&&r.checkKeys,i="boolean"==typeof r.serializeFunctions&&r.serializeFunctions,o="boolean"!=typeof r.ignoreUndefined||r.ignoreUndefined,s="number"==typeof r.index?r.index:0,a=cr(fr,e,n,0,0,i,o);return fr.copy(t,s,0,a),s+a-1}function yr(e,t){return void 0===t&&(t={}),Dt(e instanceof m?e:C(e),t)}function vr(e,t){return void 0===t&&(t={}),gt(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function mr(e,t,r,n,i,o){for(var s=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},o),a=C(e),u=t,c=0;c<r;c++){var l=a[u]|a[u+1]<<8|a[u+2]<<16|a[u+3]<<24;s.index=u,n[i+c]=Dt(a,s),u+=l}return u}const br={Binary:Se,Code:Ie,DBRef:je,Decimal128:We,Double:He,Int32:Ke,Long:De,UUID:Ee,Map:vt,MaxKey:Ge,MinKey:Je,ObjectId:tt,ObjectID:tt,BSONRegExp:rt,BSONSymbol:nt,Timestamp:ot,EJSON:yt,setInternalBufferSize:pr,serialize:dr,serializeWithBufferAndIndex:hr,deserialize:yr,calculateObjectSize:vr,deserializeStream:mr,BSONError:w,BSONTypeError:O}},2091:function(e,t,r){var n,i;i=function(e){var t=["N","E","A","D"];function r(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function n(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,r){i.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function s(e,t){s.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function a(e,t,r){a.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function u(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),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 l(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}function f(e){var t=0,r=c(e);if("array"===r)return e.forEach((function(e){t+=f(e)})),t+l("[type: array, hash: "+t+"]");if("object"===r){for(var n in e)if(e.hasOwnProperty(n)){var i="[ type: object, key: "+n+", value hash: "+f(e[n])+"]";t+=l(i)}return t}return t+l("[ type: "+r+" ; value: "+e+"]")}function p(e,t,r,n,u,l,d,h){r=r||[],d=d||[];var y=(u=u||[]).slice(0);if(null!=l){if(n){if("function"==typeof n&&n(y,l))return;if("object"==typeof n){if(n.prefilter&&n.prefilter(y,l))return;if(n.normalize){var v=n.normalize(y,l,e,t);v&&(e=v[0],t=v[1])}}}y.push(l)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var m,b,g,_,w=typeof e,O=typeof t,S="undefined"!==w||d&&d.length>0&&d[d.length-1].lhs&&Object.getOwnPropertyDescriptor(d[d.length-1].lhs,l),E="undefined"!==O||d&&d.length>0&&d[d.length-1].rhs&&Object.getOwnPropertyDescriptor(d[d.length-1].rhs,l);if(!S&&E)r.push(new o(y,t));else if(!E&&S)r.push(new s(y,e));else if(c(e)!==c(t))r.push(new i(y,e,t));else if("date"===c(e)&&e-t!=0)r.push(new i(y,e,t));else if("object"===w&&null!==e&&null!==t){for(m=d.length-1;m>-1;--m)if(d[m].lhs===e){_=!0;break}if(_)e!==t&&r.push(new i(y,e,t));else{if(d.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return f(e)-f(t)})),t.sort((function(e,t){return f(e)-f(t)}))),m=t.length-1,b=e.length-1;m>b;)r.push(new a(y,m,new o(void 0,t[m--])));for(;b>m;)r.push(new a(y,b,new s(void 0,e[b--])));for(;m>=0;--m)p(e[m],t[m],r,n,y,m,d,h)}else{var I=Object.keys(e),T=Object.keys(t);for(m=0;m<I.length;++m)g=I[m],(_=T.indexOf(g))>=0?(p(e[g],t[g],r,n,y,g,d,h),T[_]=null):p(e[g],void 0,r,n,y,g,d,h);for(m=0;m<T.length;++m)(g=T[m])&&p(void 0,t[g],r,n,y,g,d,h)}d.length=d.length-1}}else e!==t&&("number"===w&&isNaN(e)&&isNaN(t)||r.push(new i(y,e,t)))}function d(e,t,r,n,i){var o=[];if(p(e,t,o,n,null,null,null,i),r)for(var s=0;s<o.length;++s)r(o[s]);return o}function h(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r);return n||(i.length?i:void 0)}function y(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":y(i[r.path[n]],r.index,r.item);break;case"D":delete i[r.path[n]];break;case"E":case"N":i[r.path[n]]=r.rhs}}else switch(r.kind){case"A":y(e[t],r.index,r.item);break;case"D":e=u(e,t);break;case"E":case"N":e[t]=r.rhs}return e}function v(e,r,n){if(void 0===n&&r&&~t.indexOf(r.kind)&&(n=r),e&&n&&n.kind){for(var i=e,o=-1,s=n.path?n.path.length-1:0;++o<s;)void 0===i[n.path[o]]&&(i[n.path[o]]=void 0!==n.path[o+1]&&"number"==typeof n.path[o+1]?[]:{}),i=i[n.path[o]];switch(n.kind){case"A":n.path&&void 0===i[n.path[o]]&&(i[n.path[o]]=[]),y(n.path?i[n.path[o]]:i,n.index,n.item);break;case"D":delete i[n.path[o]];break;case"E":case"N":i[n.path[o]]=n.rhs}}}function m(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":m(i[r.path[n]],r.index,r.item);break;case"D":case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}else switch(r.kind){case"A":m(e[t],r.index,r.item);break;case"D":case"E":e[t]=r.lhs;break;case"N":e=u(e,t)}return e}return r(i,n),r(o,n),r(s,n),r(a,n),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r,!0);return n||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:d,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,r,n,i,o,s){return p(e,t,r,n,i,o,s,!0)},enumerable:!0},orderIndepHash:{value:f,enumerable:!0},applyDiff:{value:function(e,t,r){e&&t&&d(e,t,(function(n){r&&!r(e,t,n)||v(e,t,n)}))},enumerable:!0},applyChange:{value:v,enumerable:!0},revertChange:{value:function(e,t,r){if(e&&t&&r&&r.kind){var n,i,o=e;for(i=r.path.length-1,n=0;n<i;n++)void 0===o[r.path[n]]&&(o[r.path[n]]={}),o=o[r.path[n]];switch(r.kind){case"A":m(o[r.path[n]],r.index,r.item);break;case"D":case"E":o[r.path[n]]=r.lhs;break;case"N":delete o[r.path[n]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e&&(e.DeepDiff=h),h}(this),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},6471:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},8784:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",v="[object Array]",m="[object Boolean]",b="[object Date]",g="[object Error]",_="[object Function]",w="[object GeneratorFunction]",O="[object Map]",S="[object Number]",E="[object Object]",I="[object Promise]",T="[object RegExp]",j="[object Set]",P="[object String]",x="[object Symbol]",A="[object WeakMap]",N="[object ArrayBuffer]",M="[object DataView]",k="[object Float32Array]",D="[object Float64Array]",R="[object Int8Array]",C="[object Int16Array]",$="[object Int32Array]",F="[object Uint8Array]",q="[object Uint8ClampedArray]",L="[object Uint16Array]",B="[object Uint32Array]",U=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,W=RegExp(Q.source),H=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ge=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Oe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\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",Pe="["+we+"]",xe="["+je+"]",Ae="["+Oe+"]",Ne="\\d+",Me="["+Se+"]",ke="["+Ee+"]",De="[^"+we+je+Ne+Se+Ee+Ie+"]",Re="\\ud83c[\\udffb-\\udfff]",Ce="[^"+we+"]",$e="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Ie+"]",Le="\\u200d",Be="(?:"+ke+"|"+De+")",Ue="(?:"+qe+"|"+De+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Ae+"|"+Re+")?",Ye="["+Te+"]?",We=Ye+Qe+"(?:"+Le+"(?:"+[Ce,$e,Fe].join("|")+")"+Ye+Qe+")*",He="(?:"+[Me,$e,Fe].join("|")+")"+We,Ke="(?:"+[Ce+Ae+"?",Ae,$e,Fe,Pe].join("|")+")",Ge=RegExp("['’]","g"),Je=RegExp(Ae,"g"),Ze=RegExp(Re+"(?="+Re+")|"+Ke+We,"g"),Xe=RegExp([qe+"?"+ke+"+"+Ve+"(?="+[xe,qe,"$"].join("|")+")",Ue+"+"+ze+"(?="+[xe,qe+Be,"$"].join("|")+")",qe+"?"+Be+"+"+Ve,qe+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,He].join("|"),"g"),et=RegExp("["+Le+we+Oe+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["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"],nt=-1,it={};it[k]=it[D]=it[R]=it[C]=it[$]=it[F]=it[q]=it[L]=it[B]=!0,it[y]=it[v]=it[N]=it[m]=it[M]=it[b]=it[g]=it[_]=it[O]=it[S]=it[E]=it[T]=it[j]=it[P]=it[A]=!1;var ot={};ot[y]=ot[v]=ot[N]=ot[M]=ot[m]=ot[b]=ot[k]=ot[D]=ot[R]=ot[C]=ot[$]=ot[O]=ot[S]=ot[E]=ot[T]=ot[j]=ot[P]=ot[x]=ot[F]=ot[q]=ot[L]=ot[B]=!0,ot[g]=ot[_]=ot[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),pt=t&&!t.nodeType&&t,dt=pt&&e&&!e.nodeType&&e,ht=dt&&dt.exports===pt,yt=ht&&ct.process,vt=function(){try{return dt&&dt.require&&dt.require("util").types||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),mt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,gt=vt&&vt.isMap,_t=vt&&vt.isRegExp,wt=vt&&vt.isSet,Ot=vt&&vt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Et(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function It(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Tt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function jt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Pt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function xt(e,t){return!(null==e||!e.length)&&qt(e,t,0)>-1}function At(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Nt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Mt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function kt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Dt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Rt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ct=Vt("length");function $t(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Ft(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function qt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Ft(e,Bt,r)}function Lt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Bt(e){return e!=e}function Ut(e,t){var r=null==e?0:e.length;return r?Yt(e,t)/r:p}function Vt(e){return function(t){return null==t?i:t[e]}}function zt(e){return function(t){return null==e?i:e[t]}}function Qt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Yt(e,t){for(var r,n=-1,o=e.length;++n<o;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Wt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ht(e){return e?e.slice(0,fr(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function Gt(e,t){return Nt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Zt(e,t){for(var r=-1,n=e.length;++r<n&&qt(t,e[r],0)>-1;);return r}function Xt(e,t){for(var r=e.length;r--&&qt(t,e[r],0)>-1;);return r}var er=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"}),tr=zt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rr(e){return"\\"+st[e]}function nr(e){return et.test(e)}function ir(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function or(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function cr(e){return nr(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Ct(e)}function lr(e){return nr(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function fr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var pr=zt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),dr=function e(t){var r,n=(t=null==t?ft:dr.defaults(ft.Object(),t,dr.pick(ft,rt))).Array,ie=t.Date,we=t.Error,Oe=t.Function,Se=t.Math,Ee=t.Object,Ie=t.RegExp,Te=t.String,je=t.TypeError,Pe=n.prototype,xe=Oe.prototype,Ae=Ee.prototype,Ne=t["__core-js_shared__"],Me=xe.toString,ke=Ae.hasOwnProperty,De=0,Re=(r=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ce=Ae.toString,$e=Me.call(Ee),Fe=ft._,qe=Ie("^"+Me.call(ke).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=ht?t.Buffer:i,Be=t.Symbol,Ue=t.Uint8Array,Ve=Le?Le.allocUnsafe:i,ze=or(Ee.getPrototypeOf,Ee),Qe=Ee.create,Ye=Ae.propertyIsEnumerable,We=Pe.splice,He=Be?Be.isConcatSpreadable:i,Ke=Be?Be.iterator:i,Ze=Be?Be.toStringTag:i,et=function(){try{var e=uo(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==ft.Date.now&&ie.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=Se.ceil,dt=Se.floor,yt=Ee.getOwnPropertySymbols,vt=Le?Le.isBuffer:i,Ct=t.isFinite,zt=Pe.join,hr=or(Ee.keys,Ee),yr=Se.max,vr=Se.min,mr=ie.now,br=t.parseInt,gr=Se.random,_r=Pe.reverse,wr=uo(t,"DataView"),Or=uo(t,"Map"),Sr=uo(t,"Promise"),Er=uo(t,"Set"),Ir=uo(t,"WeakMap"),Tr=uo(Ee,"create"),jr=Ir&&new Ir,Pr={},xr=$o(wr),Ar=$o(Or),Nr=$o(Sr),Mr=$o(Er),kr=$o(Ir),Dr=Be?Be.prototype:i,Rr=Dr?Dr.valueOf:i,Cr=Dr?Dr.toString:i;function $r(e){if(ea(e)&&!Vs(e)&&!(e instanceof Br)){if(e instanceof Lr)return e;if(ke.call(e,"__wrapped__"))return Fo(e)}return new Lr(e)}var Fr=function(){function e(){}return function(t){if(!Xs(t))return{};if(Qe)return Qe(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function qr(){}function Lr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Br(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Ur(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new zr;++t<r;)this.add(e[t])}function Yr(e){var t=this.__data__=new Vr(e);this.size=t.size}function Wr(e,t){var r=Vs(e),n=!r&&Us(e),i=!r&&!n&&Ws(e),o=!r&&!n&&!i&&ua(e),s=r||n||i||o,a=s?Wt(e.length,Te):[],u=a.length;for(var c in e)!t&&!ke.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,u))||a.push(c);return a}function Hr(e){var t=e.length;return t?e[Qn(0,t-1)]:i}function Kr(e,t){return Mo(Ti(e),on(t,0,e.length))}function Gr(e){return Mo(Ti(e))}function Jr(e,t,r){(r!==i&&!qs(e[t],r)||r===i&&!(t in e))&&rn(e,t,r)}function Zr(e,t,r){var n=e[t];ke.call(e,t)&&qs(n,r)&&(r!==i||t in e)||rn(e,t,r)}function Xr(e,t){for(var r=e.length;r--;)if(qs(e[r][0],t))return r;return-1}function en(e,t,r,n){return ln(e,(function(e,i,o){t(n,e,r(e),o)})),n}function tn(e,t){return e&&ji(t,Aa(t),e)}function rn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nn(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Ia(e,t[r]);return s}function on(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function sn(e,t,r,n,o,s){var a,u=1&t,c=2&t,l=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!Xs(e))return e;var f=Vs(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&ke.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Ti(e,a)}else{var p=fo(e),d=p==_||p==w;if(Ws(e))return _i(e,u);if(p==E||p==y||d&&!o){if(a=c||d?{}:ho(e),!u)return c?function(e,t){return ji(e,lo(e),t)}(e,function(e,t){return e&&ji(t,Na(t),e)}(a,e)):function(e,t){return ji(e,co(e),t)}(e,tn(a,e))}else{if(!ot[p])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case N:return wi(e);case m:case b:return new i(+e);case M:return function(e,t){var r=t?wi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case k:case D:case R:case C:case $:case F:case q:case L:case B:return Oi(e,r);case O:return new i;case S:case P:return new i(e);case T:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new i;case x:return n=e,Rr?Ee(Rr.call(n)):{}}}(e,p,u)}}s||(s=new Yr);var h=s.get(e);if(h)return h;s.set(e,a),oa(e)?e.forEach((function(n){a.add(sn(n,t,r,n,e,s))})):ta(e)&&e.forEach((function(n,i){a.set(i,sn(n,t,r,i,e,s))}));var v=f?i:(l?c?to:eo:c?Na:Aa)(e);return It(v||e,(function(n,i){v&&(n=e[i=n]),Zr(a,i,sn(n,t,r,i,e,s))})),a}function an(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ee(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new je(o);return Po((function(){e.apply(i,r)}),t)}function cn(e,t,r,n){var i=-1,o=xt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Nt(t,Kt(r))),n?(o=At,s=!1):t.length>=200&&(o=Jt,s=!1,t=new Qr(t));e:for(;++i<a;){var l=e[i],f=null==r?l:r(l);if(l=n||0!==l?l:0,s&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else o(t,f,n)||u.push(l)}return u}$r.templateSettings={escape:K,evaluate:G,interpolate:J,variable:"",imports:{_:$r}},$r.prototype=qr.prototype,$r.prototype.constructor=$r,Lr.prototype=Fr(qr.prototype),Lr.prototype.constructor=Lr,Br.prototype=Fr(qr.prototype),Br.prototype.constructor=Br,Ur.prototype.clear=function(){this.__data__=Tr?Tr(null):{},this.size=0},Ur.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ur.prototype.get=function(e){var t=this.__data__;if(Tr){var r=t[e];return r===s?i:r}return ke.call(t,e)?t[e]:i},Ur.prototype.has=function(e){var t=this.__data__;return Tr?t[e]!==i:ke.call(t,e)},Ur.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tr&&t===i?s:t,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(e){var t=this.__data__,r=Xr(t,e);return!(r<0||(r==t.length-1?t.pop():We.call(t,r,1),--this.size,0))},Vr.prototype.get=function(e){var t=this.__data__,r=Xr(t,e);return r<0?i:t[r][1]},Vr.prototype.has=function(e){return Xr(this.__data__,e)>-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=Xr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},zr.prototype.clear=function(){this.size=0,this.__data__={hash:new Ur,map:new(Or||Vr),string:new Ur}},zr.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},zr.prototype.get=function(e){return so(this,e).get(e)},zr.prototype.has=function(e){return so(this,e).has(e)},zr.prototype.set=function(e,t){var r=so(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Qr.prototype.add=Qr.prototype.push=function(e){return this.__data__.set(e,s),this},Qr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Yr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Yr.prototype.get=function(e){return this.__data__.get(e)},Yr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!Or||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zr(n)}return r.set(e,t),this.size=r.size,this};var ln=Ai(bn),fn=Ai(gn,!0);function pn(e,t){var r=!0;return ln(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function dn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(u===i?a==a&&!aa(a):r(a,u)))var u=a,c=s}return c}function hn(e,t){var r=[];return ln(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function yn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=yo),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?yn(a,t-1,r,n,i):Mt(i,a):n||(i[i.length]=a)}return i}var vn=Ni(),mn=Ni(!0);function bn(e,t){return e&&vn(e,t,Aa)}function gn(e,t){return e&&mn(e,t,Aa)}function _n(e,t){return Pt(t,(function(t){return Gs(e[t])}))}function wn(e,t){for(var r=0,n=(t=vi(t,e)).length;null!=e&&r<n;)e=e[Co(t[r++])];return r&&r==n?e:i}function On(e,t,r){var n=t(e);return Vs(e)?n:Mt(n,r(e))}function Sn(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Ee(e)?function(e){var t=ke.call(e,Ze),r=e[Ze];try{e[Ze]=i;var n=!0}catch(e){}var o=Ce.call(e);return n&&(t?e[Ze]=r:delete e[Ze]),o}(e):function(e){return Ce.call(e)}(e)}function En(e,t){return e>t}function In(e,t){return null!=e&&ke.call(e,t)}function Tn(e,t){return null!=e&&t in Ee(e)}function jn(e,t,r){for(var o=r?At:xt,s=e[0].length,a=e.length,u=a,c=n(a),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=Nt(p,Kt(t))),l=vr(p.length,l),c[u]=!r&&(t||s>=120&&p.length>=120)?new Qr(u&&p):i}p=e[0];var d=-1,h=c[0];e:for(;++d<s&&f.length<l;){var y=p[d],v=t?t(y):y;if(y=r||0!==y?y:0,!(h?Jt(h,v):o(f,v,r))){for(u=a;--u;){var m=c[u];if(!(m?Jt(m,v):o(e[u],v,r)))continue e}h&&h.push(v),f.push(y)}}return f}function Pn(e,t,r){var n=null==(e=Io(e,t=vi(t,e)))?e:e[Co(Ko(t))];return null==n?i:St(n,e,r)}function xn(e){return ea(e)&&Sn(e)==y}function An(e,t,r,n,o){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=Vs(e),u=Vs(t),c=a?v:fo(e),l=u?v:fo(t),f=(c=c==y?E:c)==E,p=(l=l==y?E:l)==E,d=c==l;if(d&&Ws(e)){if(!Ws(t))return!1;a=!0,f=!1}if(d&&!f)return s||(s=new Yr),a||ua(e)?Zi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case M:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case m:case b:case S:return qs(+e,+t);case g:return e.name==t.name&&e.message==t.message;case T:case P:return e==t+"";case O:var a=ir;case j:var u=1&n;if(a||(a=ar),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var l=Zi(a(e),a(t),n,i,o,s);return s.delete(e),l;case x:if(Rr)return Rr.call(e)==Rr.call(t)}return!1}(e,t,c,r,n,o,s);if(!(1&r)){var h=f&&ke.call(e,"__wrapped__"),_=p&&ke.call(t,"__wrapped__");if(h||_){var w=h?e.value():e,I=_?t.value():t;return s||(s=new Yr),o(w,I,r,n,s)}}return!!d&&(s||(s=new Yr),function(e,t,r,n,o,s){var a=1&r,u=eo(e),c=u.length;if(c!=eo(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:ke.call(t,f)))return!1}var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var h=!0;s.set(e,t),s.set(t,e);for(var y=a;++l<c;){var v=e[f=u[l]],m=t[f];if(n)var b=a?n(m,v,f,t,e,s):n(v,m,f,e,t,s);if(!(b===i?v===m||o(v,m,r,n,s):b)){h=!1;break}y||(y="constructor"==f)}if(h&&!y){var g=e.constructor,_=t.constructor;g==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,r,n,o,s))}(e,t,r,n,An,o))}function Nn(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Ee(e);o--;){var u=r[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=r[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var p=new Yr;if(n)var d=n(l,f,c,e,t,p);if(!(d===i?An(f,l,3,n,p):d))return!1}}return!0}function Mn(e){return!(!Xs(e)||(t=e,Re&&Re in t))&&(Gs(e)?qe:ye).test($o(e));var t}function kn(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Vs(e)?Fn(e[0],e[1]):$n(e):fu(e)}function Dn(e){if(!wo(e))return hr(e);var t=[];for(var r in Ee(e))ke.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Rn(e,t){return e<t}function Cn(e,t){var r=-1,i=Qs(e)?n(e.length):[];return ln(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function $n(e){var t=ao(e);return 1==t.length&&t[0][2]?So(t[0][0],t[0][1]):function(r){return r===e||Nn(r,e,t)}}function Fn(e,t){return bo(e)&&Oo(t)?So(Co(e),t):function(r){var n=Ia(r,e);return n===i&&n===t?Ta(r,e):An(t,n,3)}}function qn(e,t,r,n,o){e!==t&&vn(t,(function(s,a){if(o||(o=new Yr),Xs(s))!function(e,t,r,n,o,s,a){var u=To(e,r),c=To(t,r),l=a.get(c);if(l)Jr(e,r,l);else{var f=s?s(u,c,r+"",e,t,a):i,p=f===i;if(p){var d=Vs(c),h=!d&&Ws(c),y=!d&&!h&&ua(c);f=c,d||h||y?Vs(u)?f=u:Ys(u)?f=Ti(u):h?(p=!1,f=_i(c,!0)):y?(p=!1,f=Oi(c,!0)):f=[]:na(c)||Us(c)?(f=u,Us(u)?f=va(u):Xs(u)&&!Gs(u)||(f=ho(c))):p=!1}p&&(a.set(c,f),o(f,c,n,s,a),a.delete(c)),Jr(e,r,f)}}(e,t,a,r,qn,n,o);else{var u=n?n(To(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Jr(e,a,u)}}),Na)}function Ln(e,t){var r=e.length;if(r)return vo(t+=t<0?r:0,r)?e[t]:i}function Bn(e,t,r){t=t.length?Nt(t,(function(e){return Vs(e)?function(t){return wn(t,1===e.length?e[0]:e)}:e})):[ru];var n=-1;t=Nt(t,Kt(oo()));var i=Cn(e,(function(e,r,i){var o=Nt(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=Si(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Un(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=wn(e,s);r(a,s)&&Gn(o,vi(s,e),a)}return o}function Vn(e,t,r,n){var i=n?Lt:qt,o=-1,s=t.length,a=e;for(e===t&&(t=Ti(t)),r&&(a=Nt(e,Kt(r)));++o<s;)for(var u=0,c=t[o],l=r?r(c):c;(u=i(a,l,u,n))>-1;)a!==e&&We.call(a,u,1),We.call(e,u,1);return e}function zn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;vo(i)?We.call(e,i,1):ui(e,i)}}return e}function Qn(e,t){return e+dt(gr()*(t-e+1))}function Yn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=dt(t/2))&&(e+=e)}while(t);return r}function Wn(e,t){return xo(Eo(e,t,ru),e+"")}function Hn(e){return Hr(qa(e))}function Kn(e,t){var r=qa(e);return Mo(r,on(t,0,r.length))}function Gn(e,t,r,n){if(!Xs(e))return e;for(var o=-1,s=(t=vi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=Co(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=n?n(f,c,u):i)===i&&(l=Xs(f)?f:vo(t[o+1])?[]:{})}Zr(u,c,l),u=u[c]}return e}var Jn=jr?function(e,t){return jr.set(e,t),e}:ru,Zn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Xa(t),writable:!0})}:ru;function Xn(e){return Mo(qa(e))}function ei(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ti(e,t){var r;return ln(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ri(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!aa(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ni(e,t,ru,r)}function ni(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,c=aa(t),l=t===i;o<s;){var f=dt((o+s)/2),p=r(e[f]),d=p!==i,h=null===p,y=p==p,v=aa(p);if(a)var m=n||y;else m=l?y&&(n||d):u?y&&d&&(n||!h):c?y&&d&&!h&&(n||!v):!h&&!v&&(n?p<=t:p<t);m?o=f+1:s=f}return vr(s,4294967294)}function ii(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!qs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function oi(e){return"number"==typeof e?e:aa(e)?p:+e}function si(e){if("string"==typeof e)return e;if(Vs(e))return Nt(e,si)+"";if(aa(e))return Cr?Cr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ai(e,t,r){var n=-1,i=xt,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=At;else if(o>=200){var c=t?null:Yi(e);if(c)return ar(c);s=!1,i=Jt,u=new Qr}else u=t?[]:a;e:for(;++n<o;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,s&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,r)||(u!==a&&u.push(f),a.push(l))}return a}function ui(e,t){return null==(e=Io(e,t=vi(t,e)))||delete e[Co(Ko(t))]}function ci(e,t,r,n){return Gn(e,t,r(wn(e,t)),n)}function li(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ei(e,n?0:o,n?o+1:i):ei(e,n?o+1:0,n?i:o)}function fi(e,t){var r=e;return r instanceof Br&&(r=r.value()),kt(t,(function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))}),r)}function pi(e,t,r){var i=e.length;if(i<2)return i?ai(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=cn(s[o]||a,e[u],t,r));return ai(yn(s,1),t,r)}function di(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var u=n<s?t[n]:i;r(a,e[n],u)}return a}function hi(e){return Ys(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function vi(e,t){return Vs(e)?e:bo(e,t)?[e]:Ro(ma(e))}var mi=Wn;function bi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ei(e,t,r)}var gi=st||function(e){return ft.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function wi(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Oi(e,t){var r=t?wi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Si(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=aa(e),a=t!==i,u=null===t,c=t==t,l=aa(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||n&&a&&c||!r&&c||!o)return 1;if(!n&&!s&&!l&&e<t||l&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function Ei(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,c=t.length,l=yr(s-a,0),f=n(c+l),p=!i;++u<c;)f[u]=t[u];for(;++o<a;)(p||o<s)&&(f[r[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Ii(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,c=-1,l=t.length,f=yr(s-u,0),p=n(f+l),d=!i;++o<f;)p[o]=e[o];for(var h=o;++c<l;)p[h+c]=t[c];for(;++a<u;)(d||o<s)&&(p[h+r[a]]=e[o++]);return p}function Ti(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function ji(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=n?n(r[u],e[u],u,r,e):i;c===i&&(c=e[u]),o?rn(r,u,c):Zr(r,u,c)}return r}function Pi(e,t){return function(r,n){var i=Vs(r)?Et:en,o=t?t():{};return i(r,e,oo(n,2),o)}}function xi(e){return Wn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&mo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t}))}function Ai(e,t){return function(r,n){if(null==r)return r;if(!Qs(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Ee(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Ni(e){return function(t,r,n){for(var i=-1,o=Ee(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Mi(e){return function(t){var r=nr(t=ma(t))?lr(t):i,n=r?r[0]:t.charAt(0),o=r?bi(r,1).join(""):t.slice(1);return n[e]()+o}}function ki(e){return function(t){return kt(Ga(Ua(t).replace(Ge,"")),e,"")}}function Di(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 r=Fr(e.prototype),n=e.apply(r,t);return Xs(n)?n:r}}function Ri(e){return function(t,r,n){var o=Ee(t);if(!Qs(t)){var s=oo(r,3);t=Aa(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function Ci(e){return Xi((function(t){var r=t.length,n=r,s=Lr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new je(o);if(s&&!u&&"wrapper"==no(a))var u=new Lr([],!0)}for(n=u?n:r;++n<r;){var c=no(a=t[n]),l="wrapper"==c?ro(a):i;u=l&&go(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[no(l[0])].apply(u,l[3]):1==a.length&&go(a)?u[c]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Vs(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function $i(e,t,r,o,s,a,u,l,f,p){var d=t&c,h=1&t,y=2&t,v=24&t,m=512&t,b=y?i:Di(e);return function c(){for(var g=arguments.length,_=n(g),w=g;w--;)_[w]=arguments[w];if(v)var O=io(c),S=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(_,O);if(o&&(_=Ei(_,o,s,v)),a&&(_=Ii(_,a,u,v)),g-=S,v&&g<p){var E=sr(_,O);return zi(e,t,$i,c.placeholder,r,_,E,l,f,p-g)}var I=h?r:this,T=y?I[e]:e;return g=_.length,l?_=function(e,t){for(var r=e.length,n=vr(t.length,r),o=Ti(e);n--;){var s=t[n];e[n]=vo(s,r)?o[s]:i}return e}(_,l):m&&g>1&&_.reverse(),d&&f<g&&(_.length=f),this&&this!==ft&&this instanceof c&&(T=b||Di(T)),T.apply(I,_)}}function Fi(e,t){return function(r,n){return function(e,t,r,n){return bn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function qi(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=si(r),n=si(n)):(r=oi(r),n=oi(n)),o=e(r,n)}return o}}function Li(e){return Xi((function(t){return t=Nt(t,Kt(oo())),Wn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Bi(e,t){var r=(t=t===i?" ":si(t)).length;if(r<2)return r?Yn(t,e):t;var n=Yn(t,pt(e/cr(t)));return nr(t)?bi(lr(n),0,e).join(""):n.slice(0,e)}function Ui(e){return function(t,r,o){return o&&"number"!=typeof o&&mo(t,r,o)&&(r=o=i),t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r,i){for(var o=-1,s=yr(pt((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:pa(o),e)}}function Vi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function zi(e,t,r,n,o,s,a,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var d=[e,t,o,p?s:i,p?a:i,p?i:s,p?i:a,c,l,f],h=r.apply(i,d);return go(e)&&jo(h,d),h.placeholder=n,Ao(h,e,t)}function Qi(e){var t=Se[e];return function(e,r){if(e=ya(e),(r=null==r?0:vr(da(r),292))&&Ct(e)){var n=(ma(e)+"e").split("e");return+((n=(ma(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Yi=Er&&1/ar(new Er([,-0]))[1]==l?function(e){return new Er(e)}:au;function Wi(e){return function(t){var r=fo(t);return r==O?ir(t):r==j?ur(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Hi(e,t,r,s,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new je(o);var y=s?s.length:0;if(y||(t&=-97,s=l=i),p=p===i?p:yr(da(p),0),d=d===i?d:da(d),y-=l?l.length:0,64&t){var v=s,m=l;s=l=i}var b=h?i:ro(e),g=[e,t,r,s,l,v,m,f,p,d];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ei(l,u,t[4]):u,e[4]=l?sr(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ii(l,u,t[6]):u,e[6]=l?sr(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&c&&(e[8]=null==e[8]?t[8]:vr(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],r=g[2],s=g[3],l=g[4],!(d=g[9]=g[9]===i?h?0:e.length:yr(g[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,r){var o=Di(e);return function s(){for(var a=arguments.length,u=n(a),c=a,l=io(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:sr(u,l);return(a-=f.length)<r?zi(e,t,$i,s.placeholder,i,u,f,i,i,r-a):St(this&&this!==ft&&this instanceof s?o:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?$i.apply(i,g):function(e,t,r,i){var o=1&t,s=Di(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),p=this&&this!==ft&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return St(p,o?r:this,f)}}(e,t,r,s);else var _=function(e,t,r){var n=1&t,i=Di(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return Ao((b?Jn:jo)(_,g),e,t)}function Ki(e,t,r,n){return e===i||qs(e,Ae[r])&&!ke.call(n,r)?t:e}function Gi(e,t,r,n,o,s){return Xs(e)&&Xs(t)&&(s.set(t,e),qn(e,t,i,Gi,s),s.delete(t)),e}function Ji(e){return na(e)?i:e}function Zi(e,t,r,n,o,s){var a=1&r,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&r?new Qr:i;for(s.set(e,t),s.set(t,e);++p<u;){var y=e[p],v=t[p];if(n)var m=a?n(v,y,p,t,e,s):n(y,v,p,e,t,s);if(m!==i){if(m)continue;d=!1;break}if(h){if(!Rt(t,(function(e,t){if(!Jt(h,t)&&(y===e||o(y,e,r,n,s)))return h.push(t)}))){d=!1;break}}else if(y!==v&&!o(y,v,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Xi(e){return xo(Eo(e,i,zo),e+"")}function eo(e){return On(e,Aa,co)}function to(e){return On(e,Na,lo)}var ro=jr?function(e){return jr.get(e)}:au;function no(e){for(var t=e.name+"",r=Pr[t],n=ke.call(Pr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function io(e){return(ke.call($r,"placeholder")?$r:e).placeholder}function oo(){var e=$r.iteratee||nu;return e=e===nu?kn:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function ao(e){for(var t=Aa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Oo(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Mn(r)?r:i}var co=yt?function(e){return null==e?[]:(e=Ee(e),Pt(yt(e),(function(t){return Ye.call(e,t)})))}:hu,lo=yt?function(e){for(var t=[];e;)Mt(t,co(e)),e=ze(e);return t}:hu,fo=Sn;function po(e,t,r){for(var n=-1,i=(t=vi(t,e)).length,o=!1;++n<i;){var s=Co(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Zs(i)&&vo(s,i)&&(Vs(e)||Us(e))}function ho(e){return"function"!=typeof e.constructor||wo(e)?{}:Fr(ze(e))}function yo(e){return Vs(e)||Us(e)||!!(He&&e&&e[He])}function vo(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&me.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,r){if(!Xs(r))return!1;var n=typeof t;return!!("number"==n?Qs(r)&&vo(t,r.length):"string"==n&&t in r)&&qs(r[t],e)}function bo(e,t){if(Vs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!aa(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function go(e){var t=no(e),r=$r[t];if("function"!=typeof r||!(t in Br.prototype))return!1;if(e===r)return!0;var n=ro(r);return!!n&&e===n[0]}(wr&&fo(new wr(new ArrayBuffer(1)))!=M||Or&&fo(new Or)!=O||Sr&&fo(Sr.resolve())!=I||Er&&fo(new Er)!=j||Ir&&fo(new Ir)!=A)&&(fo=function(e){var t=Sn(e),r=t==E?e.constructor:i,n=r?$o(r):"";if(n)switch(n){case xr:return M;case Ar:return O;case Nr:return I;case Mr:return j;case kr:return A}return t});var _o=Ne?Gs:yu;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function Oo(e){return e==e&&!Xs(e)}function So(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ee(r))}}function Eo(e,t,r){return t=yr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=yr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),St(e,this,u)}}function Io(e,t){return t.length<2?e:wn(e,ei(t,0,-1))}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var jo=No(Jn),Po=lt||function(e,t){return ft.setTimeout(e,t)},xo=No(Zn);function Ao(e,t,r){var n=t+"";return xo(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return It(h,(function(r){var n="_."+r[0];t&r[1]&&!xt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function No(e){var t=0,r=0;return function(){var n=mr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Mo(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Qn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var ko,Do,Ro=(ko=ks((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(le,"$1"):r||e)})),t}),(function(e){return 500===Do.size&&Do.clear(),e})),Do=ko.cache,ko);function Co(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function $o(e){if(null!=e){try{return Me.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fo(e){if(e instanceof Br)return e.clone();var t=new Lr(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var qo=Wn((function(e,t){return Ys(e)?cn(e,yn(t,1,Ys,!0)):[]})),Lo=Wn((function(e,t){var r=Ko(t);return Ys(r)&&(r=i),Ys(e)?cn(e,yn(t,1,Ys,!0),oo(r,2)):[]})),Bo=Wn((function(e,t){var r=Ko(t);return Ys(r)&&(r=i),Ys(e)?cn(e,yn(t,1,Ys,!0),i,r):[]}));function Uo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),Ft(e,oo(t,3),i)}function Vo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=da(r),o=r<0?yr(n+o,0):vr(o,n-1)),Ft(e,oo(t,3),o,!0)}function zo(e){return null!=e&&e.length?yn(e,1):[]}function Qo(e){return e&&e.length?e[0]:i}var Yo=Wn((function(e){var t=Nt(e,hi);return t.length&&t[0]===e[0]?jn(t):[]})),Wo=Wn((function(e){var t=Ko(e),r=Nt(e,hi);return t===Ko(r)?t=i:r.pop(),r.length&&r[0]===e[0]?jn(r,oo(t,2)):[]})),Ho=Wn((function(e){var t=Ko(e),r=Nt(e,hi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?jn(r,i,t):[]}));function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Go=Wn(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?Vn(e,t):e}var Zo=Xi((function(e,t){var r=null==e?0:e.length,n=nn(e,t);return zn(e,Nt(t,(function(e){return vo(e,r)?+e:e})).sort(Si)),n}));function Xo(e){return null==e?e:_r.call(e)}var es=Wn((function(e){return ai(yn(e,1,Ys,!0))})),ts=Wn((function(e){var t=Ko(e);return Ys(t)&&(t=i),ai(yn(e,1,Ys,!0),oo(t,2))})),rs=Wn((function(e){var t=Ko(e);return t="function"==typeof t?t:i,ai(yn(e,1,Ys,!0),i,t)}));function ns(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,(function(e){if(Ys(e))return t=yr(e.length,t),!0})),Wt(t,(function(t){return Nt(e,Vt(t))}))}function is(e,t){if(!e||!e.length)return[];var r=ns(e);return null==t?r:Nt(r,(function(e){return St(t,i,e)}))}var os=Wn((function(e,t){return Ys(e)?cn(e,t):[]})),ss=Wn((function(e){return pi(Pt(e,Ys))})),as=Wn((function(e){var t=Ko(e);return Ys(t)&&(t=i),pi(Pt(e,Ys),oo(t,2))})),us=Wn((function(e){var t=Ko(e);return t="function"==typeof t?t:i,pi(Pt(e,Ys),i,t)})),cs=Wn(ns),ls=Wn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,is(e,r)}));function fs(e){var t=$r(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var ds=Xi((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Br&&vo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:i}),new Lr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),hs=Pi((function(e,t,r){ke.call(e,r)?++e[r]:rn(e,r,1)})),ys=Ri(Uo),vs=Ri(Vo);function ms(e,t){return(Vs(e)?It:ln)(e,oo(t,3))}function bs(e,t){return(Vs(e)?Tt:fn)(e,oo(t,3))}var gs=Pi((function(e,t,r){ke.call(e,r)?e[r].push(t):rn(e,r,[t])})),_s=Wn((function(e,t,r){var i=-1,o="function"==typeof t,s=Qs(e)?n(e.length):[];return ln(e,(function(e){s[++i]=o?St(t,e,r):Pn(e,t,r)})),s})),ws=Pi((function(e,t,r){rn(e,r,t)}));function Os(e,t){return(Vs(e)?Nt:Cn)(e,oo(t,3))}var Ss=Pi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Es=Wn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&mo(e,t[0],t[1])?t=[]:r>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Bn(e,yn(t,1),[])})),Is=ct||function(){return ft.Date.now()};function Ts(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Hi(e,c,i,i,i,i,t)}function js(e,t){var r;if("function"!=typeof t)throw new je(o);return e=da(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Ps=Wn((function(e,t,r){var n=1;if(r.length){var i=sr(r,io(Ps));n|=u}return Hi(e,n,t,r,i)})),xs=Wn((function(e,t,r){var n=3;if(r.length){var i=sr(r,io(xs));n|=u}return Hi(t,n,e,r,i)}));function As(e,t,r){var n,s,a,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new je(o);function y(t){var r=n,o=s;return n=s=i,f=t,u=e.apply(o,r)}function v(e){var r=e-l;return l===i||r>=t||r<0||d&&e-f>=a}function m(){var e=Is();if(v(e))return b(e);c=Po(m,function(e){var r=t-(e-l);return d?vr(r,a-(e-f)):r}(e))}function b(e){return c=i,h&&n?y(e):(n=s=i,u)}function g(){var e=Is(),r=v(e);if(n=arguments,s=this,l=e,r){if(c===i)return function(e){return f=e,c=Po(m,t),p?y(e):u}(l);if(d)return gi(c),c=Po(m,t),y(l)}return c===i&&(c=Po(m,t)),u}return t=ya(t)||0,Xs(r)&&(p=!!r.leading,a=(d="maxWait"in r)?yr(ya(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),g.cancel=function(){c!==i&&gi(c),f=0,n=l=s=c=i},g.flush=function(){return c===i?u:b(Is())},g}var Ns=Wn((function(e,t){return un(e,1,t)})),Ms=Wn((function(e,t,r){return un(e,ya(t)||0,r)}));function ks(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new je(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(ks.Cache||zr),r}function Ds(e){if("function"!=typeof e)throw new je(o);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)}}ks.Cache=zr;var Rs=mi((function(e,t){var r=(t=1==t.length&&Vs(t[0])?Nt(t[0],Kt(oo())):Nt(yn(t,1),Kt(oo()))).length;return Wn((function(n){for(var i=-1,o=vr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return St(e,this,n)}))})),Cs=Wn((function(e,t){var r=sr(t,io(Cs));return Hi(e,u,i,t,r)})),$s=Wn((function(e,t){var r=sr(t,io($s));return Hi(e,64,i,t,r)})),Fs=Xi((function(e,t){return Hi(e,256,i,i,i,t)}));function qs(e,t){return e===t||e!=e&&t!=t}var Ls=Vi(En),Bs=Vi((function(e,t){return e>=t})),Us=xn(function(){return arguments}())?xn:function(e){return ea(e)&&ke.call(e,"callee")&&!Ye.call(e,"callee")},Vs=n.isArray,zs=mt?Kt(mt):function(e){return ea(e)&&Sn(e)==N};function Qs(e){return null!=e&&Zs(e.length)&&!Gs(e)}function Ys(e){return ea(e)&&Qs(e)}var Ws=vt||yu,Hs=bt?Kt(bt):function(e){return ea(e)&&Sn(e)==b};function Ks(e){if(!ea(e))return!1;var t=Sn(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!na(e)}function Gs(e){if(!Xs(e))return!1;var t=Sn(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Js(e){return"number"==typeof e&&e==da(e)}function Zs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Xs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=gt?Kt(gt):function(e){return ea(e)&&fo(e)==O};function ra(e){return"number"==typeof e||ea(e)&&Sn(e)==S}function na(e){if(!ea(e)||Sn(e)!=E)return!1;var t=ze(e);if(null===t)return!0;var r=ke.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Me.call(r)==$e}var ia=_t?Kt(_t):function(e){return ea(e)&&Sn(e)==T},oa=wt?Kt(wt):function(e){return ea(e)&&fo(e)==j};function sa(e){return"string"==typeof e||!Vs(e)&&ea(e)&&Sn(e)==P}function aa(e){return"symbol"==typeof e||ea(e)&&Sn(e)==x}var ua=Ot?Kt(Ot):function(e){return ea(e)&&Zs(e.length)&&!!it[Sn(e)]},ca=Vi(Rn),la=Vi((function(e,t){return e<=t}));function fa(e){if(!e)return[];if(Qs(e))return sa(e)?lr(e):Ti(e);if(Ke&&e[Ke])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ke]());var t=fo(e);return(t==O?ir:t==j?ar:qa)(e)}function pa(e){return e?(e=ya(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function da(e){var t=pa(e),r=t%1;return t==t?r?t-r:t:0}function ha(e){return e?on(da(e),0,d):0}function ya(e){if("number"==typeof e)return e;if(aa(e))return p;if(Xs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var r=he.test(e);return r||ve.test(e)?ut(e.slice(2),r?2:8):de.test(e)?p:+e}function va(e){return ji(e,Na(e))}function ma(e){return null==e?"":si(e)}var ba=xi((function(e,t){if(wo(t)||Qs(t))ji(t,Aa(t),e);else for(var r in t)ke.call(t,r)&&Zr(e,r,t[r])})),ga=xi((function(e,t){ji(t,Na(t),e)})),_a=xi((function(e,t,r,n){ji(t,Na(t),e,n)})),wa=xi((function(e,t,r,n){ji(t,Aa(t),e,n)})),Oa=Xi(nn),Sa=Wn((function(e,t){e=Ee(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&mo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=Na(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||qs(f,Ae[l])&&!ke.call(e,l))&&(e[l]=s[l])}return e})),Ea=Wn((function(e){return e.push(i,Gi),St(ka,i,e)}));function Ia(e,t,r){var n=null==e?i:wn(e,t);return n===i?r:n}function Ta(e,t){return null!=e&&po(e,t,Tn)}var ja=Fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=r}),Xa(ru)),Pa=Fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),ke.call(e,t)?e[t].push(r):e[t]=[r]}),oo),xa=Wn(Pn);function Aa(e){return Qs(e)?Wr(e):Dn(e)}function Na(e){return Qs(e)?Wr(e,!0):function(e){if(!Xs(e))return function(e){var t=[];if(null!=e)for(var r in Ee(e))t.push(r);return t}(e);var t=wo(e),r=[];for(var n in e)("constructor"!=n||!t&&ke.call(e,n))&&r.push(n);return r}(e)}var Ma=xi((function(e,t,r){qn(e,t,r)})),ka=xi((function(e,t,r,n){qn(e,t,r,n)})),Da=Xi((function(e,t){var r={};if(null==e)return r;var n=!1;t=Nt(t,(function(t){return t=vi(t,e),n||(n=t.length>1),t})),ji(e,to(e),r),n&&(r=sn(r,7,Ji));for(var i=t.length;i--;)ui(r,t[i]);return r})),Ra=Xi((function(e,t){return null==e?{}:function(e,t){return Un(e,t,(function(t,r){return Ta(e,r)}))}(e,t)}));function Ca(e,t){if(null==e)return{};var r=Nt(to(e),(function(e){return[e]}));return t=oo(t),Un(e,r,(function(e,r){return t(e,r[0])}))}var $a=Wi(Aa),Fa=Wi(Na);function qa(e){return null==e?[]:Gt(e,Aa(e))}var La=ki((function(e,t,r){return t=t.toLowerCase(),e+(r?Ba(t):t)}));function Ba(e){return Ka(ma(e).toLowerCase())}function Ua(e){return(e=ma(e))&&e.replace(be,er).replace(Je,"")}var Va=ki((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),za=ki((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Qa=Mi("toLowerCase"),Ya=ki((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Wa=ki((function(e,t,r){return e+(r?" ":"")+Ka(t)})),Ha=ki((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ka=Mi("toUpperCase");function Ga(e,t,r){return e=ma(e),(t=r?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ja=Wn((function(e,t){try{return St(e,i,t)}catch(e){return Ks(e)?e:new we(e)}})),Za=Xi((function(e,t){return It(t,(function(t){t=Co(t),rn(e,t,Ps(e[t],e))})),e}));function Xa(e){return function(){return e}}var eu=Ci(),tu=Ci(!0);function ru(e){return e}function nu(e){return kn("function"==typeof e?e:sn(e,1))}var iu=Wn((function(e,t){return function(r){return Pn(r,e,t)}})),ou=Wn((function(e,t){return function(r){return Pn(e,r,t)}}));function su(e,t,r){var n=Aa(t),i=_n(t,n);null!=r||Xs(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=_n(t,Aa(t)));var o=!(Xs(r)&&"chain"in r&&!r.chain),s=Gs(e);return It(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Ti(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Mt([this.value()],arguments))})})),e}function au(){}var uu=Li(Nt),cu=Li(jt),lu=Li(Rt);function fu(e){return bo(e)?Vt(Co(e)):function(e){return function(t){return wn(t,e)}}(e)}var pu=Ui(),du=Ui(!0);function hu(){return[]}function yu(){return!1}var vu,mu=qi((function(e,t){return e+t}),0),bu=Qi("ceil"),gu=qi((function(e,t){return e/t}),1),_u=Qi("floor"),wu=qi((function(e,t){return e*t}),1),Ou=Qi("round"),Su=qi((function(e,t){return e-t}),0);return $r.after=function(e,t){if("function"!=typeof t)throw new je(o);return e=da(e),function(){if(--e<1)return t.apply(this,arguments)}},$r.ary=Ts,$r.assign=ba,$r.assignIn=ga,$r.assignInWith=_a,$r.assignWith=wa,$r.at=Oa,$r.before=js,$r.bind=Ps,$r.bindAll=Za,$r.bindKey=xs,$r.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vs(e)?e:[e]},$r.chain=fs,$r.chunk=function(e,t,r){t=(r?mo(e,t,r):t===i)?1:yr(da(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=n(pt(o/t));s<o;)u[a++]=ei(e,s,s+=t);return u},$r.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},$r.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Mt(Vs(r)?Ti(r):[r],yn(t,1))},$r.cond=function(e){var t=null==e?0:e.length,r=oo();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new je(o);return[r(e[0]),e[1]]})):[],Wn((function(r){for(var n=-1;++n<t;){var i=e[n];if(St(i[0],this,r))return St(i[1],this,r)}}))},$r.conforms=function(e){return function(e){var t=Aa(e);return function(r){return an(r,e,t)}}(sn(e,1))},$r.constant=Xa,$r.countBy=hs,$r.create=function(e,t){var r=Fr(e);return null==t?r:tn(r,t)},$r.curry=function e(t,r,n){var o=Hi(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},$r.curryRight=function e(t,r,n){var o=Hi(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},$r.debounce=As,$r.defaults=Sa,$r.defaultsDeep=Ea,$r.defer=Ns,$r.delay=Ms,$r.difference=qo,$r.differenceBy=Lo,$r.differenceWith=Bo,$r.drop=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=r||t===i?1:da(t))<0?0:t,n):[]},$r.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,0,(t=n-(t=r||t===i?1:da(t)))<0?0:t):[]},$r.dropRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0,!0):[]},$r.dropWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0):[]},$r.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&mo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=da(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:da(n))<0&&(n+=o),n=r>n?0:ha(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},$r.filter=function(e,t){return(Vs(e)?Pt:hn)(e,oo(t,3))},$r.flatMap=function(e,t){return yn(Os(e,t),1)},$r.flatMapDeep=function(e,t){return yn(Os(e,t),l)},$r.flatMapDepth=function(e,t,r){return r=r===i?1:da(r),yn(Os(e,t),r)},$r.flatten=zo,$r.flattenDeep=function(e){return null!=e&&e.length?yn(e,l):[]},$r.flattenDepth=function(e,t){return null!=e&&e.length?yn(e,t=t===i?1:da(t)):[]},$r.flip=function(e){return Hi(e,512)},$r.flow=eu,$r.flowRight=tu,$r.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},$r.functions=function(e){return null==e?[]:_n(e,Aa(e))},$r.functionsIn=function(e){return null==e?[]:_n(e,Na(e))},$r.groupBy=gs,$r.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},$r.intersection=Yo,$r.intersectionBy=Wo,$r.intersectionWith=Ho,$r.invert=ja,$r.invertBy=Pa,$r.invokeMap=_s,$r.iteratee=nu,$r.keyBy=ws,$r.keys=Aa,$r.keysIn=Na,$r.map=Os,$r.mapKeys=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,t(e,n,i),e)})),r},$r.mapValues=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,n,t(e,n,i))})),r},$r.matches=function(e){return $n(sn(e,1))},$r.matchesProperty=function(e,t){return Fn(e,sn(t,1))},$r.memoize=ks,$r.merge=Ma,$r.mergeWith=ka,$r.method=iu,$r.methodOf=ou,$r.mixin=su,$r.negate=Ds,$r.nthArg=function(e){return e=da(e),Wn((function(t){return Ln(t,e)}))},$r.omit=Da,$r.omitBy=function(e,t){return Ca(e,Ds(oo(t)))},$r.once=function(e){return js(2,e)},$r.orderBy=function(e,t,r,n){return null==e?[]:(Vs(t)||(t=null==t?[]:[t]),Vs(r=n?i:r)||(r=null==r?[]:[r]),Bn(e,t,r))},$r.over=uu,$r.overArgs=Rs,$r.overEvery=cu,$r.overSome=lu,$r.partial=Cs,$r.partialRight=$s,$r.partition=Ss,$r.pick=Ra,$r.pickBy=Ca,$r.property=fu,$r.propertyOf=function(e){return function(t){return null==e?i:wn(e,t)}},$r.pull=Go,$r.pullAll=Jo,$r.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,oo(r,2)):e},$r.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,i,r):e},$r.pullAt=Zo,$r.range=pu,$r.rangeRight=du,$r.rearg=Fs,$r.reject=function(e,t){return(Vs(e)?Pt:hn)(e,Ds(oo(t,3)))},$r.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=oo(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return zn(e,i),r},$r.rest=function(e,t){if("function"!=typeof e)throw new je(o);return Wn(e,t=t===i?t:da(t))},$r.reverse=Xo,$r.sampleSize=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),(Vs(e)?Kr:Kn)(e,t)},$r.set=function(e,t,r){return null==e?e:Gn(e,t,r)},$r.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Gn(e,t,r,n)},$r.shuffle=function(e){return(Vs(e)?Gr:Xn)(e)},$r.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&mo(e,t,r)?(t=0,r=n):(t=null==t?0:da(t),r=r===i?n:da(r)),ei(e,t,r)):[]},$r.sortBy=Es,$r.sortedUniq=function(e){return e&&e.length?ii(e):[]},$r.sortedUniqBy=function(e,t){return e&&e.length?ii(e,oo(t,2)):[]},$r.split=function(e,t,r){return r&&"number"!=typeof r&&mo(e,t,r)&&(t=r=i),(r=r===i?d:r>>>0)?(e=ma(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&nr(e)?bi(lr(e),0,r):e.split(t,r):[]},$r.spread=function(e,t){if("function"!=typeof e)throw new je(o);return t=null==t?0:yr(da(t),0),Wn((function(r){var n=r[t],i=bi(r,0,t);return n&&Mt(i,n),St(e,this,i)}))},$r.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},$r.take=function(e,t,r){return e&&e.length?ei(e,0,(t=r||t===i?1:da(t))<0?0:t):[]},$r.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=n-(t=r||t===i?1:da(t)))<0?0:t,n):[]},$r.takeRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!1,!0):[]},$r.takeWhile=function(e,t){return e&&e.length?li(e,oo(t,3)):[]},$r.tap=function(e,t){return t(e),e},$r.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new je(o);return Xs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),As(e,t,{leading:n,maxWait:t,trailing:i})},$r.thru=ps,$r.toArray=fa,$r.toPairs=$a,$r.toPairsIn=Fa,$r.toPath=function(e){return Vs(e)?Nt(e,Co):aa(e)?[e]:Ti(Ro(ma(e)))},$r.toPlainObject=va,$r.transform=function(e,t,r){var n=Vs(e),i=n||Ws(e)||ua(e);if(t=oo(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Xs(e)&&Gs(o)?Fr(ze(e)):{}}return(i?It:bn)(e,(function(e,n,i){return t(r,e,n,i)})),r},$r.unary=function(e){return Ts(e,1)},$r.union=es,$r.unionBy=ts,$r.unionWith=rs,$r.uniq=function(e){return e&&e.length?ai(e):[]},$r.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},$r.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},$r.unset=function(e,t){return null==e||ui(e,t)},$r.unzip=ns,$r.unzipWith=is,$r.update=function(e,t,r){return null==e?e:ci(e,t,yi(r))},$r.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ci(e,t,yi(r),n)},$r.values=qa,$r.valuesIn=function(e){return null==e?[]:Gt(e,Na(e))},$r.without=os,$r.words=Ga,$r.wrap=function(e,t){return Cs(yi(t),e)},$r.xor=ss,$r.xorBy=as,$r.xorWith=us,$r.zip=cs,$r.zipObject=function(e,t){return di(e||[],t||[],Zr)},$r.zipObjectDeep=function(e,t){return di(e||[],t||[],Gn)},$r.zipWith=ls,$r.entries=$a,$r.entriesIn=Fa,$r.extend=ga,$r.extendWith=_a,su($r,$r),$r.add=mu,$r.attempt=Ja,$r.camelCase=La,$r.capitalize=Ba,$r.ceil=bu,$r.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ya(r))==r?r:0),t!==i&&(t=(t=ya(t))==t?t:0),on(ya(e),t,r)},$r.clone=function(e){return sn(e,4)},$r.cloneDeep=function(e){return sn(e,5)},$r.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:i)},$r.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:i)},$r.conformsTo=function(e,t){return null==t||an(e,t,Aa(t))},$r.deburr=Ua,$r.defaultTo=function(e,t){return null==e||e!=e?t:e},$r.divide=gu,$r.endsWith=function(e,t,r){e=ma(e),t=si(t);var n=e.length,o=r=r===i?n:on(da(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},$r.eq=qs,$r.escape=function(e){return(e=ma(e))&&H.test(e)?e.replace(Y,tr):e},$r.escapeRegExp=function(e){return(e=ma(e))&&re.test(e)?e.replace(te,"\\$&"):e},$r.every=function(e,t,r){var n=Vs(e)?jt:pn;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},$r.find=ys,$r.findIndex=Uo,$r.findKey=function(e,t){return $t(e,oo(t,3),bn)},$r.findLast=vs,$r.findLastIndex=Vo,$r.findLastKey=function(e,t){return $t(e,oo(t,3),gn)},$r.floor=_u,$r.forEach=ms,$r.forEachRight=bs,$r.forIn=function(e,t){return null==e?e:vn(e,oo(t,3),Na)},$r.forInRight=function(e,t){return null==e?e:mn(e,oo(t,3),Na)},$r.forOwn=function(e,t){return e&&bn(e,oo(t,3))},$r.forOwnRight=function(e,t){return e&&gn(e,oo(t,3))},$r.get=Ia,$r.gt=Ls,$r.gte=Bs,$r.has=function(e,t){return null!=e&&po(e,t,In)},$r.hasIn=Ta,$r.head=Qo,$r.identity=ru,$r.includes=function(e,t,r,n){e=Qs(e)?e:qa(e),r=r&&!n?da(r):0;var i=e.length;return r<0&&(r=yr(i+r,0)),sa(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&qt(e,t,r)>-1},$r.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),qt(e,t,i)},$r.inRange=function(e,t,r){return t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r){return e>=vr(t,r)&&e<yr(t,r)}(e=ya(e),t,r)},$r.invoke=xa,$r.isArguments=Us,$r.isArray=Vs,$r.isArrayBuffer=zs,$r.isArrayLike=Qs,$r.isArrayLikeObject=Ys,$r.isBoolean=function(e){return!0===e||!1===e||ea(e)&&Sn(e)==m},$r.isBuffer=Ws,$r.isDate=Hs,$r.isElement=function(e){return ea(e)&&1===e.nodeType&&!na(e)},$r.isEmpty=function(e){if(null==e)return!0;if(Qs(e)&&(Vs(e)||"string"==typeof e||"function"==typeof e.splice||Ws(e)||ua(e)||Us(e)))return!e.length;var t=fo(e);if(t==O||t==j)return!e.size;if(wo(e))return!Dn(e).length;for(var r in e)if(ke.call(e,r))return!1;return!0},$r.isEqual=function(e,t){return An(e,t)},$r.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?An(e,t,i,r):!!n},$r.isError=Ks,$r.isFinite=function(e){return"number"==typeof e&&Ct(e)},$r.isFunction=Gs,$r.isInteger=Js,$r.isLength=Zs,$r.isMap=ta,$r.isMatch=function(e,t){return e===t||Nn(e,t,ao(t))},$r.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,Nn(e,t,ao(t),r)},$r.isNaN=function(e){return ra(e)&&e!=+e},$r.isNative=function(e){if(_o(e))throw new we("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mn(e)},$r.isNil=function(e){return null==e},$r.isNull=function(e){return null===e},$r.isNumber=ra,$r.isObject=Xs,$r.isObjectLike=ea,$r.isPlainObject=na,$r.isRegExp=ia,$r.isSafeInteger=function(e){return Js(e)&&e>=-9007199254740991&&e<=f},$r.isSet=oa,$r.isString=sa,$r.isSymbol=aa,$r.isTypedArray=ua,$r.isUndefined=function(e){return e===i},$r.isWeakMap=function(e){return ea(e)&&fo(e)==A},$r.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==Sn(e)},$r.join=function(e,t){return null==e?"":zt.call(e,t)},$r.kebabCase=Va,$r.last=Ko,$r.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=da(r))<0?yr(n+o,0):vr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Ft(e,Bt,o,!0)},$r.lowerCase=za,$r.lowerFirst=Qa,$r.lt=ca,$r.lte=la,$r.max=function(e){return e&&e.length?dn(e,ru,En):i},$r.maxBy=function(e,t){return e&&e.length?dn(e,oo(t,2),En):i},$r.mean=function(e){return Ut(e,ru)},$r.meanBy=function(e,t){return Ut(e,oo(t,2))},$r.min=function(e){return e&&e.length?dn(e,ru,Rn):i},$r.minBy=function(e,t){return e&&e.length?dn(e,oo(t,2),Rn):i},$r.stubArray=hu,$r.stubFalse=yu,$r.stubObject=function(){return{}},$r.stubString=function(){return""},$r.stubTrue=function(){return!0},$r.multiply=wu,$r.nth=function(e,t){return e&&e.length?Ln(e,da(t)):i},$r.noConflict=function(){return ft._===this&&(ft._=Fe),this},$r.noop=au,$r.now=Is,$r.pad=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Bi(dt(i),r)+e+Bi(pt(i),r)},$r.padEnd=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?e+Bi(t-n,r):e},$r.padStart=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?Bi(t-n,r)+e:e},$r.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(ma(e).replace(ne,""),t||0)},$r.random=function(e,t,r){if(r&&"boolean"!=typeof r&&mo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=gr();return vr(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Qn(e,t)},$r.reduce=function(e,t,r){var n=Vs(e)?kt:Qt,i=arguments.length<3;return n(e,oo(t,4),r,i,ln)},$r.reduceRight=function(e,t,r){var n=Vs(e)?Dt:Qt,i=arguments.length<3;return n(e,oo(t,4),r,i,fn)},$r.repeat=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),Yn(ma(e),t)},$r.replace=function(){var e=arguments,t=ma(e[0]);return e.length<3?t:t.replace(e[1],e[2])},$r.result=function(e,t,r){var n=-1,o=(t=vi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[Co(t[n])];s===i&&(n=o,s=r),e=Gs(s)?s.call(e):s}return e},$r.round=Ou,$r.runInContext=e,$r.sample=function(e){return(Vs(e)?Hr:Hn)(e)},$r.size=function(e){if(null==e)return 0;if(Qs(e))return sa(e)?cr(e):e.length;var t=fo(e);return t==O||t==j?e.size:Dn(e).length},$r.snakeCase=Ya,$r.some=function(e,t,r){var n=Vs(e)?Rt:ti;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},$r.sortedIndex=function(e,t){return ri(e,t)},$r.sortedIndexBy=function(e,t,r){return ni(e,t,oo(r,2))},$r.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ri(e,t);if(n<r&&qs(e[n],t))return n}return-1},$r.sortedLastIndex=function(e,t){return ri(e,t,!0)},$r.sortedLastIndexBy=function(e,t,r){return ni(e,t,oo(r,2),!0)},$r.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ri(e,t,!0)-1;if(qs(e[r],t))return r}return-1},$r.startCase=Wa,$r.startsWith=function(e,t,r){return e=ma(e),r=null==r?0:on(da(r),0,e.length),t=si(t),e.slice(r,r+t.length)==t},$r.subtract=Su,$r.sum=function(e){return e&&e.length?Yt(e,ru):0},$r.sumBy=function(e,t){return e&&e.length?Yt(e,oo(t,2)):0},$r.template=function(e,t,r){var n=$r.templateSettings;r&&mo(e,t,r)&&(t=i),e=ma(e),t=_a({},t,n,Ki);var o,s,a=_a({},t.imports,n.imports,Ki),u=Aa(a),c=Gt(a,u),l=0,f=t.interpolate||ge,p="__p += '",d=Ie((t.escape||ge).source+"|"+f.source+"|"+(f===J?fe:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),h="//# sourceURL="+(ke.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,(function(t,r,n,i,a,u){return n||(n=i),p+=e.slice(l,u).replace(_e,rr),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var y=ke.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new we("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(U,""):p).replace(V,"$1").replace(z,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Ja((function(){return Oe(u,h+"return "+p).apply(i,c)}));if(v.source=p,Ks(v))throw v;return v},$r.times=function(e,t){if((e=da(e))<1||e>f)return[];var r=d,n=vr(e,d);t=oo(t),e-=d;for(var i=Wt(n,t);++r<e;)t(r);return i},$r.toFinite=pa,$r.toInteger=da,$r.toLength=ha,$r.toLower=function(e){return ma(e).toLowerCase()},$r.toNumber=ya,$r.toSafeInteger=function(e){return e?on(da(e),-9007199254740991,f):0===e?e:0},$r.toString=ma,$r.toUpper=function(e){return ma(e).toUpperCase()},$r.trim=function(e,t,r){if((e=ma(e))&&(r||t===i))return Ht(e);if(!e||!(t=si(t)))return e;var n=lr(e),o=lr(t);return bi(n,Zt(n,o),Xt(n,o)+1).join("")},$r.trimEnd=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.slice(0,fr(e)+1);if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,0,Xt(n,lr(t))+1).join("")},$r.trimStart=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,Zt(n,lr(t))).join("")},$r.truncate=function(e,t){var r=30,n="...";if(Xs(t)){var o="separator"in t?t.separator:o;r="length"in t?da(t.length):r,n="omission"in t?si(t.omission):n}var s=(e=ma(e)).length;if(nr(e)){var a=lr(e);s=a.length}if(r>=s)return e;var u=r-cr(n);if(u<1)return n;var c=a?bi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+n;if(a&&(u+=c.length-u),ia(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,ma(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(e.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+n},$r.unescape=function(e){return(e=ma(e))&&W.test(e)?e.replace(Q,pr):e},$r.uniqueId=function(e){var t=++De;return ma(e)+t},$r.upperCase=Ha,$r.upperFirst=Ka,$r.each=ms,$r.eachRight=bs,$r.first=Qo,su($r,(vu={},bn($r,(function(e,t){ke.call($r.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),$r.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){$r[e].placeholder=$r})),It(["drop","take"],(function(e,t){Br.prototype[e]=function(r){r=r===i?1:yr(da(r),0);var n=this.__filtered__&&!t?new Br(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},Br.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Br.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),It(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Br.prototype[e]=function(){return this[r](1).value()[0]}})),It(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Br.prototype[e]=function(){return this.__filtered__?new Br(this):this[r](1)}})),Br.prototype.compact=function(){return this.filter(ru)},Br.prototype.find=function(e){return this.filter(e).head()},Br.prototype.findLast=function(e){return this.reverse().find(e)},Br.prototype.invokeMap=Wn((function(e,t){return"function"==typeof e?new Br(this):this.map((function(r){return Pn(r,e,t)}))})),Br.prototype.reject=function(e){return this.filter(Ds(oo(e)))},Br.prototype.slice=function(e,t){e=da(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Br(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=da(t))<0?r.dropRight(-t):r.take(t-e)),r)},Br.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Br.prototype.toArray=function(){return this.take(d)},bn(Br.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=$r[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&($r.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Br,c=a[0],l=u||Vs(t),f=function(e){var t=o.apply($r,Mt([e],a));return n&&p?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=s&&!p,y=u&&!d;if(!s&&l){t=y?t:new Br(this);var v=e.apply(t,a);return v.__actions__.push({func:ps,args:[f],thisArg:i}),new Lr(v,p)}return h&&y?e.apply(this,a):(v=this.thru(f),h?n?v.value()[0]:v.value():v)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);$r.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Vs(i)?i:[],e)}return this[r]((function(r){return t.apply(Vs(r)?r:[],e)}))}})),bn(Br.prototype,(function(e,t){var r=$r[t];if(r){var n=r.name+"";ke.call(Pr,n)||(Pr[n]=[]),Pr[n].push({name:t,func:r})}})),Pr[$i(i,2).name]=[{name:"wrapper",func:i}],Br.prototype.clone=function(){var e=new Br(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Br.prototype.reverse=function(){if(this.__filtered__){var e=new Br(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Br.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Vs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vr(t,e+s);break;case"takeRight":e=yr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=n?a:s-1,l=this.__iteratees__,f=l.length,p=0,d=vr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return fi(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var y=-1,v=e[c+=t];++y<f;){var m=l[y],b=m.iteratee,g=m.type,_=b(v);if(2==g)v=_;else if(!_){if(1==g)continue e;break e}}h[p++]=v}return h},$r.prototype.at=ds,$r.prototype.chain=function(){return fs(this)},$r.prototype.commit=function(){return new Lr(this.value(),this.__chain__)},$r.prototype.next=function(){this.__values__===i&&(this.__values__=fa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},$r.prototype.plant=function(e){for(var t,r=this;r instanceof qr;){var n=Fo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},$r.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Br){var t=e;return this.__actions__.length&&(t=new Br(this)),(t=t.reverse()).__actions__.push({func:ps,args:[Xo],thisArg:i}),new Lr(t,this.__chain__)}return this.thru(Xo)},$r.prototype.toJSON=$r.prototype.valueOf=$r.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},$r.prototype.first=$r.prototype.head,Ke&&($r.prototype[Ke]=function(){return this}),$r}();ft._=dr,(n=function(){return dr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},2937:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};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 o=r(5271);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return o.Observable}});var s=r(3739);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return s.ConnectableObservable}});var a=r(2138);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return a.observable}});var u=r(4190);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var c=r(9520);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var l=r(8042);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return l.BehaviorSubject}});var f=r(216);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var p=r(7257);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return p.AsyncSubject}});var d=r(4502);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var h=r(4617);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return h.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return h.asyncScheduler}});var y=r(8344);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return y.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return y.queueScheduler}});var v=r(6192);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return v.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return v.animationFrameScheduler}});var m=r(8847);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return m.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return m.VirtualAction}});var b=r(3980);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return b.Scheduler}});var g=r(7215);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return g.Subscription}});var _=r(1403);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return _.Subscriber}});var w=r(3868);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var O=r(5966);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return O.pipe}});var S=r(5729);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return S.noop}});var E=r(9144);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return E.identity}});var I=r(1211);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return I.isObservable}});var T=r(1263);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return T.lastValueFrom}});var j=r(7447);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return j.firstValueFrom}});var P=r(6809);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return P.ArgumentOutOfRangeError}});var x=r(8032);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return x.EmptyError}});var A=r(1137);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return A.NotFoundError}});var N=r(7392);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return N.ObjectUnsubscribedError}});var M=r(6228);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return M.SequenceError}});var k=r(6279);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return k.TimeoutError}});var D=r(5463);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return D.UnsubscriptionError}});var R=r(1253);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return R.bindCallback}});var C=r(1009);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return C.bindNodeCallback}});var $=r(1047);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return $.combineLatest}});var F=r(79);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return F.concat}});var q=r(1663);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return q.connectable}});var L=r(5401);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return L.defer}});var B=r(1727);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return B.empty}});var U=r(1723);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return U.forkJoin}});var V=r(6216);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return V.from}});var z=r(6767);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return z.fromEvent}});var Q=r(4366);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return Q.fromEventPattern}});var Y=r(6103);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return Y.generate}});var W=r(4468);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return W.iif}});var H=r(4449);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return H.interval}});var K=r(5847);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return K.merge}});var G=r(7423);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return G.never}});var J=r(7443);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return J.of}});var Z=r(1282);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Z.onErrorResumeNext}});var X=r(5259);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=r(1945);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=r(7779);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var re=r(6971);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return re.range}});var ne=r(859);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return ne.throwError}});var ie=r(5710);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var oe=r(3687);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return oe.using}});var se=r(2042);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return se.zip}});var ae=r(3200);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return ae.scheduled}});var ue=r(1727);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var ce=r(7423);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),i(r(9251),t);var le=r(3782);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return le.config}});var fe=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var pe=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return pe.auditTime}});var de=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var he=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return he.bufferCount}});var ye=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ye.bufferTime}});var ve=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ve.bufferToggle}});var me=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return me.bufferWhen}});var be=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return be.catchError}});var ge=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ge.combineAll}});var _e=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return _e.combineLatestAll}});var we=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var Oe=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Oe.concatAll}});var Se=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Se.concatMap}});var Ee=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Ee.concatMapTo}});var Ie=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Ie.concatWith}});var Te=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return Te.connect}});var je=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return je.count}});var Pe=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Pe.debounce}});var xe=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return xe.debounceTime}});var Ae=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Ae.defaultIfEmpty}});var Ne=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Ne.delay}});var Me=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Me.delayWhen}});var ke=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return ke.dematerialize}});var De=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return De.distinct}});var Re=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Re.distinctUntilChanged}});var Ce=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Ce.distinctUntilKeyChanged}});var $e=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return $e.elementAt}});var Fe=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Fe.endWith}});var qe=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return qe.every}});var Le=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Le.exhaust}});var Be=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Be.exhaustAll}});var Ue=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Ue.exhaustMap}});var Ve=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ve.expand}});var ze=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return ze.filter}});var Qe=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Qe.finalize}});var Ye=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ye.find}});var We=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return We.findIndex}});var He=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return He.first}});var Ke=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ke.groupBy}});var Ge=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Ge.ignoreElements}});var Je=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Je.isEmpty}});var Ze=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ze.last}});var Xe=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var rt=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return rt.max}});var nt=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return nt.mergeAll}});var it=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var ot=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ot.mergeMap}});var st=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return st.mergeMapTo}});var at=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return at.mergeScan}});var ut=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var ct=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var lt=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return lt.multicast}});var ft=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var pt=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return pt.pairwise}});var dt=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return dt.pluck}});var ht=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return ht.publish}});var yt=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var vt=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return vt.publishLast}});var mt=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var bt=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var gt=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return gt.reduce}});var _t=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return _t.repeat}});var wt=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return wt.repeatWhen}});var Ot=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Ot.retry}});var St=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return St.retryWhen}});var Et=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Et.refCount}});var It=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return It.sample}});var Tt=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Tt.sampleTime}});var jt=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return jt.scan}});var Pt=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Pt.sequenceEqual}});var xt=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return xt.share}});var At=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return At.shareReplay}});var Nt=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Nt.single}});var Mt=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Mt.skip}});var kt=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return kt.skipLast}});var Dt=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Dt.skipUntil}});var Rt=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Rt.skipWhile}});var Ct=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ct.startWith}});var $t=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return $t.subscribeOn}});var Ft=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ft.switchAll}});var qt=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return qt.switchMap}});var Lt=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Lt.switchMapTo}});var Bt=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Bt.switchScan}});var Ut=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Ut.take}});var Vt=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Vt.takeLast}});var zt=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Qt=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Qt.takeWhile}});var Yt=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Yt.tap}});var Wt=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Wt.throttle}});var Ht=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ht.throttleTime}});var Kt=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Kt.throwIfEmpty}});var Gt=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Gt.timeInterval}});var Jt=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Jt.timeout}});var Zt=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Zt.timeoutWith}});var Xt=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var er=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return er.toArray}});var tr=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return tr.window}});var rr=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return rr.windowCount}});var nr=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return nr.windowTime}});var ir=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return ir.windowToggle}});var or=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return or.windowWhen}});var sr=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return sr.withLatestFrom}});var ar=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ar.zipAll}});var ur=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ur.zipWith}})},7257:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var o=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,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,s=t.isStopped,a=t._isComplete;r?e.error(o):(s||a)&&(n&&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,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(r(9520).Subject);t.AsyncSubject=o},8042:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var o=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(r(9520).Subject);t.BehaviorSubject=o},3868:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,i=r(1727),o=r(7443),s=r(859),a=r(4432);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var u=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return c(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,s=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(s):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return a.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,a="N"===t?o.of(r):"E"===t?s.throwError((function(){return n})):"C"===t?i.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+t);return a},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 r,n,i,o=e,s=o.kind,a=o.value,u=o.error;if("string"!=typeof s)throw new TypeError('Invalid notification, missing "kind"');"N"===s?null===(r=t.next)||void 0===r||r.call(t,a):"E"===s?null===(n=t.error)||void 0===n||n.call(t,u):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=u,t.observeNotification=c},3380:(e,t)=>{"use strict";function r(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=r("C",void 0,void 0),t.errorNotification=function(e){return r("E",void 0,e)},t.nextNotification=function(e){return r("N",e,void 0)},t.createNotification=r},5271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=r(1403),i=r(7215),o=r(2138),s=r(5966),a=r(3782),u=r(4432),c=r(4770),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var o,s=this,a=(o=e)&&o instanceof n.Subscriber||function(e){return e&&u.isFunction(e.next)&&u.isFunction(e.error)&&u.isFunction(e.complete)}(o)&&i.isSubscription(o)?e:new n.SafeSubscriber(e,t,r);return c.errorContext((function(){var e=s,t=e.operator,r=e.source;a.add(t?t.call(a,r):r?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=f(t))((function(t,i){var o=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function f(e){var t;return null!==(t=null!=e?e:a.config.Promise)&&void 0!==t?t:Promise}t.Observable=l},216:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var o=r(9520),s=r(1713),a=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return i(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(t),!o&&i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,u=1;u<n.length&&n[u]<=s;u+=2)a=u;a&&n.splice(0,a+1)}},t}(o.Subject);t.ReplaySubject=a},3980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=r(1713),i=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=i},9520:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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 s=r(5271),a=r(7215),u=r(7392),c=r(2447),l=r(4770),f=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 p(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new u.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=o(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;l.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;l.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,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?a.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new a.Subscription((function(){t.currentObservers=null,c.arrRemove(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new s.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(s.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return i(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.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,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:a.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=p},1403:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=r(4432),s=r(7215),a=r(3782),u=r(7234),c=r(5729),l=r(3380),f=r(8972),p=r(4770),d=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,s.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return i(r,e),r.create=function(e,t,r){return new m(e,t,r)},r.prototype.next=function(e){this.isStopped?g(l.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?g(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?g(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(s.Subscription);t.Subscriber=d;var h=Function.prototype.bind;function y(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}(),m=function(e){function t(t,r,n){var i,s,u=e.call(this)||this;return o.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&a.config.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&y(t.next,s),error:t.error&&y(t.error,s),complete:t.complete&&y(t.complete,s)}):i=t,u.destination=new v(i),u}return i(t,e),t}(d);function b(e){a.config.useDeprecatedSynchronousErrorHandling?p.captureError(e):u.reportUnhandledError(e)}function g(e,t){var r=a.config.onStoppedNotification;r&&f.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=m,t.EMPTY_OBSERVER={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},7215:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var s=r(4432),a=r(5463),u=r(2447),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,r,u,c;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var p=n(f),d=p.next();!d.done;d=p.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=p.return)&&t.call(p)}finally{if(e)throw e.error}}else f.remove(this);var h=this.initialTeardown;if(s.isFunction(h))try{h()}catch(e){c=e instanceof a.UnsubscriptionError?e.errors:[e]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var v=n(y),m=v.next();!m.done;m=v.next()){var b=m.value;try{l(b)}catch(e){c=null!=c?c:[],e instanceof a.UnsubscriptionError?c=o(o([],i(c)),i(e.errors)):c.push(e)}}}catch(e){r={error:e}}finally{try{m&&!m.done&&(u=v.return)&&u.call(v)}finally{if(r)throw r.error}}}if(c)throw new a.UnsubscriptionError(c)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).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)&&u.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&u.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function l(e){s.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&&s.isFunction(e.remove)&&s.isFunction(e.add)&&s.isFunction(e.unsubscribe)}},3782:(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}},7447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=r(8032),i=r(1403);t.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(o,s){var a=new i.SafeSubscriber({next:function(e){o(e),a.unsubscribe()},error:s,complete:function(){r?o(t.defaultValue):s(new n.EmptyError)}});e.subscribe(a)}))}},1263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=r(8032);t.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(i,o){var s,a=!1;e.subscribe({next:function(e){s=e,a=!0},error:o,complete:function(){a?i(s):r?i(t.defaultValue):o(new n.EmptyError)}})}))}},3739:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var o=r(5271),s=r(7215),a=r(2711),u=r(5079),c=r(4024),l=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,c.hasLift(t)&&(n.lift=t.lift),n}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 s.Subscription;var r=this.getSubject();t.add(this.source.subscribe(u.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=s.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return a.refCount()(this)},t}(o.Observable);t.ConnectableObservable=l},1253:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=r(6414);t.bindCallback=function(e,t,r){return n.bindCallbackInternals(!1,e,t,r)}},6414:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var o=r(6551),s=r(5271),a=r(831),u=r(4666),c=r(3165),l=r(7257);t.bindCallbackInternals=function e(t,r,f,p){if(f){if(!o.isScheduler(f))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r,p).apply(this,n).pipe(u.mapOneOrManyArgs(f))};p=f}return p?function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r).apply(this,n).pipe(a.subscribeOn(p),c.observeOn(p))}:function(){for(var e=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new l.AsyncSubject,c=!0;return new s.Observable((function(s){var a=u.subscribe(s);if(c){c=!1;var l=!1,f=!1;r.apply(e,i(i([],n(o)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void u.error(n)}u.next(1<e.length?e:e[0]),f=!0,l&&u.complete()}])),f&&u.complete(),l=!0}return a}))}}},1009:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=r(6414);t.bindNodeCallback=function(e,t,r){return n.bindCallbackInternals(!0,e,t,r)}},1047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=r(5271),i=r(4744),o=r(6216),s=r(9144),a=r(4666),u=r(2619),c=r(1589),l=r(5079),f=r(5421);function p(e,t,r){return void 0===r&&(r=s.identity),function(n){d(t,(function(){for(var i=e.length,s=new Array(i),a=i,u=i,c=function(i){d(t,(function(){var c=o.from(e[i],t),f=!1;c.subscribe(l.createOperatorSubscriber(n,(function(e){s[i]=e,f||(f=!0,u--),u||n.next(r(s.slice()))}),(function(){--a||n.complete()})))}),n)},f=0;f<i;f++)c(f)}),n)}}function d(e,t,r){e?f.executeSchedule(r,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popResultSelector(e),f=i.argsArgArrayOrObject(e),d=f.args,h=f.keys;if(0===d.length)return o.from([],r);var y=new n.Observable(p(d,r,h?function(e){return c.createObject(h,e)}:s.identity));return l?y.pipe(a.mapOneOrManyArgs(l)):y},t.combineLatestInit=p},79:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=r(4554),i=r(2619),o=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.concatAll()(o.from(e,i.popScheduler(e)))}},1663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=r(9520),i=r(5271),o=r(5401),s={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=s);var r=null,n=t.connector,a=t.resetOnDisconnect,u=void 0===a||a,c=n(),l=new i.Observable((function(e){return c.subscribe(e)}));return l.connect=function(){return r&&!r.closed||(r=o.defer((function(){return e})).subscribe(c),u&&r.add((function(){return c=n()}))),r},l}},5401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=r(5271),i=r(9451);t.defer=function(e){return new n.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},4190:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=r(5271),i=r(1241),o=r(6741);function s(e){return new n.Observable((function(t){var r=e||i.performanceTimestampProvider,n=r.now(),s=0,a=function(){t.closed||(s=o.animationFrameProvider.requestAnimationFrame((function(i){s=0;var o=r.now();t.next({timestamp:e?o:i,elapsed:o-n}),a()})))};return a(),function(){s&&o.animationFrameProvider.cancelAnimationFrame(s)}}))}t.animationFrames=function(e){return e?s(e):a};var a=s()},1727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=r(5271);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},1723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=r(5271),i=r(4744),o=r(9451),s=r(2619),a=r(5079),u=r(4666),c=r(1589);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,p=l.keys,d=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,i=t,s=function(t){var s=!1;o.innerFrom(f[t]).subscribe(a.createOperatorSubscriber(e,(function(e){s||(s=!0,i--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&s||(i||e.next(p?c.createObject(p,r):r),e.complete())})))},u=0;u<t;u++)s(u);else e.complete()}));return r?d.pipe(u.mapOneOrManyArgs(r)):d}},6216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=r(3200),i=r(9451);t.from=function(e,t){return t?n.scheduled(e,t):i.innerFrom(e)}},6767:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=r(9451),o=r(5271),s=r(9010),a=r(8219),u=r(4432),c=r(4666),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],p=["on","off"];function d(e,t){return function(r){return function(n){return e[r](t,n)}}}t.fromEvent=function e(t,r,h,y){if(u.isFunction(h)&&(y=h,h=void 0),y)return e(t,r,h).pipe(c.mapOneOrManyArgs(y));var v=n(function(e){return u.isFunction(e.addEventListener)&&u.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](r,n,h)}})):function(e){return u.isFunction(e.addListener)&&u.isFunction(e.removeListener)}(t)?l.map(d(t,r)):function(e){return u.isFunction(e.on)&&u.isFunction(e.off)}(t)?p.map(d(t,r)):[],2),m=v[0],b=v[1];if(!m&&a.isArrayLike(t))return s.mergeMap((function(t){return e(t,r,h)}))(i.innerFrom(t));if(!m)throw new TypeError("Invalid event target");return new o.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return m(t),function(){return b(t)}}))}},4366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=r(5271),i=r(4432),o=r(4666);t.fromEventPattern=function e(t,r,s){return s?e(t,r).pipe(o.mapOneOrManyArgs(s)):new n.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},o=t(n);return i.isFunction(r)?function(){return r(n,o)}:void 0}))}},2160:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=r(5271);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},6103:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=r(9144),o=r(6551),s=r(5401),a=r(8840);t.generate=function(e,t,r,u,c){var l,f,p,d;function h(){var e;return n(this,(function(n){switch(n.label){case 0:e=d,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,p(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(d=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,p=void 0===f?i.identity:f,c=l.scheduler):(d=e,!u||o.isScheduler(u)?(p=i.identity,c=u):p=u),s.defer(c?function(){return a.scheduleIterable(h(),c)}:h)}},4468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=r(5401);t.iif=function(e,t,r){return n.defer((function(){return e()?t:r}))}},9451:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof s?s(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}},s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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 a=r(8219),u=r(2644),c=r(5271),l=r(3292),f=r(7707),p=r(4883),d=r(6380),h=r(9266),y=r(4432),v=r(7234),m=r(2138);function b(e){return new c.Observable((function(t){var r=e[m.observable]();if(y.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function g(e){return new c.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function _(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 w(e){return new c.Observable((function(t){var r,n;try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()}))}function O(e){return new c.Observable((function(t){(function(e,t){var r,s,a,u;return n(this,void 0,void 0,(function(){var n,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=o(e),i.label=1;case 1:return[4,r.next()];case 2:if((s=i.sent()).done)return[3,4];if(n=s.value,t.next(n),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),a={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),s&&!s.done&&(u=r.return)?[4,u.call(r)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function S(e){return O(h.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof c.Observable)return e;if(null!=e){if(l.isInteropObservable(e))return b(e);if(a.isArrayLike(e))return g(e);if(u.isPromise(e))return _(e);if(f.isAsyncIterable(e))return O(e);if(d.isIterable(e))return w(e);if(h.isReadableStreamLike(e))return S(e)}throw p.createInvalidObservableTypeError(e)},t.fromInteropObservable=b,t.fromArrayLike=g,t.fromPromise=_,t.fromIterable=w,t.fromAsyncIterable=O,t.fromReadableStreamLike=S},4449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=r(4617),i=r(5710);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},5847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=r(4594),i=r(9451),o=r(1727),s=r(2619),a=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e),u=s.popNumber(e,1/0),c=e;return c.length?1===c.length?i.innerFrom(c[0]):n.mergeAll(u)(a.from(c,r)):o.EMPTY}},7423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=r(5271),i=r(5729);t.NEVER=new n.Observable(i.noop),t.never=function(){return t.NEVER}},7443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=r(2619),i=r(6216);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n.popScheduler(e);return i.from(e,r)}},1282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=r(1727),i=r(4764),o=r(4475);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.onErrorResumeNext(o.argsOrArgArray(e))(n.EMPTY)}},5259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=r(6216);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},1945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763),o=r(9451);t.partition=function(e,t,r){return[i.filter(t,r)(o.innerFrom(e)),i.filter(n.not(t,r))(o.innerFrom(e))]}},7779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=r(5271),i=r(9451),o=r(4475),s=r(5079);function a(e){return function(t){for(var r=[],n=function(n){r.push(i.innerFrom(e[n]).subscribe(s.createOperatorSubscriber(t,(function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)}))))},o=0;r&&!t.closed&&o<e.length;o++)n(o)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=o.argsOrArgArray(e)).length?i.innerFrom(e[0]):new n.Observable(a(e))},t.raceInit=a},6971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=r(5271),i=r(1727);t.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var o=t+e;return new n.Observable(r?function(t){var n=e;return r.schedule((function(){n<o?(t.next(n++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<o&&!t.closed;)t.next(r++);t.complete()})}},859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=r(5271),i=r(4432);t.throwError=function(e,t){var r=i.isFunction(e)?e:function(){return e},o=function(e){return e.error(r())};return new n.Observable(t?function(e){return t.schedule(o,0,e)}:o)}},5710:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=r(5271),i=r(4617),o=r(6551),s=r(7761);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.async);var a=-1;return null!=t&&(o.isScheduler(t)?r=t:a=t),new n.Observable((function(t){var n=s.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=a?this.schedule(void 0,a):t.complete())}),n)}))}},3687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=r(5271),i=r(9451),o=r(1727);t.using=function(e,t){return new n.Observable((function(r){var n=e(),s=t(n);return(s?i.innerFrom(s):o.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))}},2042:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(5271),s=r(9451),a=r(4475),u=r(1727),c=r(5079),l=r(2619);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e),f=a.argsOrArgArray(e);return f.length?new o.Observable((function(e){var t=f.map((function(){return[]})),o=f.map((function(){return!1}));e.add((function(){t=o=null}));for(var a=function(a){s.innerFrom(f[a]).subscribe(c.createOperatorSubscriber(e,(function(s){if(t[a].push(s),t.every((function(e){return e.length}))){var u=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,i([],n(u))):u),t.some((function(e,t){return!e.length&&o[t]}))&&e.complete()}}),(function(){o[a]=!0,!t[a].length&&e.complete()})))},u=0;!e.closed&&u<f.length;u++)a(u);return function(){t=o=null}})):u.EMPTY}},5079:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var o=r(1403);t.createOperatorSubscriber=function(e,t,r,n,i){return new s(e,t,r,n,i)};var s=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(o.Subscriber);t.OperatorSubscriber=s},3533:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=r(4024),i=r(9451),o=r(5079);t.audit=function(e){return n.operate((function(t,r){var n=!1,s=null,a=null,u=!1,c=function(){if(null==a||a.unsubscribe(),a=null,n){n=!1;var e=s;s=null,r.next(e)}u&&r.complete()},l=function(){a=null,u&&r.complete()};t.subscribe(o.createOperatorSubscriber(r,(function(t){n=!0,s=t,a||i.innerFrom(e(t)).subscribe(a=o.createOperatorSubscriber(r,c,l))}),(function(){u=!0,(!n||!a||a.closed)&&r.complete()})))}))}},5188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=r(4617),i=r(3533),o=r(5710);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.audit((function(){return o.timer(e,t)}))}},4514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=r(4024),i=r(5729),o=r(5079);t.buffer=function(e){return n.operate((function(t,r){var n=[];return t.subscribe(o.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),e.subscribe(o.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),i.noop)),function(){n=null}}))}},2537:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(4024),o=r(5079),s=r(2447);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(r,i){var a=[],u=0;r.subscribe(o.createOperatorSubscriber(i,(function(r){var o,c,l,f,p=null;u++%t==0&&a.push([]);try{for(var d=n(a),h=d.next();!h.done;h=d.next())(m=h.value).push(r),e<=m.length&&(p=null!=p?p:[]).push(m)}catch(e){o={error:e}}finally{try{h&&!h.done&&(c=d.return)&&c.call(d)}finally{if(o)throw o.error}}if(p)try{for(var y=n(p),v=y.next();!v.done;v=y.next()){var m=v.value;s.arrRemove(a,m),i.next(m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(f=y.return)&&f.call(y)}finally{if(l)throw l.error}}}),(function(){var e,t;try{for(var r=n(a),o=r.next();!o.done;o=r.next()){var s=o.value;i.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){a=null})))}))}},8720:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(7215),o=r(4024),s=r(5079),a=r(2447),u=r(4617),c=r(2619),l=r(5421);t.bufferTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:u.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return o.operate((function(t,r){var o=[],u=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),a.arrRemove(o,e),r.next(t),u&&f()},f=function(){if(o){var t=new i.Subscription;r.add(t);var n={buffer:[],subs:t};o.push(n),l.executeSchedule(t,d,(function(){return c(n)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):u=!0,f();var p=s.createOperatorSubscriber(r,(function(e){var t,r,i=o.slice();try{for(var s=n(i),a=s.next();!a.done;a=s.next()){var u=a.value,l=u.buffer;l.push(e),y<=l.length&&c(u)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}),(function(){for(;null==o?void 0:o.length;)r.next(o.shift().buffer);null==p||p.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return o=null}));t.subscribe(p)}))}},7932:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(7215),o=r(4024),s=r(9451),a=r(5079),u=r(5729),c=r(2447);t.bufferToggle=function(e,t){return o.operate((function(r,o){var l=[];s.innerFrom(e).subscribe(a.createOperatorSubscriber(o,(function(e){var r=[];l.push(r);var n=new i.Subscription;n.add(s.innerFrom(t(e)).subscribe(a.createOperatorSubscriber(o,(function(){c.arrRemove(l,r),o.next(r),n.unsubscribe()}),u.noop)))}),u.noop)),r.subscribe(a.createOperatorSubscriber(o,(function(e){var t,r;try{for(var i=n(l),o=i.next();!o.done;o=i.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),(function(){for(;l.length>0;)o.next(l.shift());o.complete()})))}))}},1445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=r(4024),i=r(5729),o=r(5079),s=r(9451);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,a=null,u=function(){null==a||a.unsubscribe();var t=n;n=[],t&&r.next(t),s.innerFrom(e()).subscribe(a=o.createOperatorSubscriber(r,u,i.noop))};u(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=a=null})))}))}},4418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=r(9451),i=r(5079),o=r(4024);t.catchError=function e(t){return o.operate((function(r,o){var s,a=null,u=!1;a=r.subscribe(i.createOperatorSubscriber(o,void 0,void 0,(function(i){s=n.innerFrom(t(i,e(t)(r))),a?(a.unsubscribe(),a=null,s.subscribe(o)):u=!0}))),u&&(a.unsubscribe(),a=null,s.subscribe(o))}))}},4163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=r(9893);t.combineAll=n.combineLatestAll},8169:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var o=r(1047),s=r(4024),a=r(4475),u=r(4666),c=r(5966),l=r(2619);t.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var f=l.popResultSelector(t);return f?c.pipe(e.apply(void 0,i([],n(t))),u.mapOneOrManyArgs(f)):s.operate((function(e,r){o.combineLatestInit(i([e],n(a.argsOrArgArray(t))))(r)}))}},9893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=r(1047),i=r(7534);t.combineLatestAll=function(e){return i.joinAllInternals(n.combineLatest,e)}},7230:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var o=r(8169);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.combineLatest.apply(void 0,i([],n(e)))}},4098:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var o=r(4024),s=r(4554),a=r(2619),u=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e);return o.operate((function(t,o){s.concatAll()(u.from(i([t],n(e)),r)).subscribe(o)}))}},4554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=r(4594);t.concatAll=function(){return n.mergeAll(1)}},1048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=r(9010),i=r(4432);t.concatMap=function(e,t){return i.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=r(1048),i=r(4432);t.concatMapTo=function(e,t){return i.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},4724:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var o=r(4098);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concat.apply(void 0,i([],n(e)))}},4347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=r(9520),i=r(9451),o=r(4024),s=r(2160),a={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=a);var r=t.connector;return o.operate((function(t,n){var o=r();i.innerFrom(e(s.fromSubscribable(o))).subscribe(n),n.add(t.subscribe(o))}))}},6944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=r(1678);t.count=function(e){return n.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)}},440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=r(4024),i=r(5729),o=r(5079),s=r(9451);t.debounce=function(e){return n.operate((function(t,r){var n=!1,a=null,u=null,c=function(){if(null==u||u.unsubscribe(),u=null,n){n=!1;var e=a;a=null,r.next(e)}};t.subscribe(o.createOperatorSubscriber(r,(function(t){null==u||u.unsubscribe(),n=!0,a=t,u=o.createOperatorSubscriber(r,c,i.noop),s.innerFrom(e(t)).subscribe(u)}),(function(){c(),r.complete()}),void 0,(function(){a=u=null})))}))}},8157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=r(4617),i=r(4024),o=r(5079);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.operate((function(r,n){var i=null,s=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var e=s;s=null,n.next(e)}};function c(){var r=a+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);u()}r.subscribe(o.createOperatorSubscriber(n,(function(r){s=r,a=t.now(),i||(i=t.schedule(c,e),n.add(i))}),(function(){u(),n.complete()}),void 0,(function(){s=i=null})))}))}},1714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=r(4024),i=r(5079);t.defaultIfEmpty=function(e){return n.operate((function(t,r){var n=!1;t.subscribe(i.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))}},1030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=r(4617),i=r(6405),o=r(5710);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var r=o.timer(e,t);return i.delayWhen((function(){return r}))}},6405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=r(79),i=r(7138),o=r(3470),s=r(4791),a=r(9010);t.delayWhen=function e(t,r){return r?function(s){return n.concat(r.pipe(i.take(1),o.ignoreElements()),s.pipe(e(t)))}:a.mergeMap((function(e,r){return t(e,r).pipe(i.take(1),s.mapTo(e))}))}},9142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},2307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=r(4024),i=r(5079),o=r(5729);t.distinct=function(e,t){return n.operate((function(r,n){var s=new Set;r.subscribe(i.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;s.has(r)||(s.add(r),n.next(t))}))),null==t||t.subscribe(i.createOperatorSubscriber(n,(function(){return s.clear()}),o.noop))}))}},9131:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=r(9144),i=r(4024),o=r(5079);function s(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:s,i.operate((function(r,n){var i,s=!0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=t(r);!s&&e(i,o)||(s=!1,i=o,n.next(r))})))}))}},6659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=r(9131);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}},4217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=r(6809),i=r(2763),o=r(8062),s=r(1714),a=r(7138);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(u){return u.pipe(i.filter((function(t,r){return r===e})),a.take(1),r?s.defaultIfEmpty(t):o.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},4707:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var o=r(79),s=r(7443);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return o.concat(t,s.of.apply(void 0,i([],n(e))))}}},9276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=r(4024),i=r(5079);t.every=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(i){e.call(t,i,o++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=r(3977);t.exhaust=n.exhaustAll},3977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=r(368),i=r(9144);t.exhaustAll=function(){return n.exhaustMap(i.identity)}},368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=r(4338),i=r(9451),o=r(4024),s=r(5079);t.exhaustMap=function e(t,r){return r?function(o){return o.pipe(e((function(e,o){return i.innerFrom(t(e,o)).pipe(n.map((function(t,n){return r(e,t,o,n)})))})))}:o.operate((function(e,r){var n=0,o=null,a=!1;e.subscribe(s.createOperatorSubscriber(r,(function(e){o||(o=s.createOperatorSubscriber(r,void 0,(function(){o=null,a&&r.complete()})),i.innerFrom(t(e,n++)).subscribe(o))}),(function(){a=!0,!o&&r.complete()})))}))}},7829:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=r(4024),i=r(7163);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,o){return i.mergeInternals(n,o,e,t,void 0,!0,r)}))}},2763:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=r(4024),i=r(5079);t.filter=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){return e.call(t,r,o++)&&n.next(r)})))}))}},4106:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=r(4024);t.finalize=function(e){return n.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))}},8759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=r(4024),i=r(5079);function o(e,t,r){var n="index"===r;return function(r,o){var s=0;r.subscribe(i.createOperatorSubscriber(o,(function(i){var a=s++;e.call(t,i,a,r)&&(o.next(n?a:i),o.complete())}),(function(){o.next(n?-1:void 0),o.complete()})))}}t.find=function(e,t){return n.operate(o(e,t,"value"))},t.createFind=o},3999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=r(4024),i=r(8759);t.findIndex=function(e,t){return n.operate(i.createFind(e,t,"index"))}},5194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=r(8032),i=r(2763),o=r(7138),s=r(1714),a=r(8062),u=r(9144);t.first=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.take(1),r?s.defaultIfEmpty(t):a.throwIfEmpty((function(){return new n.EmptyError})))}}},2735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=r(9010);t.flatMap=n.mergeMap},1664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=r(5271),i=r(9451),o=r(9520),s=r(4024),a=r(5079);t.groupBy=function(e,t,r,u){return s.operate((function(s,c){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,u=t.connector):l=t;var f=new Map,p=function(e){f.forEach(e),e(c)},d=function(e){return p((function(t){return t.error(e)}))},h=0,y=!1,v=new a.OperatorSubscriber(c,(function(t){try{var s=e(t),p=f.get(s);if(!p){f.set(s,p=u?u():new o.Subject);var m=(g=s,_=p,(w=new n.Observable((function(e){h++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--h&&y&&v.unsubscribe()}}))).key=g,w);if(c.next(m),r){var b=a.createOperatorSubscriber(p,(function(){p.complete(),null==b||b.unsubscribe()}),void 0,void 0,(function(){return f.delete(s)}));v.add(i.innerFrom(r(m)).subscribe(b))}}p.next(l?l(t):t)}catch(e){d(e)}var g,_,w}),(function(){return p((function(e){return e.complete()}))}),d,(function(){return f.clear()}),(function(){return y=!0,0===h}));s.subscribe(v)}))}},3470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=r(4024),i=r(5079),o=r(5729);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,o.noop))}))}},9549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=r(4024),i=r(5079);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},7534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=r(9144),i=r(4666),o=r(5966),s=r(9010),a=r(2378);t.joinAllInternals=function(e,t){return o.pipe(a.toArray(),s.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):n.identity)}},9582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=r(8032),i=r(2763),o=r(4288),s=r(8062),a=r(1714),u=r(9144);t.last=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.takeLast(1),r?a.defaultIfEmpty(t):s.throwIfEmpty((function(){return new n.EmptyError})))}}},4338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=r(4024),i=r(5079);t.map=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,o++))})))}))}},4791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=r(4338);t.mapTo=function(e){return n.map((function(){return e}))}},9318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.materialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},7446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=r(1678),i=r(4432);t.max=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},6094:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var o=r(4024),s=r(4475),a=r(4594),u=r(2619),c=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popNumber(e,1/0);return e=s.argsOrArgArray(e),o.operate((function(t,o){a.mergeAll(l)(c.from(i([t],n(e)),r)).subscribe(o)}))}},4594:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=r(9010),i=r(9144);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(i.identity,e)}},7163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=r(9451),i=r(5421),o=r(5079);t.mergeInternals=function(e,t,r,s,a,u,c,l){var f=[],p=0,d=0,h=!1,y=function(){!h||f.length||p||t.complete()},v=function(e){return p<s?m(e):f.push(e)},m=function(e){u&&t.next(e),p++;var l=!1;n.innerFrom(r(e,d++)).subscribe(o.createOperatorSubscriber(t,(function(e){null==a||a(e),u?v(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{p--;for(var e=function(){var e=f.shift();c?i.executeSchedule(t,c,(function(){return m(e)})):m(e)};f.length&&p<s;)e();y()}catch(e){t.error(e)}})))};return e.subscribe(o.createOperatorSubscriber(t,v,(function(){h=!0,y()}))),function(){null==l||l()}}},9010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=r(4338),i=r(9451),o=r(4024),s=r(7163),a=r(4432);t.mergeMap=function e(t,r,u){return void 0===u&&(u=1/0),a.isFunction(r)?e((function(e,o){return n.map((function(t,n){return r(e,t,o,n)}))(i.innerFrom(t(e,o)))}),u):("number"==typeof r&&(u=r),o.operate((function(e,r){return s.mergeInternals(e,r,t,u)})))}},8983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(9010),i=r(4432);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),i.isFunction(t)?n.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),n.mergeMap((function(){return e}),r))}},2170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=r(4024),i=r(7163);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),n.operate((function(n,o){var s=t;return i.mergeInternals(n,o,(function(t,r){return e(s,t,r)}),r,(function(e){s=e}),!1,void 0,(function(){return s=null}))}))}},3674:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var o=r(6094);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.merge.apply(void 0,i([],n(e)))}},1446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=r(1678),i=r(4432);t.min=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})}},2318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=r(3739),i=r(4432),o=r(4347);t.multicast=function(e,t){var r=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?o.connect(t,{connector:r}):function(e){return new n.ConnectableObservable(e,r)}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=r(5421),i=r(4024),o=r(5079);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(r,i){r.subscribe(o.createOperatorSubscriber(i,(function(r){return n.executeSchedule(i,e,(function(){return i.next(r)}),t)}),(function(){return n.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(r){return n.executeSchedule(i,e,(function(){return i.error(r)}),t)})))}))}},4764:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var o=r(4024),s=r(9451),a=r(4475),u=r(5079),c=r(5729);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.argsOrArgArray(e);return o.operate((function(e,t){var o=i([e],n(r)),a=function(){if(!t.closed)if(o.length>0){var e=void 0;try{e=s.innerFrom(o.shift())}catch(e){return void a()}var r=u.createOperatorSubscriber(t,void 0,c.noop,c.noop);e.subscribe(r),r.add(a)}else t.complete()};a()}))}},402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=r(4024),i=r(5079);t.pairwise=function(){return n.operate((function(e,t){var r,n=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))}},5960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763);t.partition=function(e,t){return function(r){return[i.filter(e,t)(r),i.filter(n.not(e,t))(r)]}}},5658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=r(4338);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return n.map((function(t){for(var n=t,i=0;i<r;i++){var o=null==n?void 0:n[e[i]];if(void 0===o)return;n=o}return n}))}},3881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=r(9520),i=r(2318),o=r(4347);t.publish=function(e){return e?function(t){return o.connect(e)(t)}:function(e){return i.multicast(new n.Subject)(e)}}},1755:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=r(8042),i=r(3739);t.publishBehavior=function(e){return function(t){var r=new n.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return r}))}}},9801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=r(7257),i=r(3739);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},5021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=r(216),i=r(2318),o=r(4432);t.publishReplay=function(e,t,r,s){r&&!o.isFunction(r)&&(s=r);var a=o.isFunction(r)?r:void 0;return function(r){return i.multicast(new n.ReplaySubject(e,t,s),a)(r)}}},2749:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var o=r(4475),s=r(9925);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.raceWith.apply(void 0,i([],n(o.argsOrArgArray(e))))}},9925:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var o=r(7779),s=r(4024),a=r(9144);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?s.operate((function(t,r){o.raceInit(i([t],n(e)))(r)})):a.identity}},1678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=r(2181),i=r(4024);t.reduce=function(e,t){return i.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},2711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=r(4024),i=r(5079);t.refCount=function(){return n.operate((function(e,t){var r=null;e._refCount++;var n=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))}},1194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=r(1727),i=r(4024),o=r(5079),s=r(9451),a=r(5710);t.repeat=function(e){var t,r,u=1/0;return null!=e&&("object"==typeof e?(t=e.count,u=void 0===t?1/0:t,r=e.delay):u=e),u<=0?function(){return n.EMPTY}:i.operate((function(e,t){var n,i=0,c=function(){if(null==n||n.unsubscribe(),n=null,null!=r){var e="number"==typeof r?a.timer(r):s.innerFrom(r(i)),u=o.createOperatorSubscriber(t,(function(){u.unsubscribe(),l()}));e.subscribe(u)}else l()},l=function(){var r=!1;n=e.subscribe(o.createOperatorSubscriber(t,void 0,(function(){++i<u?n?c():r=!0:t.complete()}))),r&&c()};l()}))}},7085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.repeatWhen=function(e){return i.operate((function(t,r){var i,s,a=!1,u=!1,c=!1,l=function(){return c&&u&&(r.complete(),!0)},f=function(){c=!1,i=t.subscribe(o.createOperatorSubscriber(r,void 0,(function(){c=!0,!l()&&(s||(s=new n.Subject,e(s).subscribe(o.createOperatorSubscriber(r,(function(){i?f():a=!0}),(function(){u=!0,l()})))),s).next()}))),a&&(i.unsubscribe(),i=null,a=!1,f())};f()}))}},7524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=r(4024),i=r(5079),o=r(9144),s=r(5710),a=r(9451);t.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,u=void 0===r?1/0:r,c=t.delay,l=t.resetOnSuccess,f=void 0!==l&&l;return u<=0?o.identity:n.operate((function(e,t){var r,n=0,o=function(){var l=!1;r=e.subscribe(i.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++<u){var f=function(){r?(r.unsubscribe(),r=null,o()):l=!0};if(null!=c){var p="number"==typeof c?s.timer(c):a.innerFrom(c(e,n)),d=i.createOperatorSubscriber(t,(function(){d.unsubscribe(),f()}),(function(){t.complete()}));p.subscribe(d)}else f()}else t.error(e)}))),l&&(r.unsubscribe(),r=null,o())};o()}))}},548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.retryWhen=function(e){return i.operate((function(t,r){var i,s,a=!1,u=function(){i=t.subscribe(o.createOperatorSubscriber(r,void 0,void 0,(function(t){s||(s=new n.Subject,e(s).subscribe(o.createOperatorSubscriber(r,(function(){return i?u():a=!0})))),s&&s.next(t)}))),a&&(i.unsubscribe(),i=null,a=!1,u())};u()}))}},6577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(4024),i=r(5729),o=r(5079);t.sample=function(e){return n.operate((function(t,r){var n=!1,s=null;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,s=e}))),e.subscribe(o.createOperatorSubscriber(r,(function(){if(n){n=!1;var e=s;s=null,r.next(e)}}),i.noop))}))}},3815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=r(4617),i=r(6577),o=r(4449);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.sample(o.interval(e,t))}},7250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=r(4024),i=r(2181);t.scan=function(e,t){return n.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},2181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=r(5079);t.scanInternals=function(e,t,r,i,o){return function(s,a){var u=r,c=t,l=0;s.subscribe(n.createOperatorSubscriber(a,(function(t){var r=l++;c=u?e(c,t,r):(u=!0,t),i&&a.next(c)}),o&&function(){u&&a.next(c),a.complete()}))}}},842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=r(4024),i=r(5079);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(r,n){var o={buffer:[],complete:!1},s={buffer:[],complete:!1},a=function(e){n.next(e),n.complete()},u=function(e,r){var o=i.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?a(!1):e.buffer.push(n):!t(n,i.shift())&&a(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&a(0===n.length),null==o||o.unsubscribe()}));return o};r.subscribe(u(o,s)),e.subscribe(u(s,o))}))}},9728:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var o=r(9451),s=r(9520),a=r(1403),u=r(4024);function c(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];if(!0!==t){if(!1!==t){var s=new a.SafeSubscriber({next:function(){s.unsubscribe(),e()}});return t.apply(void 0,i([],n(r))).subscribe(s)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.Subject}:t,n=e.resetOnError,i=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,p=e.resetOnRefCountZero,d=void 0===p||p;return function(e){var t,n,s,l=0,p=!1,h=!1,y=function(){null==n||n.unsubscribe(),n=void 0},v=function(){y(),t=s=void 0,p=h=!1},m=function(){var e=t;v(),null==e||e.unsubscribe()};return u.operate((function(e,u){l++,h||p||y();var b=s=null!=s?s:r();u.add((function(){0!=--l||h||p||(n=c(m,d))})),b.subscribe(u),!t&&l>0&&(t=new a.SafeSubscriber({next:function(e){return b.next(e)},error:function(e){h=!0,y(),n=c(v,i,e),b.error(e)},complete:function(){p=!0,y(),n=c(v,f),b.complete()}}),o.innerFrom(e).subscribe(t))}))(e)}}},7768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=r(216),i=r(9728);t.shareReplay=function(e,t,r){var o,s,a,u,c=!1;return e&&"object"==typeof e?(o=e.bufferSize,u=void 0===o?1/0:o,s=e.windowTime,t=void 0===s?1/0:s,c=void 0!==(a=e.refCount)&&a,r=e.scheduler):u=null!=e?e:1/0,i.share({connector:function(){return new n.ReplaySubject(u,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},2445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=r(8032),i=r(6228),o=r(1137),s=r(4024),a=r(5079);t.single=function(e){return s.operate((function(t,r){var s,u=!1,c=!1,l=0;t.subscribe(a.createOperatorSubscriber(r,(function(n){c=!0,e&&!e(n,l++,t)||(u&&r.error(new i.SequenceError("Too many matching values")),u=!0,s=n)}),(function(){u?(r.next(s),r.complete()):r.error(c?new o.NotFoundError("No matching values"):new n.EmptyError)})))}))}},6262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=r(2763);t.skip=function(e){return n.filter((function(t,r){return e<=r}))}},7397:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=r(9144),i=r(4024),o=r(5079);t.skipLast=function(e){return e<=0?n.identity:i.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(o.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var s=o%e,a=n[s];n[s]=t,r.next(a)}}))),function(){n=null}}))}},9900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),s=r(5729);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,a=i.createOperatorSubscriber(r,(function(){null==a||a.unsubscribe(),n=!0}),s.noop);o.innerFrom(e).subscribe(a),t.subscribe(i.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))}},1620:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=r(4024),i=r(5079);t.skipWhile=function(e){return n.operate((function(t,r){var n=!1,o=0;t.subscribe(i.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,o++)))&&r.next(t)})))}))}},3424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=r(79),i=r(2619),o=r(4024);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.popScheduler(e);return o.operate((function(t,i){(r?n.concat(e,t,r):n.concat(e,t)).subscribe(i)}))}},831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=r(4024);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}},411:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(7222),i=r(9144);t.switchAll=function(){return n.switchMap(i.identity)}},7222:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(9451),i=r(4024),o=r(5079);t.switchMap=function(e,t){return i.operate((function(r,i){var s=null,a=0,u=!1,c=function(){return u&&!s&&i.complete()};r.subscribe(o.createOperatorSubscriber(i,(function(r){null==s||s.unsubscribe();var u=0,l=a++;n.innerFrom(e(r,l)).subscribe(s=o.createOperatorSubscriber(i,(function(e){return i.next(t?t(r,e,l,u++):e)}),(function(){s=null,c()})))}),(function(){u=!0,c()})))}))}},6464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=r(7222),i=r(4432);t.switchMapTo=function(e,t){return i.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},4434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=r(7222),i=r(4024);t.switchScan=function(e,t){return i.operate((function(r,i){var o=t;return n.switchMap((function(t,r){return e(o,t,r)}),(function(e,t){return o=t,t}))(r).subscribe(i),function(){o=null}}))}},7138:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=r(1727),i=r(4024),o=r(5079);t.take=function(e){return e<=0?function(){return n.EMPTY}:i.operate((function(t,r){var n=0;t.subscribe(o.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))}},4288:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(1727),o=r(4024),s=r(5079);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:o.operate((function(t,r){var i=[];t.subscribe(s.createOperatorSubscriber(r,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var o=n(i),s=o.next();!s.done;s=o.next()){var a=s.value;r.next(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){i=null})))}))}},7341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),s=r(5729);t.takeUntil=function(e){return n.operate((function(t,r){o.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){return r.complete()}),s.noop)),!r.closed&&t.subscribe(r)}))}},653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=r(4024),i=r(5079);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){var i=e(r,o++);(i||t)&&n.next(r),!i&&n.complete()})))}))}},8668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=r(4432),i=r(4024),o=r(5079),s=r(9144);t.tap=function(e,t,r){var a=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return a?i.operate((function(e,t){var r;null===(r=a.subscribe)||void 0===r||r.call(a);var n=!0;e.subscribe(o.createOperatorSubscriber(t,(function(e){var r;null===(r=a.next)||void 0===r||r.call(a,e),t.next(e)}),(function(){var e;n=!1,null===(e=a.complete)||void 0===e||e.call(a),t.complete()}),(function(e){var r;n=!1,null===(r=a.error)||void 0===r||r.call(a,e),t.error(e)}),(function(){var e,t;n&&(null===(e=a.unsubscribe)||void 0===e||e.call(a)),null===(t=a.finalize)||void 0===t||t.call(a)})))})):s.identity}},9466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.defaultThrottleConfig=void 0;var n=r(4024),i=r(5079),o=r(9451);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),n.operate((function(t,n){var s=r.leading,a=r.trailing,u=!1,c=null,l=null,f=!1,p=function(){null==l||l.unsubscribe(),l=null,a&&(y(),f&&n.complete())},d=function(){l=null,f&&n.complete()},h=function(t){return l=o.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(n,p,d))},y=function(){if(u){u=!1;var e=c;c=null,n.next(e),!f&&h(e)}};t.subscribe(i.createOperatorSubscriber(n,(function(e){u=!0,c=e,(!l||l.closed)&&(s?y():h(e))}),(function(){f=!0,(!(a&&u&&l)||l.closed)&&n.complete()})))}))}},9705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=r(4617),i=r(9466),o=r(5710);t.throttleTime=function(e,t,r){void 0===t&&(t=n.asyncScheduler),void 0===r&&(r=i.defaultThrottleConfig);var s=o.timer(e,t);return i.throttle((function(){return s}),r)}},8062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=r(8032),i=r(4024),o=r(5079);function s(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=s),i.operate((function(t,r){var n=!1;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))}},6610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=r(4617),i=r(4024),o=r(5079);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),i.operate((function(t,r){var n=e.now();t.subscribe(o.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new s(t,o))})))}))};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},6279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=r(4617),i=r(7761),o=r(4024),s=r(9451),a=r(9876),u=r(5079),c=r(5421);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=a.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 r=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,a=r.first,f=r.each,p=r.with,d=void 0===p?l:p,h=r.scheduler,y=void 0===h?null!=t?t:n.asyncScheduler:h,v=r.meta,m=void 0===v?null:v;if(null==a&&null==f)throw new TypeError("No timeout provided.");return o.operate((function(e,t){var r,n,i=null,o=0,l=function(e){n=c.executeSchedule(t,y,(function(){try{r.unsubscribe(),s.innerFrom(d({meta:m,lastValue:i,seen:o})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(u.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),o++,t.next(i=e),f>0&&l(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!o&&l(null!=a?"number"==typeof a?a:+a-y.now():f)}))}},8132:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=r(4617),i=r(7761),o=r(6279);t.timeoutWith=function(e,t,r){var s,a,u;if(r=null!=r?r:n.async,i.isValidDate(e)?s=e:"number"==typeof e&&(a=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==s&&null==a)throw new TypeError("No timeout provided.");return o.timeout({first:s,each:a,scheduler:r,with:u})}},4553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=r(1713),i=r(4338);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},2378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=r(1678),i=r(4024),o=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){n.reduce(o,[])(e).subscribe(t)}))}},4768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=r(9520),i=r(4024),o=r(5079),s=r(5729);t.window=function(e){return i.operate((function(t,r){var i=new n.Subject;r.next(i.asObservable());var a=function(e){i.error(e),r.error(e)};return t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),r.complete()}),a)),e.subscribe(o.createOperatorSubscriber(r,(function(){i.complete(),r.next(i=new n.Subject)}),s.noop,a)),function(){null==i||i.unsubscribe(),i=null}}))}},131:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(9520),o=r(4024),s=r(5079);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return o.operate((function(t,o){var a=[new i.Subject],u=0;o.next(a[0].asObservable()),t.subscribe(s.createOperatorSubscriber(o,(function(t){var s,c;try{for(var l=n(a),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){s={error:e}}finally{try{f&&!f.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}var p=u-e+1;if(p>=0&&p%r==0&&a.shift().complete(),++u%r==0){var d=new i.Subject;a.push(d),o.next(d.asObservable())}}),(function(){for(;a.length>0;)a.shift().complete();o.complete()}),(function(e){for(;a.length>0;)a.shift().error(e);o.error(e)}),(function(){a=null})))}))}},9579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=r(9520),i=r(4617),o=r(7215),s=r(4024),a=r(5079),u=r(2447),c=r(2619),l=r(5421);t.windowTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:i.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return s.operate((function(t,r){var i=[],s=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),u.arrRemove(i,e),s&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var s=new n.Subject,a={window:s,subs:t,seen:0};i.push(a),r.next(s.asObservable()),l.executeSchedule(t,d,(function(){return c(a)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):s=!0,f();var p=function(e){return i.slice().forEach(e)},v=function(e){p((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(a.createOperatorSubscriber(r,(function(e){p((function(t){t.window.next(e),y<=++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}}))}},752:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(9520),o=r(7215),s=r(4024),a=r(9451),u=r(5079),c=r(5729),l=r(2447);t.windowToggle=function(e,t){return s.operate((function(r,s){var f=[],p=function(e){for(;0<f.length;)f.shift().error(e);s.error(e)};a.innerFrom(e).subscribe(u.createOperatorSubscriber(s,(function(e){var r=new i.Subject;f.push(r);var n,d=new o.Subscription;try{n=a.innerFrom(t(e))}catch(e){return void p(e)}s.next(r.asObservable()),d.add(n.subscribe(u.createOperatorSubscriber(s,(function(){l.arrRemove(f,r),r.complete(),d.unsubscribe()}),c.noop,p)))}),c.noop)),r.subscribe(u.createOperatorSubscriber(s,(function(e){var t,r,i=f.slice();try{for(var o=n(i),s=o.next();!s.done;s=o.next())s.value.next(e)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();s.complete()}),p,(function(){for(;0<f.length;)f.shift().unsubscribe()})))}))}},582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=r(9520),i=r(4024),o=r(5079),s=r(9451);t.windowWhen=function(e){return i.operate((function(t,r){var i,a,u=function(e){i.error(e),r.error(e)},c=function(){var t;null==a||a.unsubscribe(),null==i||i.complete(),i=new n.Subject,r.next(i.asObservable());try{t=s.innerFrom(e())}catch(e){return void u(e)}t.subscribe(a=o.createOperatorSubscriber(r,c,c,u))};c(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return i.next(e)}),(function(){i.complete(),r.complete()}),u,(function(){null==a||a.unsubscribe(),i=null})))}))}},4255:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var o=r(4024),s=r(5079),a=r(9451),u=r(9144),c=r(5729),l=r(2619);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e);return o.operate((function(t,o){for(var l=e.length,f=new Array(l),p=e.map((function(){return!1})),d=!1,h=function(t){a.innerFrom(e[t]).subscribe(s.createOperatorSubscriber(o,(function(e){f[t]=e,d||p[t]||(p[t]=!0,(d=p.every(u.identity))&&(p=null))}),c.noop))},y=0;y<l;y++)h(y);t.subscribe(s.createOperatorSubscriber(o,(function(e){if(d){var t=i([e],n(f));o.next(r?r.apply(void 0,i([],n(t))):t)}})))}))}},3253:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(2042),s=r(4024);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.operate((function(t,r){o.zip.apply(void 0,i([t],n(e))).subscribe(r)}))}},7220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=r(2042),i=r(7534);t.zipAll=function(e){return i.joinAllInternals(n.zip,e)}},9287:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var o=r(3253);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.zip.apply(void 0,i([],n(e)))}},3584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=r(5271);t.scheduleArray=function(e,t){return new n.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}},1659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=r(5271),i=r(5421);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(r){i.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();i.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}},8840:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=r(5271),i=r(5686),o=r(4432),s=r(5421);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return s.executeSchedule(r,t,(function(){n=e[i.iterator](),s.executeSchedule(r,t,(function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){return void r.error(e)}i?r.complete():r.next(t)}),0,!0)})),function(){return o.isFunction(null==n?void 0:n.return)&&n.return()}}))}},5704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=r(9451),i=r(3165),o=r(831);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},4644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=r(9451),i=r(3165),o=r(831);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},3035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=r(1659),i=r(9266);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},3200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=r(5704),i=r(4644),o=r(3584),s=r(8840),a=r(1659),u=r(3292),c=r(2644),l=r(8219),f=r(6380),p=r(7707),d=r(4883),h=r(9266),y=r(3035);t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return n.scheduleObservable(e,t);if(l.isArrayLike(e))return o.scheduleArray(e,t);if(c.isPromise(e))return i.schedulePromise(e,t);if(p.isAsyncIterable(e))return a.scheduleAsyncIterable(e,t);if(f.isIterable(e))return s.scheduleIterable(e,t);if(h.isReadableStreamLike(e))return y.scheduleReadableStreamLike(e,t)}throw d.createInvalidObservableTypeError(e)}},4756:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var o=function(e){function t(t,r){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(7215).Subscription);t.Action=o},5364:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var o=r(1172),s=r(6741),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=a},1834:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var o=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 r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AnimationFrameScheduler=o},3761:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var o=r(1172),s=r(6703),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.immediateProvider.clearImmediate(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AsapAction=a},1386:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var o=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 r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AsapScheduler=o},1172:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var o=r(4756),s=r(9678),a=r(2447),u=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return i(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),s.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&s.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,a.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o.Action);t.AsyncAction=u},6759:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var o=r(3980),s=function(e){function t(t,r){void 0===r&&(r=o.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(o.Scheduler);t.AsyncScheduler=s},6354:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var o=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(r(1172).AsyncAction);t.QueueAction=o},3144:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(6759).AsyncScheduler);t.QueueScheduler=o},8847:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var o=r(1172),s=r(7215),a=function(e){function t(t,r){void 0===t&&(t=u),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return i(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(r(6759).AsyncScheduler);t.VirtualTimeScheduler=a;var u=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return i(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return s.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},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}(o.AsyncAction);t.VirtualAction=u},6192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=r(5364),i=r(1834);t.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},6741:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var o=r(7215);t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,n=i.cancelAnimationFrame);var s=r((function(t){n=void 0,e(t)}));return new o.Subscription((function(){return null==n?void 0:n(s)}))},requestAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],n(e)))},cancelAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],n(e)))},delegate:void 0}},4502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=r(3761),i=r(1386);t.asapScheduler=new i.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},4617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=r(1172),i=r(6759);t.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},1713:(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,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var o=r(2534),s=o.Immediate.setImmediate,a=o.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.immediateProvider.delegate;return((null==o?void 0:o.setImmediate)||s).apply(void 0,i([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||a)(e)},delegate:void 0}},9678:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,n([e,i],r(o))):setInterval.apply(void 0,n([e,i],r(o)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}},1241:(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}},8344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=r(6354),i=r(3144);t.queueScheduler=new i.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},8972:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,n([e,i],r(o))):setTimeout.apply(void 0,n([e,i],r(o)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}},5686:(e,t)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=r,t.iterator=r()},2138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},9251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6809:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=r(9876);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},8032:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=r(9876);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},2534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var r,n=1,i={};function o(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return i[t]=!0,r||(r=Promise.resolve()),r.then((function(){return o(t)&&e()})),t},clearImmediate:function(e){o(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},1137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(9876);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},7392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=r(9876);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},6228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=r(9876);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},5463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=r(9876);t.UnsubscriptionError=n.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}}))},2619:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=r(4432),i=r(6551);function o(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(o(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(o(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof o(e)?e.pop():t}},4744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var r=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,o=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((a=t)&&"object"==typeof a&&n(a)===i){var s=o(t);return{args:s.map((function(e){return t[e]})),keys:s}}}var a;return{args:e,keys:null}}},4475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},2447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},9876:(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}},1589:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})}},4770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=r(3782),i=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,o=r.errorThrown,s=r.error;if(i=null,o)throw s}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},5421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule((function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(o),!i)return o}},9144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},8219:(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}},7707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=r(4432);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},7761:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},4432:(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,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=r(2138),i=r(4432);t.isInteropObservable=function(e){return i.isFunction(e[n.observable])}},6380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=r(5686),i=r(4432);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[n.iterator])}},1211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=r(5271),i=r(4432);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},2644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=r(4432);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},9266:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},o=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||u(e,t)}))})}function u(e,t){try{(r=o[e](t)).value instanceof i?Promise.resolve(r.value.v).then(c,l):f(s[0][2],r)}catch(e){f(s[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),s.shift(),s.length&&u(s[0][0],s[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var s=r(4432);t.readableStreamLikeToAsyncGenerator=function(e){return o(this,arguments,(function(){var t,r,o;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,i(t.read())];case 3:return r=n.sent(),o=r.value,r.done?[4,i(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,i(o)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return s.isFunction(null==e?void 0:e.getReader)}},6551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=r(4432);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},4024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=r(4432);function i(e){return n.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")}}},4666:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var o=r(4338),s=Array.isArray;t.mapOneOrManyArgs=function(e){return o.map((function(t){return function(e,t){return s(t)?e.apply(void 0,i([],n(t))):e(t)}(e,t)}))}},5729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},1574:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(r,n){return!e.call(t,r,n)}}},5966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=r(9144);function i(e){return 0===e.length?n.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},7234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=r(3782),i=r(8972);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},4883:(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.")}},9978:(e,t,r)=>{"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 n=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var i=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var o=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return o.buffer}});var s=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return s.bufferCount}});var a=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var u=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var c=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return c.bufferWhen}});var l=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return l.catchError}});var f=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var p=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return p.combineLatestAll}});var d=r(8169);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return d.combineLatest}});var h=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return h.combineLatestWith}});var y=r(4098);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return y.concat}});var v=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return v.concatAll}});var m=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return m.concatMap}});var b=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return b.concatMapTo}});var g=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return g.concatWith}});var _=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _.connect}});var w=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return w.count}});var O=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return O.debounce}});var S=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return S.debounceTime}});var E=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return E.defaultIfEmpty}});var I=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return I.delay}});var T=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return T.delayWhen}});var j=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return j.dematerialize}});var P=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return P.distinct}});var x=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return x.distinctUntilChanged}});var A=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return A.distinctUntilKeyChanged}});var N=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return N.elementAt}});var M=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return M.endWith}});var k=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return k.every}});var D=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return D.exhaust}});var R=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return R.exhaustAll}});var C=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return C.exhaustMap}});var $=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return $.expand}});var F=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return F.filter}});var q=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return q.finalize}});var L=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return L.find}});var B=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return B.findIndex}});var U=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return U.first}});var V=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return V.groupBy}});var z=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return z.ignoreElements}});var Q=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Q.isEmpty}});var Y=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Y.last}});var W=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return W.map}});var H=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return H.mapTo}});var K=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return K.materialize}});var G=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return G.max}});var J=r(6094);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return J.merge}});var Z=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Z.mergeAll}});var X=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var re=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return re.mergeScan}});var ne=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var ie=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var oe=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return oe.multicast}});var se=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return se.observeOn}});var ae=r(4764);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return ae.onErrorResumeNext}});var ue=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ue.pairwise}});var ce=r(5960);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ce.partition}});var le=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return le.pluck}});var fe=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var pe=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return pe.publishBehavior}});var de=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return de.publishLast}});var he=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return he.publishReplay}});var ye=r(2749);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ye.race}});var ve=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ve.raceWith}});var me=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return me.reduce}});var be=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return be.repeat}});var ge=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ge.repeatWhen}});var _e=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return _e.retry}});var we=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return we.retryWhen}});var Oe=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Oe.refCount}});var Se=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Se.sample}});var Ee=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Ee.sampleTime}});var Ie=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Ie.scan}});var Te=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Te.sequenceEqual}});var je=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return je.share}});var Pe=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Pe.shareReplay}});var xe=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return xe.single}});var Ae=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ae.skip}});var Ne=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Ne.skipLast}});var Me=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Me.skipUntil}});var ke=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return ke.skipWhile}});var De=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return De.startWith}});var Re=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Re.subscribeOn}});var Ce=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ce.switchAll}});var $e=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return $e.switchMap}});var Fe=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Fe.switchMapTo}});var qe=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return qe.switchScan}});var Le=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Le.take}});var Be=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Be.takeLast}});var Ue=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ue.takeUntil}});var Ve=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ve.takeWhile}});var ze=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return ze.tap}});var Qe=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Qe.throttle}});var Ye=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ye.throttleTime}});var We=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return We.throwIfEmpty}});var He=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return He.timeInterval}});var Ke=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Ke.timeout}});var Ge=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ge.timeoutWith}});var Je=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Je.timestamp}});var Ze=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ze.toArray}});var Xe=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var rt=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return rt.windowToggle}});var nt=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var it=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var ot=r(3253);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ot.zip}});var st=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return st.zipAll}});var at=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return at.zipWith}})},9380:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantMutationContext=t.AiAssistantChatContext=void 0,t.AiAssistantChatContext=class{constructor(e){this.profileId=e.profileId,this.prompt=e.prompt}},t.AiAssistantMutationContext=class{constructor(e){this.profileId=e.profileId,this.type=e.type,this.resource=e.resource,this.payload=e.payload}}},7698:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantMutateRequestSchema=t.AiAssistantChatRequestSchema=void 0,t.AiAssistantChatRequestSchema={type:"object",properties:{profileId:{type:"string"},integrationId:{type:"string"},clientId:{type:"string"},clientRequestId:{type:"string"},prompt:{type:"string"}},required:["profileId","integrationId","clientId","clientRequestId","prompt"]},t.AiAssistantMutateRequestSchema={type:"object",properties:{profileId:{type:"string"},integrationId:{type:"string"},type:{type:"string",enum:["insert","update","delete"]},resource:{type:"string",enum:["instruction","context","profile"]}},required:["profileId","integrationId","type","resource"],oneOf:[{properties:{type:{const:"insert"},resource:{const:"profile"},payload:{type:"object",properties:{modelName:{type:"string",enum:["gpt-3.5-turbo","gpt-4"]},strictContext:{type:"boolean"}},required:["modelName","strictContext"]}}},{properties:{type:{const:"insert"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"},instruction:{type:"string"}},required:["id","instruction"]}}},{properties:{type:{const:"insert"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"},title:{type:"string"},context:{type:"string"}},required:["id","title","context"]}}},{properties:{type:{const:"update"},resource:{const:"profile"},payload:{type:"object",properties:{modelName:{type:"string",enum:["gpt-3.5-turbo","gpt-4"]},strictContext:{type:"boolean"}}}}},{properties:{type:{const:"update"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"},instruction:{type:"string"}},required:["id","instruction"]}}},{properties:{type:{const:"update"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"},title:{type:"string"},context:{type:"string"}}}}},{properties:{type:{const:"delete"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"}},required:["id"]}}},{properties:{type:{const:"delete"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"}},required:["id"]}}},{properties:{type:{const:"delete"},resource:{const:"profile"},payload:{type:"object"}}}]}},6614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenAiModelData=void 0,t.OpenAiModelData={"gpt-4":{tokens:8192},"gpt-3.5-turbo":{tokens:4096}}},2943:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiCallContext=void 0,t.ApiCallContext=class{constructor(e){this.endpointId=e.endpointId,this.url=e.url,this.method=e.method,this.headers=e.headers,this.body=e.body,this.queryParams=e.queryParams,this.pathParams=e.pathParams,this.serverUrlOverride=e.serverUrlOverride}}},5218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoverOpenApiSchemaRequestSchema=t.UpdateAllowedHostsRequestSchema=t.DiscoverGraphQLConnectionSchemaRequestSchema=t.DiscoverDataConnectionSchemaRequestSchema=t.TestDataConnectionRequestSchema=t.DeleteIntegrationRequestSchema=t.UpsertIntegrationRequestSchema=t.UpdateOpenIdProviderRequestSchema=void 0;const n=r(133);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}}},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},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},s={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}}},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},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}}},u={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}}}}},c={type:"object",nullable:!1,required:["baseUrl"],properties:{baseUrl:{type:"string",nullable:!1,format:"uri"}}},l={type:"object",required:[],properties:{account:{type:"string",nullable:!1},username:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!1},warehouse:{type:"string",nullable:!1},role:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}}}};t.UpsertIntegrationRequestSchema={type:"object",required:["type","id"],properties:{id:{type:"string",nullable:!1},schema:{type:"object",nullable:!0}},oneOf:[{type:"object",required:[],properties:{type:{const:n.IntegrationType.built_in_db}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mysql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.oracledb},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:u}}}},{type:"object",required:[],properties:{type:{const:n.IntegrationType.api},configuration:{type:"object",nullable:!0,required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",nullable:!1,required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",nullable:!1}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:c}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:l}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.datadog},configuration:{type:"object",nullable:!1,required:["apiKey","appKey","datadogRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},appKey:{type:"string",nullable:!1,isSecret:{}},datadogRegion:{type:"string",nullable:!1,enum:Object.keys(n.datadogRegionMap)}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.newrelic},configuration:{type:"object",nullable:!1,required:["apiKey","newRelicRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},newRelicRegion:{type:"string",nullable:!1,enum:Object.keys(n.newRelicRegionMap)}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.auth0},configuration:{type:"object",nullable:!1,required:["clientId","domain"],properties:{clientId:{type:"string",nullable:!1},domain:{type:"string",nullable:!1}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.jwt_rsa},configuration:{type:"object",nullable:!1,required:["jwksUri"],properties:{jwksUri:{type:"string",nullable:!1},validations:{type:"object",nullable:!0,properties:{iss:{type:"string",nullable:!0},aud:{type:"string",nullable:!0}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.jwt_hmac},configuration:{type:"object",nullable:!1,required:["verifyUri"],properties:{verifyUri:{type:"string",nullable:!1}}}}},{type:"object",required:[],properties:{type:{const:n.IntegrationType.ai_assistant},configuration:{type:"object",nullable:!1,required:[],properties:{apiKey:{type:"string",nullable:!1}}}}}]},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:n.IntegrationType.mysql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.oracledb},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:u}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:l}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:c}}}}]},t.DiscoverDataConnectionSchemaRequestSchema={type:"object",required:["integrationType"],oneOf:[{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mysql},connectionOptions:i}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.oracledb},connectionOptions:o}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mssql},connectionOptions:s}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.snowflake},connectionOptions:l}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.postgres},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.cockroach},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mongo},connectionOptions:u}},{type:"object",properties:{integrationType:{const:n.IntegrationType.built_in_db}}}]},t.DiscoverGraphQLConnectionSchemaRequestSchema={type:"object",required:["integrationType"],properties:{integrationType:{const:n.IntegrationType.graphql},connectionOptions:c}},t.UpdateAllowedHostsRequestSchema={type:"object",required:["allowedHosts"],properties:{allowedHosts:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},t.DiscoverOpenApiSchemaRequestSchema={type:"object",required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",format:"uri"}}}}}},8030:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CronExpression=void 0,(r=t.CronExpression||(t.CronExpression={})).EVERY_SECOND="* * * * * *",r.EVERY_5_SECONDS="*/5 * * * * *",r.EVERY_10_SECONDS="*/10 * * * * *",r.EVERY_30_SECONDS="*/30 * * * * *",r.EVERY_MINUTE="*/1 * * * *",r.EVERY_5_MINUTES="0 */5 * * * *",r.EVERY_10_MINUTES="0 */10 * * * *",r.EVERY_30_MINUTES="0 */30 * * * *",r.EVERY_HOUR="0 0-23/1 * * *",r.EVERY_2_HOURS="0 0-23/2 * * *",r.EVERY_3_HOURS="0 0-23/3 * * *",r.EVERY_4_HOURS="0 0-23/4 * * *",r.EVERY_5_HOURS="0 0-23/5 * * *",r.EVERY_6_HOURS="0 0-23/6 * * *",r.EVERY_7_HOURS="0 0-23/7 * * *",r.EVERY_8_HOURS="0 0-23/8 * * *",r.EVERY_9_HOURS="0 0-23/9 * * *",r.EVERY_10_HOURS="0 0-23/10 * * *",r.EVERY_11_HOURS="0 0-23/11 * * *",r.EVERY_12_HOURS="0 0-23/12 * * *",r.EVERY_DAY_AT_1AM="0 01 * * *",r.EVERY_DAY_AT_2AM="0 02 * * *",r.EVERY_DAY_AT_3AM="0 03 * * *",r.EVERY_DAY_AT_4AM="0 04 * * *",r.EVERY_DAY_AT_5AM="0 05 * * *",r.EVERY_DAY_AT_6AM="0 06 * * *",r.EVERY_DAY_AT_7AM="0 07 * * *",r.EVERY_DAY_AT_8AM="0 08 * * *",r.EVERY_DAY_AT_9AM="0 09 * * *",r.EVERY_DAY_AT_10AM="0 10 * * *",r.EVERY_DAY_AT_11AM="0 11 * * *",r.EVERY_DAY_AT_NOON="0 12 * * *",r.EVERY_DAY_AT_1PM="0 13 * * *",r.EVERY_DAY_AT_2PM="0 14 * * *",r.EVERY_DAY_AT_3PM="0 15 * * *",r.EVERY_DAY_AT_4PM="0 16 * * *",r.EVERY_DAY_AT_5PM="0 17 * * *",r.EVERY_DAY_AT_6PM="0 18 * * *",r.EVERY_DAY_AT_7PM="0 19 * * *",r.EVERY_DAY_AT_8PM="0 20 * * *",r.EVERY_DAY_AT_9PM="0 21 * * *",r.EVERY_DAY_AT_10PM="0 22 * * *",r.EVERY_DAY_AT_11PM="0 23 * * *",r.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",r.EVERY_WEEK="0 0 * * 0",r.EVERY_WEEKDAY="0 0 * * 1-5",r.EVERY_WEEKEND="0 0 * * 6,0",r.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",r.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",r.EVERY_2ND_HOUR="0 */2 * * *",r.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",r.EVERY_2ND_MONTH="0 0 1 */2 *",r.EVERY_QUARTER="0 0 1 */3 *",r.EVERY_6_MONTHS="0 0 1 */6 *",r.EVERY_YEAR="0 0 1 0 *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",r.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",r.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",r.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"},9903:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7545:(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}}}},9235:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformResponse=t.transformParams=t.ExecuteFunctionSecureAnnotations=void 0;const n=r(9380),i=r(2943),o=r(7627),s=r(326),a=r(2251),u=r(5250),c=r(2574);t.ExecuteFunctionSecureAnnotations=["secureDistributedLock","secureQuery","secureMutation","secureNamedQuery","secureGraphQL","secureApi","secureAiAssistantChat","secureAiAssistantMutation"],t.transformParams=function(e,t){switch(t){case"webhook":case"executable":case"trigger":case"transformRead":case"transformWrite":case"metadata":return e;case"scheduler":return[];case"secureQuery":return[new c.QueryContext(e[0].query)];case"secureMutation":return[new a.MutationContext(e[0].mutation,e[0].beforeAndAfterDocs,e[0].serverTimestamp)];case"secureNamedQuery":return[new u.NamedQueryContext(e[0])];case"secureDistributedLock":return[new o.DistributedLockContext(e[0].mutex,e[0].exclusive)];case"secureGraphQL":return[new s.GraphqlContext(e[0])];case"secureApi":return[new i.ApiCallContext(e[0])];case"secureAiAssistantChat":return[new n.AiAssistantChatContext(e[0])];case"secureAiAssistantMutation":return[new n.AiAssistantMutationContext(e[0])]}},t.transformResponse=function(e,r){return t.ExecuteFunctionSecureAnnotations.includes(r)?{rulesPassed:e,docsToHash:e?{}:void 0}:e}},1277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},720:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3085:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockContext=void 0,t.DistributedLockContext=class{constructor(e,t){this.mutex=e,this.exclusive=t}}},4385:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasDocumentDiff=t.getSquidDocId=t.parseSquidDocId=void 0;const n=r(9312).__importDefault(r(2091)),i=r(1636),o=r(4684);function s(e){return(0,o.deserializeObj)(e)}t.parseSquidDocId=s,t.getSquidDocId=function(...e){const[t,r,n]=e,i="object"==typeof t?t:{docId:t,collectionName:r,integrationId:n};return i.integrationId||(i.integrationId=void 0),(0,o.normalizeJsonAsString)(i)},t.hasDocumentDiff=function(e,t){const r=(0,n.default)(e,t)||[],a=["__docId__","__ts__"],u=r.find((e=>{var t;return"__docId__"===(null===(t=e.path)||void 0===t?void 0:t[0])}));if(u){if("E"!==u.kind||!u.rhs)throw new Error(`Unexpected diff for __docId__: ${(0,o.normalizeJsonAsString)(u)}`);const e=s(u.rhs+"");a.push(...Object.keys(e))}return!!(null==r?void 0:r.find(((e,t)=>{var r;if(a.includes(null===(r=e.path)||void 0===r?void 0:r[0]))return!1;switch(e.kind){case"N":return(0,i.isNotNullish)(e.rhs);case"E":case"D":case"A":return!0}return!1})))}},326:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphqlContext=void 0,t.GraphqlContext=class{constructor(e){this.isGraphiQL=e.isGraphiQL,this.query=e.query,this.operationName=e.operationName,this.variables=e.variables}}},9231:(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:[]}}},7008:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpStatus=void 0,(r=t.HttpStatus||(t.HttpStatus={}))[r.CONTINUE=100]="CONTINUE",r[r.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",r[r.PROCESSING=102]="PROCESSING",r[r.EARLYHINTS=103]="EARLYHINTS",r[r.OK=200]="OK",r[r.CREATED=201]="CREATED",r[r.ACCEPTED=202]="ACCEPTED",r[r.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",r[r.NO_CONTENT=204]="NO_CONTENT",r[r.RESET_CONTENT=205]="RESET_CONTENT",r[r.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",r[r.AMBIGUOUS=300]="AMBIGUOUS",r[r.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",r[r.FOUND=302]="FOUND",r[r.SEE_OTHER=303]="SEE_OTHER",r[r.NOT_MODIFIED=304]="NOT_MODIFIED",r[r.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",r[r.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.UNAUTHORIZED=401]="UNAUTHORIZED",r[r.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",r[r.FORBIDDEN=403]="FORBIDDEN",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",r[r.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",r[r.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",r[r.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",r[r.CONFLICT=409]="CONFLICT",r[r.GONE=410]="GONE",r[r.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",r[r.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",r[r.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",r[r.URI_TOO_LONG=414]="URI_TOO_LONG",r[r.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",r[r.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",r[r.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",r[r.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",r[r.MISDIRECTED=421]="MISDIRECTED",r[r.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",r[r.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",r[r.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",r[r.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r[r.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",r[r.BAD_GATEWAY=502]="BAD_GATEWAY",r[r.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",r[r.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",r[r.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED"},575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(7698),t),n.__exportStar(r(6614),t),n.__exportStar(r(2943),t),n.__exportStar(r(5218),t),n.__exportStar(r(4125),t),n.__exportStar(r(8030),t),n.__exportStar(r(9903),t),n.__exportStar(r(7545),t),n.__exportStar(r(9235),t),n.__exportStar(r(6421),t),n.__exportStar(r(1277),t),n.__exportStar(r(3889),t),n.__exportStar(r(720),t),n.__exportStar(r(3085),t),n.__exportStar(r(7627),t),n.__exportStar(r(4385),t),n.__exportStar(r(326),t),n.__exportStar(r(9231),t),n.__exportStar(r(7008),t),n.__exportStar(r(133),t),n.__exportStar(r(6778),t),n.__exportStar(r(3858),t),n.__exportStar(r(2251),t),n.__exportStar(r(5263),t),n.__exportStar(r(2792),t),n.__exportStar(r(5250),t),n.__exportStar(r(7581),t),n.__exportStar(r(1012),t),n.__exportStar(r(2574),t),n.__exportStar(r(2972),t),n.__exportStar(r(791),t),n.__exportStar(r(1906),t),n.__exportStar(r(6504),t),n.__exportStar(r(5098),t),n.__exportStar(r(1391),t),n.__exportStar(r(3851),t),n.__exportStar(r(5791),t),n.__exportStar(r(7104),t),n.__exportStar(r(9132),t),n.__exportStar(r(7682),t),n.__exportStar(r(3185),t),n.__exportStar(r(4825),t),n.__exportStar(r(7850),t),n.__exportStar(r(8255),t),n.__exportStar(r(7142),t),n.__exportStar(r(6485),t),n.__exportStar(r(3589),t),n.__exportStar(r(1636),t),n.__exportStar(r(8038),t),n.__exportStar(r(4684),t),n.__exportStar(r(8932),t),n.__exportStar(r(2608),t),n.__exportStar(r(8315),t),n.__exportStar(r(3811),t)},3583:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},677:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4001:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAuthIntegration=t.isAuthIntegrationType=t.isDataIntegration=t.isDataIntegrationType=t.AuthIntegrationTypes=t.ObservabilityIntegrationTypes=t.ApiIntegrationTypes=t.DatabaseIntegrationTypes=t.IntegrationType=t.IntegrationCategory=void 0;const n=r(9312);var i,o;function s(e){return t.DatabaseIntegrationTypes.includes(e)}function a(e){return t.AuthIntegrationTypes.includes(e)}n.__exportStar(r(3583),t),n.__exportStar(r(677),t),n.__exportStar(r(2605),t),n.__exportStar(r(4001),t),n.__exportStar(r(6855),t),(o=t.IntegrationCategory||(t.IntegrationCategory={})).database="database",o.api="api",o.observability="observability",o.crm="crm",o.auth="auth",o.ai="ai",function(e){e.built_in_db="built_in_db",e.mongo="mongo",e.mysql="mysql",e.mssql="mssql",e.postgres="postgres",e.cockroach="cockroach",e.api="api",e.graphql="graphql",e.snowflake="snowflake",e.datadog="datadog",e.newrelic="newrelic",e.auth0="auth0",e.jwt_rsa="jwt_rsa",e.jwt_hmac="jwt_hmac",e.ai_assistant="ai_assistant",e.algolia="algolia",e.elastic_observability="elastic_observability",e.elastic_search="elastic_search",e.elastic_enterprise_search="elastic_enterprise_search",e.sentry="sentry",e.sap_hana="sap_hana",e.salesforce_crm="salesforce_crm",e.documentdb="documentdb",e.dynamodb="dynamodb",e.cassandra="cassandra",e.clickhouse="clickhouse",e.alloydb="alloydb",e.spanner="spanner",e.db2="db2",e.mariadb="mariadb",e.oracledb="oracledb",e.redis="redis",e.xata="xata",e.azure_sql="azure_sql"}(i=t.IntegrationType||(t.IntegrationType={})),t.DatabaseIntegrationTypes=[i.built_in_db,i.mongo,i.mysql,i.mssql,i.postgres,i.cockroach,i.snowflake,i.oracledb],t.ApiIntegrationTypes=[i.api,i.graphql],t.ObservabilityIntegrationTypes=[i.datadog,i.newrelic],t.AuthIntegrationTypes=[i.auth0,i.jwt_rsa,i.jwt_hmac],t.isDataIntegrationType=s,t.isDataIntegration=function(e){return s(e.type)},t.isAuthIntegrationType=a,t.isAuthIntegration=function(e){return a(e.type)}},6855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.newRelicRegionMap=t.datadogRegionMap=void 0,t.datadogRegionMap={us1:"US1 - East",us3:"US3 - West",us5:"US5 - Central",eu1:"EU1 - Europe","us1-fed":"US1-FED (FedRamp)"},t.newRelicRegionMap={worldwide:"Worldwide",eu:"Europe"}},6778:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(r=t.LogLevel||(t.LogLevel={})).TRACE="trace",r.DEBUG="debug",r.INFO="info",r.WARN="warn",r.ERROR="error"},3858:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregationPeriodMap=void 0,t.aggregationPeriodMap={"1m":1,"5m":5,"15m":15,"1h":60,"1d":1440,"1w":10080}},2251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationContext=void 0;const n=r(9312).__importStar(r(8784));t.MutationContext=class{constructor(e,t,r){this.mutation=e,this.beforeAndAfterDocs=t,this.serverTimeStamp=r}getMutationType(){return this.mutation.type}affectsPath(e){const t=this.beforeAndAfterDocs.before?n.get(this.beforeAndAfterDocs.before,e):void 0,r=this.beforeAndAfterDocs.after?n.get(this.beforeAndAfterDocs.after,e):void 0;return!n.isEqual(t,r)}}},5263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationRequestSchema=void 0;const r={type:"string"},n={type:"object",required:["docId","integrationId","collectionName"],properties:{docId:r,integrationId:r,collectionName:r}},i={oneOf:[{type:"object",required:["type","properties","squidDocIdObj"],properties:{type:{type:"string",const:"insert"},properties:{type:"object"},squidDocIdObj:n}},{type:"object",required:["type","squidDocIdObj"],properties:{type:{type:"string",const:"delete"},squidDocIdObj:n}},{type:"object",required:[],properties:{type:{type:"string",const:"update"},squidDocIdObj:n,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:r}},{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:r,integrationId:r,mutations:{type:"array",items:i}}}},2792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduceMutations=t.convertInsertToUpdate=t.applyUpdateMutation=t.mergeMutations=t.sortUpdateMutationProperties=void 0;const n=r(9312).__importStar(r(8784)),i=r(2937),o=r(7850),s=r(8038);function a(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?n.cloneDeep(t.value):t.value;case"removeProperty":return;default:throw new Error("Unknown property mutation type: "+JSON.stringify(t))}}function u(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,o.assertTruthy)("update"===t.type,"Invalid mutation type"),"update"===e.type)return function(e,t){const r=n.cloneDeep(e);t=n.cloneDeep(t);for(const[e]of u(r)){const n=e.split(".").length;Object.entries(t.properties).some((([t])=>e.startsWith(t+".")&&n>t.split(".").length))&&delete r.properties[e]}for(const[e,n]of u(t))r.properties[e]=[...r.properties[e]||[],...n];return r}(e,t);const r=n.cloneDeep(e);for(const[e,n]of u(t)){const t=n;for(const n of t){const t=a((0,s.getInPath)(r.properties,e),n);void 0===t?(0,s.deleteInPath)(r.properties,e):(0,s.setInPath)(r.properties,e,t)}}return r}t.sortUpdateMutationProperties=u,t.mergeMutations=c,t.applyUpdateMutation=function(e,t){if(!e)return;const r=Object.assign({},e),n=u(t);for(const[e,t]of n){const n=t;for(const t of n){const n=a((0,s.getInPath)(r,e),t);void 0===n?(0,s.deleteInPath)(r,e):(0,s.setInPath)(r,e,n)}}return r},t.convertInsertToUpdate=function(e){const t={type:"update",squidDocIdObj:e.squidDocIdObj,properties:{}};for(const[r,n]of Object.entries(e.properties))t.properties[r]=[{type:"update",value:n}];return t},t.reduceMutations=function(e){let t=[];return(0,i.from)(e).pipe((0,i.groupBy)((e=>`${e.squidDocIdObj.integrationId}${e.squidDocIdObj.collectionName}/${e.squidDocIdObj.docId}`)),(0,i.mergeMap)((e=>e.pipe((0,i.reduce)(((e,t)=>c(e,t)))))),(0,i.toArray)()).subscribe((e=>{t=e})),t}},5250:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryContext=void 0,t.NamedQueryContext=class{constructor(e){this.params=e}}},7581:(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}}}},1012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2972:(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:["==",">=","<=",">","<","!=","like","not like","like_cs","not like_cs"]},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:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuerySubscriptionId=t.getQuerySubscriptionId=t.compareOperator=t.findQueriesForDocumentSync=t.SimpleQueryMappingManager=t.QueryMappingManager=void 0;const n=r(1636),i=r(8038),o=r(4684);class s{}function a(e,t){var r;const s=[...e.unconditional||[]],a=new Set,c=new Map;for(const[s,l]of Object.entries(e.conditional||{})){const e=(0,o.decodeValueForMapping)(s);for(const[s,f]of Object.entries(l)){const l=[],p=null!==(r=(0,i.getInPath)(t,e))&&void 0!==r?r:null,d=(0,o.encodeValueForMapping)(p);switch(s){case"==":l.push(...f[d]||[]);break;case"!=":{(f[d]||[]).forEach((e=>a.add(e)));const e=Object.entries(f).filter((([e])=>e!==d));for(const[t,r]of e)l.push(...r);break}case"<":case"<=":case">":case">=":case"like":case"not like":case"like_cs":case"not like_cs":(0,n.isNotNullish)(p)&&l.push(...Object.entries(f).filter((([e])=>u((0,o.decodeValueForMapping)(e),p,s))).reduce(((e,[t,r])=>(e.push(...r),e)),[]));break;default:throw new Error("Unsupported operator: "+s)}for(const e of l)c.set(e,(c.get(e)||0)+1)}}for(const[t,r]of c.entries())a.has(t)||r>=e.queriesMetadata[t].condCount&&s.push(t);return s}function u(e,t,r){if(null===e||null===t)return!1;switch(r){case"<":return t<e;case"<=":return t<=e;case">":return t>e;case">=":return t>=e;case"like":return"string"==typeof t&&"string"==typeof e&&c(t,e,!1);case"not like":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!1));case"like_cs":return"string"==typeof t&&"string"==typeof e&&c(t,e,!0);case"not like_cs":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!0));default:throw new Error(`Unsupported operator comparison: ${r}`)}}function c(e,t,r){r||(e=e.toLowerCase(),t=t.toLowerCase());const n=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/%/g,".*");return new RegExp(`^${n}$`).test(e)}t.QueryMappingManager=s,t.SimpleQueryMappingManager=class extends s{async findQueriesForDocument(e,t,r,n){const i=await this.getMapping(e,r,n);return i?a(i,t):[]}},t.findQueriesForDocumentSync=a,t.compareOperator=u,t.getQuerySubscriptionId=function(e,t){return`${e}_${t}`},t.parseQuerySubscriptionId=function(e){const t=e.split("_");return{clientId:t[0],clientRequestId:t[1]}}},2574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(8556),t),n.__exportStar(r(1515),t)},8556:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryContext=void 0;const n=r(8784),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){this.query=e,this.query=e,this.parsedConditions=this.parseConditions(this.query.conditions)}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}sortedBy(e){return!e.find(((e,t)=>{var r;return!(0,n.isEqual)(this.query.sortOrder[t],Object.assign(Object.assign({},e),{asc:null===(r=e.asc)||void 0===r||r}))}))}sortedByExact(e){return e.length===this.query.sortOrder.length&&this.sortedBy(e)}includes(e,t,r){return this.includesCondition({fieldName:e,operator:t,value:r})}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),r=this.sortedByExact(e.sortOrder),n=this.limit===e.limit;return t&&r&&n}isSubsetOf(e,t,r){return this.isSubsetOfCondition({fieldName:e,operator:t,value:r})}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),r=this.sortedBy(e.sortOrder),n=-1===e.limit||this.limit>-1&&this.limit<e.limit;return t&&r&&n}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:r,value:n}=e,{operator:o,value:s}=this.parseConditions([t])[0],a=i[`${r}:${o}`];return!!a&&a(n,s)}evaluateIncludes(e,t){const{operator:r,value:i}=e,{operator:o,value:s}=this.parseConditions([t])[0],a=Array.isArray(i)?i.sort():i,u=Array.isArray(s)?s.sort():s;return o===r&&(0,n.isEqual)(u,a)}parseConditions(e){const t=[],r=new Map,n=new Map;return e.forEach((e=>{switch(e.operator){case"==":case"in":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat(e.value));break;case"!=":case"not in":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat(e.value));break;default:t.push(e)}})),r.forEach(((e,r)=>{t.push({fieldName:r,operator:"in",value:e})})),n.forEach(((e,r)=>{t.push({fieldName:r,operator:"not in",value:e})})),t}}},1515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleQueryBuilder=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850),o=r(8315);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,r){if("in"===t||"not in"===t){const n=r instanceof Array?[...r]:[r];for(const r of n)this.query.conditions.push({fieldName:e,operator:"in"===t?"==":"!=",value:r});return this}return this.query.conditions.push({fieldName:e,operator:t,value:r}),this}eq(e,t){return this.where(e,"==",t)}neq(e,t){return this.where(e,"!=",t)}in(e,t){return this.where(e,"in",t)}nin(e,t){return this.where(e,"not in",t)}gt(e,t){return this.where(e,">",t)}gte(e,t){return this.where(e,">=",t)}lt(e,t){return this.where(e,"<",t)}lte(e,t){return this.where(e,"<=",t)}like(e,t,r=!0){return this.where(e,r?"like_cs":"like",t)}notLike(e,t,r=!0){return this.where(e,r?"not like_cs":"not like",t)}limit(e){return(0,o.validateQueryLimit)(e),(0,i.assertTruthy)(-1===this.query.limit,"The limit was already set."),this.query.limit=e,this}sortBy(e,t=!0){const r={asc:t,fieldName:e};return(0,o.validateFieldSort)(r),(0,i.assertTruthy)(!this.query.sortOrder.some((t=>t.fieldName===e)),`${e} already in the sort list.`),this.query.sortOrder.push(r),this}build(){const e=this.mergeConditions();return Object.assign(Object.assign({},this.query),{conditions:e})}mergeConditions(){const e=[],t=n.groupBy(this.query.conditions||[],(e=>e.fieldName));for(const r of Object.values(t)){const t=n.groupBy(r,(e=>e.operator));for(const[r,i]of Object.entries(t)){if("=="===r||"!="===r){e.push(...i);continue}const t=n.sortBy(i,(e=>e.value));">"===r||">="===r?e.push(t[t.length-1]):e.push(t[0])}}return e}}},1906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertFromSquidRegion=t.convertToSquidRegion=t.getSquidSupportedCloudMap=t.squidSupportedRegionMap=t.supportedSquidRegions=void 0;const n=r(1636);t.supportedSquidRegions=["us-east-1.aws","local"],t.squidSupportedRegionMap={"us-east-1.aws":{id:"us-east-1",name:"US East (N. Virginia)"},local:{id:"local",name:"Local"}},t.getSquidSupportedCloudMap=function(e=!1){return{aws:{id:"aws",name:"Amazon Web Services",icon:"aws_icon",regions:[e?t.squidSupportedRegionMap.local:void 0,t.squidSupportedRegionMap["us-east-1.aws"]].filter(n.isNotNullish)},gcp:{id:"gcp",name:"Google Cloud Platform",icon:"gcp_icon",tooltip:"Google Cloud (GCP) support is coming soon!",regions:[]},azure:{id:"azure",name:"Microsoft Azure",icon:"azure_icon",tooltip:"Microsoft Azure support is coming soon!",regions:[]}}},t.convertToSquidRegion=function(e,t){return"local"===t?"local":`${t}.${e}`},t.convertFromSquidRegion=function(e){if("local"===e)return{cloudId:"aws",region:"local"};const t=e.split(".");return{cloudId:t[1],region:t[0]}}},6504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findMatchingPropertiesForKey=t.validateSchema=t.compileSchema=t.SUPPORTED_FIELD_TYPES_ARRAY=void 0;const n=r(9312),i=n.__importDefault(r(6236)),o=n.__importDefault(r(8414)),s=n.__importDefault(r(2091)),a=r(7008),u=r(7850),c=r(8315),l=new i.default({allErrors:!0,allowUnionTypes:!1,useDefaults:!1});function f(e){return l.compile(e)}function p(e,t){const r={exactMatch:[],parentsMatch:[]};if(!e.length)return r.exactMatch.push(t),r;r.parentsMatch.push(t);const n=[...e];for(;n.length;){const e=d(t,(0,u.notNullish)(n.shift()));for(const t of e){const e=p(n,t);r.parentsMatch.push(...e.parentsMatch),r.exactMatch.push(...e.exactMatch)}}return r}function d(e,t){var r,n;const i=(null===(r=e.properties)||void 0===r?void 0:r[t])?[null===(n=e.properties)||void 0===n?void 0:n[t]]:[];return e.patternProperties&&i.push(...Object.entries(e.patternProperties).filter((([e])=>new RegExp(e).test(t))).map((([e,t])=>t))),i}(0,o.default)(l),l.addKeyword({keyword:"isDate",type:"object",validate:(e,t)=>e===t instanceof Date}),l.addKeyword({keyword:"isJSON",type:"object",validate:(e,t)=>{try{const e=JSON.stringify(t);return JSON.parse(e),!0}catch(e){return!1}}}),l.addKeyword({keyword:"isComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"isDefaultComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"primaryKey",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"insertable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"deletable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"applyDefaultValueOn",validate:(e,t)=>!e||["always","empty","updateOrEmpty"].includes(e)}),l.addKeyword({keyword:"dataType",validate:(e,t)=>!0}),t.SUPPORTED_FIELD_TYPES_ARRAY=["string","integer","number","date","boolean","map","array","any"],t.compileSchema=f,t.validateSchema=function(e,t,r=[],n={}){const i=f(e),o=i(t);if(!r.length&&!o)throw new c.ValidationError("The data does not conform with the collection schema.",a.HttpStatus.BAD_REQUEST,{errors:i.errors});if(!o&&r.length)for(const e of(0,u.truthy)(i.errors)){let t=e.instancePath;if(e.params.missingProperty&&(t=`${t}/${e.params.missingProperty}`),t=t.slice(1).replace(/\//g,".")+".",r.some((e=>t.startsWith(e+"."))))throw new c.ValidationError(`${t} does not conform with the collection schema.`,a.HttpStatus.BAD_REQUEST)}!function(e,t,r){if(r&&t.readOnly||!1===t.insertable&&!r)throw new c.ValidationError("The schema does not allow this action",a.HttpStatus.BAD_REQUEST);for(const n of e){const e=(0,u.truthy)(n.path).join("."),i=p((0,u.truthy)(n.path),t);for(const t of i.exactMatch){if(t.readOnly&&"E"===n.kind)throw new c.ValidationError(`${e} is readonly`,a.HttpStatus.BAD_REQUEST);if(r&&!1===t.deletable&&"D"===n.kind)throw new c.ValidationError(`${e} is not deletable`,a.HttpStatus.BAD_REQUEST);if(!1===t.insertable&&"N"===n.kind)throw new c.ValidationError(`${e} is not insertable`,a.HttpStatus.BAD_REQUEST)}for(const t of i.parentsMatch)if(r&&t.readOnly)throw new c.ValidationError(`${e} is readonly`,a.HttpStatus.BAD_REQUEST)}}((0,u.truthy)((0,s.default)(n,t)),e,!!r.length)},t.findMatchingPropertiesForKey=d},5098:(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:{}}}}},1391:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3851:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5791:(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"}}},{properties:{type:{const:"acquireLock"},payload:{type:"object",required:["mutex","exclusive","clientRequestId"],properties:{mutex:{type:"string"},exclusive:{type:"boolean"},clientRequestId:{type:"string"}}}}},{properties:{type:{const:"releaseLock"},payload:{type:"object",required:["lockId","clientRequestId"],properties:{lockId:{type:"string"},clientRequestId:{type:"string"}}}}}]}},7104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9132:(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},7682:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4825:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayMergeCustomizer=t.asyncGroupBy=t.removeSorted=t.insertSorted=t.binarySearch=void 0;const n=r(8784);function i(e,t,r=((e,t)=>e>t?1:e<t?-1:0),n=0,o=e.length-1){if(o<n)return-1;const s=Math.trunc((n+o)/2);return 0===r(t,e[s])?s:r(t,e[s])>0?i(e,t,r,s+1,o):i(e,t,r,n,s-1)}t.binarySearch=i,t.insertSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){let n;for(n=e.length-1;n>=0&&r(e[n],t)>0;n--)e[n+1]=e[n];e[n+1]=t},t.removeSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){const n=i(e,t,r);n>-1&&e.splice(n,1)},t.asyncGroupBy=async function(e,t){const r={};for(const n of e){const e=await t(n);r[e]||(r[e]=[]),r[e].push(n)}return r},t.arrayMergeCustomizer=(e,t)=>(0,n.isArray)(e)?e.concat(t):void 0},7850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTruthy=t.notNullish=t.truthy=t.assertValidateTruthy=t.assertNotNullish=t.assertTruthy=void 0;const n=r(7008),i=r(1636),o=r(8315);function s(e,t){if(e)return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function a(e,t){if((0,i.isNotNullish)(e))return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function u(e,t){return s(e,t),e}t.assertTruthy=s,t.assertNotNullish=a,t.assertValidateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){s(e,(()=>new o.ValidationError(t,r,i)))},t.truthy=u,t.notNullish=function(e,t){return a(e,t),e},t.validateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){return u(e,(()=>new o.ValidationError(t,r,i)))}},8255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeExecutionError=void 0;class r extends Error{constructor(e,t){super(e),this.details=t}}t.CodeExecutionError=r},7142:(e,t)=>{"use strict";function r(e){return/^local/.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicationHttpHeaders=t.getApplicationUrl=void 0,t.getApplicationUrl=function(e,t){const n=new URL("https://squid.cloud");n.host=`${t}.${e}.${n.host}`,r(e)&&(n.protocol="http",n.port="8000",function(e){return/android$/.test(e)}(e)?n.host="10.0.2.2":function(e){return/ios$/.test(e)}(e)&&(n.host="localhost"));const i=n.toString();return i.endsWith("/")?i:i+"/"},t.getApplicationHttpHeaders=function(e,t){const n={};return r(e)&&(n["X-Squid-AppId"]=t),n}},6485:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateShortId=t.generateId=void 0,t.generateId=function(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))},t.generateShortId=function(e=18){let t="";for(let r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(36*Math.random()));return t}},3589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LockManager=void 0;const n=r(2937),i=r(7850);t.LockManager=class{constructor(){this.locks={}}async lock(...e){if(this.canGetLock(...e))return void this.lockSync(...e);const t=Object.entries(this.locks).filter((([t])=>e.includes(t))).map((([e,t])=>t));await(0,n.lastValueFrom)((0,n.combineLatest)(t).pipe((0,n.filter)((e=>!e.includes(!0))),(0,n.take)(1))),await this.lock(...e)}release(...e){for(const t of e){const e=(0,i.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,i.assertTruthy)(this.canGetLock(...e),"Cannot acquire lock sync");for(const t of e)this.locks[t]=new n.BehaviorSubject(!0)}}},1636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNotNullish=void 0,t.isNotNullish=function(e){return null!=e}},8038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceKeyInRecord=t.replaceKeyInMap=t.deepReplace=t.deleteInPath=t.setInPath=t.getInPath=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850);function o(e){return"object"==typeof e&&Reflect.getPrototypeOf(e)===Object.prototype}t.getInPath=function(e,t,r="."){const n=t.split(r);let o,s=e;for(;s&&n.length;){const e=(0,i.truthy)(n.shift());if(!(s instanceof Object&&e in s))return;o=s[e],s=o}return o},t.setInPath=function(e,t,r,s="."){var a;const u=t.split(s);let c=e;for(;u.length;){const e=(0,i.truthy)(u.shift());if(u.length){const t=o(c[e])&&null!==(a=n.clone(c[e]))&&void 0!==a?a:{};c[e]=t,c=t}else c[e]=r}},t.deleteInPath=function(e,t,r="."){var s;const a=t.split(r);let u=e;for(;a.length;){const e=(0,i.truthy)(a.shift());if(a.length){const t=o(u[e])&&null!==(s=n.clone(u[e]))&&void 0!==s?s:{};u[e]=t,u=t}else delete u[e]}},t.deepReplace=function e(t,r,n){for(const i in t)i===r?t[i]=n(t[i]):Array.isArray(t[i])?t[i].forEach((t=>e(t,r,n))):"object"==typeof t[i]&&e(t[i],r,n)},t.replaceKeyInMap=function(e,t,r){if(e.has(t)){const n=e.get(t);e.delete(t),e.set(r,n)}},t.replaceKeyInRecord=function(e,t,r){const n=e[t];void 0!==n&&(e[r]=n,delete e[t])}},4684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recodeValue=t.decodeValueForMapping=t.encodeValueForMapping=t.deserializeObj=t.serializeObj=t.normalizeJsonAsString=void 0;const n=r(5382);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),r={};return t.sort().forEach((t=>{r[t]=i(e[t])})),r}function o(e){try{return n.EJSON.stringify(e)}catch(e){throw console.error("Unable to serialize object",e,"\n\nSTACK:",(new Error).stack),e}}function s(e){return n.EJSON.parse(e)}function a(e){if(void 0===e)throw new Error("INVALID_ENCODE_VALUE");return btoa(o(e))}function u(e){return s(atob(e))}t.normalizeJsonAsString=function(e){return o(i(e))},t.serializeObj=o,t.deserializeObj=s,t.encodeValueForMapping=a,t.decodeValueForMapping=u,t.recodeValue=function(e){return u(a(e))}},8932:(e,t)=>{"use strict";function r(e){return`${(e.getUTCHours()+"").padStart(2,"0")}:${(e.getUTCMinutes()+"").padStart(2,"0")}:${(e.getUTCSeconds()+"").padStart(2,"0")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.dateToTimeString=t.msPastMidnightToTimeString=t.kafkaConnectStringToInterval=t.base64ToBinary=t.base64ToString=t.isoStringToDate=t.msToDate=t.daysPastEpochToDate=t.moneyStringToNumber=t.JSONToString=t.stringToJSON=t.stringToBuffer=t.bufferToString=t.numberToString=t.stringToNumber=t.intToBoolean=t.booleanToInt=t.unchanged=void 0,t.unchanged=function(e){return e},t.booleanToInt=function(e){return e?1:0},t.intToBoolean=function(e){return!!e},t.stringToNumber=function(e){return Number(e)},t.numberToString=function(e){return e+""},t.bufferToString=function(e){return e.toString()},t.stringToBuffer=function(e){return Buffer.from(e)},t.stringToJSON=function(e){return JSON.parse(e)},t.JSONToString=function(e){return JSON.stringify(e)},t.moneyStringToNumber=function(e){return Number(e.replace(/[^0-9\.]+/g,""))},t.daysPastEpochToDate=function(e){return new Date(864e5*e)},t.msToDate=function(e){return new Date(e)},t.isoStringToDate=function(e){return new Date(e)},t.base64ToString=function(e){return atob(e)},t.base64ToBinary=function(e){const t=atob(e);let r="";for(let e=0;e<t.length;e++)r+=t[e].charCodeAt(0).toString(2);return r},t.kafkaConnectStringToInterval=function(e){const t=e.match(/^P(\d+Y)?(\d+M)?(\d+D)?T?(\d+H)?(\d+M)?(\d+S)?$/);if(!t)throw new Error(`Interval string is not properly formatted: ${e}`);return{years:parseInt(t[1])||0,months:parseInt(t[2])||0,days:parseInt(t[3])||0,hours:parseInt(t[4])||0,minutes:parseInt(t[5])||0,seconds:parseInt(t[6])||0}},t.msPastMidnightToTimeString=function(e){return r(new Date(e))},t.dateToTimeString=r},2608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendQueryParams=void 0,t.appendQueryParams=function(e,t){const r=new URL(e),n=new URLSearchParams(r.search);for(const e in t)t.hasOwnProperty(e)&&n.set(e,t[e]);return r.search=n.toString(),r.toString()}},8315:(e,t,r)=>{"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 n=r(7850);class i extends Error{constructor(e,t,r){super(e),this.statusCode=t,this.details=r}}function o(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 s(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 a(e){(0,n.assertTruthy)(["auth0"].includes(e),"INVALID_OPEN_ID_PROVIDER_TYPE")}function u(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");o(e)}(e.squidDocIdObj.collectionName),o(e.squidDocIdObj.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))s(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,r]of t){s(e);for(const e of r)u(e)}}(e)}}function l(e,t){return Array.isArray(e)?e.every((e=>typeof e===t)):typeof e===t}function f(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,n.assertTruthy)(f(e,["fieldName","asc"]),"Field sort should only contain a fieldName and asc"),(0,n.assertTruthy)(l(e.asc,"boolean"),"Asc needs to be boolean"),s(e.fieldName)},t.validateOpenIdProvider=function(e){return(0,n.assertTruthy)(e,"INVALID_PROVIDER"),a(e.providerType),(0,n.assertTruthy)(e.providerType,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.clientId,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.domain,"INVALID_DOMAIN"),e},t.validateOpenIdProviderType=a,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,n.assertTruthy)(l(e,"number"),"Limit needs to be a number"),-1!==e&&((0,n.assertTruthy)(e>0,"query limit has to be greater than 0"),(0,n.assertTruthy)(Math.floor(e)===e,"query limit has to be an integer"),(0,n.assertTruthy)(e<=2e4,"Limit can be maximum 20000"))},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=l,t.hasOnlyKeys=f},3811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWebhookResponse=void 0,t.isWebhookResponse=function(e){return e&&e.__isWebhookResponse__}},6808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantClient=void 0;const n=r(575),i=r(2937),o=r(9978);t.AiAssistantClient=class{constructor(e,t,r,n){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.integrationId=n,this.ongoingChatRequests={},this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"aiAssistant"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleChatResponse(e)}))}profile(e){return new s(this,this.integrationId,e)}async mutate(e){await this.rpcManager.post("ai/assistant/mutate",e)}chat(e,t){const r=(0,n.generateId)(),o=new i.BehaviorSubject("");this.ongoingChatRequests[r]=o;const s={profileId:e,prompt:t,clientId:this.clientIdService.getClientId(),integrationId:this.integrationId,clientRequestId:r};return this.rpcManager.post("ai/assistant/chat",s).catch((e=>{o.error(e),o.complete()})),o.pipe((0,i.finalize)((()=>{delete this.ongoingChatRequests[r]})),(0,i.share)())}handleChatResponse(e){const t=this.ongoingChatRequests[e.clientRequestId];t&&(e.payload.complete?t.complete():t.next(t.value+e.payload.token))}};class s{constructor(e,t,r){this.client=e,this.integrationId=t,this.profileId=r}chat(e){return this.client.chat(this.profileId,e)}context(e){return new a(this.client,this.integrationId,this.profileId,e)}instruction(e){return new u(this.client,this.integrationId,this.profileId,e)}insert(e){const{modelName:t,strictContext:r}=e,n={type:"insert",resource:"profile",profileId:this.profileId,payload:{modelName:t,strictContext:r},integrationId:this.integrationId};return this.client.mutate(n)}update(e){const{modelName:t,strictContext:r}=e,n={type:"update",resource:"profile",profileId:this.profileId,payload:{modelName:t,strictContext:r},integrationId:this.integrationId};return this.client.mutate(n)}delete(){const e={type:"delete",resource:"profile",profileId:this.profileId,integrationId:this.integrationId,payload:{}};return this.client.mutate(e)}}class a{constructor(e,t,r,i){this.client=e,this.integrationId=t,this.profileId=r,this.id=i||(0,n.generateId)()}insert(e){const{title:t,context:r}=e,n={type:"insert",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,title:t,context:r}};return this.client.mutate(n)}update(e){const{title:t,context:r}=e,n={type:"update",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,title:t,context:r}};return this.client.mutate(n)}delete(){const e={type:"delete",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id}};return this.client.mutate(e)}}class u{constructor(e,t,r,i){this.client=e,this.integrationId=t,this.profileId=r,this.id=i||(0,n.generateId)()}insert(e){const{instruction:t}=e,r={type:"insert",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,instruction:t}};return this.client.mutate(r)}update(e){const{instruction:t}=e,r={type:"update",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,instruction:t}};return this.client.mutate(r)}delete(){const e={type:"delete",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id}};return this.client.mutate(e)}}},5969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiClientFactory=void 0;const n=r(6808);t.AiClientFactory=class{constructor(e,t,r){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.assistantsMap=new Map}getAssistant(e){let t=this.assistantsMap.get(e);return t||(t=new n.AiAssistantClient(this.clientIdService,this.rpcManager,this.socketManager,e),this.assistantsMap.set(e,t),t)}}},4268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiManager=void 0;const n=r(575),i=r(8784),o=r(2937),s=r(9978);t.ApiManager=class{constructor(e,t,r,n={}){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.apiServerUrlOverrideMapping=n,this.ongoingApiExecutions={},r.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,r){const i=(0,n.generateId)(),a=new o.Subject;this.ongoingApiExecutions[i]=a;const u={integrationId:e,endpointId:t,request:r,clientId:this.clientIdService.getClientId(),clientRequestId:i,serverUrlOverride:this.apiServerUrlOverrideMapping[e]};return this.rpcManager.post("api/call",u).catch((n=>{console.error("Got error while calling API",e,t,r,n),a.error(n),a.complete()})),(0,o.race)(a.pipe((0,o.finalize)((()=>{delete this.ongoingApiExecutions[i]})),(0,o.share)()),this.clientIdService.observeClientTooOld().pipe((0,s.map)((()=>{throw new Error("CLIENT_NOT_CONNECTED")}))))}async handleApiResponse(e,t){const r=this.ongoingApiExecutions[e];r&&(t.success?r.next((0,n.deserializeObj)(t.payload)):r.error((0,i.pick)(t,"httpStatus","payload")),r.complete())}}},9526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthManager=void 0;const n=r(2937);t.AuthManager=class{constructor(e,t){this.destructManager=e,this.apiKey=t,this.authIdTokenSet=new n.BehaviorSubject(!1),this.authIdTokenObservableSubject=new n.Subject,this.shouldWaitForAuth=!1,this.observeAuthIdToken().subscribe((e=>{this.idToken=e.token,this.integrationId=e.integrationId,this.authIdTokenSet.next(!0)}))}setAuthIdToken(e,t){this.shouldWaitForAuth=!0,this.authIdTokenSet.next(!1);const r=e&&"string"!=typeof e?(0,n.from)(e).pipe((0,n.map)((e=>({token:e,integrationId:t})))):(0,n.of)({token:e,integrationId:t});this.authIdTokenObservableSubject.next(r)}observeAuthIdToken(){return this.authIdTokenObservableSubject.pipe((0,n.switchMap)((e=>e)),(0,n.takeUntil)(this.destructManager.isDestructingObservable))}async waitForReadyState(){this.shouldWaitForAuth&&!this.destructManager.isDestructing&&await(0,n.firstValueFrom)((0,n.race)(this.authIdTokenSet.asObservable().pipe((0,n.filter)(Boolean)),this.destructManager.isDestructingObservable))}getApiKey(){return this.apiKey}getAuthToken(){return this.apiKey?{type:"ApiKey",token:this.apiKey}:this.idToken?{type:"Bearer",token:this.idToken,integrationId:this.integrationId}:void 0}}},8862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFunctionManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.BackendFunctionManager=class{constructor(e,t,r){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.ongoingFunctionExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"backendFunction"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleFunctionResponse(e.clientRequestId,e.payload)}))}executeFunctionAndSubscribe(e,...t){const r=(0,n.generateId)(),s=new i.Subject;this.ongoingFunctionExecutions[r]=s;const a={functionName:e,paramsArrayStr:(0,n.serializeObj)(t),clientId:this.clientIdService.getClientId(),clientRequestId:r};return this.rpcManager.post("backend-function/execute",a).catch((t=>{console.error("Got error while executing function",e,t),s.error(t),s.complete()})),(0,i.race)(s.pipe((0,i.finalize)((()=>{delete this.ongoingFunctionExecutions[r]})),(0,i.share)()),this.clientIdService.observeClientTooOld().pipe((0,o.map)((()=>{throw new Error("CLIENT_NOT_CONNECTED")}))))}handleFunctionResponse(e,t){const r=this.ongoingFunctionExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.response):(r.error(new Error(i.response)),r.complete())}}},7378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientIdService=void 0;const n=r(2937),i=r(575);t.ClientIdService=class{constructor(e){this.destructManager=e,this.clientTooOldSubject=new n.BehaviorSubject(!1),this.clientId=(0,i.generateId)(),this.destructManager.onDestruct((()=>{this.clientTooOldSubject.complete()}))}observeClientTooOld(){return this.clientTooOldSubject.pipe((0,n.filter)((e=>e)),(0,n.map)((e=>{})))}notifyClientTooOld(){this.clientTooOldSubject.next(!0),this.clientId=(0,i.generateId)()}notifyClientReadyToBeRegenerated(){this.clientTooOldSubject.next(!1)}observeClientReadyToBeRegenerated(){return this.clientTooOldSubject.pipe((0,n.skip)(1),(0,n.filter)((e=>!e)),(0,n.map)((e=>{})))}getClientId(){return this.clientId}isClientTooOld(){return this.clientTooOldSubject.value}}},1600:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReferenceFactory=void 0;const n=r(5660);t.CollectionReferenceFactory=class{constructor(e,t,r,n){this.documentReferenceFactory=e,this.queryBuilderFactory=t,this.joinQueryBuilderFactory=r,this.documentIdentityService=n,this.collections=new Map,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this))}get(e,t){let r=this.collections.get(t);r||(r=new Map,this.collections.set(t,r));let i=r.get(e);return i||(i=new n.CollectionReference(e,t,this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory),r.set(e,i),i)}migrateDocIds(e){this.collections.forEach((t=>{for(const[r,n]of t)n.migrateDocIds(e)}))}}},5660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReference=void 0;const n=r(575),i=r(2937);t.CollectionReference=class{constructor(e,t,r,i,o){this.collectionName=e,this.integrationId=t,this.documentReferenceFactory=r,this.queryBuilderFactory=i,this.joinQueryBuilderFactory=o,this.documents=new Map,this.refId=(0,n.generateId)()}doc(e){if(e&&"string"!=typeof e&&"object"!=typeof e&&!Array.isArray(e))throw new Error("Invalid doc id. Can be only object or string.");if(this.integrationId!==n.IntegrationType.built_in_db)if(e){if("object"!=typeof e)throw new Error("Invalid doc id. String doc ids are only supported for the built_in_db integration. For all other integrations, the doc id must be an object.")}else e={__squidId:(0,n.generateId)()};else e=e&&"string"!=typeof e?{__id:(0,n.normalizeJsonAsString)(e)}:{__id:e||(0,n.generateId)()};const t=(0,n.normalizeJsonAsString)(e),r=(0,n.getSquidDocId)(t,this.collectionName,this.integrationId);let i=this.documents.get(t);return i||(i=this.documentReferenceFactory.create(r,this.queryBuilderFactory),this.documents.set(t,i),i)}query(){return this.queryBuilderFactory.get(this.collectionName,this.integrationId)}joinQuery(e){return this.joinQueryBuilderFactory.getForJoin(this.collectionName,this.integrationId,null!=e?e:this.collectionName)}or(...e){return new o(...e)}migrateDocIds(e){for(const[t,r]of this.documents)r.migrateDocIds(e);Object.entries(e).forEach((([e,t])=>{const r=(0,n.parseSquidDocId)(e),i=(0,n.parseSquidDocId)(t);(0,n.replaceKeyInMap)(this.documents,r.docId,i.docId)}))}};class o{constructor(...e){if(0===e.length)throw new Error("At least one query builder must be provided");this.builders=e}changes(){throw new Error("Changes are not supported for merged queries")}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e){const t=this.builders.map((t=>t.snapshots(e)));return this.or(this.builders[0].getSortOrder(),...t)}or(e,...t){return(0,i.combineLatest)([...t]).pipe((0,i.map)((t=>{const r=new Set,n=t.flat(),i=[];for(const e of n)r.has(e.data)||(r.add(e.data),i.push(e));return i.sort(((t,r)=>{for(const{fieldName:n,asc:i}of e){const e=t.data[n],o=r.data[n];if(e<o)return i?-1:1;if(e>o)return i?1:-1}return 0}))})))}getSortOrder(){throw new Error("getSortOrder is not supported for merged queries")}}},4967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataManager=void 0;const n=r(575),i=r(3910),o=r(2937),s=r(9978),a="dataManager_runInTransaction";t.DataManager=class{constructor(e,t,r,n,i,s,a,u){this.documentStore=e,this.mutationSender=t,this.socketManager=r,this.querySubscriptionManager=n,this.queryBuilderFactory=i,this.lockManager=s,this.destructManager=a,this.documentIdentityService=u,this.docIdToLocalTimestamp=new Map,this.batchClientRequestIds=new Set,this.docIdToServerTimestamp=new Map,this.pendingIncomingUpdates=new Map,this.pendingOutgoingMutations=new Map,this.pendingOutgoingMutationsChanged=new o.Subject,this.outgoingMutationsEmpty=new o.BehaviorSubject(!0),this.knownDirtyDocs=new Set,this.failedDocsToResync=[],this.refreshDocIdToTimestamp=new Map,this.handleIncomingMessagesForTests=!0,this.destructManager.onDestruct((()=>{this.destruct()})),this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.handleNotifications(),this.startDeleteExpiredTimestampsJob(),this.handleOrphanDocs(),this.outgoingMutationsEmpty.subscribe((e=>{this.querySubscriptionManager.safeToSendQueriesToServer.next(e)}))}getProperties(e){return this.documentStore.getDocumentOrUndefined(e)}isDirty(e){var t;if(this.knownDirtyDocs.has(e))return!0;if(null===(t=this.pendingOutgoingMutations.get(e))||void 0===t?void 0:t.length)return!0;const r=this.docIdToServerTimestamp.get(e),n=r&&!r.expireTimestamp?r.timestamp:void 0,i=this.docIdToLocalTimestamp.get(e);return!((!i||n)&&!this.isForgotten(e)&&!this.isLocalOnly(e)&&i===n)}async runInTransaction(e,t){return t?((0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),e(t).then((e=>Promise.resolve()))):(this.lockManager.canGetLock(a)?this.lockManager.lockSync(a):await this.lockManager.lock(a),new Promise((async(t,r)=>{try{this.currentTransactionId=(0,n.generateId)();try{return await e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction({resolve:t,reject:r})}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(a)}})))}async applyOutgoingMutation(e,t){var r;const i=e.squidDocIdObj,o=(0,n.getSquidDocId)(i);this.knownDirtyDocs.add(o),t||(await this.lockManager.lock(a),this.lockManager.release(a)),this.knownDirtyDocs.delete(o);const s=null===(r=this.pendingOutgoingMutations.get(o))||void 0===r?void 0:r.slice(-1)[0];if(s&&!s.sentToServer)s.mutation=(0,n.reduceMutations)([s.mutation,e])[0],this.outgoingMutationsEmpty.next(!1);else{const t={mutation:this.removeInternalProperties(e),sentToServer:!1},r=this.pendingOutgoingMutations.get(o)||[];r.push(t),this.pendingOutgoingMutations.set(o,r),this.outgoingMutationsEmpty.next(!1),this.pendingOutgoingMutationsChanged.next()}return this.runInTransaction((async()=>{const t=this.documentStore.getDocumentOrUndefined(o),r="delete"===e.type?void 0:"update"===e.type?(0,n.applyUpdateMutation)(t,e):Object.assign({},e.properties);this.updateDocumentFromSnapshot(o,r)&&("insert"===e.type&&this.docIdToLocalTimestamp.set(o,(new Date).getTime()),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(o,r).forEach((e=>this.batchClientRequestIds.add(e))))}),t)}async runInTransactionSync(e,t){if(t)return(0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),void e(t);await this.lockManager.lock(a);try{this.currentTransactionId=(0,n.generateId)();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(a)}}removeInternalProperties(e){if("delete"===e.type)return e;const t=Object.assign(Object.assign({},e),{properties:Object.assign({},e.properties)});return delete t.properties.__docId__,delete t.properties.__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.handleIncomingMessagesForTests)return;const t=e.reduce(((e,t)=>this.querySubscriptionManager.hasOngoingQuery(t.clientRequestId)?(e[t.squidDocId]={properties:t.doc,timestamp:t.mutationTimestamp},e):e),{});this.applyIncomingUpdates(t)}handleIncomingQuerySnapshots(e){if(!this.handleIncomingMessagesForTests)return;if(!this.querySubscriptionManager.hasOngoingQuery(e.clientRequestId))return;const t=this.querySubscriptionManager.getQuery(e.clientRequestId),r={};for(const i of e.docs){const e=(0,n.getSquidDocId)(i.__docId__,t.collectionName,t.integrationId);r[e]={properties:i,timestamp:i.__ts__}}this.querySubscriptionManager.setGotResponseFromServer(e.clientRequestId),this.runInTransactionSync((t=>{this.batchClientRequestIds.add(e.clientRequestId),this.applyIncomingUpdates(r,t)&&this.querySubscriptionManager.hasSubscription(e.clientRequestId)&&this.batchClientRequestIds.delete(e.clientRequestId)})).then()}applyIncomingUpdates(e,t){let r=!1;const n=new Set;for(const[t,i]of Object.entries(e))this.addPendingIncomingUpdate(t,i),this.pendingIncomingUpdates.get(t)||(r=!0),n.add(t);return this.runInTransactionSync((()=>{for(const e of n)this.maybeApplyIncomingUpdate(e)}),t).then(),r}addPendingIncomingUpdate(e,t){const r=this.pendingIncomingUpdates.get(e),n=this.docIdToServerTimestamp.get(e);r&&r.timestamp>t.timestamp||n&&n.timestamp>t.timestamp||this.pendingIncomingUpdates.set(e,t)}maybeApplyIncomingUpdate(e){const t=this.pendingIncomingUpdates.get(e);if(!t)return;const r=this.pendingOutgoingMutations.get(e);r&&r.length||(this.updateDocumentFromSnapshot(e,t.properties),this.acknowledgeDocument(e,t.timestamp,!t.properties),this.docIdToLocalTimestamp.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.forgetDocument(e)))}destruct(){this.stopDeleteExpiredTimestampsJob()}stopDeleteExpiredTimestampsJob(){void 0!==this.deleteExpiredTimestampsInterval&&(clearInterval(this.deleteExpiredTimestampsInterval),this.deleteExpiredTimestampsInterval=void 0)}startDeleteExpiredTimestampsJob(){this.deleteExpiredTimestampsInterval=setInterval((()=>{const e=[...this.docIdToServerTimestamp.entries()].filter((([e,t])=>!(!t.expireTimestamp||t.expireTimestamp>Date.now()||this.isTracked(e))));for(const[t]of e)this.docIdToServerTimestamp.delete(t),this.forgetDocument(t)}),1e4)}isTracked(e){if(this.pendingIncomingUpdates.get(e))return!0;const t=this.pendingOutgoingMutations.get(e);return!(!t||!t.length)||this.querySubscriptionManager.hasOngoingQueryForDocId(e)}isForgotten(e){return this.documentStore.hasData(e)&&!this.isTracked(e)}isLocalOnly(e){return!this.hasBeenAcknowledged(e)&&this.documentStore.hasData(e)}hasBeenAcknowledged(e){return this.docIdToServerTimestamp.has(e)}updateDocumentFromSnapshot(e,t){const r=this.documentStore.getDocumentOrUndefined(e);return!(!r&&!t||r===t)&&((!r||!t||(0,n.normalizeJsonAsString)(Object.assign(Object.assign({},t),{__ts__:void 0}))!==(0,n.normalizeJsonAsString)(r))&&(this.documentStore.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()}async sendAllUnsentOutgoingMutations(e){const t=this.groupOutgoingMutationsByIntegrationId();try{await i.PromisePool.for(t).withConcurrency(t.length||1).handleError((e=>{throw e})).process((async([e,t])=>{await this.sendMutationsForIntegration([...t],e)})),this.pendingOutgoingMutations.size||this.outgoingMutationsEmpty.next(!0),await this.refreshUpdatedDocuments(),this.hasPendingSentMutations()?(await(0,o.firstValueFrom)(this.pendingOutgoingMutationsChanged.pipe((0,o.filter)((()=>!this.hasPendingSentMutations())))),null==e||e.resolve()):null==e||e.resolve()}catch(t){this.pendingOutgoingMutations.size||(this.outgoingMutationsEmpty.next(!0),await this.resyncFailedUpdates()),null==e||e.reject(t)}}async sendMutationsForIntegration(e,t){try{const{timestamp:r,idResolutionMap:n={},refreshList:i=[]}=await this.mutationSender.sendMutations(e.map((e=>e.mutation)),t);await this.documentIdentityService.migrate(n),i.forEach((e=>{this.refreshDocIdToTimestamp.set(n[e]||e,r)}));for(const t of e){let e=this.removeOutgoingMutation(t);n[e]&&(e=n[e]),this.acknowledgeDocument(e,r),this.isTracked(e)||(this.setExpiration(e,!0),this.forgetDocument(e))}}catch(t){for(const t of e){const e=this.removeOutgoingMutation(t);this.forgetDocument(e),(this.hasBeenAcknowledged(e)||"insert"===t.mutation.type)&&this.failedDocsToResync.push(e)}throw t}}removeOutgoingMutation(e){const t=(0,n.getSquidDocId)(e.mutation.squidDocIdObj),r=(0,n.truthy)(this.pendingOutgoingMutations.get(t));return r.splice(r.indexOf(e),1),r.length||this.pendingOutgoingMutations.delete(t),this.pendingOutgoingMutationsChanged.next(),t}async resyncFailedUpdates(){const e=[...this.failedDocsToResync];this.failedDocsToResync.splice(0);for(const t of e){this.setExpiration(t,!0);try{const e=await this.queryBuilderFactory.getForDocument(t).snapshot();if((0,n.truthy)(e.length<=1,"Got more than one doc for the same id:"+t),!e.length){this.forgetDocument(t);const e=this.querySubscriptionManager.setClientRequestIdsForLocalDoc(t,void 0);this.querySubscriptionManager.notifyAllSubscriptions(e)}}catch(e){this.querySubscriptionManager.errorOutAllQueries(t,e)}}}async refreshUpdatedDocuments(){var e;const t=[];for(const[r,n]of this.refreshDocIdToTimestamp.entries()){const i=null===(e=this.docIdToServerTimestamp.get(r))||void 0===e?void 0:e.timestamp;i&&i>n||t.push(r)}this.refreshDocIdToTimestamp.clear();for(const e of t)try{await this.queryBuilderFactory.getForDocument(e).snapshot()}catch(e){}}groupOutgoingMutationsByIntegrationId(){const e={};for(const[t,r]of[...this.pendingOutgoingMutations.entries()]){const t=r[r.length-1];if(t&&!t.sentToServer){const r=t.mutation.squidDocIdObj.integrationId;(e[r]||(e[r]=[])).push(t),t.sentToServer=!0}}return Object.entries(e)}handleOrphanDocs(){this.querySubscriptionManager.onOrphanDocuments.subscribe((e=>{for(const t of e)this.isTracked(t)||this.forgetDocument(t)}))}acknowledgeDocument(e,t,r=!1){this.docIdToServerTimestamp.set(e,{timestamp:t}),this.setExpiration(e,r)}setExpiration(e,t){const r=this.docIdToServerTimestamp.get(e);r&&(r.expireTimestamp=t?Date.now()+2e4:void 0)}forgetDocument(e){this.docIdToLocalTimestamp.delete(e),this.setExpiration(e,!0)}migrateDocIds(e){Object.entries(e).forEach((([e,t])=>{(0,n.replaceKeyInMap)(this.docIdToLocalTimestamp,e,t),(0,n.replaceKeyInMap)(this.docIdToServerTimestamp,e,t)}))}hasPendingSentMutations(){for(const e of this.pendingOutgoingMutations.values())for(const t of e)if(t.sentToServer)return!0;return!1}}},7787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DestructManager=void 0;const n=r(2937);t.DestructManager=class{constructor(){this.predestructors=[],this.destructors=[],this.isDestructedSubject=new n.BehaviorSubject(!1)}get isDestructing(){return this.isDestructedSubject.value}get isDestructingObservable(){return this.isDestructedSubject.asObservable().pipe((0,n.filter)(Boolean))}onPreDestruct(e){this.predestructors.push(e)}onDestruct(e){this.destructors.push(e)}async destruct(){if(this.isDestructing)return;this.isDestructedSubject.next(!0);const e=this.predestructors.concat(this.destructors);let t=e.shift();for(;t;){try{await t()}catch(e){console.error("Error while destructing Squid",e)}t=e.shift()}}}},4605:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockImpl=t.DistributedLockManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.DistributedLockManager=class{constructor(e,t){this.socketManager=e,this.destructManager=t,this.ongoingLocks={},this.acquireLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockAcquired"===e.type))),this.releaseLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockReleased"===e.type))),this.lockWaitForConnectionThreshold=2e3,t.onPreDestruct((()=>{this.releaseAllLocks()})),this.socketManager.observeConnectionReady().subscribe((e=>{e||this.releaseAllLocks()})),this.releaseLockMessagesFromServer.subscribe((e=>{const t=this.ongoingLocks[e.payload.clientRequestId];void 0!==t&&t.release().then()}))}async lock(e,t){if(!await(0,i.firstValueFrom)((0,i.race)((0,i.timer)(this.lockWaitForConnectionThreshold).pipe((0,o.map)((()=>!1))),this.socketManager.observeConnectionReady().pipe((0,i.filter)(Boolean)),this.destructManager.isDestructingObservable)))return Promise.reject("CLIENT_NOT_CONNECTED");const r=(0,n.generateId)(),a={type:"acquireLock",payload:{mutex:e,exclusive:t,clientRequestId:r}};this.socketManager.sendMessage(a);const u=await(0,i.firstValueFrom)((0,i.race)((0,i.timer)(5e3).pipe((0,i.take)(1),(0,o.map)((()=>({payload:{error:"TIMEOUT_GETTING_LOCK",lockId:void 0}})))),this.acquireLockMessagesFromServer.pipe((0,i.filter)((e=>e.payload.clientRequestId===r)))));if(!u.payload.lockId)throw new Error(`Failed to acquire lock: ${u.payload.error}`);const c=u.payload.lockId,l=new s(c,r,this.ongoingLocks,this.socketManager);return this.ongoingLocks[c]=l,l}releaseAllLocks(){for(const[e,t]of Object.entries(this.ongoingLocks))t.release().then(),delete this.ongoingLocks[e]}};class s{constructor(e,t,r,n){this.lockId=e,this.clientRequestId=t,this.ongoingLocks=r,this.socketManager=n,this.released=!1,this.onReleaseSubject=new i.Subject}async release(){if(this.released)return;this.released=!0,delete this.ongoingLocks[this.lockId];const e={type:"releaseLock",payload:{lockId:this.lockId,clientRequestId:this.clientRequestId}};this.socketManager.sendMessage(e),this.onReleaseSubject.next()}observeRelease(){return this.onReleaseSubject.asObservable()}isReleased(){return this.released}}t.DistributedLockImpl=s},2256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2937);t.default=class{constructor(e,t){this.documentStore=e,this.destructManager=t,this.changeNotifier=new n.BehaviorSubject({}),this.destructManager.onDestruct((()=>{this.changeNotifier.complete()}))}migrate(e){Object.entries(e).forEach((([e,t])=>{this.documentStore.migrateDocId(e,t)})),this.changeNotifier.next(e)}observeChanges(){return this.changeNotifier.asObservable()}}},2417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReferenceFactory=void 0;const n=r(575),i=r(4516);t.DocumentReferenceFactory=class{create(e,t){return new i.DocumentReference(e,(0,n.truthy)(this.dataManager,"dataManager not found"),t)}setDataManager(e){this.dataManager=e}}},4516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReference=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937);t.DocumentReference=class{constructor(e,t,r){this._squidDocId=e,this.dataManager=t,this.queryBuilderFactory=r,this.refId=(0,i.generateId)()}get squidDocId(){return this._squidDocId}get data(){return(0,i.truthy)(this.dataManager.getProperties(this.squidDocId))}get hasData(){return!!this.dataManager.getProperties(this.squidDocId)}async snapshot(){if(this.isTracked()&&this.dataManager.getProperties(this.squidDocId))return this;const e=await this.queryBuilderFactory.getForDocument(this.squidDocId).snapshot();return(0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0}snapshots(){return this.queryBuilderFactory.getForDocument(this.squidDocId).snapshots().pipe((0,s.map)((e=>((0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0))))}isDirty(){return this.dataManager.isDirty(this.squidDocId)}isTracked(){return this.dataManager.isTracked(this.squidDocId)}async update(e,t){const r={};Object.entries(e).forEach((([e,t])=>{const n=void 0!==t?{type:"update",value:t}:{type:"removeProperty"};r[e]=[n]}));const n={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:r};return this.dataManager.applyOutgoingMutation(n,t)}async setInPath(e,t,r){return this.update({[e]:o.cloneDeep(t)},r)}async deleteInPath(e,t){return this.update({[e]:void 0},t)}incrementInPath(e,t,r){const n={type:"applyNumericFn",fn:"increment",value:t},o={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:{[e]:[n]}};return this.dataManager.applyOutgoingMutation(o,r)}decrementInPath(e,t,r){return this.incrementInPath(e,-t,r)}async insert(e,t){const r=(0,i.parseSquidDocId)(this.squidDocId);let n=(0,i.deserializeObj)(r.docId);n.__squidId&&(n={});const o={type:"insert",squidDocIdObj:r,properties:Object.assign(Object.assign(Object.assign({},e),{__docId__:r.docId}),n)};return this.dataManager.applyOutgoingMutation(o,t)}async delete(e){const t={type:"delete",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId)};return this.dataManager.applyOutgoingMutation(t,e)}migrateDocIds(e){const t=e[this.squidDocId];t&&(this._squidDocId=t)}}},5182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentStore=void 0;const n=r(575),i=r(8784);t.DocumentStore=class{constructor(){this.squidDocIdToDoc=new Map}saveDocument(e,t){const r=this.squidDocIdToDoc.get(e);if(void 0===r&&!t)return;if(void 0!==r){if(t){const r=(0,i.cloneDeep)(t),n=this.removeInternalProperties(r);return this.squidDocIdToDoc.set(e,n),n}return void this.squidDocIdToDoc.delete(e)}const n=this.removeInternalProperties(t);return this.squidDocIdToDoc.set(e,n),t}hasData(e){return void 0!==this.squidDocIdToDoc.get(e)}getDocument(e){return(0,n.truthy)(this.getDocumentOrUndefined(e))}getDocumentOrUndefined(e){return this.squidDocIdToDoc.get(e)}sortAndLimitDocs(e,t){if(!e||0===e.size)return[];const r=[...e].map((e=>this.squidDocIdToDoc.get(e))).filter(n.isNotNullish),{sortOrder:o,limit:s}=t,a=o.map((e=>e.fieldName)),u=o.map((e=>e.asc?"asc":"desc")),c=(0,i.orderBy)(r,a,u);return s<0?c:r.slice(0,s)}removeInternalProperties(e){if(!e)return;const t=Object.assign({},e);return delete t.__ts__,t}migrateDocId(e,t){const r=this.getDocument(e);(0,n.replaceKeyInMap)(this.squidDocIdToDoc,e,t);const i=(0,n.parseSquidDocId)(t),o=(0,n.deserializeObj)(i.docId);this.saveDocument(t,Object.assign(Object.assign(Object.assign({},r),o),{__docId__:i.docId}))}}},5621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClientFactory=void 0;const n=r(5857);t.GraphQLClientFactory=class{constructor(e){this.rpcManager=e,this.clientsMap=new Map}get(e){let t=this.clientsMap.get(e);return t||(t=new n.GraphQLClient(this.rpcManager,e),this.clientsMap.set(e,t),t)}}},5857:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;const n=r(9312),i=r(2948),o=n.__importDefault(r(9031));t.GraphQLClient=class{constructor(e,t){this.rpcManager=e;const r=`${t}/graphql`;this.client=new i.ApolloClient({link:new i.HttpLink({uri:`${this.rpcManager.getEndpoint()}${r}`,headers:this.rpcManager.getStaticHeaders(),fetch:o.default}),cache:new i.InMemoryCache})}async query(e){return(await this.client.query({query:i.gql`
8
+ deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),u(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const u in t){const c=t[u];if(0===c.length)continue;const l=(0,o.propertyInData)(r,i,u,s.opts.ownProperties);e.setParams({property:u,depsCount:c.length,deps:c.join(", ")}),s.allErrors?r.if(l,(()=>{for(const t of c)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,o.checkMissingProp)(e,c,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function u(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,u=r.name("valid");for(const c in t)(0,i.alwaysValidSchema)(a,t[c])||(r.if((0,o.propertyInData)(r,n,c,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:c},u);e.mergeValidEvaluated(t,u)}),(()=>r.var(u,!0))),e.ok(u))}t.validatePropertyDeps=a,t.validateSchemaDeps=u,t.default=s},76:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),u=s(o,"else");if(!a&&!u)return;const c=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&u){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,f("then",r),f("else",r))}else a?t.if(l,f("then")):t.if((0,n.not)(l),f("else"));function f(r,i){return()=>{const o=e.subschema({keyword:r},l);t.assign(c,l),e.mergeValidEvaluated(o,c),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},6951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8891),i=r(1162),o=r(8634),s=r(5151),a=r(5609),u=r(5747),c=r(3021),l=r(4943),f=r(4243),p=r(8103),d=r(2869),h=r(4279),y=r(4880),v=r(2609),m=r(76),b=r(5316);t.default=function(e=!1){const t=[d.default,h.default,y.default,v.default,m.default,b.default,c.default,l.default,u.default,f.default,p.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},8634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(5669),i=r(8936),o=r(3499),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:u,it:c}=e;!function(e){const{opts:n,errSchemaPath:o}=c,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${u}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(c,e,n.strictTuples)}}(s),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(o,r.length,c.items));const l=o.name("valid"),f=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(o.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=a,t.default=s},5151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(3499),s=r(8891),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},2869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},4880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,u=t.let("valid",!1),c=t.let("passing",null),l=t.name("_valid");e.setParams({passing:c}),t.block((function(){a.forEach(((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(n._`${l} && ${u}`).assign(u,!1).assign(c,n._`[${c}, ${o}]`).else(),t.if(l,(()=>{t.assign(u,!0),t.assign(c,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(u,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},8103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),s=r(8936),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:u,it:c}=e,{opts:l}=c,f=(0,n.allSchemaProperties)(r),p=f.filter((e=>(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length||p.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const d=l.strictSchema&&!l.allowMatchingProperties&&u.properties,h=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,s.evaluatedPropsToName)(t,c.props));const{props:y}=c;function v(e){for(const t in d)new RegExp(e).test(t)&&(0,o.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function m(r){t.forIn("key",a,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},h),c.opts.unevaluated&&!0!==y?t.assign(i._`${y}[${o}]`,!0):n||c.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of f)d&&v(e),c.allErrors?m(e):(t.var(h,!0),m(e),t.if(h))}()}};t.default=a},1162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8634),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},4243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1686),i=r(3499),o=r(8936),s=r(4943),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:u,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(c,s.default,"additionalProperties"));const l=(0,i.allSchemaProperties)(r);for(const e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),c.props));const f=l.filter((e=>!(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length)return;const p=t.name("valid");for(const r of f)d(r)?h(r):(t.if((0,i.propertyInData)(t,u,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function d(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=a},3021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},5316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},3499:(e,t,r)=>{"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 n=r(5669),i=r(8936),o=r(5247),s=r(8936);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function u(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function c(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(u(e,t,r))):o}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:o}=e;r.if(c(r,i,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,o){return(0,n.or)(...i.map((i=>(0,n.and)(c(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=u,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${u(e,t,r)}`:o},t.noPropertyInData=c,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:u},c,l,f){const p=f?n._`${e}, ${t}, ${i}${s}`:t,d=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,u.parentData],[o.default.parentDataProperty,u.parentDataProperty],[o.default.rootData,o.default.rootData]];u.opts.dynamicRef&&d.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${p}, ${r.object(...d)}`;return l!==n.nil?n._`${c}.call(${l}, ${h})`:n._`${c}(${h})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?f:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return u((()=>t.assign(e,!1))),e}return t.var(a,!0),u((()=>t.break())),a;function u(s){const u=t.const("len",n._`${r}.length`);t.forRange("i",0,u,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),u=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},u);t.assign(a,n._`${a} || ${u}`),e.mergeValidEvaluated(s,u)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},1018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},2101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1018),i=r(1939),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},1939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(1578),i=r(3499),o=r(5669),s=r(5247),a=r(7382),u=r(8936),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:u,validateName:c,opts:p,self:d}=i,{root:h}=u;if(("#"===r||"#/"===r)&&s===h.baseId)return function(){if(u===h)return f(e,c,u,u.$async);const r=t.scopeValue("root",{ref:h});return f(e,o._`${r}.validate`,h,h.$async)}();const y=a.resolveRef.call(d,h,s,r);if(void 0===y)throw new n.default(i.opts.uriResolver,s,r);return y instanceof a.SchemaEnv?function(t){const r=l(e,t);f(e,r,t,t.$async)}(y):function(n){const i=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(y)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:a,it:c}=e,{allErrors:l,schemaEnv:f,opts:p}=c,d=p.passContext?s.default.this:o.nil;function h(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function y(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=u.mergeEvaluated.props(a,n.props,c.props));else{const t=a.var("props",o._`${e}.evaluated.props`);c.props=u.mergeEvaluated.props(a,t,c.props,o.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=u.mergeEvaluated.items(a,n.items,c.items));else{const t=a.var("items",o._`${e}.evaluated.items`);c.items=u.mergeEvaluated.items(a,t,c.items,o.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,d)}`),y(t),l||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${c.ValidationError})`,(()=>a.throw(e))),h(e),l||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,d),(()=>y(t)),(()=>h(t)))}t.getValidate=l,t.callRef=f,t.default=c},2:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(7421),o=r(7382),s=r(8936),a={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:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:u,it:c}=e,{oneOf:l}=u;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=a.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(f)}`);function h(r){const i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=i(u);let n=!0;for(let t=0;t<l.length;t++){let u=l[t];(null==u?void 0:u.$ref)&&!(0,s.schemaHasRulesButRef)(u,c.self.RULES)&&(u=o.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==u?void 0:u.$ref),u instanceof o.SchemaEnv&&(u=u.schema));const p=null===(e=null==u?void 0:u.properties)||void 0===e?void 0:e[f];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(r||i(u)),a(p,t)}if(!n)throw new Error(`discriminator: "${f}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(f)}function a(e,t){if(e.const)p(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)p(r,t)}}function p(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${d} === ${e}`),t.assign(p,h(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:d,tagName:f}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:d,tagName:f}))),e.ok(p)}};t.default=a},7421:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},5671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2101),i=r(7499),o=r(6951),s=r(4480),a=r(2480),u=[n.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=u},3599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:p}=u;c.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),u=r.let("fType"),l=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(u,n._`${s}.type || "string"`).assign(l,n._`${s}.validate`)),(()=>r.assign(u,n._`"string"`).assign(l,s))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${a} && !${l}`,function(){const e=f.$async?n._`(${s}.async ? await ${l}(${i}) : ${l}(${i}))`:n._`${l}(${i})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${i}))`;return n._`${l} && ${l} !== true && ${u} === ${t} && !${r}`}()))}():function(){const o=p.formats[s];if(!o)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}p.logger.warn(e())}();if(!0===o)return;const[a,u,d]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${d}(${i})`}return"function"==typeof u?n._`${d}(${i})`:n._`${d}.test(${i})`}())}())}};t.default=i},4480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(3599).default];t.default=n},2480:(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"]},8549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:u}=e;s||u&&"object"==typeof u?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${u} !== ${r}`)}};t.default=s},9450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:u,it:c}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=c.opts.loopEnum;let f;const p=()=>null!=f?f:f=(0,i.useFunc)(t,o.default);let d;if(l||s)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",u,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",u);d=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(d)}};t.default=s},7499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1337),i=r(9706),o=r(9507),s=r(1216),a=r(34),u=r(6962),c=r(1135),l=r(194),f=r(8549),p=r(9450),d=[n.default,i.default,o.default,s.default,a.default,u.default,c.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,p.default];t.default=d},1135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${i}`)}};t.default=i},9507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(9161),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,u="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${c} ${u} ${s}`)}};t.default=s},1337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=n.operators,o={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}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},34:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${i}`)}};t.default=i},9706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),u=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${u}))`)}};t.default=i},1216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o={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:r,schema:o,schemaCode:s,it:a}=e,u=a.opts.unicodeRegExp?"u":"",c=r?i._`(new RegExp(${s}, ${u}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${c}.test(${t})`)}};t.default=o},6962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),s={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:r,schemaCode:s,data:a,$data:u,it:c}=e,{opts:l}=c;if(!u&&0===r.length)return;const f=r.length>=l.loopRequired;if(c.allErrors?function(){if(f||u)e.block$data(i.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(f||u){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,l.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(c,t,c.opts.strictRequired)}}function p(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=s},194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7332),i=r(5669),o=r(8936),s=r(4285),a={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}}`},u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:a,code(e){const{gen:t,data:r,$data:a,schema:u,parentSchema:c,schemaCode:l,it:f}=e;if(!a&&!u)return;const p=t.let("valid"),d=c.items?(0,n.getSchemaTypes)(c.items):[];function h(o,s){const a=t.name("item"),u=(0,n.checkDataTypes)(d,a,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${r}[${o}]`),t.if(u,i._`continue`),d.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${c}[${a}] == "number"`,(()=>{t.assign(s,i._`${c}[${a}]`),e.error(),t.assign(p,!1).break()})).code(i._`${c}[${a}] = ${o}`)}))}function y(n,a){const u=(0,o.useFunc)(t,s.default),c=t.name("outer");t.label(c).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${u}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(c)}))))))}e.block$data(p,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(p,!0),t.if(i._`${n} > 1`,(()=>(d.length>0&&!d.some((e=>"object"===e||"array"===e))?h:y)(n,o)))}),i._`${l} === false`),e.ok(p)}};t.default=u},8682:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,s,a,u,c,l,f){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var p in n(o,s,a,u,c,l,f),o){var d=o[p];if(Array.isArray(d)){if(p in t.arrayKeywords)for(var h=0;h<d.length;h++)r(e,n,i,d[h],s+"/"+p+"/"+h,a,s,p,o,h)}else if(p in t.propsKeywords){if(d&&"object"==typeof d)for(var y in d)r(e,n,i,d[y],s+"/"+p+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,p,o,y)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,i,d,s+"/"+p,a,s,p,o)}i(o,s,a,u,c,l,f)}}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}},5382:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BSONError:()=>w,BSONRegExp:()=>rt,BSONSymbol:()=>nt,BSONTypeError:()=>O,BSON_BINARY_SUBTYPE_BYTE_ARRAY:()=>ve,BSON_BINARY_SUBTYPE_COLUMN:()=>we,BSON_BINARY_SUBTYPE_DEFAULT:()=>he,BSON_BINARY_SUBTYPE_ENCRYPTED:()=>_e,BSON_BINARY_SUBTYPE_FUNCTION:()=>ye,BSON_BINARY_SUBTYPE_MD5:()=>ge,BSON_BINARY_SUBTYPE_USER_DEFINED:()=>Oe,BSON_BINARY_SUBTYPE_UUID:()=>me,BSON_BINARY_SUBTYPE_UUID_NEW:()=>be,BSON_DATA_ARRAY:()=>G,BSON_DATA_BINARY:()=>J,BSON_DATA_BOOLEAN:()=>ee,BSON_DATA_CODE:()=>oe,BSON_DATA_CODE_W_SCOPE:()=>ae,BSON_DATA_DATE:()=>te,BSON_DATA_DBPOINTER:()=>ie,BSON_DATA_DECIMAL128:()=>fe,BSON_DATA_INT:()=>ue,BSON_DATA_LONG:()=>le,BSON_DATA_MAX_KEY:()=>de,BSON_DATA_MIN_KEY:()=>pe,BSON_DATA_NULL:()=>re,BSON_DATA_NUMBER:()=>W,BSON_DATA_OBJECT:()=>H,BSON_DATA_OID:()=>X,BSON_DATA_REGEXP:()=>ne,BSON_DATA_STRING:()=>K,BSON_DATA_SYMBOL:()=>se,BSON_DATA_TIMESTAMP:()=>ce,BSON_DATA_UNDEFINED:()=>Z,BSON_INT32_MAX:()=>B,BSON_INT32_MIN:()=>U,BSON_INT64_MAX:()=>V,BSON_INT64_MIN:()=>z,Binary:()=>Se,Code:()=>Ie,DBRef:()=>je,Decimal128:()=>We,Double:()=>Ke,EJSON:()=>yt,Int32:()=>He,Long:()=>De,LongWithoutOverridesClass:()=>it,Map:()=>vt,MaxKey:()=>Ge,MinKey:()=>Je,ObjectID:()=>tt,ObjectId:()=>tt,Timestamp:()=>ot,UUID:()=>Ee,calculateObjectSize:()=>vr,default:()=>br,deserialize:()=>yr,deserializeStream:()=>mr,serialize:()=>dr,serializeWithBufferAndIndex:()=>hr,setInternalBufferSize:()=>pr});for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,s=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63;var l,f,p=function(e){var t,r,n=u(e),s=n[0],a=n[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},d=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,u=r-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")},h=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,p=r?-1:1,d=e[t+f];for(f+=p,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},y=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,h=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=h,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=h,s/=256,c-=8);e[r+d-h]|=128*y},v=(l=function(e,t){var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;var n=2147483647;function i(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|v(e,t),n=i(r),s=n.write(e,t);return s!==r&&(n=n.slice(0,s)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(U(e,Uint8Array)){var t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e));if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return l(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return l(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var s=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?i(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e))}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return a(e),i(e<0?0:0|f(e))}function c(e){for(var t=e.length<0?0:0|f(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,o.prototype),n}function f(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function v(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(i)return n?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return j(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,p=0;p<u;p++)if(c(e,o+p)!==c(t,p)){f=!1;break}if(f)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(V(a))return s;e[r+s]=a}return s}function O(e,t,r,n){return B(q(t,e.length-r),e,r,n)}function S(e,t,r,n){return B(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return B(L(t),e,r,n)}function I(e,t,r,n){return B(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?d(e):d(e.slice(t,r))}function j(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=P));return r}(n)}t.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},o.allocUnsafe=function(e){return u(e)},o.allocUnsafeSlow=function(e){return u(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(U(s,Uint8Array))i+s.length>n.length?o.from(s).copy(n,i):Uint8Array.prototype.set.call(n,s,i);else{if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i)}i+=s.length}return n},o.byteLength=v,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?j(this,0,e):m.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),f=0;f<u;++f)if(c[f]!==l[f]){s=c[f],a=l[f];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return O(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=z[e[o]];return i}function M(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function k(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,4),y(e,t,r,n,23,4),r+4}function $(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,8),y(e,t,r,n,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),h(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),h(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),h(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),h(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:o.from(e,n),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=a[s%u]}return this};var F=/[^+/0-9A-Za-z-_]/g;function q(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(e){return p(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}var z=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},l(f={exports:{}},f.exports),f.exports),m=v.Buffer;v.SlowBuffer,v.INSPECT_MAX_BYTES,v.kMaxLength;var b=function(e,t){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},b(e,t)};function g(e,t){function r(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var _=function(){return _=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},w=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),O=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function S(e){return e&&e.Math==Math&&e}function E(){return S("object"==typeof globalThis&&globalThis)||S("object"==typeof window&&window)||S("object"==typeof self&&self)||S("object"==typeof r.g&&r.g)||Function("return this")()}function I(e){return e.toString().replace("function(","function (")}var T=function(e){var t,r="object"==typeof(t=E()).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(r);for(var n=m.alloc(e),i=0;i<e;++i)n[i]=Math.floor(256*Math.random());return n},j=function(){if("undefined"!=typeof window){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(m.alloc(t))}}return void 0!==r.g&&r.g.crypto&&r.g.crypto.getRandomValues?function(e){return r.g.crypto.getRandomValues(m.alloc(e))}:T}();function P(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function x(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function A(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function N(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function M(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function k(e){return D(e)&&"[object Date]"===Object.prototype.toString.call(e)}function D(e){return"object"==typeof e&&null!==e}function R(e,t){var r=!1;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return r||(console.warn(t),r=!0),e.apply(this,n)}}function C(e){if(ArrayBuffer.isView(e))return m.from(e.buffer,e.byteOffset,e.byteLength);if(P(e))return m.from(e);throw new O("Must use either Buffer or TypedArray")}var $=/^(?:[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,F=function(e){return"string"==typeof e&&$.test(e)},q=function(e){if(!F(e))throw new O('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 m.from(t,"hex")},L=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")},B=2147483647,U=-2147483648,V=Math.pow(2,63)-1,z=-Math.pow(2,63),Q=Math.pow(2,53),Y=-Math.pow(2,53),W=1,K=2,H=3,G=4,J=5,Z=6,X=7,ee=8,te=9,re=10,ne=11,ie=12,oe=13,se=14,ae=15,ue=16,ce=17,le=18,fe=19,pe=255,de=127,he=0,ye=1,ve=2,me=3,be=4,ge=5,_e=6,we=7,Oe=128,Se=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new O("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=r?r:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=m.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=m.from(t,"binary"):Array.isArray(t)?this.buffer=m.from(t):this.buffer=C(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new O("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new O("only accepts single character Uint8Array or Array");var r;if((r="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||r>255)throw new O("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=m.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var r=m.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(C(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"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===r.length?"0"+r:r}:{$binary:{base64:t,subType:1===r.length?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new Ee(this.buffer.slice(0,this.position));throw new w('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,r){var n,i;if(r=r||{},"$binary"in t?r.legacy&&"string"==typeof t.$binary&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,n=m.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,n=m.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,n=q(t.$uuid)),!n)throw new O("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===be?new Ee(n):new e(n,i)},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(Se.prototype,"_bsontype",{value:"Binary"});var Ee=function(e){function t(r){var n,i,o=this;if(null==r)n=t.generate();else if(r instanceof t)n=m.from(r.buffer),i=r.__id;else if(ArrayBuffer.isView(r)&&16===r.byteLength)n=C(r);else{if("string"!=typeof r)throw new O("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).");n=q(r)}return(o=e.call(this,n,be)||this).__id=i,o}return g(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(e){this.buffer=e,t.cacheHexString&&(this.__id=L(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var r=L(this.id,e);return t.cacheHexString&&(this.__id=r),r},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 Se(this.id,Se.SUBTYPE_UUID)},t.generate=function(){var e=j(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,m.from(e)},t.isValid=function(e){return!!e&&(e instanceof t||("string"==typeof e?F(e):!!x(e)&&16===e.length&&64==(240&e[6])&&128==(128&e[8])))},t.createFromHexString=function(e){return new t(q(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Se),Ie=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);this.code=t,this.scope=r}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 Te(e){return D(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty(Ie.prototype,"_bsontype",{value:"Code"});var je=function(){function e(t,r,n,i){if(!(this instanceof e))return new e(t,r,n,i);var o=t.split(".");2===o.length&&(n=o.shift(),t=o.shift()),this.collection=t,this.oid=r,this.db=n,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 r=Object.assign({},t);return delete r.$ref,delete r.$id,delete r.$db,new e(t.$ref,t.$id,t.$db,r)},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(je.prototype,"_bsontype",{value:"DBRef"});var Pe=void 0;try{Pe=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 xe=4294967296,Ae=0x10000000000000000,Ne=Ae/2,Me={},ke={},De=function(){function e(t,r,n){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,r,n);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!r)):"string"==typeof t?Object.assign(this,e.fromString(t,!!r)):(this.low=0|t,this.high=0|r,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromInt=function(t,r){var n,i,o;return r?(o=0<=(t>>>=0)&&t<256)&&(i=ke[t])?i:(n=e.fromBits(t,(0|t)<0?-1:0,!0),o&&(ke[t]=n),n):(o=-128<=(t|=0)&&t<128)&&(i=Me[t])?i:(n=e.fromBits(t,t<0?-1:0,!1),o&&(Me[t]=n),n)},e.fromNumber=function(t,r){if(isNaN(t))return r?e.UZERO:e.ZERO;if(r){if(t<0)return e.UZERO;if(t>=Ae)return e.MAX_UNSIGNED_VALUE}else{if(t<=-Ne)return e.MIN_VALUE;if(t+1>=Ne)return e.MAX_VALUE}return t<0?e.fromNumber(-t,r).neg():e.fromBits(t%xe|0,t/xe|0,r)},e.fromBigInt=function(t,r){return e.fromString(t.toString(),r)},e.fromString=function(t,r,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof r?(n=r,r=!1):r=!!r,(n=n||10)<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),r,n).neg();for(var o=e.fromNumber(Math.pow(n,8)),s=e.ZERO,a=0;a<t.length;a+=8){var u=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+u),n);if(u<8){var l=e.fromNumber(Math.pow(n,u));s=s.mul(l).add(e.fromNumber(c))}else s=(s=s.mul(o)).add(e.fromNumber(c))}return s.unsigned=r,s},e.fromBytes=function(t,r,n){return n?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){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,r)},e.fromBytesBE=function(t,r){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],r)},e.isLong=function(e){return D(e)&&!0===e.__isLong__},e.fromValue=function(t,r){return"number"==typeof t?e.fromNumber(t,r):"string"==typeof t?e.fromString(t,r):e.fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,u=t.low>>>16,c=0,l=0,f=0,p=0;return f+=(p+=o+(65535&t.low))>>>16,p&=65535,l+=(f+=i+u)>>>16,f&=65535,c+=(l+=n+a)>>>16,l&=65535,c+=r+s,c&=65535,e.fromBits(f<<16|p,c<<16|l,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 r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?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(Pe){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var r=(this.unsigned?Pe.div_u:Pe.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;o=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:(n=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(n)),o=n.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();o=e.ZERO}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:Math.pow(2,s-48),u=e.fromNumber(n),c=u.mul(t);c.isNegative()||c.gt(i);)n-=a,c=(u=e.fromNumber(n,this.unsigned)).mul(t);u.isZero()&&(u=e.ONE),o=o.add(u),i=i.sub(c)}return o},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,r=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(r&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)),Pe){var r=(this.unsigned?Pe.rem_u:Pe.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.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)),Pe){var r=Pe.mul(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.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 n=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,l=65535&t.low,f=0,p=0,d=0,h=0;return d+=(h+=s*l)>>>16,h&=65535,p+=(d+=o*l)>>>16,d&=65535,p+=(d+=s*c)>>>16,d&=65535,f+=(p+=i*l)>>>16,p&=65535,f+=(p+=o*c)>>>16,p&=65535,f+=(p+=s*u)>>>16,p&=65535,f+=n*l+i*c+o*u+s*a,f&=65535,e.fromBits(d<<16|h,f<<16|p,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 r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>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)*xe+(this.low>>>0):this.high*xe+(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 r=e.fromNumber(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=e.fromNumber(Math.pow(t,6),this.unsigned),s=this,a="";;){var u=s.div(o),c=(s.sub(u.mul(o)).toInt()>>>0).toString(t);if((s=u).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},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,r){var n=e.fromString(t.$numberLong);return r&&r.relaxed?n.toNumber():n},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(De.prototype,"__isLong__",{value:!0}),Object.defineProperty(De.prototype,"_bsontype",{value:"Long"});var Re=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Ce=/^(\+|-)?(Infinity|inf)$/i,$e=/^(\+|-)?NaN$/i,Fe=6111,qe=-6176,Le=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Be=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ue=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ve=/^([-+])?(\d+)?$/;function ze(e){return!isNaN(parseInt(e,10))}function Qe(e){var t=De.fromNumber(1e9),r=De.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:r};for(var n=0;n<=3;n++)r=(r=r.shiftLeft(32)).add(new De(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function Ye(e,t){throw new O('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var We=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!x(t))throw new O("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new O("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var r,n=!1,i=!1,o=!1,s=0,a=0,u=0,c=0,l=0,f=[0],p=0,d=0,h=0,y=0,v=0,b=0,g=new De(0,0),_=new De(0,0),w=0;if(t.length>=7e3)throw new O(t+" not a valid Decimal128 string");var S=t.match(Re),E=t.match(Ce),I=t.match($e);if(!S&&!E&&!I||0===t.length)throw new O(t+" not a valid Decimal128 string");if(S){var T=S[2],j=S[4],P=S[5],x=S[6];j&&void 0===x&&Ye(t,"missing exponent power"),j&&void 0===T&&Ye(t,"missing exponent base"),void 0===j&&(P||x)&&Ye(t,"missing e before exponent")}if("+"!==t[w]&&"-"!==t[w]||(n="-"===t[w++]),!ze(t[w])&&"."!==t[w]){if("i"===t[w]||"I"===t[w])return new e(m.from(n?Be:Ue));if("N"===t[w])return new e(m.from(Le))}for(;ze(t[w])||"."===t[w];)"."!==t[w]?(p<34&&("0"!==t[w]||o)&&(o||(l=a),o=!0,f[d++]=parseInt(t[w],10),p+=1),o&&(u+=1),i&&(c+=1),a+=1,w+=1):(i&&Ye(t,"contains multiple periods"),i=!0,w+=1);if(i&&!a)throw new O(t+" not a valid Decimal128 string");if("e"===t[w]||"E"===t[w]){var A=t.substr(++w).match(Ve);if(!A||!A[2])return new e(m.from(Le));v=parseInt(A[0],10),w+=A[0].length}if(t[w])return new e(m.from(Le));if(h=0,p){if(y=p-1,1!==(s=u))for(;0===f[l+s-1];)s-=1}else h=0,y=0,f[0]=0,u=1,p=1,s=0;for(v<=c&&c-v>16384?v=qe:v-=c;v>Fe;){if((y+=1)-h>34){if(f.join("").match(/^0+$/)){v=Fe;break}Ye(t,"overflow")}v-=1}for(;v<qe||p<u;){if(0===y&&s<p){v=qe,s=0;break}if(p<u?u-=1:y-=1,v<Fe)v+=1;else{if(f.join("").match(/^0+$/)){v=Fe;break}Ye(t,"overflow")}}if(y-h+1<s){var N=a;i&&(l+=1,N+=1),n&&(l+=1,N+=1);var M=parseInt(t[l+y+1],10),k=0;if(M>=5&&(k=1,5===M))for(k=f[y]%2==1?1:0,b=l+y+2;b<N;b++)if(parseInt(t[b],10)){k=1;break}if(k)for(var D=y;D>=0;D--)if(++f[D]>9&&(f[D]=0,0===D)){if(!(v<Fe))return new e(m.from(n?Be:Ue));v+=1,f[D]=1}}if(g=De.fromNumber(0),_=De.fromNumber(0),0===s)g=De.fromNumber(0),_=De.fromNumber(0);else if(y-h<17)for(D=h,_=De.fromNumber(f[D++]),g=new De(0,0);D<=y;D++)_=(_=_.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]));else{for(D=h,g=De.fromNumber(f[D++]);D<=y-17;D++)g=(g=g.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]));for(_=De.fromNumber(f[D++]);D<=y;D++)_=(_=_.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]))}var R,C,$,F,q=function(e,t){if(!e&&!t)return{high:De.fromNumber(0),low:De.fromNumber(0)};var r=e.shiftRightUnsigned(32),n=new De(e.getLowBits(),0),i=t.shiftRightUnsigned(32),o=new De(t.getLowBits(),0),s=r.multiply(i),a=r.multiply(o),u=n.multiply(i),c=n.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new De(a.getLowBits(),0).add(u).add(c.shiftRightUnsigned(32)),{high:s=s.add(a.shiftRightUnsigned(32)),low:c=a.shiftLeft(32).add(new De(c.getLowBits(),0))}}(g,De.fromString("100000000000000000"));q.low=q.low.add(_),C=_,(($=(R=q.low).high>>>0)<(F=C.high>>>0)||$===F&&R.low>>>0<C.low>>>0)&&(q.high=q.high.add(De.fromNumber(1))),r=v+6176;var L={low:De.fromNumber(0),high:De.fromNumber(0)};q.high.shiftRightUnsigned(49).and(De.fromNumber(1)).equals(De.fromNumber(1))?(L.high=L.high.or(De.fromNumber(3).shiftLeft(61)),L.high=L.high.or(De.fromNumber(r).and(De.fromNumber(16383).shiftLeft(47))),L.high=L.high.or(q.high.and(De.fromNumber(0x7fffffffffff)))):(L.high=L.high.or(De.fromNumber(16383&r).shiftLeft(49)),L.high=L.high.or(q.high.and(De.fromNumber(562949953421311)))),L.low=q.low,n&&(L.high=L.high.or(De.fromString("9223372036854775808")));var B=m.alloc(16);return w=0,B[w++]=255&L.low.low,B[w++]=L.low.low>>8&255,B[w++]=L.low.low>>16&255,B[w++]=L.low.low>>24&255,B[w++]=255&L.low.high,B[w++]=L.low.high>>8&255,B[w++]=L.low.high>>16&255,B[w++]=L.low.high>>24&255,B[w++]=255&L.high.low,B[w++]=L.high.low>>8&255,B[w++]=L.high.low>>16&255,B[w++]=L.high.low>>24&255,B[w++]=255&L.high.high,B[w++]=L.high.high>>8&255,B[w++]=L.high.high>>16&255,B[w++]=L.high.high>>24&255,new e(B)},e.prototype.toString=function(){for(var e,t=0,r=new Array(36),n=0;n<r.length;n++)r[n]=0;var i,o,s,a=0,u=!1,c={parts:[0,0,0,0]},l=[];a=0;var f=this.bytes,p=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,d=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,h=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,y=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24;a=0,(new De(p,d),new De(h,y)).lessThan(De.ZERO)&&l.push("-");var v=y>>26&31;if(v>>3==3){if(30===v)return l.join("")+"Infinity";if(31===v)return"NaN";e=y>>15&16383,i=8+(y>>14&1)}else i=y>>14&7,e=y>>17&16383;var m=e-6176;if(c.parts[0]=(16383&y)+((15&i)<<14),c.parts[1]=h,c.parts[2]=d,c.parts[3]=p,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])u=!0;else for(s=3;s>=0;s--){var b=0,g=Qe(c);if(c=g.quotient,b=g.rem.low)for(o=8;o>=0;o--)r[9*s+o]=b%10,b=Math.floor(b/10)}if(u)t=1,r[a]=0;else for(t=36;!r[a];)t-=1,a+=1;var _=t-1+m;if(_>=34||_<=-7||m>0){if(t>34)return l.push("".concat(0)),m>0?l.push("E+".concat(m)):m<0&&l.push("E".concat(m)),l.join("");for(l.push("".concat(r[a++])),(t-=1)&&l.push("."),n=0;n<t;n++)l.push("".concat(r[a++]));l.push("E"),_>0?l.push("+".concat(_)):l.push("".concat(_))}else if(m>=0)for(n=0;n<t;n++)l.push("".concat(r[a++]));else{var w=t+m;if(w>0)for(n=0;n<w;n++)l.push("".concat(r[a++]));else l.push("0");for(l.push(".");w++<0;)l.push("0");for(n=0;n<t-Math.max(w-1,0);n++)l.push("".concat(r[a++]))}return l.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(We.prototype,"_bsontype",{value:"Decimal128"});var Ke=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,r){var n=parseFloat(t.$numberDouble);return r&&r.relaxed?n:new e(n)},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(Ke.prototype,"_bsontype",{value:"Double"});var He=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,r){return r&&r.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(He.prototype,"_bsontype",{value:"Int32"});var Ge=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(Ge.prototype,"_bsontype",{value:"MaxKey"});var Je=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(Je.prototype,"_bsontype",{value:"MinKey"});var Ze=new RegExp("^[0-9a-fA-F]{24}$"),Xe=null,et=Symbol("id"),tt=function(){function e(t){if(!(this instanceof e))return new e(t);var r;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new O("Argument passed in must have an id that is of type string or Buffer");r="toHexString"in t&&"function"==typeof t.toHexString?m.from(t.toHexString(),"hex"):t.id}else r=t;if(null==r||"number"==typeof r)this[et]=e.generate("number"==typeof r?r:void 0);else if(ArrayBuffer.isView(r)&&12===r.byteLength)this[et]=r instanceof m?r:C(r);else{if("string"!=typeof r)throw new O("Argument passed in does not match the accepted types");if(12===r.length){var n=m.from(r);if(12!==n.byteLength)throw new O("Argument passed in must be a string of 12 bytes");this[et]=n}else{if(24!==r.length||!Ze.test(r))throw new O("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[et]=m.from(r,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[et]},set:function(t){this[et]=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 r=e.getInc(),n=m.alloc(12);return n.writeUInt32BE(t,0),null===Xe&&(Xe=j(5)),n[4]=Xe[0],n[5]=Xe[1],n[6]=Xe[2],n[7]=Xe[3],n[8]=Xe[4],n[11]=255&r,n[10]=r>>8&255,n[9]=r>>16&255,n},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[et][11]===t[et][11]&&this[et].equals(t[et]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&x(this.id))return t===m.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 m.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var r=t.toHexString(),n=this.toHexString().toLowerCase();return"string"==typeof r&&r.toLowerCase()===n}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 r=m.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(t,0),new e(r)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new O("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(m.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(tt.prototype,"generate",{value:R((function(e){return tt.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(tt.prototype,"getInc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt.prototype,"get_inc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt,"get_inc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt.prototype,"_bsontype",{value:"ObjectID"});var rt=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this.pattern=t,this.options=(null!=r?r:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new w("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new w("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if("i"!==this.options[n]&&"m"!==this.options[n]&&"x"!==this.options[n]&&"l"!==this.options[n]&&"s"!==this.options[n]&&"u"!==this.options[n])throw new w("The regular expression option [".concat(this.options[n],"] 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 O("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(rt.prototype,"_bsontype",{value:"BSONRegExp"});var nt=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(nt.prototype,"_bsontype",{value:"Symbol"});var it=De,ot=function(e){function t(r,n){var i=this;return i instanceof t?(i=De.isLong(r)?e.call(this,r.low,r.high,!0)||this:D(r)&&void 0!==r.t&&void 0!==r.i?e.call(this,r.i,r.t,!0)||this:e.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(r,n)}return g(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(De.fromInt(e,!0))},t.fromNumber=function(e){return new t(De.fromNumber(e,!0))},t.fromBits=function(e,r){return new t(e,r)},t.fromString=function(e,r){return new t(De.fromString(e,!0,r))},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=De.MAX_UNSIGNED_VALUE,t}(it);function st(e){return D(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var at=2147483647,ut=-2147483648,ct=0x8000000000000000,lt=-0x8000000000000000,ft={$oid:tt,$binary:Se,$uuid:Se,$symbol:nt,$numberInt:He,$numberDecimal:We,$numberDouble:Ke,$numberLong:De,$minKey:Je,$maxKey:Ge,$regex:rt,$regularExpression:rt,$timestamp:ot};function pt(e,t){if(void 0===t&&(t={}),"number"==typeof e){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=ut&&e<=at)return new He(e);if(e>=lt&&e<=ct)return De.fromNumber(e)}return new Ke(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;for(var r=Object.keys(e).filter((function(t){return t.startsWith("$")&&null!=e[t]})),n=0;n<r.length;n++){var i=ft[r[n]];if(i)return i.fromExtendedJSON(e,t)}if(null!=e.$date){var o=e.$date,s=new Date;return t.legacy?"number"==typeof o?s.setTime(o):"string"==typeof o&&s.setTime(Date.parse(o)):"string"==typeof o?s.setTime(Date.parse(o)):De.isLong(o)?s.setTime(o.toNumber()):"number"==typeof o&&t.relaxed&&s.setTime(o),s}if(null!=e.$code){var a=Object.assign({},e);return e.$scope&&(a.$scope=pt(e.$scope)),Ie.fromExtendedJSON(e)}if(Te(e)||e.$dbPointer){var u=e.$ref?e:e.$dbPointer;if(u instanceof je)return u;var c=Object.keys(u).filter((function(e){return e.startsWith("$")})),l=!0;if(c.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(l=!1)})),l)return je.fromExtendedJSON(u)}return e}function dt(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function ht(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var r=t.seenObjects.findIndex((function(t){return t.obj===e}));if(-1!==r){var n=t.seenObjects.map((function(e){return e.propertyName})),i=n.slice(0,r).map((function(e){return"".concat(e," -> ")})).join(""),o=n[r],s=" -> "+n.slice(r+1,n.length-1).map((function(e){return"".concat(e," -> ")})).join(""),a=n[n.length-1],u=" ".repeat(i.length+o.length/2),c="-".repeat(s.length+(o.length+a.length)/2-1);throw new O("Converting circular structure to EJSON:\n"+" ".concat(i).concat(o).concat(s).concat(a,"\n")+" ".concat(u,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return ht(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||k(e)){var l=e.getTime(),f=l>-1&&l<2534023188e5;return t.legacy?t.relaxed&&f?{$date:e.getTime()}:{$date:dt(e)}:t.relaxed&&f?{$date:dt(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var p=e>=lt&&e<=ct;if(e>=ut&&e<=at)return{$numberInt:e.toString()};if(p)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||M(e)){var d=e.flags;if(void 0===d){var h=e.toString().match(/[gimuy]*$/);h&&(d=h[0])}return new rt(e.source,d).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new w("not an object instance");var r=e._bsontype;if(void 0===r){var n={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var o=ht(e[i],t);"__proto__"===i?Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):n[i]=o}finally{t.seenObjects.pop()}}return n}if(st(e)){var s=e;if("function"!=typeof s.toExtendedJSON){var a=mt[e._bsontype];if(!a)throw new O("Unrecognized or invalid _bsontype: "+e._bsontype);s=a(s)}return"Code"===r&&s.scope?s=new Ie(s.code,ht(s.scope,t)):"DBRef"===r&&s.oid&&(s=new je(ht(s.collection,t),ht(s.oid,t),ht(s.db,t),ht(s.fields,t))),s.toExtendedJSON(t)}throw new w("_bsontype must be a string, but was: "+typeof r)}(e,t):e}var yt,vt,mt={Binary:function(e){return new Se(e.value(),e.sub_type)},Code:function(e){return new Ie(e.code,e.scope)},DBRef:function(e){return new je(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new We(e.bytes)},Double:function(e){return new Ke(e.value)},Int32:function(e){return new He(e.value)},Long:function(e){return De.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 Ge},MinKey:function(){return new Je},ObjectID:function(e){return new tt(e)},ObjectId:function(e){return new tt(e)},BSONRegExp:function(e){return new rt(e.pattern,e.options)},Symbol:function(e){return new nt(e.value)},Timestamp:function(e){return ot.fromBits(e.low,e.high)}};!function(e){function t(e,t){var r=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof r.relaxed&&(r.strict=!r.relaxed),"boolean"==typeof r.strict&&(r.relaxed=!r.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new w("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return pt(t,r)}))}function r(e,t,r,n){null!=r&&"object"==typeof r&&(n=r,r=0),null==t||"object"!=typeof t||Array.isArray(t)||(n=t,t=void 0,r=0);var i=ht(e,Object.assign({relaxed:!0,legacy:!1},n,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,r)}e.parse=t,e.stringify=r,e.serialize=function(e,t){return t=t||{},JSON.parse(r(e,t))},e.deserialize=function(e,r){return r=r||{},t(JSON.stringify(e),r)}}(yt||(yt={}));var bt=E();function gt(e,t,r){var n=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)n+=_t(i.toString(),e[i],t,!0,r);else for(var o in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)n+=_t(o,e[o],t,!1,r);return n}function _t(e,t,r,n,i){switch(void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+m.byteLength(e,"utf8")+1+4+m.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=Y&&t<=Q&&t>=U&&t<=B?(null!=e?m.byteLength(e,"utf8")+1:0)+5:(null!=e?m.byteLength(e,"utf8")+1:0)+9;case"undefined":return n||!i?(null!=e?m.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?m.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||k(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||P(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+4+m.byteLength(t.code.toString(),"utf8")+1+gt(t.scope,r,i):(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+m.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var o=t;return o.sub_type===Se.SUBTYPE_BYTE_ARRAY?(null!=e?m.byteLength(e,"utf8")+1:0)+(o.position+1+4+1+4):(null!=e?m.byteLength(e,"utf8")+1:0)+(o.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+m.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?m.byteLength(e,"utf8")+1:0)+1+gt(s,r,i)}return t instanceof RegExp||M(t)?(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.pattern,"utf8")+1+m.byteLength(t.options,"utf8")+1:(null!=e?m.byteLength(e,"utf8")+1:0)+gt(t,r,i)+1;case"function":if(t instanceof RegExp||M(t)||"[object RegExp]"===String.call(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(r&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+4+m.byteLength(I(t),"utf8")+1+gt(t.scope,r,i);if(r)return(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+m.byteLength(I(t),"utf8")+1}return 0}vt=bt.Map?bt.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 r=e[t],n=r[0],i=r[1];this._keys.push(n),this._values[n]={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 r=e._keys[t++];return{value:void 0!==r?[r,e._values[r].v]:void 0,done:void 0===r}}}},e.prototype.forEach=function(e,t){t=t||this;for(var r=0;r<this._keys.length;r++){var n=this._keys[r];e.call(t,this._values[n].v,n,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 r=e._keys[t++];return{value:void 0!==r?r:void 0,done:void 0===r}}}},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 r=e._keys[t++];return{value:void 0!==r?e._values[r].v:void 0,done:void 0===r}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var wt=128,Ot=192,St=224,Et=240,It=248,Tt=192,jt=224,Pt=240,xt=128;function At(e,t,r){for(var n=0,i=t;i<r;i+=1){var o=e[i];if(n){if((o&Ot)!==xt)return!1;n-=1}else if(o&wt)if((o&St)===Tt)n=1;else if((o&Et)===jt)n=2;else{if((o&It)!==Pt)return!1;n=3}}return!n}var Nt=De.fromNumber(Q),Mt=De.fromNumber(Y),kt={};function Dt(e,t,r){var n=(t=null==t?{}:t)&&t.index?t.index:0,i=e[n]|e[n+1]<<8|e[n+2]<<16|e[n+3]<<24;if(i<5)throw new w("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new w("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new w("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+n>e.byteLength)throw new w("(bson size ".concat(i," + options.index ").concat(n," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[n+i-1])throw new w("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return Ct(e,n,t,r)}var Rt=/^\$ref$|^\$id$|^\$db$/;function Ct(e,t,r,n){void 0===n&&(n=!1);var i,o=null!=r.evalFunctions&&r.evalFunctions,s=null!=r.cacheFunctions&&r.cacheFunctions,a=null==r.fieldsAsRaw?null:r.fieldsAsRaw,u=null!=r.raw&&r.raw,c="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,l=null!=r.promoteBuffers&&r.promoteBuffers,f=null==r.promoteLongs||r.promoteLongs,p=null==r.promoteValues||r.promoteValues,d=null==r.validation?{utf8:!0}:r.validation,h=!0,y=new Set,v=d.utf8;if("boolean"==typeof v)i=v;else{h=!1;var b=Object.keys(v).map((function(e){return v[e]}));if(0===b.length)throw new w("UTF-8 validation setting cannot be empty");if("boolean"!=typeof b[0])throw new w("Invalid UTF-8 validation option, must specify boolean values");if(i=b[0],!b.every((function(e){return e===i})))throw new w("Invalid UTF-8 validation option - keys must be all true or all false")}if(!h)for(var g=0,O=Object.keys(v);g<O.length;g++){var S=O[g];y.add(S)}var E=t;if(e.length<5)throw new w("corrupt bson message < 5 bytes long");var I=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(I<5||I>e.length)throw new w("corrupt bson message");for(var T=n?[]:{},j=0,P=!n&&null,x=new DataView(e.buffer,e.byteOffset,e.byteLength);;){var A=e[t++];if(0===A)break;for(var N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.byteLength)throw new w("Bad BSON Document: illegal CString");var M,k=n?j++:e.toString("utf8",t,N);M=h||y.has(k)?i:!i,!1!==P&&"$"===k[0]&&(P=Rt.test(k));var D=void 0;if(t=N+1,A===K){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");D=Ft(e,t,t+Ae-1,M),t+=Ae}else if(A===X){var R=m.alloc(12);e.copy(R,0,t,t+12),D=new tt(R),t+=12}else if(A===ue&&!1===p)D=new He(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24);else if(A===ue)D=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;else if(A===W&&!1===p)D=new Ke(x.getFloat64(t,!0)),t+=8;else if(A===W)D=x.getFloat64(t,!0),t+=8;else if(A===te){var C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;D=new Date(new De(C,$).toNumber())}else if(A===ee){if(0!==e[t]&&1!==e[t])throw new w("illegal boolean type value");D=1===e[t++]}else if(A===H){var F=t;if((Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)<=0||Pe>e.length-t)throw new w("bad embedded document length in bson");if(u)D=e.slice(t,t+Pe);else{var q=r;h||(q=_(_({},r),{validation:{utf8:M}})),D=Ct(e,F,q,!1)}t+=Pe}else if(A===G){F=t;var L=r,B=t+(Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24);if(a&&a[k]){for(var U in L={},r)L[U]=r[U];L.raw=!0}if(h||(L=_(_({},L),{validation:{utf8:M}})),D=Ct(e,F,L,!0),0!==e[(t+=Pe)-1])throw new w("invalid array terminator byte");if(t!==B)throw new w("corrupted array bson")}else if(A===Z)D=void 0;else if(A===re)D=null;else if(A===le){C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;var V=new De(C,$);D=f&&!0===p&&V.lessThanOrEqual(Nt)&&V.greaterThanOrEqual(Mt)?V.toNumber():V}else if(A===fe){var z=m.alloc(16);e.copy(z,0,t,t+16),t+=16;var Q=new We(z);D="toObject"in Q&&"function"==typeof Q.toObject?Q.toObject():Q}else if(A===J){var Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,he=Y,ye=e[t++];if(Y<0)throw new w("Negative binary type element size found");if(Y>e.byteLength)throw new w("Binary type size larger than document size");if(null!=e.slice){if(ye===Se.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new w("Negative binary type element size found for subtype 0x02");if(Y>he-4)throw new w("Binary type with subtype 0x02 contains too long binary size");if(Y<he-4)throw new w("Binary type with subtype 0x02 contains too short binary size")}l&&p?D=e.slice(t,t+Y):(D=new Se(e.slice(t,t+Y),ye),ye===be&&(D=D.toUUID()))}else{var ve=m.alloc(Y);if(ye===Se.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new w("Negative binary type element size found for subtype 0x02");if(Y>he-4)throw new w("Binary type with subtype 0x02 contains too long binary size");if(Y<he-4)throw new w("Binary type with subtype 0x02 contains too short binary size")}for(N=0;N<Y;N++)ve[N]=e[t+N];D=l&&p?ve:ye===be?new Se(e.slice(t,t+Y),ye).toUUID():new Se(e.slice(t,t+Y),ye)}t+=Y}else if(A===ne&&!1===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");var me=e.toString("utf8",t,N);for(N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");var ge=e.toString("utf8",t,N);t=N+1;var _e=new Array(ge.length);for(N=0;N<ge.length;N++)switch(ge[N]){case"m":_e[N]="m";break;case"s":_e[N]="g";break;case"i":_e[N]="i"}D=new RegExp(me,_e.join(""))}else if(A===ne&&!0===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");for(me=e.toString("utf8",t,N),N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");ge=e.toString("utf8",t,N),t=N+1,D=new rt(me,ge)}else if(A===se){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");var we=Ft(e,t,t+Ae-1,M);D=p?we:new nt(we),t+=Ae}else if(A===ce)C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,D=new ot(C,$);else if(A===pe)D=new Je;else if(A===de)D=new Ge;else if(A===oe){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");var Oe=Ft(e,t,t+Ae-1,M);D=o?s?$t(Oe,kt,T):$t(Oe):new Ie(Oe),t+=Ae}else if(A===ae){var Ee=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(Ee<13)throw new w("code_w_scope total size shorter minimum expected length");if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");Oe=Ft(e,t,t+Ae-1,M),F=t+=Ae;var Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,xe=Ct(e,F,r,!1);if(t+=Pe,Ee<8+Pe+Ae)throw new w("code_w_scope total size is too short, truncating scope");if(Ee>8+Pe+Ae)throw new w("code_w_scope total size is too long, clips outer document");o?(D=s?$t(Oe,kt,T):$t(Oe)).scope=xe:D=new Ie(Oe,xe)}else{if(A!==ie)throw new w("Detected unknown BSON type ".concat(A.toString(16),' for fieldname "').concat(k,'"'));var Ae;if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");if(null!=d&&d.utf8&&!At(e,t,t+Ae-1))throw new w("Invalid UTF-8 string in BSON document");var Ne=e.toString("utf8",t,t+Ae-1);t+=Ae;var Me=m.alloc(12);e.copy(Me,0,t,t+12),R=new tt(Me),t+=12,D=new je(Ne,R)}"__proto__"===k?Object.defineProperty(T,k,{value:D,writable:!0,enumerable:!0,configurable:!0}):T[k]=D}if(I!==t-E){if(n)throw new w("corrupt array bson");throw new w("corrupt object bson")}if(!P)return T;if(Te(T)){var ke=Object.assign({},T);return delete ke.$ref,delete ke.$id,delete ke.$db,new je(T.$ref,T.$id,T.$db,ke)}return T}function $t(e,t,r){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(r)):new Function(e)}function Ft(e,t,r,n){var i=e.toString("utf8",t,r);if(n)for(var o=0;o<i.length;o++)if(65533===i.charCodeAt(o)){if(!At(e,t,r))throw new w("Invalid UTF-8 string in BSON document");break}return i}var qt=/\x00/,Lt=new Set(["$db","$ref","$id","$clusterTime"]);function Bt(e,t,r,n,i){e[n++]=K;var o=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8");e[(n=n+o+1)-1]=0;var s=e.write(r,n+4,void 0,"utf8");return e[n+3]=s+1>>24&255,e[n+2]=s+1>>16&255,e[n+1]=s+1>>8&255,e[n]=s+1&255,n=n+4+s,e[n++]=0,n}var Ut=new Uint8Array(8),Vt=new DataView(Ut.buffer,Ut.byteOffset,Ut.byteLength);function zt(e,t,r,n,i){return Number.isInteger(r)&&r>=U&&r<=B?(e[n++]=ue,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255):(e[n++]=W,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Vt.setFloat64(0,r,!0),e.set(Ut,n),n+=8),n}function Qt(e,t,r,n,i){return e[n++]=re,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Yt(e,t,r,n,i){return e[n++]=ee,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=r?1:0,n}function Wt(e,t,r,n,i){e[n++]=te,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=De.fromNumber(r.getTime()),s=o.getLowBits(),a=o.getHighBits();return e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=255&a,e[n++]=a>>8&255,e[n++]=a>>16&255,e[n++]=a>>24&255,n}function Kt(e,t,r,n,i){if(e[n++]=ne,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,r.source&&null!=r.source.match(qt))throw Error("value "+r.source+" must not contain null bytes");return n+=e.write(r.source,n,void 0,"utf8"),e[n++]=0,r.ignoreCase&&(e[n++]=105),r.global&&(e[n++]=115),r.multiline&&(e[n++]=109),e[n++]=0,n}function Ht(e,t,r,n,i){if(e[n++]=ne,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,null!=r.pattern.match(qt))throw Error("pattern "+r.pattern+" must not contain null bytes");return n+=e.write(r.pattern,n,void 0,"utf8"),e[n++]=0,n+=e.write(r.options.split("").sort().join(""),n,void 0,"utf8"),e[n++]=0,n}function Gt(e,t,r,n,i){return null===r?e[n++]=re:"MinKey"===r._bsontype?e[n++]=pe:e[n++]=de,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Jt(e,t,r,n,i){if(e[n++]=X,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,"string"==typeof r.id)e.write(r.id,n,void 0,"binary");else{if(!x(r.id))throw new O("object ["+JSON.stringify(r)+"] is not a valid ObjectId");e.set(r.id.subarray(0,12),n)}return n+12}function Zt(e,t,r,n,i){e[n++]=J,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.length;return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=he,e.set(C(r),n),n+o}function Xt(e,t,r,n,i,o,s,a,u,c){void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),void 0===c&&(c=[]);for(var l=0;l<c.length;l++)if(c[l]===r)throw new w("cyclic dependency detected");c.push(r),e[n++]=Array.isArray(r)?G:H,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var f=cr(e,r,i,n,o+1,s,a,c);return c.pop(),f}function er(e,t,r,n,i){return e[n++]=fe,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e.set(r.bytes.subarray(0,16),n),n+16}function tr(e,t,r,n,i){e[n++]="Long"===r._bsontype?le:ce,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.getLowBits(),s=r.getHighBits();return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,n}function rr(e,t,r,n,i){return r=r.valueOf(),e[n++]=ue,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255,n}function nr(e,t,r,n,i){return e[n++]=W,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Vt.setFloat64(0,r.value,!0),e.set(Ut,n),n+8}function ir(e,t,r,n,i,o,s){e[n++]=oe,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=I(r),u=e.write(a,n+4,void 0,"utf8")+1;return e[n]=255&u,e[n+1]=u>>8&255,e[n+2]=u>>16&255,e[n+3]=u>>24&255,n=n+4+u-1,e[n++]=0,n}function or(e,t,r,n,i,o,s,a,u){if(void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),r.scope&&"object"==typeof r.scope){e[n++]=ae,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var c=n,l="string"==typeof r.code?r.code:r.code.toString();n+=4;var f=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&f,e[n+1]=f>>8&255,e[n+2]=f>>16&255,e[n+3]=f>>24&255,e[n+4+f-1]=0,n=n+f+4;var p=cr(e,r.scope,i,n,o+1,s,a);n=p-1;var d=p-c;e[c++]=255&d,e[c++]=d>>8&255,e[c++]=d>>16&255,e[c++]=d>>24&255,e[n++]=0}else{e[n++]=oe,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,l=r.code.toString();var h=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&h,e[n+1]=h>>8&255,e[n+2]=h>>16&255,e[n+3]=h>>24&255,n=n+4+h-1,e[n++]=0}return n}function sr(e,t,r,n,i){e[n++]=J,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.value(!0),s=r.position;return r.sub_type===Se.SUBTYPE_BYTE_ARRAY&&(s+=4),e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=r.sub_type,r.sub_type===Se.SUBTYPE_BYTE_ARRAY&&(s-=4,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255),e.set(o,n),n+r.position}function ar(e,t,r,n,i){e[n++]=se,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=e.write(r.value,n+4,void 0,"utf8")+1;return e[n]=255&o,e[n+1]=o>>8&255,e[n+2]=o>>16&255,e[n+3]=o>>24&255,n=n+4+o-1,e[n++]=0,n}function ur(e,t,r,n,i,o,s){e[n++]=H,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=n,u={$ref:r.collection||r.namespace,$id:r.oid};null!=r.db&&(u.$db=r.db);var c=cr(e,u=Object.assign(u,r.fields),!1,n,i+1,o),l=c-a;return e[a++]=255&l,e[a++]=l>>8&255,e[a++]=l>>16&255,e[a++]=l>>24&255,c}function cr(e,t,r,n,i,o,s,a){void 0===r&&(r=!1),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=!1),void 0===s&&(s=!0),void 0===a&&(a=[]),n=n||0,(a=a||[]).push(t);var u,c=n+4;if(Array.isArray(t))for(var l=0;l<t.length;l++){var f="".concat(l);if("function"==typeof(null==(v=t[l])?void 0:v.toBSON)&&(v=v.toBSON()),"string"==typeof v)c=Bt(e,f,v,c,!0);else if("number"==typeof v)c=zt(e,f,v,c,!0);else{if("bigint"==typeof v)throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof v)c=Yt(e,f,v,c,!0);else if(v instanceof Date||k(v))c=Wt(e,f,v,c,!0);else if(void 0===v)c=Qt(e,f,0,c,!0);else if(null===v)c=Qt(e,f,0,c,!0);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c,!0);else if(x(v))c=Zt(e,f,v,c,!0);else if(v instanceof RegExp||M(v))c=Kt(e,f,v,c,!0);else if("object"==typeof v&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!0,a);else if("object"==typeof v&&st(v)&&"Decimal128"===v._bsontype)c=er(e,f,v,c,!0);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c,!0);else if("Double"===v._bsontype)c=nr(e,f,v,c,!0);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,!0);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s,!0);else if("Binary"===v._bsontype)c=sr(e,f,v,c,!0);else if("Symbol"===v._bsontype)c=ar(e,f,v,c,!0);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o,!0);else if("BSONRegExp"===v._bsontype)c=Ht(e,f,v,c,!0);else if("Int32"===v._bsontype)c=rr(e,f,v,c,!0);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c,!0);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}else if(t instanceof vt||(u=t,"[object Map]"===Object.prototype.toString.call(u)))for(var p=t.entries(),d=!1;!d;){var h=p.next();if(!(d=!!h.done)){f=h.value[0];var y=typeof(v=h.value[1]);if("string"==typeof f&&!Lt.has(f)){if(null!=f.match(qt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Bt(e,f,v,c);else if("number"===y)c=zt(e,f,v,c);else{if("bigint"===y||A(v)||N(v))throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Yt(e,f,v,c);else if(v instanceof Date||k(v))c=Wt(e,f,v,c);else if(null===v||void 0===v&&!1===s)c=Qt(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c);else if(x(v))c=Zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Kt(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===v._bsontype)c=er(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c);else if("Double"===v._bsontype)c=nr(e,f,v,c);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=sr(e,f,v,c);else if("Symbol"===v._bsontype)c=ar(e,f,v,c);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Ht(e,f,v,c);else if("Int32"===v._bsontype)c=rr(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new O("toBSON function did not return an object");for(var f in t){var v;if("function"==typeof(null==(v=t[f])?void 0:v.toBSON)&&(v=v.toBSON()),y=typeof v,"string"==typeof f&&!Lt.has(f)){if(null!=f.match(qt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Bt(e,f,v,c);else if("number"===y)c=zt(e,f,v,c);else{if("bigint"===y)throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Yt(e,f,v,c);else if(v instanceof Date||k(v))c=Wt(e,f,v,c);else if(void 0===v)!1===s&&(c=Qt(e,f,0,c));else if(null===v)c=Qt(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c);else if(x(v))c=Zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Kt(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===v._bsontype)c=er(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c);else if("Double"===v._bsontype)c=nr(e,f,v,c);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=sr(e,f,v,c);else if("Symbol"===v._bsontype)c=ar(e,f,v,c);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Ht(e,f,v,c);else if("Int32"===v._bsontype)c=rr(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}a.pop(),e[c++]=0;var m=c-n;return e[n++]=255&m,e[n++]=m>>8&255,e[n++]=m>>16&255,e[n++]=m>>24&255,c}var lr=17825792,fr=m.alloc(lr);function pr(e){fr.length<e&&(fr=m.alloc(e))}function dr(e,t){void 0===t&&(t={});var r="boolean"==typeof t.checkKeys&&t.checkKeys,n="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,o="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:lr;fr.length<o&&(fr=m.alloc(o));var s=cr(fr,e,r,0,0,n,i,[]),a=m.alloc(s);return fr.copy(a,0,0,a.length),a}function hr(e,t,r){void 0===r&&(r={});var n="boolean"==typeof r.checkKeys&&r.checkKeys,i="boolean"==typeof r.serializeFunctions&&r.serializeFunctions,o="boolean"!=typeof r.ignoreUndefined||r.ignoreUndefined,s="number"==typeof r.index?r.index:0,a=cr(fr,e,n,0,0,i,o);return fr.copy(t,s,0,a),s+a-1}function yr(e,t){return void 0===t&&(t={}),Dt(e instanceof m?e:C(e),t)}function vr(e,t){return void 0===t&&(t={}),gt(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function mr(e,t,r,n,i,o){for(var s=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},o),a=C(e),u=t,c=0;c<r;c++){var l=a[u]|a[u+1]<<8|a[u+2]<<16|a[u+3]<<24;s.index=u,n[i+c]=Dt(a,s),u+=l}return u}const br={Binary:Se,Code:Ie,DBRef:je,Decimal128:We,Double:Ke,Int32:He,Long:De,UUID:Ee,Map:vt,MaxKey:Ge,MinKey:Je,ObjectId:tt,ObjectID:tt,BSONRegExp:rt,BSONSymbol:nt,Timestamp:ot,EJSON:yt,setInternalBufferSize:pr,serialize:dr,serializeWithBufferAndIndex:hr,deserialize:yr,calculateObjectSize:vr,deserializeStream:mr,BSONError:w,BSONTypeError:O}},2091:function(e,t,r){var n,i;i=function(e){var t=["N","E","A","D"];function r(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function n(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,r){i.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function s(e,t){s.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function a(e,t,r){a.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function u(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),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 l(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}function f(e){var t=0,r=c(e);if("array"===r)return e.forEach((function(e){t+=f(e)})),t+l("[type: array, hash: "+t+"]");if("object"===r){for(var n in e)if(e.hasOwnProperty(n)){var i="[ type: object, key: "+n+", value hash: "+f(e[n])+"]";t+=l(i)}return t}return t+l("[ type: "+r+" ; value: "+e+"]")}function p(e,t,r,n,u,l,d,h){r=r||[],d=d||[];var y=(u=u||[]).slice(0);if(null!=l){if(n){if("function"==typeof n&&n(y,l))return;if("object"==typeof n){if(n.prefilter&&n.prefilter(y,l))return;if(n.normalize){var v=n.normalize(y,l,e,t);v&&(e=v[0],t=v[1])}}}y.push(l)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var m,b,g,_,w=typeof e,O=typeof t,S="undefined"!==w||d&&d.length>0&&d[d.length-1].lhs&&Object.getOwnPropertyDescriptor(d[d.length-1].lhs,l),E="undefined"!==O||d&&d.length>0&&d[d.length-1].rhs&&Object.getOwnPropertyDescriptor(d[d.length-1].rhs,l);if(!S&&E)r.push(new o(y,t));else if(!E&&S)r.push(new s(y,e));else if(c(e)!==c(t))r.push(new i(y,e,t));else if("date"===c(e)&&e-t!=0)r.push(new i(y,e,t));else if("object"===w&&null!==e&&null!==t){for(m=d.length-1;m>-1;--m)if(d[m].lhs===e){_=!0;break}if(_)e!==t&&r.push(new i(y,e,t));else{if(d.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return f(e)-f(t)})),t.sort((function(e,t){return f(e)-f(t)}))),m=t.length-1,b=e.length-1;m>b;)r.push(new a(y,m,new o(void 0,t[m--])));for(;b>m;)r.push(new a(y,b,new s(void 0,e[b--])));for(;m>=0;--m)p(e[m],t[m],r,n,y,m,d,h)}else{var I=Object.keys(e),T=Object.keys(t);for(m=0;m<I.length;++m)g=I[m],(_=T.indexOf(g))>=0?(p(e[g],t[g],r,n,y,g,d,h),T[_]=null):p(e[g],void 0,r,n,y,g,d,h);for(m=0;m<T.length;++m)(g=T[m])&&p(void 0,t[g],r,n,y,g,d,h)}d.length=d.length-1}}else e!==t&&("number"===w&&isNaN(e)&&isNaN(t)||r.push(new i(y,e,t)))}function d(e,t,r,n,i){var o=[];if(p(e,t,o,n,null,null,null,i),r)for(var s=0;s<o.length;++s)r(o[s]);return o}function h(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r);return n||(i.length?i:void 0)}function y(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":y(i[r.path[n]],r.index,r.item);break;case"D":delete i[r.path[n]];break;case"E":case"N":i[r.path[n]]=r.rhs}}else switch(r.kind){case"A":y(e[t],r.index,r.item);break;case"D":e=u(e,t);break;case"E":case"N":e[t]=r.rhs}return e}function v(e,r,n){if(void 0===n&&r&&~t.indexOf(r.kind)&&(n=r),e&&n&&n.kind){for(var i=e,o=-1,s=n.path?n.path.length-1:0;++o<s;)void 0===i[n.path[o]]&&(i[n.path[o]]=void 0!==n.path[o+1]&&"number"==typeof n.path[o+1]?[]:{}),i=i[n.path[o]];switch(n.kind){case"A":n.path&&void 0===i[n.path[o]]&&(i[n.path[o]]=[]),y(n.path?i[n.path[o]]:i,n.index,n.item);break;case"D":delete i[n.path[o]];break;case"E":case"N":i[n.path[o]]=n.rhs}}}function m(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":m(i[r.path[n]],r.index,r.item);break;case"D":case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}else switch(r.kind){case"A":m(e[t],r.index,r.item);break;case"D":case"E":e[t]=r.lhs;break;case"N":e=u(e,t)}return e}return r(i,n),r(o,n),r(s,n),r(a,n),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r,!0);return n||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:d,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,r,n,i,o,s){return p(e,t,r,n,i,o,s,!0)},enumerable:!0},orderIndepHash:{value:f,enumerable:!0},applyDiff:{value:function(e,t,r){e&&t&&d(e,t,(function(n){r&&!r(e,t,n)||v(e,t,n)}))},enumerable:!0},applyChange:{value:v,enumerable:!0},revertChange:{value:function(e,t,r){if(e&&t&&r&&r.kind){var n,i,o=e;for(i=r.path.length-1,n=0;n<i;n++)void 0===o[r.path[n]]&&(o[r.path[n]]={}),o=o[r.path[n]];switch(r.kind){case"A":m(o[r.path[n]],r.index,r.item);break;case"D":case"E":o[r.path[n]]=r.lhs;break;case"N":delete o[r.path[n]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e&&(e.DeepDiff=h),h}(this),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},6471:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},8784:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",v="[object Array]",m="[object Boolean]",b="[object Date]",g="[object Error]",_="[object Function]",w="[object GeneratorFunction]",O="[object Map]",S="[object Number]",E="[object Object]",I="[object Promise]",T="[object RegExp]",j="[object Set]",P="[object String]",x="[object Symbol]",A="[object WeakMap]",N="[object ArrayBuffer]",M="[object DataView]",k="[object Float32Array]",D="[object Float64Array]",R="[object Int8Array]",C="[object Int16Array]",$="[object Int32Array]",F="[object Uint8Array]",q="[object Uint8ClampedArray]",L="[object Uint16Array]",B="[object Uint32Array]",U=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,W=RegExp(Q.source),K=RegExp(Y.source),H=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ge=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Oe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\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",Pe="["+we+"]",xe="["+je+"]",Ae="["+Oe+"]",Ne="\\d+",Me="["+Se+"]",ke="["+Ee+"]",De="[^"+we+je+Ne+Se+Ee+Ie+"]",Re="\\ud83c[\\udffb-\\udfff]",Ce="[^"+we+"]",$e="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Ie+"]",Le="\\u200d",Be="(?:"+ke+"|"+De+")",Ue="(?:"+qe+"|"+De+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Ae+"|"+Re+")?",Ye="["+Te+"]?",We=Ye+Qe+"(?:"+Le+"(?:"+[Ce,$e,Fe].join("|")+")"+Ye+Qe+")*",Ke="(?:"+[Me,$e,Fe].join("|")+")"+We,He="(?:"+[Ce+Ae+"?",Ae,$e,Fe,Pe].join("|")+")",Ge=RegExp("['’]","g"),Je=RegExp(Ae,"g"),Ze=RegExp(Re+"(?="+Re+")|"+He+We,"g"),Xe=RegExp([qe+"?"+ke+"+"+Ve+"(?="+[xe,qe,"$"].join("|")+")",Ue+"+"+ze+"(?="+[xe,qe+Be,"$"].join("|")+")",qe+"?"+Be+"+"+Ve,qe+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Ke].join("|"),"g"),et=RegExp("["+Le+we+Oe+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["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"],nt=-1,it={};it[k]=it[D]=it[R]=it[C]=it[$]=it[F]=it[q]=it[L]=it[B]=!0,it[y]=it[v]=it[N]=it[m]=it[M]=it[b]=it[g]=it[_]=it[O]=it[S]=it[E]=it[T]=it[j]=it[P]=it[A]=!1;var ot={};ot[y]=ot[v]=ot[N]=ot[M]=ot[m]=ot[b]=ot[k]=ot[D]=ot[R]=ot[C]=ot[$]=ot[O]=ot[S]=ot[E]=ot[T]=ot[j]=ot[P]=ot[x]=ot[F]=ot[q]=ot[L]=ot[B]=!0,ot[g]=ot[_]=ot[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),pt=t&&!t.nodeType&&t,dt=pt&&e&&!e.nodeType&&e,ht=dt&&dt.exports===pt,yt=ht&&ct.process,vt=function(){try{return dt&&dt.require&&dt.require("util").types||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),mt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,gt=vt&&vt.isMap,_t=vt&&vt.isRegExp,wt=vt&&vt.isSet,Ot=vt&&vt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Et(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function It(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Tt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function jt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Pt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function xt(e,t){return!(null==e||!e.length)&&qt(e,t,0)>-1}function At(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Nt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Mt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function kt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Dt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Rt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ct=Vt("length");function $t(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Ft(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function qt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Ft(e,Bt,r)}function Lt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Bt(e){return e!=e}function Ut(e,t){var r=null==e?0:e.length;return r?Yt(e,t)/r:p}function Vt(e){return function(t){return null==t?i:t[e]}}function zt(e){return function(t){return null==e?i:e[t]}}function Qt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Yt(e,t){for(var r,n=-1,o=e.length;++n<o;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Wt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Kt(e){return e?e.slice(0,fr(e)+1).replace(ne,""):e}function Ht(e){return function(t){return e(t)}}function Gt(e,t){return Nt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Zt(e,t){for(var r=-1,n=e.length;++r<n&&qt(t,e[r],0)>-1;);return r}function Xt(e,t){for(var r=e.length;r--&&qt(t,e[r],0)>-1;);return r}var er=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"}),tr=zt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rr(e){return"\\"+st[e]}function nr(e){return et.test(e)}function ir(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function or(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function cr(e){return nr(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Ct(e)}function lr(e){return nr(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function fr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var pr=zt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),dr=function e(t){var r,n=(t=null==t?ft:dr.defaults(ft.Object(),t,dr.pick(ft,rt))).Array,ie=t.Date,we=t.Error,Oe=t.Function,Se=t.Math,Ee=t.Object,Ie=t.RegExp,Te=t.String,je=t.TypeError,Pe=n.prototype,xe=Oe.prototype,Ae=Ee.prototype,Ne=t["__core-js_shared__"],Me=xe.toString,ke=Ae.hasOwnProperty,De=0,Re=(r=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ce=Ae.toString,$e=Me.call(Ee),Fe=ft._,qe=Ie("^"+Me.call(ke).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=ht?t.Buffer:i,Be=t.Symbol,Ue=t.Uint8Array,Ve=Le?Le.allocUnsafe:i,ze=or(Ee.getPrototypeOf,Ee),Qe=Ee.create,Ye=Ae.propertyIsEnumerable,We=Pe.splice,Ke=Be?Be.isConcatSpreadable:i,He=Be?Be.iterator:i,Ze=Be?Be.toStringTag:i,et=function(){try{var e=uo(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==ft.Date.now&&ie.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=Se.ceil,dt=Se.floor,yt=Ee.getOwnPropertySymbols,vt=Le?Le.isBuffer:i,Ct=t.isFinite,zt=Pe.join,hr=or(Ee.keys,Ee),yr=Se.max,vr=Se.min,mr=ie.now,br=t.parseInt,gr=Se.random,_r=Pe.reverse,wr=uo(t,"DataView"),Or=uo(t,"Map"),Sr=uo(t,"Promise"),Er=uo(t,"Set"),Ir=uo(t,"WeakMap"),Tr=uo(Ee,"create"),jr=Ir&&new Ir,Pr={},xr=$o(wr),Ar=$o(Or),Nr=$o(Sr),Mr=$o(Er),kr=$o(Ir),Dr=Be?Be.prototype:i,Rr=Dr?Dr.valueOf:i,Cr=Dr?Dr.toString:i;function $r(e){if(ea(e)&&!Vs(e)&&!(e instanceof Br)){if(e instanceof Lr)return e;if(ke.call(e,"__wrapped__"))return Fo(e)}return new Lr(e)}var Fr=function(){function e(){}return function(t){if(!Xs(t))return{};if(Qe)return Qe(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function qr(){}function Lr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Br(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Ur(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new zr;++t<r;)this.add(e[t])}function Yr(e){var t=this.__data__=new Vr(e);this.size=t.size}function Wr(e,t){var r=Vs(e),n=!r&&Us(e),i=!r&&!n&&Ws(e),o=!r&&!n&&!i&&ua(e),s=r||n||i||o,a=s?Wt(e.length,Te):[],u=a.length;for(var c in e)!t&&!ke.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,u))||a.push(c);return a}function Kr(e){var t=e.length;return t?e[Qn(0,t-1)]:i}function Hr(e,t){return Mo(Ti(e),on(t,0,e.length))}function Gr(e){return Mo(Ti(e))}function Jr(e,t,r){(r!==i&&!qs(e[t],r)||r===i&&!(t in e))&&rn(e,t,r)}function Zr(e,t,r){var n=e[t];ke.call(e,t)&&qs(n,r)&&(r!==i||t in e)||rn(e,t,r)}function Xr(e,t){for(var r=e.length;r--;)if(qs(e[r][0],t))return r;return-1}function en(e,t,r,n){return ln(e,(function(e,i,o){t(n,e,r(e),o)})),n}function tn(e,t){return e&&ji(t,Aa(t),e)}function rn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nn(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Ia(e,t[r]);return s}function on(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function sn(e,t,r,n,o,s){var a,u=1&t,c=2&t,l=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!Xs(e))return e;var f=Vs(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&ke.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Ti(e,a)}else{var p=fo(e),d=p==_||p==w;if(Ws(e))return _i(e,u);if(p==E||p==y||d&&!o){if(a=c||d?{}:ho(e),!u)return c?function(e,t){return ji(e,lo(e),t)}(e,function(e,t){return e&&ji(t,Na(t),e)}(a,e)):function(e,t){return ji(e,co(e),t)}(e,tn(a,e))}else{if(!ot[p])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case N:return wi(e);case m:case b:return new i(+e);case M:return function(e,t){var r=t?wi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case k:case D:case R:case C:case $:case F:case q:case L:case B:return Oi(e,r);case O:return new i;case S:case P:return new i(e);case T:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new i;case x:return n=e,Rr?Ee(Rr.call(n)):{}}}(e,p,u)}}s||(s=new Yr);var h=s.get(e);if(h)return h;s.set(e,a),oa(e)?e.forEach((function(n){a.add(sn(n,t,r,n,e,s))})):ta(e)&&e.forEach((function(n,i){a.set(i,sn(n,t,r,i,e,s))}));var v=f?i:(l?c?to:eo:c?Na:Aa)(e);return It(v||e,(function(n,i){v&&(n=e[i=n]),Zr(a,i,sn(n,t,r,i,e,s))})),a}function an(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ee(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new je(o);return Po((function(){e.apply(i,r)}),t)}function cn(e,t,r,n){var i=-1,o=xt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Nt(t,Ht(r))),n?(o=At,s=!1):t.length>=200&&(o=Jt,s=!1,t=new Qr(t));e:for(;++i<a;){var l=e[i],f=null==r?l:r(l);if(l=n||0!==l?l:0,s&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else o(t,f,n)||u.push(l)}return u}$r.templateSettings={escape:H,evaluate:G,interpolate:J,variable:"",imports:{_:$r}},$r.prototype=qr.prototype,$r.prototype.constructor=$r,Lr.prototype=Fr(qr.prototype),Lr.prototype.constructor=Lr,Br.prototype=Fr(qr.prototype),Br.prototype.constructor=Br,Ur.prototype.clear=function(){this.__data__=Tr?Tr(null):{},this.size=0},Ur.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ur.prototype.get=function(e){var t=this.__data__;if(Tr){var r=t[e];return r===s?i:r}return ke.call(t,e)?t[e]:i},Ur.prototype.has=function(e){var t=this.__data__;return Tr?t[e]!==i:ke.call(t,e)},Ur.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tr&&t===i?s:t,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(e){var t=this.__data__,r=Xr(t,e);return!(r<0||(r==t.length-1?t.pop():We.call(t,r,1),--this.size,0))},Vr.prototype.get=function(e){var t=this.__data__,r=Xr(t,e);return r<0?i:t[r][1]},Vr.prototype.has=function(e){return Xr(this.__data__,e)>-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=Xr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},zr.prototype.clear=function(){this.size=0,this.__data__={hash:new Ur,map:new(Or||Vr),string:new Ur}},zr.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},zr.prototype.get=function(e){return so(this,e).get(e)},zr.prototype.has=function(e){return so(this,e).has(e)},zr.prototype.set=function(e,t){var r=so(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Qr.prototype.add=Qr.prototype.push=function(e){return this.__data__.set(e,s),this},Qr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Yr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Yr.prototype.get=function(e){return this.__data__.get(e)},Yr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!Or||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zr(n)}return r.set(e,t),this.size=r.size,this};var ln=Ai(bn),fn=Ai(gn,!0);function pn(e,t){var r=!0;return ln(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function dn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(u===i?a==a&&!aa(a):r(a,u)))var u=a,c=s}return c}function hn(e,t){var r=[];return ln(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function yn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=yo),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?yn(a,t-1,r,n,i):Mt(i,a):n||(i[i.length]=a)}return i}var vn=Ni(),mn=Ni(!0);function bn(e,t){return e&&vn(e,t,Aa)}function gn(e,t){return e&&mn(e,t,Aa)}function _n(e,t){return Pt(t,(function(t){return Gs(e[t])}))}function wn(e,t){for(var r=0,n=(t=vi(t,e)).length;null!=e&&r<n;)e=e[Co(t[r++])];return r&&r==n?e:i}function On(e,t,r){var n=t(e);return Vs(e)?n:Mt(n,r(e))}function Sn(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Ee(e)?function(e){var t=ke.call(e,Ze),r=e[Ze];try{e[Ze]=i;var n=!0}catch(e){}var o=Ce.call(e);return n&&(t?e[Ze]=r:delete e[Ze]),o}(e):function(e){return Ce.call(e)}(e)}function En(e,t){return e>t}function In(e,t){return null!=e&&ke.call(e,t)}function Tn(e,t){return null!=e&&t in Ee(e)}function jn(e,t,r){for(var o=r?At:xt,s=e[0].length,a=e.length,u=a,c=n(a),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=Nt(p,Ht(t))),l=vr(p.length,l),c[u]=!r&&(t||s>=120&&p.length>=120)?new Qr(u&&p):i}p=e[0];var d=-1,h=c[0];e:for(;++d<s&&f.length<l;){var y=p[d],v=t?t(y):y;if(y=r||0!==y?y:0,!(h?Jt(h,v):o(f,v,r))){for(u=a;--u;){var m=c[u];if(!(m?Jt(m,v):o(e[u],v,r)))continue e}h&&h.push(v),f.push(y)}}return f}function Pn(e,t,r){var n=null==(e=Io(e,t=vi(t,e)))?e:e[Co(Ho(t))];return null==n?i:St(n,e,r)}function xn(e){return ea(e)&&Sn(e)==y}function An(e,t,r,n,o){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=Vs(e),u=Vs(t),c=a?v:fo(e),l=u?v:fo(t),f=(c=c==y?E:c)==E,p=(l=l==y?E:l)==E,d=c==l;if(d&&Ws(e)){if(!Ws(t))return!1;a=!0,f=!1}if(d&&!f)return s||(s=new Yr),a||ua(e)?Zi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case M:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case m:case b:case S:return qs(+e,+t);case g:return e.name==t.name&&e.message==t.message;case T:case P:return e==t+"";case O:var a=ir;case j:var u=1&n;if(a||(a=ar),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var l=Zi(a(e),a(t),n,i,o,s);return s.delete(e),l;case x:if(Rr)return Rr.call(e)==Rr.call(t)}return!1}(e,t,c,r,n,o,s);if(!(1&r)){var h=f&&ke.call(e,"__wrapped__"),_=p&&ke.call(t,"__wrapped__");if(h||_){var w=h?e.value():e,I=_?t.value():t;return s||(s=new Yr),o(w,I,r,n,s)}}return!!d&&(s||(s=new Yr),function(e,t,r,n,o,s){var a=1&r,u=eo(e),c=u.length;if(c!=eo(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:ke.call(t,f)))return!1}var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var h=!0;s.set(e,t),s.set(t,e);for(var y=a;++l<c;){var v=e[f=u[l]],m=t[f];if(n)var b=a?n(m,v,f,t,e,s):n(v,m,f,e,t,s);if(!(b===i?v===m||o(v,m,r,n,s):b)){h=!1;break}y||(y="constructor"==f)}if(h&&!y){var g=e.constructor,_=t.constructor;g==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,r,n,o,s))}(e,t,r,n,An,o))}function Nn(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Ee(e);o--;){var u=r[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=r[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var p=new Yr;if(n)var d=n(l,f,c,e,t,p);if(!(d===i?An(f,l,3,n,p):d))return!1}}return!0}function Mn(e){return!(!Xs(e)||(t=e,Re&&Re in t))&&(Gs(e)?qe:ye).test($o(e));var t}function kn(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Vs(e)?Fn(e[0],e[1]):$n(e):fu(e)}function Dn(e){if(!wo(e))return hr(e);var t=[];for(var r in Ee(e))ke.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Rn(e,t){return e<t}function Cn(e,t){var r=-1,i=Qs(e)?n(e.length):[];return ln(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function $n(e){var t=ao(e);return 1==t.length&&t[0][2]?So(t[0][0],t[0][1]):function(r){return r===e||Nn(r,e,t)}}function Fn(e,t){return bo(e)&&Oo(t)?So(Co(e),t):function(r){var n=Ia(r,e);return n===i&&n===t?Ta(r,e):An(t,n,3)}}function qn(e,t,r,n,o){e!==t&&vn(t,(function(s,a){if(o||(o=new Yr),Xs(s))!function(e,t,r,n,o,s,a){var u=To(e,r),c=To(t,r),l=a.get(c);if(l)Jr(e,r,l);else{var f=s?s(u,c,r+"",e,t,a):i,p=f===i;if(p){var d=Vs(c),h=!d&&Ws(c),y=!d&&!h&&ua(c);f=c,d||h||y?Vs(u)?f=u:Ys(u)?f=Ti(u):h?(p=!1,f=_i(c,!0)):y?(p=!1,f=Oi(c,!0)):f=[]:na(c)||Us(c)?(f=u,Us(u)?f=va(u):Xs(u)&&!Gs(u)||(f=ho(c))):p=!1}p&&(a.set(c,f),o(f,c,n,s,a),a.delete(c)),Jr(e,r,f)}}(e,t,a,r,qn,n,o);else{var u=n?n(To(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Jr(e,a,u)}}),Na)}function Ln(e,t){var r=e.length;if(r)return vo(t+=t<0?r:0,r)?e[t]:i}function Bn(e,t,r){t=t.length?Nt(t,(function(e){return Vs(e)?function(t){return wn(t,1===e.length?e[0]:e)}:e})):[ru];var n=-1;t=Nt(t,Ht(oo()));var i=Cn(e,(function(e,r,i){var o=Nt(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=Si(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Un(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=wn(e,s);r(a,s)&&Gn(o,vi(s,e),a)}return o}function Vn(e,t,r,n){var i=n?Lt:qt,o=-1,s=t.length,a=e;for(e===t&&(t=Ti(t)),r&&(a=Nt(e,Ht(r)));++o<s;)for(var u=0,c=t[o],l=r?r(c):c;(u=i(a,l,u,n))>-1;)a!==e&&We.call(a,u,1),We.call(e,u,1);return e}function zn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;vo(i)?We.call(e,i,1):ui(e,i)}}return e}function Qn(e,t){return e+dt(gr()*(t-e+1))}function Yn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=dt(t/2))&&(e+=e)}while(t);return r}function Wn(e,t){return xo(Eo(e,t,ru),e+"")}function Kn(e){return Kr(qa(e))}function Hn(e,t){var r=qa(e);return Mo(r,on(t,0,r.length))}function Gn(e,t,r,n){if(!Xs(e))return e;for(var o=-1,s=(t=vi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=Co(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=n?n(f,c,u):i)===i&&(l=Xs(f)?f:vo(t[o+1])?[]:{})}Zr(u,c,l),u=u[c]}return e}var Jn=jr?function(e,t){return jr.set(e,t),e}:ru,Zn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Xa(t),writable:!0})}:ru;function Xn(e){return Mo(qa(e))}function ei(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ti(e,t){var r;return ln(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ri(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!aa(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ni(e,t,ru,r)}function ni(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,c=aa(t),l=t===i;o<s;){var f=dt((o+s)/2),p=r(e[f]),d=p!==i,h=null===p,y=p==p,v=aa(p);if(a)var m=n||y;else m=l?y&&(n||d):u?y&&d&&(n||!h):c?y&&d&&!h&&(n||!v):!h&&!v&&(n?p<=t:p<t);m?o=f+1:s=f}return vr(s,4294967294)}function ii(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!qs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function oi(e){return"number"==typeof e?e:aa(e)?p:+e}function si(e){if("string"==typeof e)return e;if(Vs(e))return Nt(e,si)+"";if(aa(e))return Cr?Cr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ai(e,t,r){var n=-1,i=xt,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=At;else if(o>=200){var c=t?null:Yi(e);if(c)return ar(c);s=!1,i=Jt,u=new Qr}else u=t?[]:a;e:for(;++n<o;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,s&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,r)||(u!==a&&u.push(f),a.push(l))}return a}function ui(e,t){return null==(e=Io(e,t=vi(t,e)))||delete e[Co(Ho(t))]}function ci(e,t,r,n){return Gn(e,t,r(wn(e,t)),n)}function li(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ei(e,n?0:o,n?o+1:i):ei(e,n?o+1:0,n?i:o)}function fi(e,t){var r=e;return r instanceof Br&&(r=r.value()),kt(t,(function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))}),r)}function pi(e,t,r){var i=e.length;if(i<2)return i?ai(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=cn(s[o]||a,e[u],t,r));return ai(yn(s,1),t,r)}function di(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var u=n<s?t[n]:i;r(a,e[n],u)}return a}function hi(e){return Ys(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function vi(e,t){return Vs(e)?e:bo(e,t)?[e]:Ro(ma(e))}var mi=Wn;function bi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ei(e,t,r)}var gi=st||function(e){return ft.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function wi(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Oi(e,t){var r=t?wi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Si(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=aa(e),a=t!==i,u=null===t,c=t==t,l=aa(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||n&&a&&c||!r&&c||!o)return 1;if(!n&&!s&&!l&&e<t||l&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function Ei(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,c=t.length,l=yr(s-a,0),f=n(c+l),p=!i;++u<c;)f[u]=t[u];for(;++o<a;)(p||o<s)&&(f[r[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Ii(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,c=-1,l=t.length,f=yr(s-u,0),p=n(f+l),d=!i;++o<f;)p[o]=e[o];for(var h=o;++c<l;)p[h+c]=t[c];for(;++a<u;)(d||o<s)&&(p[h+r[a]]=e[o++]);return p}function Ti(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function ji(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=n?n(r[u],e[u],u,r,e):i;c===i&&(c=e[u]),o?rn(r,u,c):Zr(r,u,c)}return r}function Pi(e,t){return function(r,n){var i=Vs(r)?Et:en,o=t?t():{};return i(r,e,oo(n,2),o)}}function xi(e){return Wn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&mo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t}))}function Ai(e,t){return function(r,n){if(null==r)return r;if(!Qs(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Ee(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Ni(e){return function(t,r,n){for(var i=-1,o=Ee(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Mi(e){return function(t){var r=nr(t=ma(t))?lr(t):i,n=r?r[0]:t.charAt(0),o=r?bi(r,1).join(""):t.slice(1);return n[e]()+o}}function ki(e){return function(t){return kt(Ga(Ua(t).replace(Ge,"")),e,"")}}function Di(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 r=Fr(e.prototype),n=e.apply(r,t);return Xs(n)?n:r}}function Ri(e){return function(t,r,n){var o=Ee(t);if(!Qs(t)){var s=oo(r,3);t=Aa(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function Ci(e){return Xi((function(t){var r=t.length,n=r,s=Lr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new je(o);if(s&&!u&&"wrapper"==no(a))var u=new Lr([],!0)}for(n=u?n:r;++n<r;){var c=no(a=t[n]),l="wrapper"==c?ro(a):i;u=l&&go(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[no(l[0])].apply(u,l[3]):1==a.length&&go(a)?u[c]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Vs(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function $i(e,t,r,o,s,a,u,l,f,p){var d=t&c,h=1&t,y=2&t,v=24&t,m=512&t,b=y?i:Di(e);return function c(){for(var g=arguments.length,_=n(g),w=g;w--;)_[w]=arguments[w];if(v)var O=io(c),S=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(_,O);if(o&&(_=Ei(_,o,s,v)),a&&(_=Ii(_,a,u,v)),g-=S,v&&g<p){var E=sr(_,O);return zi(e,t,$i,c.placeholder,r,_,E,l,f,p-g)}var I=h?r:this,T=y?I[e]:e;return g=_.length,l?_=function(e,t){for(var r=e.length,n=vr(t.length,r),o=Ti(e);n--;){var s=t[n];e[n]=vo(s,r)?o[s]:i}return e}(_,l):m&&g>1&&_.reverse(),d&&f<g&&(_.length=f),this&&this!==ft&&this instanceof c&&(T=b||Di(T)),T.apply(I,_)}}function Fi(e,t){return function(r,n){return function(e,t,r,n){return bn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function qi(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=si(r),n=si(n)):(r=oi(r),n=oi(n)),o=e(r,n)}return o}}function Li(e){return Xi((function(t){return t=Nt(t,Ht(oo())),Wn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Bi(e,t){var r=(t=t===i?" ":si(t)).length;if(r<2)return r?Yn(t,e):t;var n=Yn(t,pt(e/cr(t)));return nr(t)?bi(lr(n),0,e).join(""):n.slice(0,e)}function Ui(e){return function(t,r,o){return o&&"number"!=typeof o&&mo(t,r,o)&&(r=o=i),t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r,i){for(var o=-1,s=yr(pt((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:pa(o),e)}}function Vi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function zi(e,t,r,n,o,s,a,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var d=[e,t,o,p?s:i,p?a:i,p?i:s,p?i:a,c,l,f],h=r.apply(i,d);return go(e)&&jo(h,d),h.placeholder=n,Ao(h,e,t)}function Qi(e){var t=Se[e];return function(e,r){if(e=ya(e),(r=null==r?0:vr(da(r),292))&&Ct(e)){var n=(ma(e)+"e").split("e");return+((n=(ma(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Yi=Er&&1/ar(new Er([,-0]))[1]==l?function(e){return new Er(e)}:au;function Wi(e){return function(t){var r=fo(t);return r==O?ir(t):r==j?ur(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ki(e,t,r,s,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new je(o);var y=s?s.length:0;if(y||(t&=-97,s=l=i),p=p===i?p:yr(da(p),0),d=d===i?d:da(d),y-=l?l.length:0,64&t){var v=s,m=l;s=l=i}var b=h?i:ro(e),g=[e,t,r,s,l,v,m,f,p,d];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ei(l,u,t[4]):u,e[4]=l?sr(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ii(l,u,t[6]):u,e[6]=l?sr(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&c&&(e[8]=null==e[8]?t[8]:vr(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],r=g[2],s=g[3],l=g[4],!(d=g[9]=g[9]===i?h?0:e.length:yr(g[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,r){var o=Di(e);return function s(){for(var a=arguments.length,u=n(a),c=a,l=io(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:sr(u,l);return(a-=f.length)<r?zi(e,t,$i,s.placeholder,i,u,f,i,i,r-a):St(this&&this!==ft&&this instanceof s?o:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?$i.apply(i,g):function(e,t,r,i){var o=1&t,s=Di(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),p=this&&this!==ft&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return St(p,o?r:this,f)}}(e,t,r,s);else var _=function(e,t,r){var n=1&t,i=Di(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return Ao((b?Jn:jo)(_,g),e,t)}function Hi(e,t,r,n){return e===i||qs(e,Ae[r])&&!ke.call(n,r)?t:e}function Gi(e,t,r,n,o,s){return Xs(e)&&Xs(t)&&(s.set(t,e),qn(e,t,i,Gi,s),s.delete(t)),e}function Ji(e){return na(e)?i:e}function Zi(e,t,r,n,o,s){var a=1&r,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&r?new Qr:i;for(s.set(e,t),s.set(t,e);++p<u;){var y=e[p],v=t[p];if(n)var m=a?n(v,y,p,t,e,s):n(y,v,p,e,t,s);if(m!==i){if(m)continue;d=!1;break}if(h){if(!Rt(t,(function(e,t){if(!Jt(h,t)&&(y===e||o(y,e,r,n,s)))return h.push(t)}))){d=!1;break}}else if(y!==v&&!o(y,v,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Xi(e){return xo(Eo(e,i,zo),e+"")}function eo(e){return On(e,Aa,co)}function to(e){return On(e,Na,lo)}var ro=jr?function(e){return jr.get(e)}:au;function no(e){for(var t=e.name+"",r=Pr[t],n=ke.call(Pr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function io(e){return(ke.call($r,"placeholder")?$r:e).placeholder}function oo(){var e=$r.iteratee||nu;return e=e===nu?kn:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function ao(e){for(var t=Aa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Oo(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Mn(r)?r:i}var co=yt?function(e){return null==e?[]:(e=Ee(e),Pt(yt(e),(function(t){return Ye.call(e,t)})))}:hu,lo=yt?function(e){for(var t=[];e;)Mt(t,co(e)),e=ze(e);return t}:hu,fo=Sn;function po(e,t,r){for(var n=-1,i=(t=vi(t,e)).length,o=!1;++n<i;){var s=Co(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Zs(i)&&vo(s,i)&&(Vs(e)||Us(e))}function ho(e){return"function"!=typeof e.constructor||wo(e)?{}:Fr(ze(e))}function yo(e){return Vs(e)||Us(e)||!!(Ke&&e&&e[Ke])}function vo(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&me.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,r){if(!Xs(r))return!1;var n=typeof t;return!!("number"==n?Qs(r)&&vo(t,r.length):"string"==n&&t in r)&&qs(r[t],e)}function bo(e,t){if(Vs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!aa(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function go(e){var t=no(e),r=$r[t];if("function"!=typeof r||!(t in Br.prototype))return!1;if(e===r)return!0;var n=ro(r);return!!n&&e===n[0]}(wr&&fo(new wr(new ArrayBuffer(1)))!=M||Or&&fo(new Or)!=O||Sr&&fo(Sr.resolve())!=I||Er&&fo(new Er)!=j||Ir&&fo(new Ir)!=A)&&(fo=function(e){var t=Sn(e),r=t==E?e.constructor:i,n=r?$o(r):"";if(n)switch(n){case xr:return M;case Ar:return O;case Nr:return I;case Mr:return j;case kr:return A}return t});var _o=Ne?Gs:yu;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function Oo(e){return e==e&&!Xs(e)}function So(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ee(r))}}function Eo(e,t,r){return t=yr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=yr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),St(e,this,u)}}function Io(e,t){return t.length<2?e:wn(e,ei(t,0,-1))}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var jo=No(Jn),Po=lt||function(e,t){return ft.setTimeout(e,t)},xo=No(Zn);function Ao(e,t,r){var n=t+"";return xo(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return It(h,(function(r){var n="_."+r[0];t&r[1]&&!xt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function No(e){var t=0,r=0;return function(){var n=mr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Mo(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Qn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var ko,Do,Ro=(ko=ks((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(le,"$1"):r||e)})),t}),(function(e){return 500===Do.size&&Do.clear(),e})),Do=ko.cache,ko);function Co(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function $o(e){if(null!=e){try{return Me.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fo(e){if(e instanceof Br)return e.clone();var t=new Lr(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var qo=Wn((function(e,t){return Ys(e)?cn(e,yn(t,1,Ys,!0)):[]})),Lo=Wn((function(e,t){var r=Ho(t);return Ys(r)&&(r=i),Ys(e)?cn(e,yn(t,1,Ys,!0),oo(r,2)):[]})),Bo=Wn((function(e,t){var r=Ho(t);return Ys(r)&&(r=i),Ys(e)?cn(e,yn(t,1,Ys,!0),i,r):[]}));function Uo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),Ft(e,oo(t,3),i)}function Vo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=da(r),o=r<0?yr(n+o,0):vr(o,n-1)),Ft(e,oo(t,3),o,!0)}function zo(e){return null!=e&&e.length?yn(e,1):[]}function Qo(e){return e&&e.length?e[0]:i}var Yo=Wn((function(e){var t=Nt(e,hi);return t.length&&t[0]===e[0]?jn(t):[]})),Wo=Wn((function(e){var t=Ho(e),r=Nt(e,hi);return t===Ho(r)?t=i:r.pop(),r.length&&r[0]===e[0]?jn(r,oo(t,2)):[]})),Ko=Wn((function(e){var t=Ho(e),r=Nt(e,hi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?jn(r,i,t):[]}));function Ho(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Go=Wn(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?Vn(e,t):e}var Zo=Xi((function(e,t){var r=null==e?0:e.length,n=nn(e,t);return zn(e,Nt(t,(function(e){return vo(e,r)?+e:e})).sort(Si)),n}));function Xo(e){return null==e?e:_r.call(e)}var es=Wn((function(e){return ai(yn(e,1,Ys,!0))})),ts=Wn((function(e){var t=Ho(e);return Ys(t)&&(t=i),ai(yn(e,1,Ys,!0),oo(t,2))})),rs=Wn((function(e){var t=Ho(e);return t="function"==typeof t?t:i,ai(yn(e,1,Ys,!0),i,t)}));function ns(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,(function(e){if(Ys(e))return t=yr(e.length,t),!0})),Wt(t,(function(t){return Nt(e,Vt(t))}))}function is(e,t){if(!e||!e.length)return[];var r=ns(e);return null==t?r:Nt(r,(function(e){return St(t,i,e)}))}var os=Wn((function(e,t){return Ys(e)?cn(e,t):[]})),ss=Wn((function(e){return pi(Pt(e,Ys))})),as=Wn((function(e){var t=Ho(e);return Ys(t)&&(t=i),pi(Pt(e,Ys),oo(t,2))})),us=Wn((function(e){var t=Ho(e);return t="function"==typeof t?t:i,pi(Pt(e,Ys),i,t)})),cs=Wn(ns),ls=Wn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,is(e,r)}));function fs(e){var t=$r(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var ds=Xi((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Br&&vo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:i}),new Lr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),hs=Pi((function(e,t,r){ke.call(e,r)?++e[r]:rn(e,r,1)})),ys=Ri(Uo),vs=Ri(Vo);function ms(e,t){return(Vs(e)?It:ln)(e,oo(t,3))}function bs(e,t){return(Vs(e)?Tt:fn)(e,oo(t,3))}var gs=Pi((function(e,t,r){ke.call(e,r)?e[r].push(t):rn(e,r,[t])})),_s=Wn((function(e,t,r){var i=-1,o="function"==typeof t,s=Qs(e)?n(e.length):[];return ln(e,(function(e){s[++i]=o?St(t,e,r):Pn(e,t,r)})),s})),ws=Pi((function(e,t,r){rn(e,r,t)}));function Os(e,t){return(Vs(e)?Nt:Cn)(e,oo(t,3))}var Ss=Pi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Es=Wn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&mo(e,t[0],t[1])?t=[]:r>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Bn(e,yn(t,1),[])})),Is=ct||function(){return ft.Date.now()};function Ts(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ki(e,c,i,i,i,i,t)}function js(e,t){var r;if("function"!=typeof t)throw new je(o);return e=da(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Ps=Wn((function(e,t,r){var n=1;if(r.length){var i=sr(r,io(Ps));n|=u}return Ki(e,n,t,r,i)})),xs=Wn((function(e,t,r){var n=3;if(r.length){var i=sr(r,io(xs));n|=u}return Ki(t,n,e,r,i)}));function As(e,t,r){var n,s,a,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new je(o);function y(t){var r=n,o=s;return n=s=i,f=t,u=e.apply(o,r)}function v(e){var r=e-l;return l===i||r>=t||r<0||d&&e-f>=a}function m(){var e=Is();if(v(e))return b(e);c=Po(m,function(e){var r=t-(e-l);return d?vr(r,a-(e-f)):r}(e))}function b(e){return c=i,h&&n?y(e):(n=s=i,u)}function g(){var e=Is(),r=v(e);if(n=arguments,s=this,l=e,r){if(c===i)return function(e){return f=e,c=Po(m,t),p?y(e):u}(l);if(d)return gi(c),c=Po(m,t),y(l)}return c===i&&(c=Po(m,t)),u}return t=ya(t)||0,Xs(r)&&(p=!!r.leading,a=(d="maxWait"in r)?yr(ya(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),g.cancel=function(){c!==i&&gi(c),f=0,n=l=s=c=i},g.flush=function(){return c===i?u:b(Is())},g}var Ns=Wn((function(e,t){return un(e,1,t)})),Ms=Wn((function(e,t,r){return un(e,ya(t)||0,r)}));function ks(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new je(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(ks.Cache||zr),r}function Ds(e){if("function"!=typeof e)throw new je(o);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)}}ks.Cache=zr;var Rs=mi((function(e,t){var r=(t=1==t.length&&Vs(t[0])?Nt(t[0],Ht(oo())):Nt(yn(t,1),Ht(oo()))).length;return Wn((function(n){for(var i=-1,o=vr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return St(e,this,n)}))})),Cs=Wn((function(e,t){var r=sr(t,io(Cs));return Ki(e,u,i,t,r)})),$s=Wn((function(e,t){var r=sr(t,io($s));return Ki(e,64,i,t,r)})),Fs=Xi((function(e,t){return Ki(e,256,i,i,i,t)}));function qs(e,t){return e===t||e!=e&&t!=t}var Ls=Vi(En),Bs=Vi((function(e,t){return e>=t})),Us=xn(function(){return arguments}())?xn:function(e){return ea(e)&&ke.call(e,"callee")&&!Ye.call(e,"callee")},Vs=n.isArray,zs=mt?Ht(mt):function(e){return ea(e)&&Sn(e)==N};function Qs(e){return null!=e&&Zs(e.length)&&!Gs(e)}function Ys(e){return ea(e)&&Qs(e)}var Ws=vt||yu,Ks=bt?Ht(bt):function(e){return ea(e)&&Sn(e)==b};function Hs(e){if(!ea(e))return!1;var t=Sn(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!na(e)}function Gs(e){if(!Xs(e))return!1;var t=Sn(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Js(e){return"number"==typeof e&&e==da(e)}function Zs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Xs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=gt?Ht(gt):function(e){return ea(e)&&fo(e)==O};function ra(e){return"number"==typeof e||ea(e)&&Sn(e)==S}function na(e){if(!ea(e)||Sn(e)!=E)return!1;var t=ze(e);if(null===t)return!0;var r=ke.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Me.call(r)==$e}var ia=_t?Ht(_t):function(e){return ea(e)&&Sn(e)==T},oa=wt?Ht(wt):function(e){return ea(e)&&fo(e)==j};function sa(e){return"string"==typeof e||!Vs(e)&&ea(e)&&Sn(e)==P}function aa(e){return"symbol"==typeof e||ea(e)&&Sn(e)==x}var ua=Ot?Ht(Ot):function(e){return ea(e)&&Zs(e.length)&&!!it[Sn(e)]},ca=Vi(Rn),la=Vi((function(e,t){return e<=t}));function fa(e){if(!e)return[];if(Qs(e))return sa(e)?lr(e):Ti(e);if(He&&e[He])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[He]());var t=fo(e);return(t==O?ir:t==j?ar:qa)(e)}function pa(e){return e?(e=ya(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function da(e){var t=pa(e),r=t%1;return t==t?r?t-r:t:0}function ha(e){return e?on(da(e),0,d):0}function ya(e){if("number"==typeof e)return e;if(aa(e))return p;if(Xs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var r=he.test(e);return r||ve.test(e)?ut(e.slice(2),r?2:8):de.test(e)?p:+e}function va(e){return ji(e,Na(e))}function ma(e){return null==e?"":si(e)}var ba=xi((function(e,t){if(wo(t)||Qs(t))ji(t,Aa(t),e);else for(var r in t)ke.call(t,r)&&Zr(e,r,t[r])})),ga=xi((function(e,t){ji(t,Na(t),e)})),_a=xi((function(e,t,r,n){ji(t,Na(t),e,n)})),wa=xi((function(e,t,r,n){ji(t,Aa(t),e,n)})),Oa=Xi(nn),Sa=Wn((function(e,t){e=Ee(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&mo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=Na(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||qs(f,Ae[l])&&!ke.call(e,l))&&(e[l]=s[l])}return e})),Ea=Wn((function(e){return e.push(i,Gi),St(ka,i,e)}));function Ia(e,t,r){var n=null==e?i:wn(e,t);return n===i?r:n}function Ta(e,t){return null!=e&&po(e,t,Tn)}var ja=Fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=r}),Xa(ru)),Pa=Fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),ke.call(e,t)?e[t].push(r):e[t]=[r]}),oo),xa=Wn(Pn);function Aa(e){return Qs(e)?Wr(e):Dn(e)}function Na(e){return Qs(e)?Wr(e,!0):function(e){if(!Xs(e))return function(e){var t=[];if(null!=e)for(var r in Ee(e))t.push(r);return t}(e);var t=wo(e),r=[];for(var n in e)("constructor"!=n||!t&&ke.call(e,n))&&r.push(n);return r}(e)}var Ma=xi((function(e,t,r){qn(e,t,r)})),ka=xi((function(e,t,r,n){qn(e,t,r,n)})),Da=Xi((function(e,t){var r={};if(null==e)return r;var n=!1;t=Nt(t,(function(t){return t=vi(t,e),n||(n=t.length>1),t})),ji(e,to(e),r),n&&(r=sn(r,7,Ji));for(var i=t.length;i--;)ui(r,t[i]);return r})),Ra=Xi((function(e,t){return null==e?{}:function(e,t){return Un(e,t,(function(t,r){return Ta(e,r)}))}(e,t)}));function Ca(e,t){if(null==e)return{};var r=Nt(to(e),(function(e){return[e]}));return t=oo(t),Un(e,r,(function(e,r){return t(e,r[0])}))}var $a=Wi(Aa),Fa=Wi(Na);function qa(e){return null==e?[]:Gt(e,Aa(e))}var La=ki((function(e,t,r){return t=t.toLowerCase(),e+(r?Ba(t):t)}));function Ba(e){return Ha(ma(e).toLowerCase())}function Ua(e){return(e=ma(e))&&e.replace(be,er).replace(Je,"")}var Va=ki((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),za=ki((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Qa=Mi("toLowerCase"),Ya=ki((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Wa=ki((function(e,t,r){return e+(r?" ":"")+Ha(t)})),Ka=ki((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ha=Mi("toUpperCase");function Ga(e,t,r){return e=ma(e),(t=r?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ja=Wn((function(e,t){try{return St(e,i,t)}catch(e){return Hs(e)?e:new we(e)}})),Za=Xi((function(e,t){return It(t,(function(t){t=Co(t),rn(e,t,Ps(e[t],e))})),e}));function Xa(e){return function(){return e}}var eu=Ci(),tu=Ci(!0);function ru(e){return e}function nu(e){return kn("function"==typeof e?e:sn(e,1))}var iu=Wn((function(e,t){return function(r){return Pn(r,e,t)}})),ou=Wn((function(e,t){return function(r){return Pn(e,r,t)}}));function su(e,t,r){var n=Aa(t),i=_n(t,n);null!=r||Xs(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=_n(t,Aa(t)));var o=!(Xs(r)&&"chain"in r&&!r.chain),s=Gs(e);return It(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Ti(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Mt([this.value()],arguments))})})),e}function au(){}var uu=Li(Nt),cu=Li(jt),lu=Li(Rt);function fu(e){return bo(e)?Vt(Co(e)):function(e){return function(t){return wn(t,e)}}(e)}var pu=Ui(),du=Ui(!0);function hu(){return[]}function yu(){return!1}var vu,mu=qi((function(e,t){return e+t}),0),bu=Qi("ceil"),gu=qi((function(e,t){return e/t}),1),_u=Qi("floor"),wu=qi((function(e,t){return e*t}),1),Ou=Qi("round"),Su=qi((function(e,t){return e-t}),0);return $r.after=function(e,t){if("function"!=typeof t)throw new je(o);return e=da(e),function(){if(--e<1)return t.apply(this,arguments)}},$r.ary=Ts,$r.assign=ba,$r.assignIn=ga,$r.assignInWith=_a,$r.assignWith=wa,$r.at=Oa,$r.before=js,$r.bind=Ps,$r.bindAll=Za,$r.bindKey=xs,$r.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vs(e)?e:[e]},$r.chain=fs,$r.chunk=function(e,t,r){t=(r?mo(e,t,r):t===i)?1:yr(da(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=n(pt(o/t));s<o;)u[a++]=ei(e,s,s+=t);return u},$r.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},$r.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Mt(Vs(r)?Ti(r):[r],yn(t,1))},$r.cond=function(e){var t=null==e?0:e.length,r=oo();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new je(o);return[r(e[0]),e[1]]})):[],Wn((function(r){for(var n=-1;++n<t;){var i=e[n];if(St(i[0],this,r))return St(i[1],this,r)}}))},$r.conforms=function(e){return function(e){var t=Aa(e);return function(r){return an(r,e,t)}}(sn(e,1))},$r.constant=Xa,$r.countBy=hs,$r.create=function(e,t){var r=Fr(e);return null==t?r:tn(r,t)},$r.curry=function e(t,r,n){var o=Ki(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},$r.curryRight=function e(t,r,n){var o=Ki(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},$r.debounce=As,$r.defaults=Sa,$r.defaultsDeep=Ea,$r.defer=Ns,$r.delay=Ms,$r.difference=qo,$r.differenceBy=Lo,$r.differenceWith=Bo,$r.drop=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=r||t===i?1:da(t))<0?0:t,n):[]},$r.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,0,(t=n-(t=r||t===i?1:da(t)))<0?0:t):[]},$r.dropRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0,!0):[]},$r.dropWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0):[]},$r.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&mo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=da(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:da(n))<0&&(n+=o),n=r>n?0:ha(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},$r.filter=function(e,t){return(Vs(e)?Pt:hn)(e,oo(t,3))},$r.flatMap=function(e,t){return yn(Os(e,t),1)},$r.flatMapDeep=function(e,t){return yn(Os(e,t),l)},$r.flatMapDepth=function(e,t,r){return r=r===i?1:da(r),yn(Os(e,t),r)},$r.flatten=zo,$r.flattenDeep=function(e){return null!=e&&e.length?yn(e,l):[]},$r.flattenDepth=function(e,t){return null!=e&&e.length?yn(e,t=t===i?1:da(t)):[]},$r.flip=function(e){return Ki(e,512)},$r.flow=eu,$r.flowRight=tu,$r.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},$r.functions=function(e){return null==e?[]:_n(e,Aa(e))},$r.functionsIn=function(e){return null==e?[]:_n(e,Na(e))},$r.groupBy=gs,$r.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},$r.intersection=Yo,$r.intersectionBy=Wo,$r.intersectionWith=Ko,$r.invert=ja,$r.invertBy=Pa,$r.invokeMap=_s,$r.iteratee=nu,$r.keyBy=ws,$r.keys=Aa,$r.keysIn=Na,$r.map=Os,$r.mapKeys=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,t(e,n,i),e)})),r},$r.mapValues=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,n,t(e,n,i))})),r},$r.matches=function(e){return $n(sn(e,1))},$r.matchesProperty=function(e,t){return Fn(e,sn(t,1))},$r.memoize=ks,$r.merge=Ma,$r.mergeWith=ka,$r.method=iu,$r.methodOf=ou,$r.mixin=su,$r.negate=Ds,$r.nthArg=function(e){return e=da(e),Wn((function(t){return Ln(t,e)}))},$r.omit=Da,$r.omitBy=function(e,t){return Ca(e,Ds(oo(t)))},$r.once=function(e){return js(2,e)},$r.orderBy=function(e,t,r,n){return null==e?[]:(Vs(t)||(t=null==t?[]:[t]),Vs(r=n?i:r)||(r=null==r?[]:[r]),Bn(e,t,r))},$r.over=uu,$r.overArgs=Rs,$r.overEvery=cu,$r.overSome=lu,$r.partial=Cs,$r.partialRight=$s,$r.partition=Ss,$r.pick=Ra,$r.pickBy=Ca,$r.property=fu,$r.propertyOf=function(e){return function(t){return null==e?i:wn(e,t)}},$r.pull=Go,$r.pullAll=Jo,$r.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,oo(r,2)):e},$r.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,i,r):e},$r.pullAt=Zo,$r.range=pu,$r.rangeRight=du,$r.rearg=Fs,$r.reject=function(e,t){return(Vs(e)?Pt:hn)(e,Ds(oo(t,3)))},$r.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=oo(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return zn(e,i),r},$r.rest=function(e,t){if("function"!=typeof e)throw new je(o);return Wn(e,t=t===i?t:da(t))},$r.reverse=Xo,$r.sampleSize=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),(Vs(e)?Hr:Hn)(e,t)},$r.set=function(e,t,r){return null==e?e:Gn(e,t,r)},$r.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Gn(e,t,r,n)},$r.shuffle=function(e){return(Vs(e)?Gr:Xn)(e)},$r.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&mo(e,t,r)?(t=0,r=n):(t=null==t?0:da(t),r=r===i?n:da(r)),ei(e,t,r)):[]},$r.sortBy=Es,$r.sortedUniq=function(e){return e&&e.length?ii(e):[]},$r.sortedUniqBy=function(e,t){return e&&e.length?ii(e,oo(t,2)):[]},$r.split=function(e,t,r){return r&&"number"!=typeof r&&mo(e,t,r)&&(t=r=i),(r=r===i?d:r>>>0)?(e=ma(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&nr(e)?bi(lr(e),0,r):e.split(t,r):[]},$r.spread=function(e,t){if("function"!=typeof e)throw new je(o);return t=null==t?0:yr(da(t),0),Wn((function(r){var n=r[t],i=bi(r,0,t);return n&&Mt(i,n),St(e,this,i)}))},$r.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},$r.take=function(e,t,r){return e&&e.length?ei(e,0,(t=r||t===i?1:da(t))<0?0:t):[]},$r.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=n-(t=r||t===i?1:da(t)))<0?0:t,n):[]},$r.takeRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!1,!0):[]},$r.takeWhile=function(e,t){return e&&e.length?li(e,oo(t,3)):[]},$r.tap=function(e,t){return t(e),e},$r.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new je(o);return Xs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),As(e,t,{leading:n,maxWait:t,trailing:i})},$r.thru=ps,$r.toArray=fa,$r.toPairs=$a,$r.toPairsIn=Fa,$r.toPath=function(e){return Vs(e)?Nt(e,Co):aa(e)?[e]:Ti(Ro(ma(e)))},$r.toPlainObject=va,$r.transform=function(e,t,r){var n=Vs(e),i=n||Ws(e)||ua(e);if(t=oo(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Xs(e)&&Gs(o)?Fr(ze(e)):{}}return(i?It:bn)(e,(function(e,n,i){return t(r,e,n,i)})),r},$r.unary=function(e){return Ts(e,1)},$r.union=es,$r.unionBy=ts,$r.unionWith=rs,$r.uniq=function(e){return e&&e.length?ai(e):[]},$r.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},$r.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},$r.unset=function(e,t){return null==e||ui(e,t)},$r.unzip=ns,$r.unzipWith=is,$r.update=function(e,t,r){return null==e?e:ci(e,t,yi(r))},$r.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ci(e,t,yi(r),n)},$r.values=qa,$r.valuesIn=function(e){return null==e?[]:Gt(e,Na(e))},$r.without=os,$r.words=Ga,$r.wrap=function(e,t){return Cs(yi(t),e)},$r.xor=ss,$r.xorBy=as,$r.xorWith=us,$r.zip=cs,$r.zipObject=function(e,t){return di(e||[],t||[],Zr)},$r.zipObjectDeep=function(e,t){return di(e||[],t||[],Gn)},$r.zipWith=ls,$r.entries=$a,$r.entriesIn=Fa,$r.extend=ga,$r.extendWith=_a,su($r,$r),$r.add=mu,$r.attempt=Ja,$r.camelCase=La,$r.capitalize=Ba,$r.ceil=bu,$r.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ya(r))==r?r:0),t!==i&&(t=(t=ya(t))==t?t:0),on(ya(e),t,r)},$r.clone=function(e){return sn(e,4)},$r.cloneDeep=function(e){return sn(e,5)},$r.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:i)},$r.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:i)},$r.conformsTo=function(e,t){return null==t||an(e,t,Aa(t))},$r.deburr=Ua,$r.defaultTo=function(e,t){return null==e||e!=e?t:e},$r.divide=gu,$r.endsWith=function(e,t,r){e=ma(e),t=si(t);var n=e.length,o=r=r===i?n:on(da(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},$r.eq=qs,$r.escape=function(e){return(e=ma(e))&&K.test(e)?e.replace(Y,tr):e},$r.escapeRegExp=function(e){return(e=ma(e))&&re.test(e)?e.replace(te,"\\$&"):e},$r.every=function(e,t,r){var n=Vs(e)?jt:pn;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},$r.find=ys,$r.findIndex=Uo,$r.findKey=function(e,t){return $t(e,oo(t,3),bn)},$r.findLast=vs,$r.findLastIndex=Vo,$r.findLastKey=function(e,t){return $t(e,oo(t,3),gn)},$r.floor=_u,$r.forEach=ms,$r.forEachRight=bs,$r.forIn=function(e,t){return null==e?e:vn(e,oo(t,3),Na)},$r.forInRight=function(e,t){return null==e?e:mn(e,oo(t,3),Na)},$r.forOwn=function(e,t){return e&&bn(e,oo(t,3))},$r.forOwnRight=function(e,t){return e&&gn(e,oo(t,3))},$r.get=Ia,$r.gt=Ls,$r.gte=Bs,$r.has=function(e,t){return null!=e&&po(e,t,In)},$r.hasIn=Ta,$r.head=Qo,$r.identity=ru,$r.includes=function(e,t,r,n){e=Qs(e)?e:qa(e),r=r&&!n?da(r):0;var i=e.length;return r<0&&(r=yr(i+r,0)),sa(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&qt(e,t,r)>-1},$r.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),qt(e,t,i)},$r.inRange=function(e,t,r){return t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r){return e>=vr(t,r)&&e<yr(t,r)}(e=ya(e),t,r)},$r.invoke=xa,$r.isArguments=Us,$r.isArray=Vs,$r.isArrayBuffer=zs,$r.isArrayLike=Qs,$r.isArrayLikeObject=Ys,$r.isBoolean=function(e){return!0===e||!1===e||ea(e)&&Sn(e)==m},$r.isBuffer=Ws,$r.isDate=Ks,$r.isElement=function(e){return ea(e)&&1===e.nodeType&&!na(e)},$r.isEmpty=function(e){if(null==e)return!0;if(Qs(e)&&(Vs(e)||"string"==typeof e||"function"==typeof e.splice||Ws(e)||ua(e)||Us(e)))return!e.length;var t=fo(e);if(t==O||t==j)return!e.size;if(wo(e))return!Dn(e).length;for(var r in e)if(ke.call(e,r))return!1;return!0},$r.isEqual=function(e,t){return An(e,t)},$r.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?An(e,t,i,r):!!n},$r.isError=Hs,$r.isFinite=function(e){return"number"==typeof e&&Ct(e)},$r.isFunction=Gs,$r.isInteger=Js,$r.isLength=Zs,$r.isMap=ta,$r.isMatch=function(e,t){return e===t||Nn(e,t,ao(t))},$r.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,Nn(e,t,ao(t),r)},$r.isNaN=function(e){return ra(e)&&e!=+e},$r.isNative=function(e){if(_o(e))throw new we("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mn(e)},$r.isNil=function(e){return null==e},$r.isNull=function(e){return null===e},$r.isNumber=ra,$r.isObject=Xs,$r.isObjectLike=ea,$r.isPlainObject=na,$r.isRegExp=ia,$r.isSafeInteger=function(e){return Js(e)&&e>=-9007199254740991&&e<=f},$r.isSet=oa,$r.isString=sa,$r.isSymbol=aa,$r.isTypedArray=ua,$r.isUndefined=function(e){return e===i},$r.isWeakMap=function(e){return ea(e)&&fo(e)==A},$r.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==Sn(e)},$r.join=function(e,t){return null==e?"":zt.call(e,t)},$r.kebabCase=Va,$r.last=Ho,$r.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=da(r))<0?yr(n+o,0):vr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Ft(e,Bt,o,!0)},$r.lowerCase=za,$r.lowerFirst=Qa,$r.lt=ca,$r.lte=la,$r.max=function(e){return e&&e.length?dn(e,ru,En):i},$r.maxBy=function(e,t){return e&&e.length?dn(e,oo(t,2),En):i},$r.mean=function(e){return Ut(e,ru)},$r.meanBy=function(e,t){return Ut(e,oo(t,2))},$r.min=function(e){return e&&e.length?dn(e,ru,Rn):i},$r.minBy=function(e,t){return e&&e.length?dn(e,oo(t,2),Rn):i},$r.stubArray=hu,$r.stubFalse=yu,$r.stubObject=function(){return{}},$r.stubString=function(){return""},$r.stubTrue=function(){return!0},$r.multiply=wu,$r.nth=function(e,t){return e&&e.length?Ln(e,da(t)):i},$r.noConflict=function(){return ft._===this&&(ft._=Fe),this},$r.noop=au,$r.now=Is,$r.pad=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Bi(dt(i),r)+e+Bi(pt(i),r)},$r.padEnd=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?e+Bi(t-n,r):e},$r.padStart=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?Bi(t-n,r)+e:e},$r.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(ma(e).replace(ne,""),t||0)},$r.random=function(e,t,r){if(r&&"boolean"!=typeof r&&mo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=gr();return vr(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Qn(e,t)},$r.reduce=function(e,t,r){var n=Vs(e)?kt:Qt,i=arguments.length<3;return n(e,oo(t,4),r,i,ln)},$r.reduceRight=function(e,t,r){var n=Vs(e)?Dt:Qt,i=arguments.length<3;return n(e,oo(t,4),r,i,fn)},$r.repeat=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),Yn(ma(e),t)},$r.replace=function(){var e=arguments,t=ma(e[0]);return e.length<3?t:t.replace(e[1],e[2])},$r.result=function(e,t,r){var n=-1,o=(t=vi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[Co(t[n])];s===i&&(n=o,s=r),e=Gs(s)?s.call(e):s}return e},$r.round=Ou,$r.runInContext=e,$r.sample=function(e){return(Vs(e)?Kr:Kn)(e)},$r.size=function(e){if(null==e)return 0;if(Qs(e))return sa(e)?cr(e):e.length;var t=fo(e);return t==O||t==j?e.size:Dn(e).length},$r.snakeCase=Ya,$r.some=function(e,t,r){var n=Vs(e)?Rt:ti;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},$r.sortedIndex=function(e,t){return ri(e,t)},$r.sortedIndexBy=function(e,t,r){return ni(e,t,oo(r,2))},$r.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ri(e,t);if(n<r&&qs(e[n],t))return n}return-1},$r.sortedLastIndex=function(e,t){return ri(e,t,!0)},$r.sortedLastIndexBy=function(e,t,r){return ni(e,t,oo(r,2),!0)},$r.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ri(e,t,!0)-1;if(qs(e[r],t))return r}return-1},$r.startCase=Wa,$r.startsWith=function(e,t,r){return e=ma(e),r=null==r?0:on(da(r),0,e.length),t=si(t),e.slice(r,r+t.length)==t},$r.subtract=Su,$r.sum=function(e){return e&&e.length?Yt(e,ru):0},$r.sumBy=function(e,t){return e&&e.length?Yt(e,oo(t,2)):0},$r.template=function(e,t,r){var n=$r.templateSettings;r&&mo(e,t,r)&&(t=i),e=ma(e),t=_a({},t,n,Hi);var o,s,a=_a({},t.imports,n.imports,Hi),u=Aa(a),c=Gt(a,u),l=0,f=t.interpolate||ge,p="__p += '",d=Ie((t.escape||ge).source+"|"+f.source+"|"+(f===J?fe:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),h="//# sourceURL="+(ke.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,(function(t,r,n,i,a,u){return n||(n=i),p+=e.slice(l,u).replace(_e,rr),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var y=ke.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new we("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(U,""):p).replace(V,"$1").replace(z,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Ja((function(){return Oe(u,h+"return "+p).apply(i,c)}));if(v.source=p,Hs(v))throw v;return v},$r.times=function(e,t){if((e=da(e))<1||e>f)return[];var r=d,n=vr(e,d);t=oo(t),e-=d;for(var i=Wt(n,t);++r<e;)t(r);return i},$r.toFinite=pa,$r.toInteger=da,$r.toLength=ha,$r.toLower=function(e){return ma(e).toLowerCase()},$r.toNumber=ya,$r.toSafeInteger=function(e){return e?on(da(e),-9007199254740991,f):0===e?e:0},$r.toString=ma,$r.toUpper=function(e){return ma(e).toUpperCase()},$r.trim=function(e,t,r){if((e=ma(e))&&(r||t===i))return Kt(e);if(!e||!(t=si(t)))return e;var n=lr(e),o=lr(t);return bi(n,Zt(n,o),Xt(n,o)+1).join("")},$r.trimEnd=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.slice(0,fr(e)+1);if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,0,Xt(n,lr(t))+1).join("")},$r.trimStart=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,Zt(n,lr(t))).join("")},$r.truncate=function(e,t){var r=30,n="...";if(Xs(t)){var o="separator"in t?t.separator:o;r="length"in t?da(t.length):r,n="omission"in t?si(t.omission):n}var s=(e=ma(e)).length;if(nr(e)){var a=lr(e);s=a.length}if(r>=s)return e;var u=r-cr(n);if(u<1)return n;var c=a?bi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+n;if(a&&(u+=c.length-u),ia(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,ma(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(e.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+n},$r.unescape=function(e){return(e=ma(e))&&W.test(e)?e.replace(Q,pr):e},$r.uniqueId=function(e){var t=++De;return ma(e)+t},$r.upperCase=Ka,$r.upperFirst=Ha,$r.each=ms,$r.eachRight=bs,$r.first=Qo,su($r,(vu={},bn($r,(function(e,t){ke.call($r.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),$r.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){$r[e].placeholder=$r})),It(["drop","take"],(function(e,t){Br.prototype[e]=function(r){r=r===i?1:yr(da(r),0);var n=this.__filtered__&&!t?new Br(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},Br.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Br.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),It(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Br.prototype[e]=function(){return this[r](1).value()[0]}})),It(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Br.prototype[e]=function(){return this.__filtered__?new Br(this):this[r](1)}})),Br.prototype.compact=function(){return this.filter(ru)},Br.prototype.find=function(e){return this.filter(e).head()},Br.prototype.findLast=function(e){return this.reverse().find(e)},Br.prototype.invokeMap=Wn((function(e,t){return"function"==typeof e?new Br(this):this.map((function(r){return Pn(r,e,t)}))})),Br.prototype.reject=function(e){return this.filter(Ds(oo(e)))},Br.prototype.slice=function(e,t){e=da(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Br(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=da(t))<0?r.dropRight(-t):r.take(t-e)),r)},Br.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Br.prototype.toArray=function(){return this.take(d)},bn(Br.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=$r[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&($r.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Br,c=a[0],l=u||Vs(t),f=function(e){var t=o.apply($r,Mt([e],a));return n&&p?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=s&&!p,y=u&&!d;if(!s&&l){t=y?t:new Br(this);var v=e.apply(t,a);return v.__actions__.push({func:ps,args:[f],thisArg:i}),new Lr(v,p)}return h&&y?e.apply(this,a):(v=this.thru(f),h?n?v.value()[0]:v.value():v)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);$r.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Vs(i)?i:[],e)}return this[r]((function(r){return t.apply(Vs(r)?r:[],e)}))}})),bn(Br.prototype,(function(e,t){var r=$r[t];if(r){var n=r.name+"";ke.call(Pr,n)||(Pr[n]=[]),Pr[n].push({name:t,func:r})}})),Pr[$i(i,2).name]=[{name:"wrapper",func:i}],Br.prototype.clone=function(){var e=new Br(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Br.prototype.reverse=function(){if(this.__filtered__){var e=new Br(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Br.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Vs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vr(t,e+s);break;case"takeRight":e=yr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=n?a:s-1,l=this.__iteratees__,f=l.length,p=0,d=vr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return fi(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var y=-1,v=e[c+=t];++y<f;){var m=l[y],b=m.iteratee,g=m.type,_=b(v);if(2==g)v=_;else if(!_){if(1==g)continue e;break e}}h[p++]=v}return h},$r.prototype.at=ds,$r.prototype.chain=function(){return fs(this)},$r.prototype.commit=function(){return new Lr(this.value(),this.__chain__)},$r.prototype.next=function(){this.__values__===i&&(this.__values__=fa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},$r.prototype.plant=function(e){for(var t,r=this;r instanceof qr;){var n=Fo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},$r.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Br){var t=e;return this.__actions__.length&&(t=new Br(this)),(t=t.reverse()).__actions__.push({func:ps,args:[Xo],thisArg:i}),new Lr(t,this.__chain__)}return this.thru(Xo)},$r.prototype.toJSON=$r.prototype.valueOf=$r.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},$r.prototype.first=$r.prototype.head,He&&($r.prototype[He]=function(){return this}),$r}();ft._=dr,(n=function(){return dr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},2937:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};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 o=r(5271);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return o.Observable}});var s=r(3739);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return s.ConnectableObservable}});var a=r(2138);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return a.observable}});var u=r(4190);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var c=r(9520);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var l=r(8042);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return l.BehaviorSubject}});var f=r(216);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var p=r(7257);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return p.AsyncSubject}});var d=r(4502);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var h=r(4617);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return h.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return h.asyncScheduler}});var y=r(8344);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return y.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return y.queueScheduler}});var v=r(6192);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return v.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return v.animationFrameScheduler}});var m=r(8847);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return m.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return m.VirtualAction}});var b=r(3980);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return b.Scheduler}});var g=r(7215);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return g.Subscription}});var _=r(1403);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return _.Subscriber}});var w=r(3868);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var O=r(5966);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return O.pipe}});var S=r(5729);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return S.noop}});var E=r(9144);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return E.identity}});var I=r(1211);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return I.isObservable}});var T=r(1263);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return T.lastValueFrom}});var j=r(7447);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return j.firstValueFrom}});var P=r(6809);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return P.ArgumentOutOfRangeError}});var x=r(8032);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return x.EmptyError}});var A=r(1137);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return A.NotFoundError}});var N=r(7392);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return N.ObjectUnsubscribedError}});var M=r(6228);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return M.SequenceError}});var k=r(6279);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return k.TimeoutError}});var D=r(5463);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return D.UnsubscriptionError}});var R=r(1253);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return R.bindCallback}});var C=r(1009);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return C.bindNodeCallback}});var $=r(1047);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return $.combineLatest}});var F=r(79);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return F.concat}});var q=r(1663);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return q.connectable}});var L=r(5401);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return L.defer}});var B=r(1727);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return B.empty}});var U=r(1723);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return U.forkJoin}});var V=r(6216);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return V.from}});var z=r(6767);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return z.fromEvent}});var Q=r(4366);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return Q.fromEventPattern}});var Y=r(6103);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return Y.generate}});var W=r(4468);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return W.iif}});var K=r(4449);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return K.interval}});var H=r(5847);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return H.merge}});var G=r(7423);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return G.never}});var J=r(7443);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return J.of}});var Z=r(1282);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Z.onErrorResumeNext}});var X=r(5259);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=r(1945);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=r(7779);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var re=r(6971);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return re.range}});var ne=r(859);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return ne.throwError}});var ie=r(5710);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var oe=r(3687);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return oe.using}});var se=r(2042);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return se.zip}});var ae=r(3200);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return ae.scheduled}});var ue=r(1727);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var ce=r(7423);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),i(r(9251),t);var le=r(3782);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return le.config}});var fe=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var pe=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return pe.auditTime}});var de=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var he=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return he.bufferCount}});var ye=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ye.bufferTime}});var ve=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ve.bufferToggle}});var me=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return me.bufferWhen}});var be=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return be.catchError}});var ge=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ge.combineAll}});var _e=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return _e.combineLatestAll}});var we=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var Oe=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Oe.concatAll}});var Se=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Se.concatMap}});var Ee=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Ee.concatMapTo}});var Ie=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Ie.concatWith}});var Te=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return Te.connect}});var je=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return je.count}});var Pe=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Pe.debounce}});var xe=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return xe.debounceTime}});var Ae=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Ae.defaultIfEmpty}});var Ne=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Ne.delay}});var Me=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Me.delayWhen}});var ke=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return ke.dematerialize}});var De=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return De.distinct}});var Re=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Re.distinctUntilChanged}});var Ce=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Ce.distinctUntilKeyChanged}});var $e=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return $e.elementAt}});var Fe=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Fe.endWith}});var qe=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return qe.every}});var Le=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Le.exhaust}});var Be=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Be.exhaustAll}});var Ue=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Ue.exhaustMap}});var Ve=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ve.expand}});var ze=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return ze.filter}});var Qe=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Qe.finalize}});var Ye=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ye.find}});var We=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return We.findIndex}});var Ke=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return Ke.first}});var He=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return He.groupBy}});var Ge=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Ge.ignoreElements}});var Je=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Je.isEmpty}});var Ze=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ze.last}});var Xe=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var rt=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return rt.max}});var nt=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return nt.mergeAll}});var it=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var ot=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ot.mergeMap}});var st=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return st.mergeMapTo}});var at=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return at.mergeScan}});var ut=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var ct=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var lt=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return lt.multicast}});var ft=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var pt=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return pt.pairwise}});var dt=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return dt.pluck}});var ht=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return ht.publish}});var yt=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var vt=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return vt.publishLast}});var mt=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var bt=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var gt=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return gt.reduce}});var _t=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return _t.repeat}});var wt=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return wt.repeatWhen}});var Ot=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Ot.retry}});var St=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return St.retryWhen}});var Et=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Et.refCount}});var It=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return It.sample}});var Tt=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Tt.sampleTime}});var jt=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return jt.scan}});var Pt=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Pt.sequenceEqual}});var xt=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return xt.share}});var At=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return At.shareReplay}});var Nt=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Nt.single}});var Mt=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Mt.skip}});var kt=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return kt.skipLast}});var Dt=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Dt.skipUntil}});var Rt=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Rt.skipWhile}});var Ct=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ct.startWith}});var $t=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return $t.subscribeOn}});var Ft=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ft.switchAll}});var qt=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return qt.switchMap}});var Lt=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Lt.switchMapTo}});var Bt=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Bt.switchScan}});var Ut=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Ut.take}});var Vt=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Vt.takeLast}});var zt=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Qt=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Qt.takeWhile}});var Yt=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Yt.tap}});var Wt=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Wt.throttle}});var Kt=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Kt.throttleTime}});var Ht=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Ht.throwIfEmpty}});var Gt=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Gt.timeInterval}});var Jt=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Jt.timeout}});var Zt=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Zt.timeoutWith}});var Xt=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var er=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return er.toArray}});var tr=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return tr.window}});var rr=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return rr.windowCount}});var nr=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return nr.windowTime}});var ir=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return ir.windowToggle}});var or=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return or.windowWhen}});var sr=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return sr.withLatestFrom}});var ar=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ar.zipAll}});var ur=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ur.zipWith}})},7257:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var o=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,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,s=t.isStopped,a=t._isComplete;r?e.error(o):(s||a)&&(n&&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,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(r(9520).Subject);t.AsyncSubject=o},8042:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var o=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(r(9520).Subject);t.BehaviorSubject=o},3868:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,i=r(1727),o=r(7443),s=r(859),a=r(4432);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var u=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return c(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,s=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(s):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return a.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,a="N"===t?o.of(r):"E"===t?s.throwError((function(){return n})):"C"===t?i.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+t);return a},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 r,n,i,o=e,s=o.kind,a=o.value,u=o.error;if("string"!=typeof s)throw new TypeError('Invalid notification, missing "kind"');"N"===s?null===(r=t.next)||void 0===r||r.call(t,a):"E"===s?null===(n=t.error)||void 0===n||n.call(t,u):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=u,t.observeNotification=c},3380:(e,t)=>{"use strict";function r(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=r("C",void 0,void 0),t.errorNotification=function(e){return r("E",void 0,e)},t.nextNotification=function(e){return r("N",e,void 0)},t.createNotification=r},5271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=r(1403),i=r(7215),o=r(2138),s=r(5966),a=r(3782),u=r(4432),c=r(4770),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var o,s=this,a=(o=e)&&o instanceof n.Subscriber||function(e){return e&&u.isFunction(e.next)&&u.isFunction(e.error)&&u.isFunction(e.complete)}(o)&&i.isSubscription(o)?e:new n.SafeSubscriber(e,t,r);return c.errorContext((function(){var e=s,t=e.operator,r=e.source;a.add(t?t.call(a,r):r?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=f(t))((function(t,i){var o=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function f(e){var t;return null!==(t=null!=e?e:a.config.Promise)&&void 0!==t?t:Promise}t.Observable=l},216:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var o=r(9520),s=r(1713),a=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return i(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(t),!o&&i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,u=1;u<n.length&&n[u]<=s;u+=2)a=u;a&&n.splice(0,a+1)}},t}(o.Subject);t.ReplaySubject=a},3980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=r(1713),i=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=i},9520:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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 s=r(5271),a=r(7215),u=r(7392),c=r(2447),l=r(4770),f=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 p(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new u.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=o(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;l.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;l.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,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?a.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new a.Subscription((function(){t.currentObservers=null,c.arrRemove(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new s.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(s.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return i(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.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,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:a.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=p},1403:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=r(4432),s=r(7215),a=r(3782),u=r(7234),c=r(5729),l=r(3380),f=r(8972),p=r(4770),d=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,s.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return i(r,e),r.create=function(e,t,r){return new m(e,t,r)},r.prototype.next=function(e){this.isStopped?g(l.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?g(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?g(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(s.Subscription);t.Subscriber=d;var h=Function.prototype.bind;function y(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}(),m=function(e){function t(t,r,n){var i,s,u=e.call(this)||this;return o.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&a.config.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&y(t.next,s),error:t.error&&y(t.error,s),complete:t.complete&&y(t.complete,s)}):i=t,u.destination=new v(i),u}return i(t,e),t}(d);function b(e){a.config.useDeprecatedSynchronousErrorHandling?p.captureError(e):u.reportUnhandledError(e)}function g(e,t){var r=a.config.onStoppedNotification;r&&f.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=m,t.EMPTY_OBSERVER={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},7215:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var s=r(4432),a=r(5463),u=r(2447),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,r,u,c;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var p=n(f),d=p.next();!d.done;d=p.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=p.return)&&t.call(p)}finally{if(e)throw e.error}}else f.remove(this);var h=this.initialTeardown;if(s.isFunction(h))try{h()}catch(e){c=e instanceof a.UnsubscriptionError?e.errors:[e]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var v=n(y),m=v.next();!m.done;m=v.next()){var b=m.value;try{l(b)}catch(e){c=null!=c?c:[],e instanceof a.UnsubscriptionError?c=o(o([],i(c)),i(e.errors)):c.push(e)}}}catch(e){r={error:e}}finally{try{m&&!m.done&&(u=v.return)&&u.call(v)}finally{if(r)throw r.error}}}if(c)throw new a.UnsubscriptionError(c)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).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)&&u.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&u.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function l(e){s.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&&s.isFunction(e.remove)&&s.isFunction(e.add)&&s.isFunction(e.unsubscribe)}},3782:(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}},7447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=r(8032),i=r(1403);t.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(o,s){var a=new i.SafeSubscriber({next:function(e){o(e),a.unsubscribe()},error:s,complete:function(){r?o(t.defaultValue):s(new n.EmptyError)}});e.subscribe(a)}))}},1263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=r(8032);t.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(i,o){var s,a=!1;e.subscribe({next:function(e){s=e,a=!0},error:o,complete:function(){a?i(s):r?i(t.defaultValue):o(new n.EmptyError)}})}))}},3739:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var o=r(5271),s=r(7215),a=r(2711),u=r(5079),c=r(4024),l=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,c.hasLift(t)&&(n.lift=t.lift),n}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 s.Subscription;var r=this.getSubject();t.add(this.source.subscribe(u.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=s.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return a.refCount()(this)},t}(o.Observable);t.ConnectableObservable=l},1253:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=r(6414);t.bindCallback=function(e,t,r){return n.bindCallbackInternals(!1,e,t,r)}},6414:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var o=r(6551),s=r(5271),a=r(831),u=r(4666),c=r(3165),l=r(7257);t.bindCallbackInternals=function e(t,r,f,p){if(f){if(!o.isScheduler(f))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r,p).apply(this,n).pipe(u.mapOneOrManyArgs(f))};p=f}return p?function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r).apply(this,n).pipe(a.subscribeOn(p),c.observeOn(p))}:function(){for(var e=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new l.AsyncSubject,c=!0;return new s.Observable((function(s){var a=u.subscribe(s);if(c){c=!1;var l=!1,f=!1;r.apply(e,i(i([],n(o)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void u.error(n)}u.next(1<e.length?e:e[0]),f=!0,l&&u.complete()}])),f&&u.complete(),l=!0}return a}))}}},1009:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=r(6414);t.bindNodeCallback=function(e,t,r){return n.bindCallbackInternals(!0,e,t,r)}},1047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=r(5271),i=r(4744),o=r(6216),s=r(9144),a=r(4666),u=r(2619),c=r(1589),l=r(5079),f=r(5421);function p(e,t,r){return void 0===r&&(r=s.identity),function(n){d(t,(function(){for(var i=e.length,s=new Array(i),a=i,u=i,c=function(i){d(t,(function(){var c=o.from(e[i],t),f=!1;c.subscribe(l.createOperatorSubscriber(n,(function(e){s[i]=e,f||(f=!0,u--),u||n.next(r(s.slice()))}),(function(){--a||n.complete()})))}),n)},f=0;f<i;f++)c(f)}),n)}}function d(e,t,r){e?f.executeSchedule(r,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popResultSelector(e),f=i.argsArgArrayOrObject(e),d=f.args,h=f.keys;if(0===d.length)return o.from([],r);var y=new n.Observable(p(d,r,h?function(e){return c.createObject(h,e)}:s.identity));return l?y.pipe(a.mapOneOrManyArgs(l)):y},t.combineLatestInit=p},79:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=r(4554),i=r(2619),o=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.concatAll()(o.from(e,i.popScheduler(e)))}},1663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=r(9520),i=r(5271),o=r(5401),s={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=s);var r=null,n=t.connector,a=t.resetOnDisconnect,u=void 0===a||a,c=n(),l=new i.Observable((function(e){return c.subscribe(e)}));return l.connect=function(){return r&&!r.closed||(r=o.defer((function(){return e})).subscribe(c),u&&r.add((function(){return c=n()}))),r},l}},5401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=r(5271),i=r(9451);t.defer=function(e){return new n.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},4190:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=r(5271),i=r(1241),o=r(6741);function s(e){return new n.Observable((function(t){var r=e||i.performanceTimestampProvider,n=r.now(),s=0,a=function(){t.closed||(s=o.animationFrameProvider.requestAnimationFrame((function(i){s=0;var o=r.now();t.next({timestamp:e?o:i,elapsed:o-n}),a()})))};return a(),function(){s&&o.animationFrameProvider.cancelAnimationFrame(s)}}))}t.animationFrames=function(e){return e?s(e):a};var a=s()},1727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=r(5271);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},1723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=r(5271),i=r(4744),o=r(9451),s=r(2619),a=r(5079),u=r(4666),c=r(1589);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,p=l.keys,d=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,i=t,s=function(t){var s=!1;o.innerFrom(f[t]).subscribe(a.createOperatorSubscriber(e,(function(e){s||(s=!0,i--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&s||(i||e.next(p?c.createObject(p,r):r),e.complete())})))},u=0;u<t;u++)s(u);else e.complete()}));return r?d.pipe(u.mapOneOrManyArgs(r)):d}},6216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=r(3200),i=r(9451);t.from=function(e,t){return t?n.scheduled(e,t):i.innerFrom(e)}},6767:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=r(9451),o=r(5271),s=r(9010),a=r(8219),u=r(4432),c=r(4666),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],p=["on","off"];function d(e,t){return function(r){return function(n){return e[r](t,n)}}}t.fromEvent=function e(t,r,h,y){if(u.isFunction(h)&&(y=h,h=void 0),y)return e(t,r,h).pipe(c.mapOneOrManyArgs(y));var v=n(function(e){return u.isFunction(e.addEventListener)&&u.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](r,n,h)}})):function(e){return u.isFunction(e.addListener)&&u.isFunction(e.removeListener)}(t)?l.map(d(t,r)):function(e){return u.isFunction(e.on)&&u.isFunction(e.off)}(t)?p.map(d(t,r)):[],2),m=v[0],b=v[1];if(!m&&a.isArrayLike(t))return s.mergeMap((function(t){return e(t,r,h)}))(i.innerFrom(t));if(!m)throw new TypeError("Invalid event target");return new o.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return m(t),function(){return b(t)}}))}},4366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=r(5271),i=r(4432),o=r(4666);t.fromEventPattern=function e(t,r,s){return s?e(t,r).pipe(o.mapOneOrManyArgs(s)):new n.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},o=t(n);return i.isFunction(r)?function(){return r(n,o)}:void 0}))}},2160:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=r(5271);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},6103:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=r(9144),o=r(6551),s=r(5401),a=r(8840);t.generate=function(e,t,r,u,c){var l,f,p,d;function h(){var e;return n(this,(function(n){switch(n.label){case 0:e=d,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,p(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(d=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,p=void 0===f?i.identity:f,c=l.scheduler):(d=e,!u||o.isScheduler(u)?(p=i.identity,c=u):p=u),s.defer(c?function(){return a.scheduleIterable(h(),c)}:h)}},4468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=r(5401);t.iif=function(e,t,r){return n.defer((function(){return e()?t:r}))}},9451:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof s?s(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}},s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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 a=r(8219),u=r(2644),c=r(5271),l=r(3292),f=r(7707),p=r(4883),d=r(6380),h=r(9266),y=r(4432),v=r(7234),m=r(2138);function b(e){return new c.Observable((function(t){var r=e[m.observable]();if(y.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function g(e){return new c.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function _(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 w(e){return new c.Observable((function(t){var r,n;try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()}))}function O(e){return new c.Observable((function(t){(function(e,t){var r,s,a,u;return n(this,void 0,void 0,(function(){var n,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=o(e),i.label=1;case 1:return[4,r.next()];case 2:if((s=i.sent()).done)return[3,4];if(n=s.value,t.next(n),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),a={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),s&&!s.done&&(u=r.return)?[4,u.call(r)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function S(e){return O(h.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof c.Observable)return e;if(null!=e){if(l.isInteropObservable(e))return b(e);if(a.isArrayLike(e))return g(e);if(u.isPromise(e))return _(e);if(f.isAsyncIterable(e))return O(e);if(d.isIterable(e))return w(e);if(h.isReadableStreamLike(e))return S(e)}throw p.createInvalidObservableTypeError(e)},t.fromInteropObservable=b,t.fromArrayLike=g,t.fromPromise=_,t.fromIterable=w,t.fromAsyncIterable=O,t.fromReadableStreamLike=S},4449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=r(4617),i=r(5710);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},5847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=r(4594),i=r(9451),o=r(1727),s=r(2619),a=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e),u=s.popNumber(e,1/0),c=e;return c.length?1===c.length?i.innerFrom(c[0]):n.mergeAll(u)(a.from(c,r)):o.EMPTY}},7423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=r(5271),i=r(5729);t.NEVER=new n.Observable(i.noop),t.never=function(){return t.NEVER}},7443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=r(2619),i=r(6216);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n.popScheduler(e);return i.from(e,r)}},1282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=r(1727),i=r(4764),o=r(4475);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.onErrorResumeNext(o.argsOrArgArray(e))(n.EMPTY)}},5259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=r(6216);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},1945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763),o=r(9451);t.partition=function(e,t,r){return[i.filter(t,r)(o.innerFrom(e)),i.filter(n.not(t,r))(o.innerFrom(e))]}},7779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=r(5271),i=r(9451),o=r(4475),s=r(5079);function a(e){return function(t){for(var r=[],n=function(n){r.push(i.innerFrom(e[n]).subscribe(s.createOperatorSubscriber(t,(function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)}))))},o=0;r&&!t.closed&&o<e.length;o++)n(o)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=o.argsOrArgArray(e)).length?i.innerFrom(e[0]):new n.Observable(a(e))},t.raceInit=a},6971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=r(5271),i=r(1727);t.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var o=t+e;return new n.Observable(r?function(t){var n=e;return r.schedule((function(){n<o?(t.next(n++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<o&&!t.closed;)t.next(r++);t.complete()})}},859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=r(5271),i=r(4432);t.throwError=function(e,t){var r=i.isFunction(e)?e:function(){return e},o=function(e){return e.error(r())};return new n.Observable(t?function(e){return t.schedule(o,0,e)}:o)}},5710:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=r(5271),i=r(4617),o=r(6551),s=r(7761);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.async);var a=-1;return null!=t&&(o.isScheduler(t)?r=t:a=t),new n.Observable((function(t){var n=s.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=a?this.schedule(void 0,a):t.complete())}),n)}))}},3687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=r(5271),i=r(9451),o=r(1727);t.using=function(e,t){return new n.Observable((function(r){var n=e(),s=t(n);return(s?i.innerFrom(s):o.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))}},2042:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(5271),s=r(9451),a=r(4475),u=r(1727),c=r(5079),l=r(2619);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e),f=a.argsOrArgArray(e);return f.length?new o.Observable((function(e){var t=f.map((function(){return[]})),o=f.map((function(){return!1}));e.add((function(){t=o=null}));for(var a=function(a){s.innerFrom(f[a]).subscribe(c.createOperatorSubscriber(e,(function(s){if(t[a].push(s),t.every((function(e){return e.length}))){var u=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,i([],n(u))):u),t.some((function(e,t){return!e.length&&o[t]}))&&e.complete()}}),(function(){o[a]=!0,!t[a].length&&e.complete()})))},u=0;!e.closed&&u<f.length;u++)a(u);return function(){t=o=null}})):u.EMPTY}},5079:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var o=r(1403);t.createOperatorSubscriber=function(e,t,r,n,i){return new s(e,t,r,n,i)};var s=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(o.Subscriber);t.OperatorSubscriber=s},3533:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=r(4024),i=r(9451),o=r(5079);t.audit=function(e){return n.operate((function(t,r){var n=!1,s=null,a=null,u=!1,c=function(){if(null==a||a.unsubscribe(),a=null,n){n=!1;var e=s;s=null,r.next(e)}u&&r.complete()},l=function(){a=null,u&&r.complete()};t.subscribe(o.createOperatorSubscriber(r,(function(t){n=!0,s=t,a||i.innerFrom(e(t)).subscribe(a=o.createOperatorSubscriber(r,c,l))}),(function(){u=!0,(!n||!a||a.closed)&&r.complete()})))}))}},5188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=r(4617),i=r(3533),o=r(5710);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.audit((function(){return o.timer(e,t)}))}},4514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=r(4024),i=r(5729),o=r(5079);t.buffer=function(e){return n.operate((function(t,r){var n=[];return t.subscribe(o.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),e.subscribe(o.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),i.noop)),function(){n=null}}))}},2537:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(4024),o=r(5079),s=r(2447);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(r,i){var a=[],u=0;r.subscribe(o.createOperatorSubscriber(i,(function(r){var o,c,l,f,p=null;u++%t==0&&a.push([]);try{for(var d=n(a),h=d.next();!h.done;h=d.next())(m=h.value).push(r),e<=m.length&&(p=null!=p?p:[]).push(m)}catch(e){o={error:e}}finally{try{h&&!h.done&&(c=d.return)&&c.call(d)}finally{if(o)throw o.error}}if(p)try{for(var y=n(p),v=y.next();!v.done;v=y.next()){var m=v.value;s.arrRemove(a,m),i.next(m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(f=y.return)&&f.call(y)}finally{if(l)throw l.error}}}),(function(){var e,t;try{for(var r=n(a),o=r.next();!o.done;o=r.next()){var s=o.value;i.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){a=null})))}))}},8720:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(7215),o=r(4024),s=r(5079),a=r(2447),u=r(4617),c=r(2619),l=r(5421);t.bufferTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:u.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return o.operate((function(t,r){var o=[],u=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),a.arrRemove(o,e),r.next(t),u&&f()},f=function(){if(o){var t=new i.Subscription;r.add(t);var n={buffer:[],subs:t};o.push(n),l.executeSchedule(t,d,(function(){return c(n)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):u=!0,f();var p=s.createOperatorSubscriber(r,(function(e){var t,r,i=o.slice();try{for(var s=n(i),a=s.next();!a.done;a=s.next()){var u=a.value,l=u.buffer;l.push(e),y<=l.length&&c(u)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}),(function(){for(;null==o?void 0:o.length;)r.next(o.shift().buffer);null==p||p.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return o=null}));t.subscribe(p)}))}},7932:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(7215),o=r(4024),s=r(9451),a=r(5079),u=r(5729),c=r(2447);t.bufferToggle=function(e,t){return o.operate((function(r,o){var l=[];s.innerFrom(e).subscribe(a.createOperatorSubscriber(o,(function(e){var r=[];l.push(r);var n=new i.Subscription;n.add(s.innerFrom(t(e)).subscribe(a.createOperatorSubscriber(o,(function(){c.arrRemove(l,r),o.next(r),n.unsubscribe()}),u.noop)))}),u.noop)),r.subscribe(a.createOperatorSubscriber(o,(function(e){var t,r;try{for(var i=n(l),o=i.next();!o.done;o=i.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),(function(){for(;l.length>0;)o.next(l.shift());o.complete()})))}))}},1445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=r(4024),i=r(5729),o=r(5079),s=r(9451);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,a=null,u=function(){null==a||a.unsubscribe();var t=n;n=[],t&&r.next(t),s.innerFrom(e()).subscribe(a=o.createOperatorSubscriber(r,u,i.noop))};u(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=a=null})))}))}},4418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=r(9451),i=r(5079),o=r(4024);t.catchError=function e(t){return o.operate((function(r,o){var s,a=null,u=!1;a=r.subscribe(i.createOperatorSubscriber(o,void 0,void 0,(function(i){s=n.innerFrom(t(i,e(t)(r))),a?(a.unsubscribe(),a=null,s.subscribe(o)):u=!0}))),u&&(a.unsubscribe(),a=null,s.subscribe(o))}))}},4163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=r(9893);t.combineAll=n.combineLatestAll},8169:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var o=r(1047),s=r(4024),a=r(4475),u=r(4666),c=r(5966),l=r(2619);t.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var f=l.popResultSelector(t);return f?c.pipe(e.apply(void 0,i([],n(t))),u.mapOneOrManyArgs(f)):s.operate((function(e,r){o.combineLatestInit(i([e],n(a.argsOrArgArray(t))))(r)}))}},9893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=r(1047),i=r(7534);t.combineLatestAll=function(e){return i.joinAllInternals(n.combineLatest,e)}},7230:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var o=r(8169);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.combineLatest.apply(void 0,i([],n(e)))}},4098:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var o=r(4024),s=r(4554),a=r(2619),u=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e);return o.operate((function(t,o){s.concatAll()(u.from(i([t],n(e)),r)).subscribe(o)}))}},4554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=r(4594);t.concatAll=function(){return n.mergeAll(1)}},1048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=r(9010),i=r(4432);t.concatMap=function(e,t){return i.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=r(1048),i=r(4432);t.concatMapTo=function(e,t){return i.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},4724:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var o=r(4098);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concat.apply(void 0,i([],n(e)))}},4347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=r(9520),i=r(9451),o=r(4024),s=r(2160),a={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=a);var r=t.connector;return o.operate((function(t,n){var o=r();i.innerFrom(e(s.fromSubscribable(o))).subscribe(n),n.add(t.subscribe(o))}))}},6944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=r(1678);t.count=function(e){return n.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)}},440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=r(4024),i=r(5729),o=r(5079),s=r(9451);t.debounce=function(e){return n.operate((function(t,r){var n=!1,a=null,u=null,c=function(){if(null==u||u.unsubscribe(),u=null,n){n=!1;var e=a;a=null,r.next(e)}};t.subscribe(o.createOperatorSubscriber(r,(function(t){null==u||u.unsubscribe(),n=!0,a=t,u=o.createOperatorSubscriber(r,c,i.noop),s.innerFrom(e(t)).subscribe(u)}),(function(){c(),r.complete()}),void 0,(function(){a=u=null})))}))}},8157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=r(4617),i=r(4024),o=r(5079);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.operate((function(r,n){var i=null,s=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var e=s;s=null,n.next(e)}};function c(){var r=a+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);u()}r.subscribe(o.createOperatorSubscriber(n,(function(r){s=r,a=t.now(),i||(i=t.schedule(c,e),n.add(i))}),(function(){u(),n.complete()}),void 0,(function(){s=i=null})))}))}},1714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=r(4024),i=r(5079);t.defaultIfEmpty=function(e){return n.operate((function(t,r){var n=!1;t.subscribe(i.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))}},1030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=r(4617),i=r(6405),o=r(5710);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var r=o.timer(e,t);return i.delayWhen((function(){return r}))}},6405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=r(79),i=r(7138),o=r(3470),s=r(4791),a=r(9010);t.delayWhen=function e(t,r){return r?function(s){return n.concat(r.pipe(i.take(1),o.ignoreElements()),s.pipe(e(t)))}:a.mergeMap((function(e,r){return t(e,r).pipe(i.take(1),s.mapTo(e))}))}},9142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},2307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=r(4024),i=r(5079),o=r(5729);t.distinct=function(e,t){return n.operate((function(r,n){var s=new Set;r.subscribe(i.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;s.has(r)||(s.add(r),n.next(t))}))),null==t||t.subscribe(i.createOperatorSubscriber(n,(function(){return s.clear()}),o.noop))}))}},9131:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=r(9144),i=r(4024),o=r(5079);function s(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:s,i.operate((function(r,n){var i,s=!0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=t(r);!s&&e(i,o)||(s=!1,i=o,n.next(r))})))}))}},6659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=r(9131);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}},4217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=r(6809),i=r(2763),o=r(8062),s=r(1714),a=r(7138);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(u){return u.pipe(i.filter((function(t,r){return r===e})),a.take(1),r?s.defaultIfEmpty(t):o.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},4707:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var o=r(79),s=r(7443);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return o.concat(t,s.of.apply(void 0,i([],n(e))))}}},9276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=r(4024),i=r(5079);t.every=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(i){e.call(t,i,o++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=r(3977);t.exhaust=n.exhaustAll},3977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=r(368),i=r(9144);t.exhaustAll=function(){return n.exhaustMap(i.identity)}},368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=r(4338),i=r(9451),o=r(4024),s=r(5079);t.exhaustMap=function e(t,r){return r?function(o){return o.pipe(e((function(e,o){return i.innerFrom(t(e,o)).pipe(n.map((function(t,n){return r(e,t,o,n)})))})))}:o.operate((function(e,r){var n=0,o=null,a=!1;e.subscribe(s.createOperatorSubscriber(r,(function(e){o||(o=s.createOperatorSubscriber(r,void 0,(function(){o=null,a&&r.complete()})),i.innerFrom(t(e,n++)).subscribe(o))}),(function(){a=!0,!o&&r.complete()})))}))}},7829:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=r(4024),i=r(7163);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,o){return i.mergeInternals(n,o,e,t,void 0,!0,r)}))}},2763:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=r(4024),i=r(5079);t.filter=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){return e.call(t,r,o++)&&n.next(r)})))}))}},4106:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=r(4024);t.finalize=function(e){return n.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))}},8759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=r(4024),i=r(5079);function o(e,t,r){var n="index"===r;return function(r,o){var s=0;r.subscribe(i.createOperatorSubscriber(o,(function(i){var a=s++;e.call(t,i,a,r)&&(o.next(n?a:i),o.complete())}),(function(){o.next(n?-1:void 0),o.complete()})))}}t.find=function(e,t){return n.operate(o(e,t,"value"))},t.createFind=o},3999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=r(4024),i=r(8759);t.findIndex=function(e,t){return n.operate(i.createFind(e,t,"index"))}},5194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=r(8032),i=r(2763),o=r(7138),s=r(1714),a=r(8062),u=r(9144);t.first=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.take(1),r?s.defaultIfEmpty(t):a.throwIfEmpty((function(){return new n.EmptyError})))}}},2735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=r(9010);t.flatMap=n.mergeMap},1664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=r(5271),i=r(9451),o=r(9520),s=r(4024),a=r(5079);t.groupBy=function(e,t,r,u){return s.operate((function(s,c){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,u=t.connector):l=t;var f=new Map,p=function(e){f.forEach(e),e(c)},d=function(e){return p((function(t){return t.error(e)}))},h=0,y=!1,v=new a.OperatorSubscriber(c,(function(t){try{var s=e(t),p=f.get(s);if(!p){f.set(s,p=u?u():new o.Subject);var m=(g=s,_=p,(w=new n.Observable((function(e){h++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--h&&y&&v.unsubscribe()}}))).key=g,w);if(c.next(m),r){var b=a.createOperatorSubscriber(p,(function(){p.complete(),null==b||b.unsubscribe()}),void 0,void 0,(function(){return f.delete(s)}));v.add(i.innerFrom(r(m)).subscribe(b))}}p.next(l?l(t):t)}catch(e){d(e)}var g,_,w}),(function(){return p((function(e){return e.complete()}))}),d,(function(){return f.clear()}),(function(){return y=!0,0===h}));s.subscribe(v)}))}},3470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=r(4024),i=r(5079),o=r(5729);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,o.noop))}))}},9549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=r(4024),i=r(5079);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},7534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=r(9144),i=r(4666),o=r(5966),s=r(9010),a=r(2378);t.joinAllInternals=function(e,t){return o.pipe(a.toArray(),s.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):n.identity)}},9582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=r(8032),i=r(2763),o=r(4288),s=r(8062),a=r(1714),u=r(9144);t.last=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.takeLast(1),r?a.defaultIfEmpty(t):s.throwIfEmpty((function(){return new n.EmptyError})))}}},4338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=r(4024),i=r(5079);t.map=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,o++))})))}))}},4791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=r(4338);t.mapTo=function(e){return n.map((function(){return e}))}},9318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.materialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},7446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=r(1678),i=r(4432);t.max=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},6094:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var o=r(4024),s=r(4475),a=r(4594),u=r(2619),c=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popNumber(e,1/0);return e=s.argsOrArgArray(e),o.operate((function(t,o){a.mergeAll(l)(c.from(i([t],n(e)),r)).subscribe(o)}))}},4594:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=r(9010),i=r(9144);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(i.identity,e)}},7163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=r(9451),i=r(5421),o=r(5079);t.mergeInternals=function(e,t,r,s,a,u,c,l){var f=[],p=0,d=0,h=!1,y=function(){!h||f.length||p||t.complete()},v=function(e){return p<s?m(e):f.push(e)},m=function(e){u&&t.next(e),p++;var l=!1;n.innerFrom(r(e,d++)).subscribe(o.createOperatorSubscriber(t,(function(e){null==a||a(e),u?v(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{p--;for(var e=function(){var e=f.shift();c?i.executeSchedule(t,c,(function(){return m(e)})):m(e)};f.length&&p<s;)e();y()}catch(e){t.error(e)}})))};return e.subscribe(o.createOperatorSubscriber(t,v,(function(){h=!0,y()}))),function(){null==l||l()}}},9010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=r(4338),i=r(9451),o=r(4024),s=r(7163),a=r(4432);t.mergeMap=function e(t,r,u){return void 0===u&&(u=1/0),a.isFunction(r)?e((function(e,o){return n.map((function(t,n){return r(e,t,o,n)}))(i.innerFrom(t(e,o)))}),u):("number"==typeof r&&(u=r),o.operate((function(e,r){return s.mergeInternals(e,r,t,u)})))}},8983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(9010),i=r(4432);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),i.isFunction(t)?n.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),n.mergeMap((function(){return e}),r))}},2170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=r(4024),i=r(7163);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),n.operate((function(n,o){var s=t;return i.mergeInternals(n,o,(function(t,r){return e(s,t,r)}),r,(function(e){s=e}),!1,void 0,(function(){return s=null}))}))}},3674:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var o=r(6094);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.merge.apply(void 0,i([],n(e)))}},1446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=r(1678),i=r(4432);t.min=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})}},2318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=r(3739),i=r(4432),o=r(4347);t.multicast=function(e,t){var r=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?o.connect(t,{connector:r}):function(e){return new n.ConnectableObservable(e,r)}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=r(5421),i=r(4024),o=r(5079);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(r,i){r.subscribe(o.createOperatorSubscriber(i,(function(r){return n.executeSchedule(i,e,(function(){return i.next(r)}),t)}),(function(){return n.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(r){return n.executeSchedule(i,e,(function(){return i.error(r)}),t)})))}))}},4764:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var o=r(4024),s=r(9451),a=r(4475),u=r(5079),c=r(5729);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.argsOrArgArray(e);return o.operate((function(e,t){var o=i([e],n(r)),a=function(){if(!t.closed)if(o.length>0){var e=void 0;try{e=s.innerFrom(o.shift())}catch(e){return void a()}var r=u.createOperatorSubscriber(t,void 0,c.noop,c.noop);e.subscribe(r),r.add(a)}else t.complete()};a()}))}},402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=r(4024),i=r(5079);t.pairwise=function(){return n.operate((function(e,t){var r,n=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))}},5960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763);t.partition=function(e,t){return function(r){return[i.filter(e,t)(r),i.filter(n.not(e,t))(r)]}}},5658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=r(4338);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return n.map((function(t){for(var n=t,i=0;i<r;i++){var o=null==n?void 0:n[e[i]];if(void 0===o)return;n=o}return n}))}},3881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=r(9520),i=r(2318),o=r(4347);t.publish=function(e){return e?function(t){return o.connect(e)(t)}:function(e){return i.multicast(new n.Subject)(e)}}},1755:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=r(8042),i=r(3739);t.publishBehavior=function(e){return function(t){var r=new n.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return r}))}}},9801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=r(7257),i=r(3739);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},5021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=r(216),i=r(2318),o=r(4432);t.publishReplay=function(e,t,r,s){r&&!o.isFunction(r)&&(s=r);var a=o.isFunction(r)?r:void 0;return function(r){return i.multicast(new n.ReplaySubject(e,t,s),a)(r)}}},2749:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var o=r(4475),s=r(9925);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.raceWith.apply(void 0,i([],n(o.argsOrArgArray(e))))}},9925:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var o=r(7779),s=r(4024),a=r(9144);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?s.operate((function(t,r){o.raceInit(i([t],n(e)))(r)})):a.identity}},1678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=r(2181),i=r(4024);t.reduce=function(e,t){return i.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},2711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=r(4024),i=r(5079);t.refCount=function(){return n.operate((function(e,t){var r=null;e._refCount++;var n=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))}},1194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=r(1727),i=r(4024),o=r(5079),s=r(9451),a=r(5710);t.repeat=function(e){var t,r,u=1/0;return null!=e&&("object"==typeof e?(t=e.count,u=void 0===t?1/0:t,r=e.delay):u=e),u<=0?function(){return n.EMPTY}:i.operate((function(e,t){var n,i=0,c=function(){if(null==n||n.unsubscribe(),n=null,null!=r){var e="number"==typeof r?a.timer(r):s.innerFrom(r(i)),u=o.createOperatorSubscriber(t,(function(){u.unsubscribe(),l()}));e.subscribe(u)}else l()},l=function(){var r=!1;n=e.subscribe(o.createOperatorSubscriber(t,void 0,(function(){++i<u?n?c():r=!0:t.complete()}))),r&&c()};l()}))}},7085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.repeatWhen=function(e){return i.operate((function(t,r){var i,s,a=!1,u=!1,c=!1,l=function(){return c&&u&&(r.complete(),!0)},f=function(){c=!1,i=t.subscribe(o.createOperatorSubscriber(r,void 0,(function(){c=!0,!l()&&(s||(s=new n.Subject,e(s).subscribe(o.createOperatorSubscriber(r,(function(){i?f():a=!0}),(function(){u=!0,l()})))),s).next()}))),a&&(i.unsubscribe(),i=null,a=!1,f())};f()}))}},7524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=r(4024),i=r(5079),o=r(9144),s=r(5710),a=r(9451);t.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,u=void 0===r?1/0:r,c=t.delay,l=t.resetOnSuccess,f=void 0!==l&&l;return u<=0?o.identity:n.operate((function(e,t){var r,n=0,o=function(){var l=!1;r=e.subscribe(i.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++<u){var f=function(){r?(r.unsubscribe(),r=null,o()):l=!0};if(null!=c){var p="number"==typeof c?s.timer(c):a.innerFrom(c(e,n)),d=i.createOperatorSubscriber(t,(function(){d.unsubscribe(),f()}),(function(){t.complete()}));p.subscribe(d)}else f()}else t.error(e)}))),l&&(r.unsubscribe(),r=null,o())};o()}))}},548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.retryWhen=function(e){return i.operate((function(t,r){var i,s,a=!1,u=function(){i=t.subscribe(o.createOperatorSubscriber(r,void 0,void 0,(function(t){s||(s=new n.Subject,e(s).subscribe(o.createOperatorSubscriber(r,(function(){return i?u():a=!0})))),s&&s.next(t)}))),a&&(i.unsubscribe(),i=null,a=!1,u())};u()}))}},6577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(4024),i=r(5729),o=r(5079);t.sample=function(e){return n.operate((function(t,r){var n=!1,s=null;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,s=e}))),e.subscribe(o.createOperatorSubscriber(r,(function(){if(n){n=!1;var e=s;s=null,r.next(e)}}),i.noop))}))}},3815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=r(4617),i=r(6577),o=r(4449);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.sample(o.interval(e,t))}},7250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=r(4024),i=r(2181);t.scan=function(e,t){return n.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},2181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=r(5079);t.scanInternals=function(e,t,r,i,o){return function(s,a){var u=r,c=t,l=0;s.subscribe(n.createOperatorSubscriber(a,(function(t){var r=l++;c=u?e(c,t,r):(u=!0,t),i&&a.next(c)}),o&&function(){u&&a.next(c),a.complete()}))}}},842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=r(4024),i=r(5079);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(r,n){var o={buffer:[],complete:!1},s={buffer:[],complete:!1},a=function(e){n.next(e),n.complete()},u=function(e,r){var o=i.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?a(!1):e.buffer.push(n):!t(n,i.shift())&&a(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&a(0===n.length),null==o||o.unsubscribe()}));return o};r.subscribe(u(o,s)),e.subscribe(u(s,o))}))}},9728:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var o=r(9451),s=r(9520),a=r(1403),u=r(4024);function c(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];if(!0!==t){if(!1!==t){var s=new a.SafeSubscriber({next:function(){s.unsubscribe(),e()}});return t.apply(void 0,i([],n(r))).subscribe(s)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.Subject}:t,n=e.resetOnError,i=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,p=e.resetOnRefCountZero,d=void 0===p||p;return function(e){var t,n,s,l=0,p=!1,h=!1,y=function(){null==n||n.unsubscribe(),n=void 0},v=function(){y(),t=s=void 0,p=h=!1},m=function(){var e=t;v(),null==e||e.unsubscribe()};return u.operate((function(e,u){l++,h||p||y();var b=s=null!=s?s:r();u.add((function(){0!=--l||h||p||(n=c(m,d))})),b.subscribe(u),!t&&l>0&&(t=new a.SafeSubscriber({next:function(e){return b.next(e)},error:function(e){h=!0,y(),n=c(v,i,e),b.error(e)},complete:function(){p=!0,y(),n=c(v,f),b.complete()}}),o.innerFrom(e).subscribe(t))}))(e)}}},7768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=r(216),i=r(9728);t.shareReplay=function(e,t,r){var o,s,a,u,c=!1;return e&&"object"==typeof e?(o=e.bufferSize,u=void 0===o?1/0:o,s=e.windowTime,t=void 0===s?1/0:s,c=void 0!==(a=e.refCount)&&a,r=e.scheduler):u=null!=e?e:1/0,i.share({connector:function(){return new n.ReplaySubject(u,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},2445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=r(8032),i=r(6228),o=r(1137),s=r(4024),a=r(5079);t.single=function(e){return s.operate((function(t,r){var s,u=!1,c=!1,l=0;t.subscribe(a.createOperatorSubscriber(r,(function(n){c=!0,e&&!e(n,l++,t)||(u&&r.error(new i.SequenceError("Too many matching values")),u=!0,s=n)}),(function(){u?(r.next(s),r.complete()):r.error(c?new o.NotFoundError("No matching values"):new n.EmptyError)})))}))}},6262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=r(2763);t.skip=function(e){return n.filter((function(t,r){return e<=r}))}},7397:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=r(9144),i=r(4024),o=r(5079);t.skipLast=function(e){return e<=0?n.identity:i.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(o.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var s=o%e,a=n[s];n[s]=t,r.next(a)}}))),function(){n=null}}))}},9900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),s=r(5729);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,a=i.createOperatorSubscriber(r,(function(){null==a||a.unsubscribe(),n=!0}),s.noop);o.innerFrom(e).subscribe(a),t.subscribe(i.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))}},1620:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=r(4024),i=r(5079);t.skipWhile=function(e){return n.operate((function(t,r){var n=!1,o=0;t.subscribe(i.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,o++)))&&r.next(t)})))}))}},3424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=r(79),i=r(2619),o=r(4024);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.popScheduler(e);return o.operate((function(t,i){(r?n.concat(e,t,r):n.concat(e,t)).subscribe(i)}))}},831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=r(4024);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}},411:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(7222),i=r(9144);t.switchAll=function(){return n.switchMap(i.identity)}},7222:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(9451),i=r(4024),o=r(5079);t.switchMap=function(e,t){return i.operate((function(r,i){var s=null,a=0,u=!1,c=function(){return u&&!s&&i.complete()};r.subscribe(o.createOperatorSubscriber(i,(function(r){null==s||s.unsubscribe();var u=0,l=a++;n.innerFrom(e(r,l)).subscribe(s=o.createOperatorSubscriber(i,(function(e){return i.next(t?t(r,e,l,u++):e)}),(function(){s=null,c()})))}),(function(){u=!0,c()})))}))}},6464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=r(7222),i=r(4432);t.switchMapTo=function(e,t){return i.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},4434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=r(7222),i=r(4024);t.switchScan=function(e,t){return i.operate((function(r,i){var o=t;return n.switchMap((function(t,r){return e(o,t,r)}),(function(e,t){return o=t,t}))(r).subscribe(i),function(){o=null}}))}},7138:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=r(1727),i=r(4024),o=r(5079);t.take=function(e){return e<=0?function(){return n.EMPTY}:i.operate((function(t,r){var n=0;t.subscribe(o.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))}},4288:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(1727),o=r(4024),s=r(5079);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:o.operate((function(t,r){var i=[];t.subscribe(s.createOperatorSubscriber(r,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var o=n(i),s=o.next();!s.done;s=o.next()){var a=s.value;r.next(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){i=null})))}))}},7341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),s=r(5729);t.takeUntil=function(e){return n.operate((function(t,r){o.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){return r.complete()}),s.noop)),!r.closed&&t.subscribe(r)}))}},653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=r(4024),i=r(5079);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){var i=e(r,o++);(i||t)&&n.next(r),!i&&n.complete()})))}))}},8668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=r(4432),i=r(4024),o=r(5079),s=r(9144);t.tap=function(e,t,r){var a=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return a?i.operate((function(e,t){var r;null===(r=a.subscribe)||void 0===r||r.call(a);var n=!0;e.subscribe(o.createOperatorSubscriber(t,(function(e){var r;null===(r=a.next)||void 0===r||r.call(a,e),t.next(e)}),(function(){var e;n=!1,null===(e=a.complete)||void 0===e||e.call(a),t.complete()}),(function(e){var r;n=!1,null===(r=a.error)||void 0===r||r.call(a,e),t.error(e)}),(function(){var e,t;n&&(null===(e=a.unsubscribe)||void 0===e||e.call(a)),null===(t=a.finalize)||void 0===t||t.call(a)})))})):s.identity}},9466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.defaultThrottleConfig=void 0;var n=r(4024),i=r(5079),o=r(9451);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),n.operate((function(t,n){var s=r.leading,a=r.trailing,u=!1,c=null,l=null,f=!1,p=function(){null==l||l.unsubscribe(),l=null,a&&(y(),f&&n.complete())},d=function(){l=null,f&&n.complete()},h=function(t){return l=o.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(n,p,d))},y=function(){if(u){u=!1;var e=c;c=null,n.next(e),!f&&h(e)}};t.subscribe(i.createOperatorSubscriber(n,(function(e){u=!0,c=e,(!l||l.closed)&&(s?y():h(e))}),(function(){f=!0,(!(a&&u&&l)||l.closed)&&n.complete()})))}))}},9705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=r(4617),i=r(9466),o=r(5710);t.throttleTime=function(e,t,r){void 0===t&&(t=n.asyncScheduler),void 0===r&&(r=i.defaultThrottleConfig);var s=o.timer(e,t);return i.throttle((function(){return s}),r)}},8062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=r(8032),i=r(4024),o=r(5079);function s(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=s),i.operate((function(t,r){var n=!1;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))}},6610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=r(4617),i=r(4024),o=r(5079);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),i.operate((function(t,r){var n=e.now();t.subscribe(o.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new s(t,o))})))}))};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},6279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=r(4617),i=r(7761),o=r(4024),s=r(9451),a=r(9876),u=r(5079),c=r(5421);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=a.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 r=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,a=r.first,f=r.each,p=r.with,d=void 0===p?l:p,h=r.scheduler,y=void 0===h?null!=t?t:n.asyncScheduler:h,v=r.meta,m=void 0===v?null:v;if(null==a&&null==f)throw new TypeError("No timeout provided.");return o.operate((function(e,t){var r,n,i=null,o=0,l=function(e){n=c.executeSchedule(t,y,(function(){try{r.unsubscribe(),s.innerFrom(d({meta:m,lastValue:i,seen:o})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(u.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),o++,t.next(i=e),f>0&&l(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!o&&l(null!=a?"number"==typeof a?a:+a-y.now():f)}))}},8132:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=r(4617),i=r(7761),o=r(6279);t.timeoutWith=function(e,t,r){var s,a,u;if(r=null!=r?r:n.async,i.isValidDate(e)?s=e:"number"==typeof e&&(a=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==s&&null==a)throw new TypeError("No timeout provided.");return o.timeout({first:s,each:a,scheduler:r,with:u})}},4553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=r(1713),i=r(4338);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},2378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=r(1678),i=r(4024),o=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){n.reduce(o,[])(e).subscribe(t)}))}},4768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=r(9520),i=r(4024),o=r(5079),s=r(5729);t.window=function(e){return i.operate((function(t,r){var i=new n.Subject;r.next(i.asObservable());var a=function(e){i.error(e),r.error(e)};return t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),r.complete()}),a)),e.subscribe(o.createOperatorSubscriber(r,(function(){i.complete(),r.next(i=new n.Subject)}),s.noop,a)),function(){null==i||i.unsubscribe(),i=null}}))}},131:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(9520),o=r(4024),s=r(5079);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return o.operate((function(t,o){var a=[new i.Subject],u=0;o.next(a[0].asObservable()),t.subscribe(s.createOperatorSubscriber(o,(function(t){var s,c;try{for(var l=n(a),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){s={error:e}}finally{try{f&&!f.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}var p=u-e+1;if(p>=0&&p%r==0&&a.shift().complete(),++u%r==0){var d=new i.Subject;a.push(d),o.next(d.asObservable())}}),(function(){for(;a.length>0;)a.shift().complete();o.complete()}),(function(e){for(;a.length>0;)a.shift().error(e);o.error(e)}),(function(){a=null})))}))}},9579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=r(9520),i=r(4617),o=r(7215),s=r(4024),a=r(5079),u=r(2447),c=r(2619),l=r(5421);t.windowTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:i.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return s.operate((function(t,r){var i=[],s=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),u.arrRemove(i,e),s&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var s=new n.Subject,a={window:s,subs:t,seen:0};i.push(a),r.next(s.asObservable()),l.executeSchedule(t,d,(function(){return c(a)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):s=!0,f();var p=function(e){return i.slice().forEach(e)},v=function(e){p((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(a.createOperatorSubscriber(r,(function(e){p((function(t){t.window.next(e),y<=++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}}))}},752:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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=r(9520),o=r(7215),s=r(4024),a=r(9451),u=r(5079),c=r(5729),l=r(2447);t.windowToggle=function(e,t){return s.operate((function(r,s){var f=[],p=function(e){for(;0<f.length;)f.shift().error(e);s.error(e)};a.innerFrom(e).subscribe(u.createOperatorSubscriber(s,(function(e){var r=new i.Subject;f.push(r);var n,d=new o.Subscription;try{n=a.innerFrom(t(e))}catch(e){return void p(e)}s.next(r.asObservable()),d.add(n.subscribe(u.createOperatorSubscriber(s,(function(){l.arrRemove(f,r),r.complete(),d.unsubscribe()}),c.noop,p)))}),c.noop)),r.subscribe(u.createOperatorSubscriber(s,(function(e){var t,r,i=f.slice();try{for(var o=n(i),s=o.next();!s.done;s=o.next())s.value.next(e)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();s.complete()}),p,(function(){for(;0<f.length;)f.shift().unsubscribe()})))}))}},582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=r(9520),i=r(4024),o=r(5079),s=r(9451);t.windowWhen=function(e){return i.operate((function(t,r){var i,a,u=function(e){i.error(e),r.error(e)},c=function(){var t;null==a||a.unsubscribe(),null==i||i.complete(),i=new n.Subject,r.next(i.asObservable());try{t=s.innerFrom(e())}catch(e){return void u(e)}t.subscribe(a=o.createOperatorSubscriber(r,c,c,u))};c(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return i.next(e)}),(function(){i.complete(),r.complete()}),u,(function(){null==a||a.unsubscribe(),i=null})))}))}},4255:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var o=r(4024),s=r(5079),a=r(9451),u=r(9144),c=r(5729),l=r(2619);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e);return o.operate((function(t,o){for(var l=e.length,f=new Array(l),p=e.map((function(){return!1})),d=!1,h=function(t){a.innerFrom(e[t]).subscribe(s.createOperatorSubscriber(o,(function(e){f[t]=e,d||p[t]||(p[t]=!0,(d=p.every(u.identity))&&(p=null))}),c.noop))},y=0;y<l;y++)h(y);t.subscribe(s.createOperatorSubscriber(o,(function(e){if(d){var t=i([e],n(f));o.next(r?r.apply(void 0,i([],n(t))):t)}})))}))}},3253:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(2042),s=r(4024);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.operate((function(t,r){o.zip.apply(void 0,i([t],n(e))).subscribe(r)}))}},7220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=r(2042),i=r(7534);t.zipAll=function(e){return i.joinAllInternals(n.zip,e)}},9287:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var o=r(3253);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.zip.apply(void 0,i([],n(e)))}},3584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=r(5271);t.scheduleArray=function(e,t){return new n.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}},1659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=r(5271),i=r(5421);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(r){i.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();i.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}},8840:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=r(5271),i=r(5686),o=r(4432),s=r(5421);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return s.executeSchedule(r,t,(function(){n=e[i.iterator](),s.executeSchedule(r,t,(function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){return void r.error(e)}i?r.complete():r.next(t)}),0,!0)})),function(){return o.isFunction(null==n?void 0:n.return)&&n.return()}}))}},5704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=r(9451),i=r(3165),o=r(831);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},4644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=r(9451),i=r(3165),o=r(831);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},3035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=r(1659),i=r(9266);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},3200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=r(5704),i=r(4644),o=r(3584),s=r(8840),a=r(1659),u=r(3292),c=r(2644),l=r(8219),f=r(6380),p=r(7707),d=r(4883),h=r(9266),y=r(3035);t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return n.scheduleObservable(e,t);if(l.isArrayLike(e))return o.scheduleArray(e,t);if(c.isPromise(e))return i.schedulePromise(e,t);if(p.isAsyncIterable(e))return a.scheduleAsyncIterable(e,t);if(f.isIterable(e))return s.scheduleIterable(e,t);if(h.isReadableStreamLike(e))return y.scheduleReadableStreamLike(e,t)}throw d.createInvalidObservableTypeError(e)}},4756:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var o=function(e){function t(t,r){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(7215).Subscription);t.Action=o},5364:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var o=r(1172),s=r(6741),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=a},1834:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var o=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 r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AnimationFrameScheduler=o},3761:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var o=r(1172),s=r(6703),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.immediateProvider.clearImmediate(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AsapAction=a},1386:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var o=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 r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AsapScheduler=o},1172:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var o=r(4756),s=r(9678),a=r(2447),u=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return i(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),s.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&s.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,a.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o.Action);t.AsyncAction=u},6759:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var o=r(3980),s=function(e){function t(t,r){void 0===r&&(r=o.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(o.Scheduler);t.AsyncScheduler=s},6354:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var o=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(r(1172).AsyncAction);t.QueueAction=o},3144:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(6759).AsyncScheduler);t.QueueScheduler=o},8847:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var o=r(1172),s=r(7215),a=function(e){function t(t,r){void 0===t&&(t=u),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return i(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(r(6759).AsyncScheduler);t.VirtualTimeScheduler=a;var u=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return i(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return s.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},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}(o.AsyncAction);t.VirtualAction=u},6192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=r(5364),i=r(1834);t.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},6741:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var o=r(7215);t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,n=i.cancelAnimationFrame);var s=r((function(t){n=void 0,e(t)}));return new o.Subscription((function(){return null==n?void 0:n(s)}))},requestAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],n(e)))},cancelAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],n(e)))},delegate:void 0}},4502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=r(3761),i=r(1386);t.asapScheduler=new i.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},4617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=r(1172),i=r(6759);t.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},1713:(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,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var o=r(2534),s=o.Immediate.setImmediate,a=o.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.immediateProvider.delegate;return((null==o?void 0:o.setImmediate)||s).apply(void 0,i([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||a)(e)},delegate:void 0}},9678:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,n([e,i],r(o))):setInterval.apply(void 0,n([e,i],r(o)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}},1241:(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}},8344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=r(6354),i=r(3144);t.queueScheduler=new i.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},8972:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,n([e,i],r(o))):setTimeout.apply(void 0,n([e,i],r(o)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}},5686:(e,t)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=r,t.iterator=r()},2138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},9251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6809:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=r(9876);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},8032:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=r(9876);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},2534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var r,n=1,i={};function o(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return i[t]=!0,r||(r=Promise.resolve()),r.then((function(){return o(t)&&e()})),t},clearImmediate:function(e){o(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},1137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(9876);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},7392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=r(9876);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},6228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=r(9876);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},5463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=r(9876);t.UnsubscriptionError=n.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}}))},2619:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=r(4432),i=r(6551);function o(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(o(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(o(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof o(e)?e.pop():t}},4744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var r=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,o=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((a=t)&&"object"==typeof a&&n(a)===i){var s=o(t);return{args:s.map((function(e){return t[e]})),keys:s}}}var a;return{args:e,keys:null}}},4475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},2447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},9876:(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}},1589:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})}},4770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=r(3782),i=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,o=r.errorThrown,s=r.error;if(i=null,o)throw s}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},5421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule((function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(o),!i)return o}},9144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},8219:(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}},7707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=r(4432);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},7761:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},4432:(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,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=r(2138),i=r(4432);t.isInteropObservable=function(e){return i.isFunction(e[n.observable])}},6380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=r(5686),i=r(4432);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[n.iterator])}},1211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=r(5271),i=r(4432);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},2644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=r(4432);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},9266:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},o=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||u(e,t)}))})}function u(e,t){try{(r=o[e](t)).value instanceof i?Promise.resolve(r.value.v).then(c,l):f(s[0][2],r)}catch(e){f(s[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),s.shift(),s.length&&u(s[0][0],s[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var s=r(4432);t.readableStreamLikeToAsyncGenerator=function(e){return o(this,arguments,(function(){var t,r,o;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,i(t.read())];case 3:return r=n.sent(),o=r.value,r.done?[4,i(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,i(o)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return s.isFunction(null==e?void 0:e.getReader)}},6551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=r(4432);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},4024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=r(4432);function i(e){return n.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")}}},4666:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var o=r(4338),s=Array.isArray;t.mapOneOrManyArgs=function(e){return o.map((function(t){return function(e,t){return s(t)?e.apply(void 0,i([],n(t))):e(t)}(e,t)}))}},5729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},1574:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(r,n){return!e.call(t,r,n)}}},5966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=r(9144);function i(e){return 0===e.length?n.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},7234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=r(3782),i=r(8972);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},4883:(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.")}},9978:(e,t,r)=>{"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 n=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var i=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var o=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return o.buffer}});var s=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return s.bufferCount}});var a=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var u=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var c=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return c.bufferWhen}});var l=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return l.catchError}});var f=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var p=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return p.combineLatestAll}});var d=r(8169);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return d.combineLatest}});var h=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return h.combineLatestWith}});var y=r(4098);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return y.concat}});var v=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return v.concatAll}});var m=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return m.concatMap}});var b=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return b.concatMapTo}});var g=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return g.concatWith}});var _=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _.connect}});var w=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return w.count}});var O=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return O.debounce}});var S=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return S.debounceTime}});var E=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return E.defaultIfEmpty}});var I=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return I.delay}});var T=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return T.delayWhen}});var j=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return j.dematerialize}});var P=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return P.distinct}});var x=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return x.distinctUntilChanged}});var A=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return A.distinctUntilKeyChanged}});var N=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return N.elementAt}});var M=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return M.endWith}});var k=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return k.every}});var D=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return D.exhaust}});var R=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return R.exhaustAll}});var C=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return C.exhaustMap}});var $=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return $.expand}});var F=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return F.filter}});var q=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return q.finalize}});var L=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return L.find}});var B=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return B.findIndex}});var U=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return U.first}});var V=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return V.groupBy}});var z=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return z.ignoreElements}});var Q=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Q.isEmpty}});var Y=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Y.last}});var W=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return W.map}});var K=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return K.mapTo}});var H=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return H.materialize}});var G=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return G.max}});var J=r(6094);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return J.merge}});var Z=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Z.mergeAll}});var X=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var re=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return re.mergeScan}});var ne=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var ie=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var oe=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return oe.multicast}});var se=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return se.observeOn}});var ae=r(4764);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return ae.onErrorResumeNext}});var ue=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ue.pairwise}});var ce=r(5960);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ce.partition}});var le=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return le.pluck}});var fe=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var pe=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return pe.publishBehavior}});var de=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return de.publishLast}});var he=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return he.publishReplay}});var ye=r(2749);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ye.race}});var ve=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ve.raceWith}});var me=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return me.reduce}});var be=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return be.repeat}});var ge=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ge.repeatWhen}});var _e=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return _e.retry}});var we=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return we.retryWhen}});var Oe=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Oe.refCount}});var Se=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Se.sample}});var Ee=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Ee.sampleTime}});var Ie=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Ie.scan}});var Te=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Te.sequenceEqual}});var je=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return je.share}});var Pe=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Pe.shareReplay}});var xe=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return xe.single}});var Ae=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ae.skip}});var Ne=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Ne.skipLast}});var Me=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Me.skipUntil}});var ke=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return ke.skipWhile}});var De=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return De.startWith}});var Re=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Re.subscribeOn}});var Ce=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ce.switchAll}});var $e=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return $e.switchMap}});var Fe=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Fe.switchMapTo}});var qe=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return qe.switchScan}});var Le=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Le.take}});var Be=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Be.takeLast}});var Ue=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ue.takeUntil}});var Ve=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ve.takeWhile}});var ze=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return ze.tap}});var Qe=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Qe.throttle}});var Ye=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ye.throttleTime}});var We=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return We.throwIfEmpty}});var Ke=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Ke.timeInterval}});var He=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return He.timeout}});var Ge=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ge.timeoutWith}});var Je=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Je.timestamp}});var Ze=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ze.toArray}});var Xe=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var rt=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return rt.windowToggle}});var nt=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var it=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var ot=r(3253);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ot.zip}});var st=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return st.zipAll}});var at=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return at.zipWith}})},9380:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantMutationContext=t.AiAssistantChatContext=void 0,t.AiAssistantChatContext=class{constructor(e){this.profileId=e.profileId,this.prompt=e.prompt}},t.AiAssistantMutationContext=class{constructor(e){this.profileId=e.profileId,this.type=e.type,this.resource=e.resource,this.payload=e.payload}}},7698:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantMutateRequestSchema=t.AiAssistantChatRequestSchema=void 0,t.AiAssistantChatRequestSchema={type:"object",properties:{profileId:{type:"string"},integrationId:{type:"string"},clientId:{type:"string"},clientRequestId:{type:"string"},prompt:{type:"string"}},required:["profileId","integrationId","clientId","clientRequestId","prompt"]},t.AiAssistantMutateRequestSchema={type:"object",properties:{profileId:{type:"string"},integrationId:{type:"string"},type:{type:"string",enum:["insert","update","delete"]},resource:{type:"string",enum:["instruction","context","profile"]}},required:["profileId","integrationId","type","resource"],oneOf:[{properties:{type:{const:"insert"},resource:{const:"profile"},payload:{type:"object",properties:{modelName:{type:"string",enum:["gpt-3.5-turbo","gpt-4"]},strictContext:{type:"boolean"}},required:["modelName","strictContext"]}}},{properties:{type:{const:"insert"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"},instruction:{type:"string"}},required:["id","instruction"]}}},{properties:{type:{const:"insert"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"},title:{type:"string"},context:{type:"string"}},required:["id","title","context"]}}},{properties:{type:{const:"update"},resource:{const:"profile"},payload:{type:"object",properties:{modelName:{type:"string",enum:["gpt-3.5-turbo","gpt-4"]},strictContext:{type:"boolean"}}}}},{properties:{type:{const:"update"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"},instruction:{type:"string"}},required:["id","instruction"]}}},{properties:{type:{const:"update"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"},title:{type:"string"},context:{type:"string"}}}}},{properties:{type:{const:"delete"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"}},required:["id"]}}},{properties:{type:{const:"delete"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"}},required:["id"]}}},{properties:{type:{const:"delete"},resource:{const:"profile"},payload:{type:"object"}}}]}},6614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenAiModelData=void 0,t.OpenAiModelData={"gpt-4":{tokens:8192},"gpt-3.5-turbo":{tokens:4096}}},2943:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiCallContext=void 0,t.ApiCallContext=class{constructor(e){this.endpointId=e.endpointId,this.url=e.url,this.method=e.method,this.headers=e.headers,this.body=e.body,this.queryParams=e.queryParams,this.pathParams=e.pathParams,this.serverUrlOverride=e.serverUrlOverride}}},5218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoverOpenApiSchemaRequestSchema=t.UpdateAllowedHostsRequestSchema=t.DiscoverGraphQLConnectionSchemaRequestSchema=t.DiscoverDataConnectionSchemaRequestSchema=t.TestDataConnectionRequestSchema=t.DeleteIntegrationRequestSchema=t.UpsertIntegrationRequestSchema=t.UpdateOpenIdProviderRequestSchema=void 0;const n=r(133);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}}},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},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},s={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}}},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},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}}},u={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}}}}},c={type:"object",nullable:!1,required:["baseUrl"],properties:{baseUrl:{type:"string",nullable:!1,format:"uri"}}},l={type:"object",required:[],properties:{account:{type:"string",nullable:!1},username:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!1},warehouse:{type:"string",nullable:!1},role:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}}}};t.UpsertIntegrationRequestSchema={type:"object",required:["type","id"],properties:{id:{type:"string",nullable:!1},schema:{type:"object",nullable:!0}},oneOf:[{type:"object",required:[],properties:{type:{const:n.IntegrationType.built_in_db}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mysql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.oracledb},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:u}}}},{type:"object",required:[],properties:{type:{const:n.IntegrationType.api},configuration:{type:"object",nullable:!0,required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",nullable:!1,required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",nullable:!1}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:c}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:l}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.datadog},configuration:{type:"object",nullable:!1,required:["apiKey","appKey","datadogRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},appKey:{type:"string",nullable:!1,isSecret:{}},datadogRegion:{type:"string",nullable:!1,enum:Object.keys(n.datadogRegionMap)}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.newrelic},configuration:{type:"object",nullable:!1,required:["apiKey","newRelicRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},newRelicRegion:{type:"string",nullable:!1,enum:Object.keys(n.newRelicRegionMap)}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.auth0},configuration:{type:"object",nullable:!1,required:["clientId","domain"],properties:{clientId:{type:"string",nullable:!1},domain:{type:"string",nullable:!1}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.jwt_rsa},configuration:{type:"object",nullable:!1,required:["jwksUri"],properties:{jwksUri:{type:"string",nullable:!1},validations:{type:"object",nullable:!0,properties:{iss:{type:"string",nullable:!0},aud:{type:"string",nullable:!0}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.jwt_hmac},configuration:{type:"object",nullable:!1,required:["verifyUri"],properties:{verifyUri:{type:"string",nullable:!1}}}}},{type:"object",required:[],properties:{type:{const:n.IntegrationType.ai_assistant},configuration:{type:"object",nullable:!1,required:[],properties:{apiKey:{type:"string",nullable:!1}}}}}]},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:n.IntegrationType.mysql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.oracledb},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:u}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:l}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:c}}}}]},t.DiscoverDataConnectionSchemaRequestSchema={type:"object",required:["integrationType"],oneOf:[{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mysql},connectionOptions:i}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.oracledb},connectionOptions:o}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mssql},connectionOptions:s}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.snowflake},connectionOptions:l}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.postgres},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.cockroach},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mongo},connectionOptions:u}},{type:"object",properties:{integrationType:{const:n.IntegrationType.built_in_db}}}]},t.DiscoverGraphQLConnectionSchemaRequestSchema={type:"object",required:["integrationType"],properties:{integrationType:{const:n.IntegrationType.graphql},connectionOptions:c}},t.UpdateAllowedHostsRequestSchema={type:"object",required:["allowedHosts"],properties:{allowedHosts:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},t.DiscoverOpenApiSchemaRequestSchema={type:"object",required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",format:"uri"}}}}}},8030:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CronExpression=void 0,(r=t.CronExpression||(t.CronExpression={})).EVERY_SECOND="* * * * * *",r.EVERY_5_SECONDS="*/5 * * * * *",r.EVERY_10_SECONDS="*/10 * * * * *",r.EVERY_30_SECONDS="*/30 * * * * *",r.EVERY_MINUTE="*/1 * * * *",r.EVERY_5_MINUTES="0 */5 * * * *",r.EVERY_10_MINUTES="0 */10 * * * *",r.EVERY_30_MINUTES="0 */30 * * * *",r.EVERY_HOUR="0 0-23/1 * * *",r.EVERY_2_HOURS="0 0-23/2 * * *",r.EVERY_3_HOURS="0 0-23/3 * * *",r.EVERY_4_HOURS="0 0-23/4 * * *",r.EVERY_5_HOURS="0 0-23/5 * * *",r.EVERY_6_HOURS="0 0-23/6 * * *",r.EVERY_7_HOURS="0 0-23/7 * * *",r.EVERY_8_HOURS="0 0-23/8 * * *",r.EVERY_9_HOURS="0 0-23/9 * * *",r.EVERY_10_HOURS="0 0-23/10 * * *",r.EVERY_11_HOURS="0 0-23/11 * * *",r.EVERY_12_HOURS="0 0-23/12 * * *",r.EVERY_DAY_AT_1AM="0 01 * * *",r.EVERY_DAY_AT_2AM="0 02 * * *",r.EVERY_DAY_AT_3AM="0 03 * * *",r.EVERY_DAY_AT_4AM="0 04 * * *",r.EVERY_DAY_AT_5AM="0 05 * * *",r.EVERY_DAY_AT_6AM="0 06 * * *",r.EVERY_DAY_AT_7AM="0 07 * * *",r.EVERY_DAY_AT_8AM="0 08 * * *",r.EVERY_DAY_AT_9AM="0 09 * * *",r.EVERY_DAY_AT_10AM="0 10 * * *",r.EVERY_DAY_AT_11AM="0 11 * * *",r.EVERY_DAY_AT_NOON="0 12 * * *",r.EVERY_DAY_AT_1PM="0 13 * * *",r.EVERY_DAY_AT_2PM="0 14 * * *",r.EVERY_DAY_AT_3PM="0 15 * * *",r.EVERY_DAY_AT_4PM="0 16 * * *",r.EVERY_DAY_AT_5PM="0 17 * * *",r.EVERY_DAY_AT_6PM="0 18 * * *",r.EVERY_DAY_AT_7PM="0 19 * * *",r.EVERY_DAY_AT_8PM="0 20 * * *",r.EVERY_DAY_AT_9PM="0 21 * * *",r.EVERY_DAY_AT_10PM="0 22 * * *",r.EVERY_DAY_AT_11PM="0 23 * * *",r.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",r.EVERY_WEEK="0 0 * * 0",r.EVERY_WEEKDAY="0 0 * * 1-5",r.EVERY_WEEKEND="0 0 * * 6,0",r.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",r.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",r.EVERY_2ND_HOUR="0 */2 * * *",r.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",r.EVERY_2ND_MONTH="0 0 1 */2 *",r.EVERY_QUARTER="0 0 1 */3 *",r.EVERY_6_MONTHS="0 0 1 */6 *",r.EVERY_YEAR="0 0 1 0 *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",r.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",r.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",r.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"},9903:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7545:(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}}}},9235:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertToRunSecrets=t.transformResponse=t.transformParams=t.ExecuteFunctionSecureAnnotations=void 0;const n=r(9380),i=r(2943),o=r(7627),s=r(326),a=r(2251),u=r(5250),c=r(2574),l=r(1391),f=r(7850);t.ExecuteFunctionSecureAnnotations=["secureDistributedLock","secureQuery","secureMutation","secureNamedQuery","secureGraphQL","secureApi","secureAiAssistantChat","secureAiAssistantMutation"],t.transformParams=function(e,t){switch(t){case"webhook":case"executable":case"trigger":case"transformRead":case"transformWrite":case"metadata":return e;case"scheduler":return[];case"secureQuery":return[new c.QueryContext(e[0].query)];case"secureMutation":return[new a.MutationContext(e[0].mutation,e[0].beforeAndAfterDocs,e[0].serverTimestamp)];case"secureNamedQuery":return[new u.NamedQueryContext(e[0])];case"secureDistributedLock":return[new o.DistributedLockContext(e[0].mutex,e[0].exclusive)];case"secureGraphQL":return[new s.GraphqlContext(e[0])];case"secureApi":return[new i.ApiCallContext(e[0])];case"secureAiAssistantChat":return[new n.AiAssistantChatContext(e[0])];case"secureAiAssistantMutation":return[new n.AiAssistantMutationContext(e[0])]}},t.transformResponse=function(e,r){return t.ExecuteFunctionSecureAnnotations.includes(r)?{rulesPassed:e,docsToHash:e?{}:void 0}:e},t.convertToRunSecrets=function(e){const t={backendApiKey:(0,f.truthy)(e.apiKeys[l.BACKEND_API_KEY].value,"Cannot find backend API key"),custom:{}};for(const[r,n]of Object.entries(e.custom))t.custom[r]=n.value;return t}},1277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},720:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.omitSquidDevId=t.verifyWithSquidDevId=t.validateEnvironment=t.appIdWithEnvironmentId=t.parseAppId=t.allEnvironmentIds=void 0;const n=r(7850);function i(e){const[t,r,i,o]=e.split("_");return(0,n.assertTruthy)(!o,"Invalid appId: "+e),{appId:t,environmentId:null!=r?r:"prod",squidDeveloperId:i}}t.allEnvironmentIds=["prod","dev"],t.parseAppId=i,t.appIdWithEnvironmentId=function(e,t){return`${i(e).appId}${t&&"prod"!==t?`_${t}`:""}`},t.validateEnvironment=function(e){const t=i(e);return(0,n.assertTruthy)("prod"!==t.environmentId||!t.squidDeveloperId,"Cannot use developer ID in production"),t},t.verifyWithSquidDevId=function(e){const t=i(e);(0,n.assertTruthy)(t.squidDeveloperId,"Must provide squid developer ID")},t.omitSquidDevId=function(e){const[t,r]=e.split("_");return t+(r?`_${r}`:"")}},3085:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockContext=void 0,t.DistributedLockContext=class{constructor(e,t){this.mutex=e,this.exclusive=t}}},4385:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasDocumentDiff=t.getSquidDocId=t.parseSquidDocId=void 0;const n=r(9312).__importDefault(r(2091)),i=r(1636),o=r(4684);function s(e){return(0,o.deserializeObj)(e)}t.parseSquidDocId=s,t.getSquidDocId=function(...e){const[t,r,n]=e,i="object"==typeof t?t:{docId:t,collectionName:r,integrationId:n};return i.integrationId||(i.integrationId=void 0),(0,o.normalizeJsonAsString)(i)},t.hasDocumentDiff=function(e,t){const r=(0,n.default)(e,t)||[],a=["__docId__","__ts__"],u=r.find((e=>{var t;return"__docId__"===(null===(t=e.path)||void 0===t?void 0:t[0])}));if(u){if("E"!==u.kind||!u.rhs)throw new Error(`Unexpected diff for __docId__: ${(0,o.normalizeJsonAsString)(u)}`);const e=s(u.rhs+"");a.push(...Object.keys(e))}return!!(null==r?void 0:r.find(((e,t)=>{var r;if(a.includes(null===(r=e.path)||void 0===r?void 0:r[0]))return!1;switch(e.kind){case"N":return(0,i.isNotNullish)(e.rhs);case"E":case"D":case"A":return!0}return!1})))}},326:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphqlContext=void 0,t.GraphqlContext=class{constructor(e){this.isGraphiQL=e.isGraphiQL,this.query=e.query,this.operationName=e.operationName,this.variables=e.variables}}},9231:(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:[]}}},7008:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpStatus=void 0,(r=t.HttpStatus||(t.HttpStatus={}))[r.CONTINUE=100]="CONTINUE",r[r.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",r[r.PROCESSING=102]="PROCESSING",r[r.EARLYHINTS=103]="EARLYHINTS",r[r.OK=200]="OK",r[r.CREATED=201]="CREATED",r[r.ACCEPTED=202]="ACCEPTED",r[r.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",r[r.NO_CONTENT=204]="NO_CONTENT",r[r.RESET_CONTENT=205]="RESET_CONTENT",r[r.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",r[r.AMBIGUOUS=300]="AMBIGUOUS",r[r.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",r[r.FOUND=302]="FOUND",r[r.SEE_OTHER=303]="SEE_OTHER",r[r.NOT_MODIFIED=304]="NOT_MODIFIED",r[r.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",r[r.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.UNAUTHORIZED=401]="UNAUTHORIZED",r[r.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",r[r.FORBIDDEN=403]="FORBIDDEN",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",r[r.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",r[r.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",r[r.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",r[r.CONFLICT=409]="CONFLICT",r[r.GONE=410]="GONE",r[r.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",r[r.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",r[r.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",r[r.URI_TOO_LONG=414]="URI_TOO_LONG",r[r.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",r[r.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",r[r.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",r[r.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",r[r.MISDIRECTED=421]="MISDIRECTED",r[r.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",r[r.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",r[r.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",r[r.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r[r.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",r[r.BAD_GATEWAY=502]="BAD_GATEWAY",r[r.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",r[r.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",r[r.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED"},575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(7698),t),n.__exportStar(r(6614),t),n.__exportStar(r(2943),t),n.__exportStar(r(5218),t),n.__exportStar(r(4125),t),n.__exportStar(r(8030),t),n.__exportStar(r(9903),t),n.__exportStar(r(7545),t),n.__exportStar(r(9235),t),n.__exportStar(r(6421),t),n.__exportStar(r(1277),t),n.__exportStar(r(3889),t),n.__exportStar(r(720),t),n.__exportStar(r(3085),t),n.__exportStar(r(7627),t),n.__exportStar(r(4385),t),n.__exportStar(r(326),t),n.__exportStar(r(9231),t),n.__exportStar(r(7008),t),n.__exportStar(r(133),t),n.__exportStar(r(6778),t),n.__exportStar(r(3858),t),n.__exportStar(r(2251),t),n.__exportStar(r(5263),t),n.__exportStar(r(2792),t),n.__exportStar(r(5250),t),n.__exportStar(r(7581),t),n.__exportStar(r(1012),t),n.__exportStar(r(2574),t),n.__exportStar(r(2972),t),n.__exportStar(r(791),t),n.__exportStar(r(1906),t),n.__exportStar(r(6504),t),n.__exportStar(r(5098),t),n.__exportStar(r(1391),t),n.__exportStar(r(3851),t),n.__exportStar(r(5791),t),n.__exportStar(r(7104),t),n.__exportStar(r(9132),t),n.__exportStar(r(7682),t),n.__exportStar(r(3185),t),n.__exportStar(r(4825),t),n.__exportStar(r(7850),t),n.__exportStar(r(8255),t),n.__exportStar(r(7142),t),n.__exportStar(r(6485),t),n.__exportStar(r(3589),t),n.__exportStar(r(1636),t),n.__exportStar(r(8038),t),n.__exportStar(r(4684),t),n.__exportStar(r(8932),t),n.__exportStar(r(2608),t),n.__exportStar(r(8315),t),n.__exportStar(r(3811),t)},3583:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},677:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4001:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAuthIntegration=t.isAuthIntegrationType=t.isDataIntegration=t.isDataIntegrationType=t.AuthIntegrationTypes=t.ObservabilityIntegrationTypes=t.ApiIntegrationTypes=t.DatabaseIntegrationTypes=t.IntegrationType=t.IntegrationCategory=void 0;const n=r(9312);var i,o;function s(e){return t.DatabaseIntegrationTypes.includes(e)}function a(e){return t.AuthIntegrationTypes.includes(e)}n.__exportStar(r(3583),t),n.__exportStar(r(677),t),n.__exportStar(r(2605),t),n.__exportStar(r(4001),t),n.__exportStar(r(6855),t),(o=t.IntegrationCategory||(t.IntegrationCategory={})).database="database",o.api="api",o.observability="observability",o.crm="crm",o.auth="auth",o.ai="ai",function(e){e.built_in_db="built_in_db",e.mongo="mongo",e.mysql="mysql",e.mssql="mssql",e.postgres="postgres",e.cockroach="cockroach",e.api="api",e.graphql="graphql",e.snowflake="snowflake",e.datadog="datadog",e.newrelic="newrelic",e.auth0="auth0",e.jwt_rsa="jwt_rsa",e.jwt_hmac="jwt_hmac",e.ai_assistant="ai_assistant",e.algolia="algolia",e.elastic_observability="elastic_observability",e.elastic_search="elastic_search",e.elastic_enterprise_search="elastic_enterprise_search",e.sentry="sentry",e.sap_hana="sap_hana",e.salesforce_crm="salesforce_crm",e.documentdb="documentdb",e.dynamodb="dynamodb",e.cassandra="cassandra",e.clickhouse="clickhouse",e.alloydb="alloydb",e.spanner="spanner",e.db2="db2",e.mariadb="mariadb",e.oracledb="oracledb",e.redis="redis",e.xata="xata",e.azure_sql="azure_sql"}(i=t.IntegrationType||(t.IntegrationType={})),t.DatabaseIntegrationTypes=[i.built_in_db,i.mongo,i.mysql,i.mssql,i.postgres,i.cockroach,i.snowflake,i.oracledb],t.ApiIntegrationTypes=[i.api,i.graphql],t.ObservabilityIntegrationTypes=[i.datadog,i.newrelic],t.AuthIntegrationTypes=[i.auth0,i.jwt_rsa,i.jwt_hmac],t.isDataIntegrationType=s,t.isDataIntegration=function(e){return s(e.type)},t.isAuthIntegrationType=a,t.isAuthIntegration=function(e){return a(e.type)}},6855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.newRelicRegionMap=t.datadogRegionMap=void 0,t.datadogRegionMap={us1:"US1 - East",us3:"US3 - West",us5:"US5 - Central",eu1:"EU1 - Europe","us1-fed":"US1-FED (FedRamp)"},t.newRelicRegionMap={worldwide:"Worldwide",eu:"Europe"}},6778:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(r=t.LogLevel||(t.LogLevel={})).TRACE="trace",r.DEBUG="debug",r.INFO="info",r.WARN="warn",r.ERROR="error"},3858:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregationPeriodMap=void 0,t.aggregationPeriodMap={"1m":1,"5m":5,"15m":15,"1h":60,"1d":1440,"1w":10080}},2251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationContext=void 0;const n=r(9312).__importStar(r(8784));t.MutationContext=class{constructor(e,t,r){this.mutation=e,this.beforeAndAfterDocs=t,this.serverTimeStamp=r}getMutationType(){return this.mutation.type}affectsPath(e){const t=this.beforeAndAfterDocs.before?n.get(this.beforeAndAfterDocs.before,e):void 0,r=this.beforeAndAfterDocs.after?n.get(this.beforeAndAfterDocs.after,e):void 0;return!n.isEqual(t,r)}}},5263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationRequestSchema=void 0;const r={type:"string"},n={type:"object",required:["docId","integrationId","collectionName"],properties:{docId:r,integrationId:r,collectionName:r}},i={oneOf:[{type:"object",required:["type","properties","squidDocIdObj"],properties:{type:{type:"string",const:"insert"},properties:{type:"object"},squidDocIdObj:n}},{type:"object",required:["type","squidDocIdObj"],properties:{type:{type:"string",const:"delete"},squidDocIdObj:n}},{type:"object",required:[],properties:{type:{type:"string",const:"update"},squidDocIdObj:n,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:r}},{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:r,integrationId:r,mutations:{type:"array",items:i}}}},2792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduceMutations=t.convertInsertToUpdate=t.applyUpdateMutation=t.mergeMutations=t.sortUpdateMutationProperties=void 0;const n=r(9312).__importStar(r(8784)),i=r(2937),o=r(7850),s=r(8038);function a(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?n.cloneDeep(t.value):t.value;case"removeProperty":return;default:throw new Error("Unknown property mutation type: "+JSON.stringify(t))}}function u(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,o.assertTruthy)("update"===t.type,"Invalid mutation type"),"update"===e.type)return function(e,t){const r=n.cloneDeep(e);t=n.cloneDeep(t);for(const[e]of u(r)){const n=e.split(".").length;Object.entries(t.properties).some((([t])=>e.startsWith(t+".")&&n>t.split(".").length))&&delete r.properties[e]}for(const[e,n]of u(t))r.properties[e]=[...r.properties[e]||[],...n];return r}(e,t);const r=n.cloneDeep(e);for(const[e,n]of u(t)){const t=n;for(const n of t){const t=a((0,s.getInPath)(r.properties,e),n);void 0===t?(0,s.deleteInPath)(r.properties,e):(0,s.setInPath)(r.properties,e,t)}}return r}t.sortUpdateMutationProperties=u,t.mergeMutations=c,t.applyUpdateMutation=function(e,t){if(!e)return;const r=Object.assign({},e),n=u(t);for(const[e,t]of n){const n=t;for(const t of n){const n=a((0,s.getInPath)(r,e),t);void 0===n?(0,s.deleteInPath)(r,e):(0,s.setInPath)(r,e,n)}}return r},t.convertInsertToUpdate=function(e){const t={type:"update",squidDocIdObj:e.squidDocIdObj,properties:{}};for(const[r,n]of Object.entries(e.properties))t.properties[r]=[{type:"update",value:n}];return t},t.reduceMutations=function(e){let t=[];return(0,i.from)(e).pipe((0,i.groupBy)((e=>`${e.squidDocIdObj.integrationId}${e.squidDocIdObj.collectionName}/${e.squidDocIdObj.docId}`)),(0,i.mergeMap)((e=>e.pipe((0,i.reduce)(((e,t)=>c(e,t)))))),(0,i.toArray)()).subscribe((e=>{t=e})),t}},5250:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryContext=void 0,t.NamedQueryContext=class{constructor(e){this.params=e}}},7581:(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}}}},1012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2972:(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:["==",">=","<=",">","<","!=","like","not like","like_cs","not like_cs"]},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:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuerySubscriptionId=t.getQuerySubscriptionId=t.compareOperator=t.findQueriesForDocumentSync=t.SimpleQueryMappingManager=t.QueryMappingManager=void 0;const n=r(1636),i=r(8038),o=r(4684);class s{}function a(e,t){var r;const s=[...e.unconditional||[]],a=new Set,c=new Map;for(const[s,l]of Object.entries(e.conditional||{})){const e=(0,o.decodeValueForMapping)(s);for(const[s,f]of Object.entries(l)){const l=[],p=null!==(r=(0,i.getInPath)(t,e))&&void 0!==r?r:null,d=(0,o.encodeValueForMapping)(p);switch(s){case"==":l.push(...f[d]||[]);break;case"!=":{(f[d]||[]).forEach((e=>a.add(e)));const e=Object.entries(f).filter((([e])=>e!==d));for(const[t,r]of e)l.push(...r);break}case"<":case"<=":case">":case">=":case"like":case"not like":case"like_cs":case"not like_cs":(0,n.isNotNullish)(p)&&l.push(...Object.entries(f).filter((([e])=>u((0,o.decodeValueForMapping)(e),p,s))).reduce(((e,[t,r])=>(e.push(...r),e)),[]));break;default:throw new Error("Unsupported operator: "+s)}for(const e of l)c.set(e,(c.get(e)||0)+1)}}for(const[t,r]of c.entries())a.has(t)||r>=e.queriesMetadata[t].condCount&&s.push(t);return s}function u(e,t,r){if(null===e||null===t)return!1;switch(r){case"<":return t<e;case"<=":return t<=e;case">":return t>e;case">=":return t>=e;case"like":return"string"==typeof t&&"string"==typeof e&&c(t,e,!1);case"not like":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!1));case"like_cs":return"string"==typeof t&&"string"==typeof e&&c(t,e,!0);case"not like_cs":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!0));default:throw new Error(`Unsupported operator comparison: ${r}`)}}function c(e,t,r){r||(e=e.toLowerCase(),t=t.toLowerCase());const n=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/%/g,".*");return new RegExp(`^${n}$`).test(e)}t.QueryMappingManager=s,t.SimpleQueryMappingManager=class extends s{async findQueriesForDocument(e,t,r,n){const i=await this.getMapping(e,r,n);return i?a(i,t):[]}},t.findQueriesForDocumentSync=a,t.compareOperator=u,t.getQuerySubscriptionId=function(e,t){return`${e}_${t}`},t.parseQuerySubscriptionId=function(e){const t=e.split("_");return{clientId:t[0],clientRequestId:t[1]}}},2574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(8556),t),n.__exportStar(r(1515),t)},8556:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryContext=void 0;const n=r(8784),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){this.query=e,this.query=e,this.parsedConditions=this.parseConditions(this.query.conditions)}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}sortedBy(e){return!e.find(((e,t)=>{var r;return!(0,n.isEqual)(this.query.sortOrder[t],Object.assign(Object.assign({},e),{asc:null===(r=e.asc)||void 0===r||r}))}))}sortedByExact(e){return e.length===this.query.sortOrder.length&&this.sortedBy(e)}includes(e,t,r){return this.includesCondition({fieldName:e,operator:t,value:r})}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),r=this.sortedByExact(e.sortOrder),n=this.limit===e.limit;return t&&r&&n}isSubsetOf(e,t,r){return this.isSubsetOfCondition({fieldName:e,operator:t,value:r})}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),r=this.sortedBy(e.sortOrder),n=-1===e.limit||this.limit>-1&&this.limit<e.limit;return t&&r&&n}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:r,value:n}=e,{operator:o,value:s}=this.parseConditions([t])[0],a=i[`${r}:${o}`];return!!a&&a(n,s)}evaluateIncludes(e,t){const{operator:r,value:i}=e,{operator:o,value:s}=this.parseConditions([t])[0],a=Array.isArray(i)?i.sort():i,u=Array.isArray(s)?s.sort():s;return o===r&&(0,n.isEqual)(u,a)}parseConditions(e){const t=[],r=new Map,n=new Map;return e.forEach((e=>{switch(e.operator){case"==":case"in":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat(e.value));break;case"!=":case"not in":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat(e.value));break;default:t.push(e)}})),r.forEach(((e,r)=>{t.push({fieldName:r,operator:"in",value:e})})),n.forEach(((e,r)=>{t.push({fieldName:r,operator:"not in",value:e})})),t}}},1515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleQueryBuilder=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850),o=r(8315);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,r){if("in"===t||"not in"===t){const n=r instanceof Array?[...r]:[r];for(const r of n)this.query.conditions.push({fieldName:e,operator:"in"===t?"==":"!=",value:r});return this}return this.query.conditions.push({fieldName:e,operator:t,value:r}),this}eq(e,t){return this.where(e,"==",t)}neq(e,t){return this.where(e,"!=",t)}in(e,t){return this.where(e,"in",t)}nin(e,t){return this.where(e,"not in",t)}gt(e,t){return this.where(e,">",t)}gte(e,t){return this.where(e,">=",t)}lt(e,t){return this.where(e,"<",t)}lte(e,t){return this.where(e,"<=",t)}like(e,t,r=!0){return this.where(e,r?"like_cs":"like",t)}notLike(e,t,r=!0){return this.where(e,r?"not like_cs":"not like",t)}limit(e){return(0,o.validateQueryLimit)(e),(0,i.assertTruthy)(-1===this.query.limit,"The limit was already set."),this.query.limit=e,this}sortBy(e,t=!0){const r={asc:t,fieldName:e};return(0,o.validateFieldSort)(r),(0,i.assertTruthy)(!this.query.sortOrder.some((t=>t.fieldName===e)),`${e} already in the sort list.`),this.query.sortOrder.push(r),this}build(){const e=this.mergeConditions();return Object.assign(Object.assign({},this.query),{conditions:e})}mergeConditions(){const e=[],t=n.groupBy(this.query.conditions||[],(e=>e.fieldName));for(const r of Object.values(t)){const t=n.groupBy(r,(e=>e.operator));for(const[r,i]of Object.entries(t)){if("=="===r||"!="===r){e.push(...i);continue}const t=n.sortBy(i,(e=>e.value));">"===r||">="===r?e.push(t[t.length-1]):e.push(t[0])}}return e}}},1906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertFromSquidRegion=t.convertToSquidRegion=t.getSquidSupportedCloudMap=t.squidSupportedRegionMap=t.SupportedSquidRegions=void 0;const n=r(1636);t.SupportedSquidRegions=["us-east-1.aws"],t.squidSupportedRegionMap={"us-east-1.aws":{id:"us-east-1",name:"US East (N. Virginia)"},"us-east-1.aws-dev":{id:"us-east-1",name:"US East (N. Virginia - Dev)"}},t.getSquidSupportedCloudMap=function(){return{aws:{id:"aws",name:"Amazon Web Services",icon:"aws_icon",regions:[t.squidSupportedRegionMap["us-east-1.aws"]].filter(n.isNotNullish)},gcp:{id:"gcp",name:"Google Cloud Platform",icon:"gcp_icon",tooltip:"Google Cloud (GCP) support is coming soon!",regions:[]},azure:{id:"azure",name:"Microsoft Azure",icon:"azure_icon",tooltip:"Microsoft Azure support is coming soon!",regions:[]}}},t.convertToSquidRegion=function(e,t){return`${t}.${e}`},t.convertFromSquidRegion=function(e){const t=e.split(".");return{cloudId:t[1],region:t[0]}}},6504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findMatchingPropertiesForKey=t.validateSchema=t.compileSchema=t.SUPPORTED_FIELD_TYPES_ARRAY=void 0;const n=r(9312),i=n.__importDefault(r(6236)),o=n.__importDefault(r(8414)),s=n.__importDefault(r(2091)),a=r(7008),u=r(7850),c=r(8315),l=new i.default({allErrors:!0,allowUnionTypes:!1,useDefaults:!1});function f(e){return l.compile(e)}function p(e,t){const r={exactMatch:[],parentsMatch:[]};if(!e.length)return r.exactMatch.push(t),r;r.parentsMatch.push(t);const n=[...e];for(;n.length;){const e=d(t,(0,u.notNullish)(n.shift()));for(const t of e){const e=p(n,t);r.parentsMatch.push(...e.parentsMatch),r.exactMatch.push(...e.exactMatch)}}return r}function d(e,t){var r,n;const i=(null===(r=e.properties)||void 0===r?void 0:r[t])?[null===(n=e.properties)||void 0===n?void 0:n[t]]:[];return e.patternProperties&&i.push(...Object.entries(e.patternProperties).filter((([e])=>new RegExp(e).test(t))).map((([e,t])=>t))),i}(0,o.default)(l),l.addKeyword({keyword:"isDate",type:"object",validate:(e,t)=>e===t instanceof Date}),l.addKeyword({keyword:"isJSON",type:"object",validate:(e,t)=>{try{const e=JSON.stringify(t);return JSON.parse(e),!0}catch(e){return!1}}}),l.addKeyword({keyword:"isComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"isDefaultComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"primaryKey",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"insertable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"deletable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"applyDefaultValueOn",validate:(e,t)=>!e||["always","empty","updateOrEmpty"].includes(e)}),l.addKeyword({keyword:"dataType",validate:(e,t)=>!0}),t.SUPPORTED_FIELD_TYPES_ARRAY=["string","integer","number","date","boolean","map","array","any"],t.compileSchema=f,t.validateSchema=function(e,t,r=[],n={}){const i=f(e),o=i(t);if(!r.length&&!o)throw new c.ValidationError("The data does not conform with the collection schema.",a.HttpStatus.BAD_REQUEST,{errors:i.errors});if(!o&&r.length)for(const e of(0,u.truthy)(i.errors)){let t=e.instancePath;if(e.params.missingProperty&&(t=`${t}/${e.params.missingProperty}`),t=t.slice(1).replace(/\//g,".")+".",r.some((e=>t.startsWith(e+"."))))throw new c.ValidationError(`${t} does not conform with the collection schema.`,a.HttpStatus.BAD_REQUEST)}!function(e,t,r){if(r&&t.readOnly||!1===t.insertable&&!r)throw new c.ValidationError("The schema does not allow this action",a.HttpStatus.BAD_REQUEST);for(const n of e){const e=(0,u.truthy)(n.path).join("."),i=p((0,u.truthy)(n.path),t);for(const t of i.exactMatch){if(t.readOnly&&"E"===n.kind)throw new c.ValidationError(`${e} is readonly`,a.HttpStatus.BAD_REQUEST);if(r&&!1===t.deletable&&"D"===n.kind)throw new c.ValidationError(`${e} is not deletable`,a.HttpStatus.BAD_REQUEST);if(!1===t.insertable&&"N"===n.kind)throw new c.ValidationError(`${e} is not insertable`,a.HttpStatus.BAD_REQUEST)}for(const t of i.parentsMatch)if(r&&t.readOnly)throw new c.ValidationError(`${e} is readonly`,a.HttpStatus.BAD_REQUEST)}}((0,u.truthy)((0,s.default)(n,t)),e,!!r.length)},t.findMatchingPropertiesForKey=d},5098:(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:{}}}}},1391:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.APP_API_KEY=t.BACKEND_API_KEY=void 0,t.BACKEND_API_KEY="_BACKEND_API_KEY",t.APP_API_KEY="APP_API_KEY"},3851:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5791:(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"}}},{properties:{type:{const:"acquireLock"},payload:{type:"object",required:["mutex","exclusive","clientRequestId"],properties:{mutex:{type:"string"},exclusive:{type:"boolean"},clientRequestId:{type:"string"}}}}},{properties:{type:{const:"releaseLock"},payload:{type:"object",required:["lockId","clientRequestId"],properties:{lockId:{type:"string"},clientRequestId:{type:"string"}}}}}]}},7104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9132:(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},7682:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4825:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayMergeCustomizer=t.asyncGroupBy=t.removeSorted=t.insertSorted=t.binarySearch=void 0;const n=r(8784);function i(e,t,r=((e,t)=>e>t?1:e<t?-1:0),n=0,o=e.length-1){if(o<n)return-1;const s=Math.trunc((n+o)/2);return 0===r(t,e[s])?s:r(t,e[s])>0?i(e,t,r,s+1,o):i(e,t,r,n,s-1)}t.binarySearch=i,t.insertSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){let n;for(n=e.length-1;n>=0&&r(e[n],t)>0;n--)e[n+1]=e[n];e[n+1]=t},t.removeSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){const n=i(e,t,r);n>-1&&e.splice(n,1)},t.asyncGroupBy=async function(e,t){const r={};for(const n of e){const e=await t(n);r[e]||(r[e]=[]),r[e].push(n)}return r},t.arrayMergeCustomizer=(e,t)=>(0,n.isArray)(e)?e.concat(t):void 0},7850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTruthy=t.notNullish=t.truthy=t.assertValidateTruthy=t.assertNotNullish=t.assertTruthy=void 0;const n=r(7008),i=r(1636),o=r(8315);function s(e,t){if(e)return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function a(e,t){if((0,i.isNotNullish)(e))return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function u(e,t){return s(e,t),e}t.assertTruthy=s,t.assertNotNullish=a,t.assertValidateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){s(e,(()=>new o.ValidationError(t,r,i)))},t.truthy=u,t.notNullish=function(e,t){return a(e,t),e},t.validateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){return u(e,(()=>new o.ValidationError(t,r,i)))}},8255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeExecutionError=void 0;class r extends Error{constructor(e,t){super(e),this.details=t}}t.CodeExecutionError=r},7142:(e,t)=>{"use strict";function r(e){return/^local/.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicationHttpHeaders=t.getApplicationUrl=void 0,t.getApplicationUrl=function(e,t){const n=new URL("https://squid.cloud");n.host=`${t}.${e}.${n.host}`,r(e)&&(n.protocol="http",n.port="8000",function(e){return/android$/.test(e)}(e)?n.host="10.0.2.2":function(e){return/ios$/.test(e)}(e)&&(n.host="localhost"));const i=n.toString();return i.endsWith("/")?i:i+"/"},t.getApplicationHttpHeaders=function(e,t){const n={};return r(e)&&(n["x-squid-appid"]=t),n}},6485:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateShortId=t.generateId=void 0,t.generateId=function(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))},t.generateShortId=function(e=18){let t="";for(let r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(36*Math.random()));return t}},3589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LockManager=void 0;const n=r(2937),i=r(7850);t.LockManager=class{constructor(){this.locks={}}async lock(...e){if(this.canGetLock(...e))return void this.lockSync(...e);const t=Object.entries(this.locks).filter((([t])=>e.includes(t))).map((([e,t])=>t));await(0,n.lastValueFrom)((0,n.combineLatest)(t).pipe((0,n.filter)((e=>!e.includes(!0))),(0,n.take)(1))),await this.lock(...e)}release(...e){for(const t of e){const e=(0,i.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,i.assertTruthy)(this.canGetLock(...e),"Cannot acquire lock sync");for(const t of e)this.locks[t]=new n.BehaviorSubject(!0)}}},1636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNotNullish=void 0,t.isNotNullish=function(e){return null!=e}},8038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceKeyInRecord=t.replaceKeyInMap=t.deepReplace=t.deleteInPath=t.setInPath=t.getInPath=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850);function o(e){return"object"==typeof e&&Reflect.getPrototypeOf(e)===Object.prototype}t.getInPath=function(e,t,r="."){const n=t.split(r);let o,s=e;for(;s&&n.length;){const e=(0,i.truthy)(n.shift());if(!(s instanceof Object&&e in s))return;o=s[e],s=o}return o},t.setInPath=function(e,t,r,s="."){var a;const u=t.split(s);let c=e;for(;u.length;){const e=(0,i.truthy)(u.shift());if(u.length){const t=o(c[e])&&null!==(a=n.clone(c[e]))&&void 0!==a?a:{};c[e]=t,c=t}else c[e]=r}},t.deleteInPath=function(e,t,r="."){var s;const a=t.split(r);let u=e;for(;a.length;){const e=(0,i.truthy)(a.shift());if(a.length){const t=o(u[e])&&null!==(s=n.clone(u[e]))&&void 0!==s?s:{};u[e]=t,u=t}else delete u[e]}},t.deepReplace=function e(t,r,n){for(const i in t)i===r?t[i]=n(t[i]):Array.isArray(t[i])?t[i].forEach((t=>e(t,r,n))):"object"==typeof t[i]&&e(t[i],r,n)},t.replaceKeyInMap=function(e,t,r){if(e.has(t)){const n=e.get(t);e.delete(t),e.set(r,n)}},t.replaceKeyInRecord=function(e,t,r){const n=e[t];void 0!==n&&(e[r]=n,delete e[t])}},4684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recodeValue=t.decodeValueForMapping=t.encodeValueForMapping=t.deserializeObj=t.serializeObj=t.normalizeJsonAsString=void 0;const n=r(5382);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),r={};return t.sort().forEach((t=>{r[t]=i(e[t])})),r}function o(e){try{return n.EJSON.stringify(e)}catch(e){throw console.error("Unable to serialize object",e,"\n\nSTACK:",(new Error).stack),e}}function s(e){return n.EJSON.parse(e)}function a(e){if(void 0===e)throw new Error("INVALID_ENCODE_VALUE");return btoa(o(e))}function u(e){return s(atob(e))}t.normalizeJsonAsString=function(e){return o(i(e))},t.serializeObj=o,t.deserializeObj=s,t.encodeValueForMapping=a,t.decodeValueForMapping=u,t.recodeValue=function(e){return u(a(e))}},8932:(e,t)=>{"use strict";function r(e){return`${(e.getUTCHours()+"").padStart(2,"0")}:${(e.getUTCMinutes()+"").padStart(2,"0")}:${(e.getUTCSeconds()+"").padStart(2,"0")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.dateToTimeString=t.msPastMidnightToTimeString=t.kafkaConnectStringToInterval=t.base64ToBinary=t.base64ToString=t.isoStringToDate=t.msToDate=t.daysPastEpochToDate=t.moneyStringToNumber=t.JSONToString=t.stringToJSON=t.stringToBuffer=t.bufferToString=t.numberToString=t.stringToNumber=t.intToBoolean=t.booleanToInt=t.unchanged=void 0,t.unchanged=function(e){return e},t.booleanToInt=function(e){return e?1:0},t.intToBoolean=function(e){return!!e},t.stringToNumber=function(e){return Number(e)},t.numberToString=function(e){return e+""},t.bufferToString=function(e){return e.toString()},t.stringToBuffer=function(e){return Buffer.from(e)},t.stringToJSON=function(e){return JSON.parse(e)},t.JSONToString=function(e){return JSON.stringify(e)},t.moneyStringToNumber=function(e){return Number(e.replace(/[^0-9\.]+/g,""))},t.daysPastEpochToDate=function(e){return new Date(864e5*e)},t.msToDate=function(e){return new Date(e)},t.isoStringToDate=function(e){return new Date(e)},t.base64ToString=function(e){return atob(e)},t.base64ToBinary=function(e){const t=atob(e);let r="";for(let e=0;e<t.length;e++)r+=t[e].charCodeAt(0).toString(2);return r},t.kafkaConnectStringToInterval=function(e){const t=e.match(/^P(\d+Y)?(\d+M)?(\d+D)?T?(\d+H)?(\d+M)?(\d+S)?$/);if(!t)throw new Error(`Interval string is not properly formatted: ${e}`);return{years:parseInt(t[1])||0,months:parseInt(t[2])||0,days:parseInt(t[3])||0,hours:parseInt(t[4])||0,minutes:parseInt(t[5])||0,seconds:parseInt(t[6])||0}},t.msPastMidnightToTimeString=function(e){return r(new Date(e))},t.dateToTimeString=r},2608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendQueryParams=void 0,t.appendQueryParams=function(e,t){const r=new URL(e),n=new URLSearchParams(r.search);for(const e in t)t.hasOwnProperty(e)&&n.set(e,t[e]);return r.search=n.toString(),r.toString()}},8315:(e,t,r)=>{"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 n=r(7850);class i extends Error{constructor(e,t,r){super(e),this.statusCode=t,this.details=r}}function o(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 s(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 a(e){(0,n.assertTruthy)(["auth0"].includes(e),"INVALID_OPEN_ID_PROVIDER_TYPE")}function u(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");o(e)}(e.squidDocIdObj.collectionName),o(e.squidDocIdObj.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))s(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,r]of t){s(e);for(const e of r)u(e)}}(e)}}function l(e,t){return Array.isArray(e)?e.every((e=>typeof e===t)):typeof e===t}function f(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,n.assertTruthy)(f(e,["fieldName","asc"]),"Field sort should only contain a fieldName and asc"),(0,n.assertTruthy)(l(e.asc,"boolean"),"Asc needs to be boolean"),s(e.fieldName)},t.validateOpenIdProvider=function(e){return(0,n.assertTruthy)(e,"INVALID_PROVIDER"),a(e.providerType),(0,n.assertTruthy)(e.providerType,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.clientId,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.domain,"INVALID_DOMAIN"),e},t.validateOpenIdProviderType=a,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,n.assertTruthy)(l(e,"number"),"Limit needs to be a number"),-1!==e&&((0,n.assertTruthy)(e>0,"query limit has to be greater than 0"),(0,n.assertTruthy)(Math.floor(e)===e,"query limit has to be an integer"),(0,n.assertTruthy)(e<=2e4,"Limit can be maximum 20000"))},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=l,t.hasOnlyKeys=f},3811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWebhookResponse=void 0,t.isWebhookResponse=function(e){return e&&e.__isWebhookResponse__}},6808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantClient=void 0;const n=r(575),i=r(2937),o=r(9978);t.AiAssistantClient=class{constructor(e,t,r,n){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.integrationId=n,this.ongoingChatRequests={},this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"aiAssistant"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleChatResponse(e)}))}profile(e){return new s(this,this.integrationId,e)}async mutate(e){await this.rpcManager.post("ai/assistant/mutate",e)}chat(e,t){const r=(0,n.generateId)(),o=new i.BehaviorSubject("");this.ongoingChatRequests[r]=o;const s={profileId:e,prompt:t,clientId:this.clientIdService.getClientId(),integrationId:this.integrationId,clientRequestId:r};return this.rpcManager.post("ai/assistant/chat",s).catch((e=>{o.error(e),o.complete()})),o.pipe((0,i.finalize)((()=>{delete this.ongoingChatRequests[r]})),(0,i.share)())}handleChatResponse(e){const t=this.ongoingChatRequests[e.clientRequestId];t&&(e.payload.complete?t.complete():t.next(t.value+e.payload.token))}};class s{constructor(e,t,r){this.client=e,this.integrationId=t,this.profileId=r}chat(e){return this.client.chat(this.profileId,e)}context(e){return new a(this.client,this.integrationId,this.profileId,e)}instruction(e){return new u(this.client,this.integrationId,this.profileId,e)}insert(e){const{modelName:t,strictContext:r}=e,n={type:"insert",resource:"profile",profileId:this.profileId,payload:{modelName:t,strictContext:r},integrationId:this.integrationId};return this.client.mutate(n)}update(e){const{modelName:t,strictContext:r}=e,n={type:"update",resource:"profile",profileId:this.profileId,payload:{modelName:t,strictContext:r},integrationId:this.integrationId};return this.client.mutate(n)}delete(){const e={type:"delete",resource:"profile",profileId:this.profileId,integrationId:this.integrationId,payload:{}};return this.client.mutate(e)}}class a{constructor(e,t,r,i){this.client=e,this.integrationId=t,this.profileId=r,this.id=i||(0,n.generateId)()}insert(e){const{title:t,context:r}=e,n={type:"insert",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,title:t,context:r}};return this.client.mutate(n)}update(e){const{title:t,context:r}=e,n={type:"update",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,title:t,context:r}};return this.client.mutate(n)}delete(){const e={type:"delete",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id}};return this.client.mutate(e)}}class u{constructor(e,t,r,i){this.client=e,this.integrationId=t,this.profileId=r,this.id=i||(0,n.generateId)()}insert(e){const{instruction:t}=e,r={type:"insert",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,instruction:t}};return this.client.mutate(r)}update(e){const{instruction:t}=e,r={type:"update",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,instruction:t}};return this.client.mutate(r)}delete(){const e={type:"delete",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id}};return this.client.mutate(e)}}},5969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiClientFactory=void 0;const n=r(6808);t.AiClientFactory=class{constructor(e,t,r){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.assistantsMap=new Map}getAssistant(e){let t=this.assistantsMap.get(e);return t||(t=new n.AiAssistantClient(this.clientIdService,this.rpcManager,this.socketManager,e),this.assistantsMap.set(e,t),t)}}},4268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiManager=void 0;const n=r(575),i=r(8784),o=r(2937),s=r(9978);t.ApiManager=class{constructor(e,t,r,n={}){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.apiServerUrlOverrideMapping=n,this.ongoingApiExecutions={},r.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,r){const i=(0,n.generateId)(),a=new o.Subject;this.ongoingApiExecutions[i]=a;const u={integrationId:e,endpointId:t,request:r,clientId:this.clientIdService.getClientId(),clientRequestId:i,serverUrlOverride:this.apiServerUrlOverrideMapping[e]};return this.rpcManager.post("api/call",u).catch((n=>{console.error("Got error while calling API",e,t,r,n),a.error(n),a.complete()})),(0,o.race)(a.pipe((0,o.finalize)((()=>{delete this.ongoingApiExecutions[i]})),(0,o.share)()),this.clientIdService.observeClientTooOld().pipe((0,s.map)((()=>{throw new Error("CLIENT_NOT_CONNECTED")}))))}async handleApiResponse(e,t){const r=this.ongoingApiExecutions[e];r&&(t.success?r.next((0,n.deserializeObj)(t.payload)):r.error((0,i.pick)(t,"httpStatus","payload")),r.complete())}}},9526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthManager=void 0;const n=r(2937);t.AuthManager=class{constructor(e,t){this.destructManager=e,this.apiKey=t,this.authIdTokenSet=new n.BehaviorSubject(!1),this.authIdTokenObservableSubject=new n.Subject,this.shouldWaitForAuth=!1,this.observeAuthIdToken().subscribe((e=>{this.idToken=e.token,this.integrationId=e.integrationId,this.authIdTokenSet.next(!0)}))}setAuthIdToken(e,t){this.shouldWaitForAuth=!0,this.authIdTokenSet.next(!1);const r=e&&"string"!=typeof e?(0,n.from)(e).pipe((0,n.map)((e=>({token:e,integrationId:t})))):(0,n.of)({token:e,integrationId:t});this.authIdTokenObservableSubject.next(r)}observeAuthIdToken(){return this.authIdTokenObservableSubject.pipe((0,n.switchMap)((e=>e)),(0,n.takeUntil)(this.destructManager.isDestructingObservable))}async waitForReadyState(){this.shouldWaitForAuth&&!this.destructManager.isDestructing&&await(0,n.firstValueFrom)((0,n.race)(this.authIdTokenSet.asObservable().pipe((0,n.filter)(Boolean)),this.destructManager.isDestructingObservable))}getApiKey(){return this.apiKey}getAuthToken(){return this.apiKey?{type:"ApiKey",token:this.apiKey}:this.idToken?{type:"Bearer",token:this.idToken,integrationId:this.integrationId}:void 0}}},8862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFunctionManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.BackendFunctionManager=class{constructor(e,t,r){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.ongoingFunctionExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"backendFunction"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleFunctionResponse(e.clientRequestId,e.payload)}))}executeFunctionAndSubscribe(e,...t){const r=(0,n.generateId)(),s=new i.Subject;this.ongoingFunctionExecutions[r]=s;const a={functionName:e,paramsArrayStr:(0,n.serializeObj)(t),clientId:this.clientIdService.getClientId(),clientRequestId:r};return this.rpcManager.post("backend-function/execute",a).catch((t=>{console.error("Got error while executing function",e,t),s.error(t),s.complete()})),(0,i.race)(s.pipe((0,i.finalize)((()=>{delete this.ongoingFunctionExecutions[r]})),(0,i.share)()),this.clientIdService.observeClientTooOld().pipe((0,o.map)((()=>{throw new Error("CLIENT_NOT_CONNECTED")}))))}handleFunctionResponse(e,t){const r=this.ongoingFunctionExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.response):(r.error(new Error(i.response)),r.complete())}}},7378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientIdService=void 0;const n=r(2937),i=r(575);t.ClientIdService=class{constructor(e){this.destructManager=e,this.clientTooOldSubject=new n.BehaviorSubject(!1),this.clientId=(0,i.generateId)(),this.destructManager.onDestruct((()=>{this.clientTooOldSubject.complete()}))}observeClientTooOld(){return this.clientTooOldSubject.pipe((0,n.filter)((e=>e)),(0,n.map)((e=>{})))}notifyClientTooOld(){this.clientTooOldSubject.next(!0),this.clientId=(0,i.generateId)()}notifyClientReadyToBeRegenerated(){this.clientTooOldSubject.next(!1)}observeClientReadyToBeRegenerated(){return this.clientTooOldSubject.pipe((0,n.skip)(1),(0,n.filter)((e=>!e)),(0,n.map)((e=>{})))}getClientId(){return this.clientId}isClientTooOld(){return this.clientTooOldSubject.value}}},1600:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReferenceFactory=void 0;const n=r(5660);t.CollectionReferenceFactory=class{constructor(e,t,r,n){this.documentReferenceFactory=e,this.queryBuilderFactory=t,this.joinQueryBuilderFactory=r,this.documentIdentityService=n,this.collections=new Map,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this))}get(e,t){let r=this.collections.get(t);r||(r=new Map,this.collections.set(t,r));let i=r.get(e);return i||(i=new n.CollectionReference(e,t,this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory),r.set(e,i),i)}migrateDocIds(e){this.collections.forEach((t=>{for(const[r,n]of t)n.migrateDocIds(e)}))}}},5660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReference=void 0;const n=r(575),i=r(2937);t.CollectionReference=class{constructor(e,t,r,i,o){this.collectionName=e,this.integrationId=t,this.documentReferenceFactory=r,this.queryBuilderFactory=i,this.joinQueryBuilderFactory=o,this.documents=new Map,this.refId=(0,n.generateId)()}doc(e){if(e&&"string"!=typeof e&&"object"!=typeof e&&!Array.isArray(e))throw new Error("Invalid doc id. Can be only object or string.");if(this.integrationId!==n.IntegrationType.built_in_db)if(e){if("object"!=typeof e)throw new Error("Invalid doc id. String doc ids are only supported for the built_in_db integration. For all other integrations, the doc id must be an object.")}else e={__squidId:(0,n.generateId)()};else e=e&&"string"!=typeof e?{__id:(0,n.normalizeJsonAsString)(e)}:{__id:e||(0,n.generateId)()};const t=(0,n.normalizeJsonAsString)(e),r=(0,n.getSquidDocId)(t,this.collectionName,this.integrationId);let i=this.documents.get(t);return i||(i=this.documentReferenceFactory.create(r,this.queryBuilderFactory),this.documents.set(t,i),i)}query(){return this.queryBuilderFactory.get(this.collectionName,this.integrationId)}joinQuery(e){return this.joinQueryBuilderFactory.getForJoin(this.collectionName,this.integrationId,null!=e?e:this.collectionName)}or(...e){return new o(...e)}migrateDocIds(e){for(const[t,r]of this.documents)r.migrateDocIds(e);Object.entries(e).forEach((([e,t])=>{const r=(0,n.parseSquidDocId)(e),i=(0,n.parseSquidDocId)(t);(0,n.replaceKeyInMap)(this.documents,r.docId,i.docId)}))}};class o{constructor(...e){if(0===e.length)throw new Error("At least one query builder must be provided");this.builders=e}changes(){throw new Error("Changes are not supported for merged queries")}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e){const t=this.builders.map((t=>t.snapshots(e)));return this.or(this.builders[0].getSortOrder(),...t)}or(e,...t){return(0,i.combineLatest)([...t]).pipe((0,i.map)((t=>{const r=new Set,n=t.flat(),i=[];for(const e of n)r.has(e.data)||(r.add(e.data),i.push(e));return i.sort(((t,r)=>{for(const{fieldName:n,asc:i}of e){const e=t.data[n],o=r.data[n];if(e<o)return i?-1:1;if(e>o)return i?1:-1}return 0}))})))}getSortOrder(){throw new Error("getSortOrder is not supported for merged queries")}}},4967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataManager=void 0;const n=r(575),i=r(3910),o=r(2937),s=r(9978),a="dataManager_runInTransaction";t.DataManager=class{constructor(e,t,r,n,i,s,a,u){this.documentStore=e,this.mutationSender=t,this.socketManager=r,this.querySubscriptionManager=n,this.queryBuilderFactory=i,this.lockManager=s,this.destructManager=a,this.documentIdentityService=u,this.docIdToLocalTimestamp=new Map,this.batchClientRequestIds=new Set,this.docIdToServerTimestamp=new Map,this.pendingIncomingUpdates=new Map,this.pendingOutgoingMutations=new Map,this.pendingOutgoingMutationsChanged=new o.Subject,this.outgoingMutationsEmpty=new o.BehaviorSubject(!0),this.knownDirtyDocs=new Set,this.failedDocsToResync=[],this.refreshDocIdToTimestamp=new Map,this.handleIncomingMessagesForTests=!0,this.destructManager.onDestruct((()=>{this.destruct()})),this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.handleNotifications(),this.startDeleteExpiredTimestampsJob(),this.handleOrphanDocs(),this.outgoingMutationsEmpty.subscribe((e=>{this.querySubscriptionManager.safeToSendQueriesToServer.next(e)}))}getProperties(e){return this.documentStore.getDocumentOrUndefined(e)}isDirty(e){var t;if(this.knownDirtyDocs.has(e))return!0;if(null===(t=this.pendingOutgoingMutations.get(e))||void 0===t?void 0:t.length)return!0;const r=this.docIdToServerTimestamp.get(e),n=r&&!r.expireTimestamp?r.timestamp:void 0,i=this.docIdToLocalTimestamp.get(e);return!((!i||n)&&!this.isForgotten(e)&&!this.isLocalOnly(e)&&i===n)}async runInTransaction(e,t){return t?((0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),e(t).then((e=>Promise.resolve()))):(this.lockManager.canGetLock(a)?this.lockManager.lockSync(a):await this.lockManager.lock(a),new Promise((async(t,r)=>{try{this.currentTransactionId=(0,n.generateId)();try{return await e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction({resolve:t,reject:r})}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(a)}})))}async applyOutgoingMutation(e,t){var r;const i=e.squidDocIdObj,o=(0,n.getSquidDocId)(i);this.knownDirtyDocs.add(o),t||(await this.lockManager.lock(a),this.lockManager.release(a)),this.knownDirtyDocs.delete(o);const s=null===(r=this.pendingOutgoingMutations.get(o))||void 0===r?void 0:r.slice(-1)[0];if(s&&!s.sentToServer)s.mutation=(0,n.reduceMutations)([s.mutation,e])[0],this.outgoingMutationsEmpty.next(!1);else{const t={mutation:this.removeInternalProperties(e),sentToServer:!1},r=this.pendingOutgoingMutations.get(o)||[];r.push(t),this.pendingOutgoingMutations.set(o,r),this.outgoingMutationsEmpty.next(!1),this.pendingOutgoingMutationsChanged.next()}return this.runInTransaction((async()=>{const t=this.documentStore.getDocumentOrUndefined(o),r="delete"===e.type?void 0:"update"===e.type?(0,n.applyUpdateMutation)(t,e):Object.assign({},e.properties);this.updateDocumentFromSnapshot(o,r)&&("insert"===e.type&&this.docIdToLocalTimestamp.set(o,(new Date).getTime()),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(o,r).forEach((e=>this.batchClientRequestIds.add(e))))}),t)}async runInTransactionSync(e,t){if(t)return(0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),void e(t);await this.lockManager.lock(a);try{this.currentTransactionId=(0,n.generateId)();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(a)}}removeInternalProperties(e){if("delete"===e.type)return e;const t=Object.assign(Object.assign({},e),{properties:Object.assign({},e.properties)});return delete t.properties.__docId__,delete t.properties.__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.handleIncomingMessagesForTests)return;const t=e.reduce(((e,t)=>this.querySubscriptionManager.hasOngoingQuery(t.clientRequestId)?(e[t.squidDocId]={properties:t.doc,timestamp:t.mutationTimestamp},e):e),{});this.applyIncomingUpdates(t)}handleIncomingQuerySnapshots(e){if(!this.handleIncomingMessagesForTests)return;if(!this.querySubscriptionManager.hasOngoingQuery(e.clientRequestId))return;const t=this.querySubscriptionManager.getQuery(e.clientRequestId),r={};for(const i of e.docs){const e=(0,n.getSquidDocId)(i.__docId__,t.collectionName,t.integrationId);r[e]={properties:i,timestamp:i.__ts__}}this.querySubscriptionManager.setGotResponseFromServer(e.clientRequestId),this.runInTransactionSync((t=>{this.batchClientRequestIds.add(e.clientRequestId),this.applyIncomingUpdates(r,t)&&this.querySubscriptionManager.hasSubscription(e.clientRequestId)&&this.batchClientRequestIds.delete(e.clientRequestId)})).then()}applyIncomingUpdates(e,t){let r=!1;const n=new Set;for(const[t,i]of Object.entries(e))this.addPendingIncomingUpdate(t,i),this.pendingIncomingUpdates.get(t)||(r=!0),n.add(t);return this.runInTransactionSync((()=>{for(const e of n)this.maybeApplyIncomingUpdate(e)}),t).then(),r}addPendingIncomingUpdate(e,t){const r=this.pendingIncomingUpdates.get(e),n=this.docIdToServerTimestamp.get(e);r&&r.timestamp>t.timestamp||n&&n.timestamp>t.timestamp||this.pendingIncomingUpdates.set(e,t)}maybeApplyIncomingUpdate(e){const t=this.pendingIncomingUpdates.get(e);if(!t)return;const r=this.pendingOutgoingMutations.get(e);r&&r.length||(this.updateDocumentFromSnapshot(e,t.properties),this.acknowledgeDocument(e,t.timestamp,!t.properties),this.docIdToLocalTimestamp.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.forgetDocument(e)))}destruct(){this.stopDeleteExpiredTimestampsJob()}stopDeleteExpiredTimestampsJob(){void 0!==this.deleteExpiredTimestampsInterval&&(clearInterval(this.deleteExpiredTimestampsInterval),this.deleteExpiredTimestampsInterval=void 0)}startDeleteExpiredTimestampsJob(){this.deleteExpiredTimestampsInterval=setInterval((()=>{const e=[...this.docIdToServerTimestamp.entries()].filter((([e,t])=>!(!t.expireTimestamp||t.expireTimestamp>Date.now()||this.isTracked(e))));for(const[t]of e)this.docIdToServerTimestamp.delete(t),this.forgetDocument(t)}),1e4)}isTracked(e){if(this.pendingIncomingUpdates.get(e))return!0;const t=this.pendingOutgoingMutations.get(e);return!(!t||!t.length)||this.querySubscriptionManager.hasOngoingQueryForDocId(e)}isForgotten(e){return this.documentStore.hasData(e)&&!this.isTracked(e)}isLocalOnly(e){return!this.hasBeenAcknowledged(e)&&this.documentStore.hasData(e)}hasBeenAcknowledged(e){return this.docIdToServerTimestamp.has(e)}updateDocumentFromSnapshot(e,t){const r=this.documentStore.getDocumentOrUndefined(e);return!(!r&&!t||r===t)&&((!r||!t||(0,n.normalizeJsonAsString)(Object.assign(Object.assign({},t),{__ts__:void 0}))!==(0,n.normalizeJsonAsString)(r))&&(this.documentStore.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()}async sendAllUnsentOutgoingMutations(e){const t=this.groupOutgoingMutationsByIntegrationId();try{await i.PromisePool.for(t).withConcurrency(t.length||1).handleError((e=>{throw e})).process((async([e,t])=>{await this.sendMutationsForIntegration([...t],e)})),this.pendingOutgoingMutations.size||this.outgoingMutationsEmpty.next(!0),await this.refreshUpdatedDocuments(),this.hasPendingSentMutations()?(await(0,o.firstValueFrom)(this.pendingOutgoingMutationsChanged.pipe((0,o.filter)((()=>!this.hasPendingSentMutations())))),null==e||e.resolve()):null==e||e.resolve()}catch(t){this.pendingOutgoingMutations.size||(this.outgoingMutationsEmpty.next(!0),await this.resyncFailedUpdates()),null==e||e.reject(t)}}async sendMutationsForIntegration(e,t){try{const{timestamp:r,idResolutionMap:n={},refreshList:i=[]}=await this.mutationSender.sendMutations(e.map((e=>e.mutation)),t);await this.documentIdentityService.migrate(n),i.forEach((e=>{this.refreshDocIdToTimestamp.set(n[e]||e,r)}));for(const t of e){let e=this.removeOutgoingMutation(t);n[e]&&(e=n[e]),this.acknowledgeDocument(e,r),this.isTracked(e)||(this.setExpiration(e,!0),this.forgetDocument(e))}}catch(t){for(const t of e){const e=this.removeOutgoingMutation(t);this.forgetDocument(e),(this.hasBeenAcknowledged(e)||"insert"===t.mutation.type)&&this.failedDocsToResync.push(e)}throw t}}removeOutgoingMutation(e){const t=(0,n.getSquidDocId)(e.mutation.squidDocIdObj),r=(0,n.truthy)(this.pendingOutgoingMutations.get(t));return r.splice(r.indexOf(e),1),r.length||this.pendingOutgoingMutations.delete(t),this.pendingOutgoingMutationsChanged.next(),t}async resyncFailedUpdates(){const e=[...this.failedDocsToResync];this.failedDocsToResync.splice(0);for(const t of e){this.setExpiration(t,!0);try{const e=await this.queryBuilderFactory.getForDocument(t).snapshot();if((0,n.truthy)(e.length<=1,"Got more than one doc for the same id:"+t),!e.length){this.forgetDocument(t);const e=this.querySubscriptionManager.setClientRequestIdsForLocalDoc(t,void 0);this.querySubscriptionManager.notifyAllSubscriptions(e)}}catch(e){this.querySubscriptionManager.errorOutAllQueries(t,e)}}}async refreshUpdatedDocuments(){var e;const t=[];for(const[r,n]of this.refreshDocIdToTimestamp.entries()){const i=null===(e=this.docIdToServerTimestamp.get(r))||void 0===e?void 0:e.timestamp;i&&i>n||t.push(r)}this.refreshDocIdToTimestamp.clear();for(const e of t)try{await this.queryBuilderFactory.getForDocument(e).snapshot()}catch(e){}}groupOutgoingMutationsByIntegrationId(){const e={};for(const[t,r]of[...this.pendingOutgoingMutations.entries()]){const t=r[r.length-1];if(t&&!t.sentToServer){const r=t.mutation.squidDocIdObj.integrationId;(e[r]||(e[r]=[])).push(t),t.sentToServer=!0}}return Object.entries(e)}handleOrphanDocs(){this.querySubscriptionManager.onOrphanDocuments.subscribe((e=>{for(const t of e)this.isTracked(t)||this.forgetDocument(t)}))}acknowledgeDocument(e,t,r=!1){this.docIdToServerTimestamp.set(e,{timestamp:t}),this.setExpiration(e,r)}setExpiration(e,t){const r=this.docIdToServerTimestamp.get(e);r&&(r.expireTimestamp=t?Date.now()+2e4:void 0)}forgetDocument(e){this.docIdToLocalTimestamp.delete(e),this.setExpiration(e,!0)}migrateDocIds(e){Object.entries(e).forEach((([e,t])=>{(0,n.replaceKeyInMap)(this.docIdToLocalTimestamp,e,t),(0,n.replaceKeyInMap)(this.docIdToServerTimestamp,e,t)}))}hasPendingSentMutations(){for(const e of this.pendingOutgoingMutations.values())for(const t of e)if(t.sentToServer)return!0;return!1}}},7787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DestructManager=void 0;const n=r(2937);t.DestructManager=class{constructor(){this.predestructors=[],this.destructors=[],this.isDestructedSubject=new n.BehaviorSubject(!1)}get isDestructing(){return this.isDestructedSubject.value}get isDestructingObservable(){return this.isDestructedSubject.asObservable().pipe((0,n.filter)(Boolean))}onPreDestruct(e){this.predestructors.push(e)}onDestruct(e){this.destructors.push(e)}async destruct(){if(this.isDestructing)return;this.isDestructedSubject.next(!0);const e=this.predestructors.concat(this.destructors);let t=e.shift();for(;t;){try{await t()}catch(e){console.error("Error while destructing Squid",e)}t=e.shift()}}}},4605:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockImpl=t.DistributedLockManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.DistributedLockManager=class{constructor(e,t){this.socketManager=e,this.destructManager=t,this.ongoingLocks={},this.acquireLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockAcquired"===e.type))),this.releaseLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockReleased"===e.type))),this.lockWaitForConnectionThreshold=2e3,t.onPreDestruct((()=>{this.releaseAllLocks()})),this.socketManager.observeConnectionReady().subscribe((e=>{e||this.releaseAllLocks()})),this.releaseLockMessagesFromServer.subscribe((e=>{const t=this.ongoingLocks[e.payload.clientRequestId];void 0!==t&&t.release().then()}))}async lock(e,t){if(!await(0,i.firstValueFrom)((0,i.race)((0,i.timer)(this.lockWaitForConnectionThreshold).pipe((0,o.map)((()=>!1))),this.socketManager.observeConnectionReady().pipe((0,i.filter)(Boolean)),this.destructManager.isDestructingObservable)))return Promise.reject("CLIENT_NOT_CONNECTED");const r=(0,n.generateId)(),a={type:"acquireLock",payload:{mutex:e,exclusive:t,clientRequestId:r}};this.socketManager.sendMessage(a);const u=await(0,i.firstValueFrom)((0,i.race)((0,i.timer)(5e3).pipe((0,i.take)(1),(0,o.map)((()=>({payload:{error:"TIMEOUT_GETTING_LOCK",lockId:void 0}})))),this.acquireLockMessagesFromServer.pipe((0,i.filter)((e=>e.payload.clientRequestId===r)))));if(!u.payload.lockId)throw new Error(`Failed to acquire lock: ${u.payload.error}`);const c=u.payload.lockId,l=new s(c,r,this.ongoingLocks,this.socketManager);return this.ongoingLocks[c]=l,l}releaseAllLocks(){for(const[e,t]of Object.entries(this.ongoingLocks))t.release().then(),delete this.ongoingLocks[e]}};class s{constructor(e,t,r,n){this.lockId=e,this.clientRequestId=t,this.ongoingLocks=r,this.socketManager=n,this.released=!1,this.onReleaseSubject=new i.Subject}async release(){if(this.released)return;this.released=!0,delete this.ongoingLocks[this.lockId];const e={type:"releaseLock",payload:{lockId:this.lockId,clientRequestId:this.clientRequestId}};this.socketManager.sendMessage(e),this.onReleaseSubject.next()}observeRelease(){return this.onReleaseSubject.asObservable()}isReleased(){return this.released}}t.DistributedLockImpl=s},2256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2937);t.default=class{constructor(e,t){this.documentStore=e,this.destructManager=t,this.changeNotifier=new n.BehaviorSubject({}),this.destructManager.onDestruct((()=>{this.changeNotifier.complete()}))}migrate(e){Object.entries(e).forEach((([e,t])=>{this.documentStore.migrateDocId(e,t)})),this.changeNotifier.next(e)}observeChanges(){return this.changeNotifier.asObservable()}}},2417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReferenceFactory=void 0;const n=r(575),i=r(4516);t.DocumentReferenceFactory=class{create(e,t){return new i.DocumentReference(e,(0,n.truthy)(this.dataManager,"dataManager not found"),t)}setDataManager(e){this.dataManager=e}}},4516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReference=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937);t.DocumentReference=class{constructor(e,t,r){this._squidDocId=e,this.dataManager=t,this.queryBuilderFactory=r,this.refId=(0,i.generateId)()}get squidDocId(){return this._squidDocId}get data(){return(0,i.truthy)(this.dataManager.getProperties(this.squidDocId))}get hasData(){return!!this.dataManager.getProperties(this.squidDocId)}async snapshot(){if(this.isTracked()&&this.dataManager.getProperties(this.squidDocId))return this;const e=await this.queryBuilderFactory.getForDocument(this.squidDocId).snapshot();return(0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0}snapshots(){return this.queryBuilderFactory.getForDocument(this.squidDocId).snapshots().pipe((0,s.map)((e=>((0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0))))}isDirty(){return this.dataManager.isDirty(this.squidDocId)}isTracked(){return this.dataManager.isTracked(this.squidDocId)}async update(e,t){const r={};Object.entries(e).forEach((([e,t])=>{const n=void 0!==t?{type:"update",value:t}:{type:"removeProperty"};r[e]=[n]}));const n={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:r};return this.dataManager.applyOutgoingMutation(n,t)}async setInPath(e,t,r){return this.update({[e]:o.cloneDeep(t)},r)}async deleteInPath(e,t){return this.update({[e]:void 0},t)}incrementInPath(e,t,r){const n={type:"applyNumericFn",fn:"increment",value:t},o={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:{[e]:[n]}};return this.dataManager.applyOutgoingMutation(o,r)}decrementInPath(e,t,r){return this.incrementInPath(e,-t,r)}async insert(e,t){const r=(0,i.parseSquidDocId)(this.squidDocId);let n=(0,i.deserializeObj)(r.docId);n.__squidId&&(n={});const o={type:"insert",squidDocIdObj:r,properties:Object.assign(Object.assign(Object.assign({},e),{__docId__:r.docId}),n)};return this.dataManager.applyOutgoingMutation(o,t)}async delete(e){const t={type:"delete",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId)};return this.dataManager.applyOutgoingMutation(t,e)}migrateDocIds(e){const t=e[this.squidDocId];t&&(this._squidDocId=t)}}},5182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentStore=void 0;const n=r(575),i=r(8784);t.DocumentStore=class{constructor(){this.squidDocIdToDoc=new Map}saveDocument(e,t){const r=this.squidDocIdToDoc.get(e);if(void 0===r&&!t)return;if(void 0!==r){if(t){const r=(0,i.cloneDeep)(t),n=this.removeInternalProperties(r);return this.squidDocIdToDoc.set(e,n),n}return void this.squidDocIdToDoc.delete(e)}const n=this.removeInternalProperties(t);return this.squidDocIdToDoc.set(e,n),t}hasData(e){return void 0!==this.squidDocIdToDoc.get(e)}getDocument(e){return(0,n.truthy)(this.getDocumentOrUndefined(e))}getDocumentOrUndefined(e){return this.squidDocIdToDoc.get(e)}sortAndLimitDocs(e,t){if(!e||0===e.size)return[];const r=[...e].map((e=>this.squidDocIdToDoc.get(e))).filter(n.isNotNullish),{sortOrder:o,limit:s}=t,a=o.map((e=>e.fieldName)),u=o.map((e=>e.asc?"asc":"desc")),c=(0,i.orderBy)(r,a,u);return s<0?c:r.slice(0,s)}removeInternalProperties(e){if(!e)return;const t=Object.assign({},e);return delete t.__ts__,t}migrateDocId(e,t){const r=this.getDocument(e);(0,n.replaceKeyInMap)(this.squidDocIdToDoc,e,t);const i=(0,n.parseSquidDocId)(t),o=(0,n.deserializeObj)(i.docId);this.saveDocument(t,Object.assign(Object.assign(Object.assign({},r),o),{__docId__:i.docId}))}}},5621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClientFactory=void 0;const n=r(5857);t.GraphQLClientFactory=class{constructor(e){this.rpcManager=e,this.clientsMap=new Map}get(e){let t=this.clientsMap.get(e);return t||(t=new n.GraphQLClient(this.rpcManager,e),this.clientsMap.set(e,t),t)}}},5857:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;const n=r(9312),i=r(2948),o=n.__importDefault(r(9031));t.GraphQLClient=class{constructor(e,t){this.rpcManager=e;const r=`${t}/graphql`;this.client=new i.ApolloClient({link:new i.HttpLink({uri:`${this.rpcManager.getEndpoint()}${r}`,headers:this.rpcManager.getStaticHeaders(),fetch:o.default}),cache:new i.InMemoryCache})}async query(e){return(await this.client.query({query:i.gql`
9
9
  ${e.query}
10
10
  `,variables:e.variables})).data}async mutate(e){return(await this.client.mutate({mutation:i.gql`
11
11
  ${e.query}
12
- `})).data}}},7718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationSender=void 0;const n=r(575);t.MutationSender=class{constructor(e,t,r,n){this.clientIdService=e,this.rpcManager=t,this.lockManager=r,this.querySubscriptionManager=n}async sendMutations(e,t){const r=(0,n.reduceMutations)(e),i=r.map((e=>`sendMutation_${(0,n.getSquidDocId)(e.squidDocIdObj)}`));await this.lockManager.lock(...i),await this.querySubscriptionManager.waitForAllQueriesToFinish();try{const e={clientId:this.clientIdService.getClientId(),mutations:r,integrationId:t};return await this.rpcManager.post("mutation/mutate",e)}finally{this.lockManager.release(...i)}}}},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.NamedQueryManager=class{constructor(e,t,r){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.ongoingNamedQueryExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"namedQuery"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleNamedQueryResponse(e.clientRequestId,e.payload)}))}executeNamedQueryAndSubscribe(e,t,r){const o=(0,n.generateId)(),s=new i.Subject;this.ongoingNamedQueryExecutions[o]=s;const a={integrationId:e,queryName:t,paramsRecordStr:(0,n.serializeObj)(r),clientId:this.clientIdService.getClientId(),clientRequestId:o};return this.rpcManager.post("named-query/execute",a).catch((r=>{console.error("Got error while executing named query",t,"for integration",e,r),s.error(r),s.complete()})),s.pipe((0,i.finalize)((()=>{delete this.ongoingNamedQueryExecutions[o]})),(0,i.share)())}handleNamedQueryResponse(e,t){const r=this.ongoingNamedQueryExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.result):(r.error(new Error(i.result)),r.complete())}}},9732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinQueryBuilder=t.JoinQueryBuilderFactory=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937),a=r(9978);t.JoinQueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.queryBuilderFactory=r}getForJoin(e,t,r){return new u(e,t,this.querySubscriptionManager,this.documentReferenceFactory,r,this,this.queryBuilderFactory)}};class u{constructor(e,t,r,n,o,s,a){this.collectionName=e,this.integrationId=t,this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.alias=o,this.joinQueryBuilderFactory=s,this.queryBuilderFactory=a,this.joins={},this.joinConditions={},this.simpleQueryBuilder=new i.SimpleQueryBuilder(e,t)}where(e,t,r){return this.simpleQueryBuilder.where(e,t,r),this}limit(e){return this.simpleQueryBuilder.limit(e),this}sortBy(e,t=!0){return this.simpleQueryBuilder.sortBy(e,t),this}join(e,t,r){const n={leftFieldName:t,rightFieldName:r,leftAlias:this.alias};this.joins[e.alias]=e.build(),Object.entries(e.joins).forEach((([e,t])=>{this.joins[e]=t}));for(const[t,r]of Object.entries(e.joinConditions))this.joinConditions[t]=r;return this.joinConditions[e.alias]=n,this}snapshot(){return(0,s.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.alias,o.cloneDeep(this.joins),o.cloneDeep(this.joinConditions),e).pipe((0,a.map)((e=>e.map((e=>{const t={};for(const[r,n]of Object.entries(e)){const e=r===this.alias?this.collectionName:this.joins[r].collectionName,o=r===this.alias?this.integrationId:this.joins[r].integrationId,s=n?(0,i.getSquidDocId)(n.__docId__,e,o):void 0;t[r]=s?this.documentReferenceFactory.create(s,this.queryBuilderFactory):void 0}return t})))))}build(){return this.simpleQueryBuilder.build()}}t.JoinQueryBuilder=u},6891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Changes=t.QueryBuilder=t.QueryBuilderFactory=void 0;const n=r(575),i=r(2937),o=r(9978);t.QueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.documentIdentityService=r}getForDocument(e){const{collectionName:t,integrationId:r,docId:i}=(0,n.parseSquidDocId)(e),o=(0,n.deserializeObj)(i),s=this.get(t,r);return Object.entries(o).forEach((([e,t])=>{s.where(e,"==",t)})),s}get(e,t){return new s(e,t,this.querySubscriptionManager,this.documentReferenceFactory,this,this.documentIdentityService)}};class s extends n.SimpleQueryBuilder{constructor(e,t,r,n,i,o){super(e,t),this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.queryBuilderFactory=i,this.documentIdentityService=o}getSortOrder(){return this.query.sortOrder}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.collectionName,{},{},e).pipe((0,o.map)((e=>e.map((e=>{(0,n.assertTruthy)(1===Object.keys(e).length);const t=e[this.collectionName],r=(0,n.getSquidDocId)((0,n.truthy)(t).__docId__,this.collectionName,this.integrationId);return this.documentReferenceFactory.create(r,this.queryBuilderFactory)})))))}changes(){let e,t=new Set;return this.snapshots().pipe((0,i.combineLatestWith)(this.documentIdentityService.observeChanges().pipe((0,i.switchMap)((t=>(Object.entries(t).forEach((([t,r])=>{(0,n.replaceKeyInRecord)(e||{},t,r)})),i.NEVER))),(0,i.startWith)({}))),(0,o.map)((([r])=>{let n=[];const i=[],o=[];if(e){for(const o of r){const r=o.squidDocId,s=o.data;if(t.has(s))delete e[r],t.delete(s);else if(e[r]){i.push(o);const n=e[r];delete e[r],t.delete(n)}else n.push(o)}for(const e of t)o.push(e)}else n=r;e={},t=new Set;for(const n of r){const r=n.data;e[n.squidDocId]=r,t.add(r)}return new a(n,i,o)})))}get hash(){return(0,n.encodeValueForMapping)(this.build())}}t.QueryBuilder=s;class a{constructor(e,t,r){this.inserts=e,this.updates=t,this.deletes=r}}t.Changes=a},4661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySubscriptionManager=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937),a=r(9978),u=r(1122),c="client";t.QuerySubscriptionManager=class{constructor(e,t,r,n,i){this.rpcManager=e,this.clientIdService=t,this.documentStore=r,this.destructManager=n,this.documentIdentityService=i,this.safeToSendQueriesToServer=new s.BehaviorSubject(!0),this.onOrphanDocuments=new s.Subject,this.ongoingQueries=new Map,this.inflightQueriesCount=new s.BehaviorSubject(0),this.clientRequestIdToLocalDocuments=new Map,this.localDocumentToClientRequestIds=new Map,this.queryMappingManager=new l,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.clientIdService.observeClientReadyToBeRegenerated().subscribe((()=>{this.refreshOngoingQueries()})),this.destructManager.onPreDestruct((()=>{this.predestruct()}))}hasOngoingQuery(e){return this.ongoingQueries.has(e)}getQuery(e){return(0,i.truthy)(this.ongoingQueries.get(e)).query}setGotResponseFromServer(e){const t=(0,i.truthy)(this.ongoingQueries.get(e));t.gotResponseFromServer?this.removeClientRequestIdMapping(e):t.gotResponseFromServer=!0}findQueriesForDocument(e,t){const{collectionName:r,integrationId:n}=(0,i.parseSquidDocId)(t),o=this.queryMappingManager.getMapping(c,r,n);return o?(0,i.findQueriesForDocumentSync)(o,e):[]}setClientRequestIdsForLocalDoc(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set,n=new Set(t?this.findQueriesForDocument(t,e).map((e=>(0,i.parseQuerySubscriptionId)(e).clientRequestId)):[]),o=new Set([...r,...n]);for(const t of[...r]){if(n.has(t))continue;r.delete(t);const i=this.clientRequestIdToLocalDocuments.get(t);i&&(i.delete(e),i.size||this.clientRequestIdToLocalDocuments.delete(t)),r.size||this.localDocumentToClientRequestIds.delete(e)}for(const t of n){let r=this.localDocumentToClientRequestIds.get(e);r||(r=new Set,this.localDocumentToClientRequestIds.set(e,r)),r.add(t);let n=this.clientRequestIdToLocalDocuments.get(t);n||(n=new Set,this.clientRequestIdToLocalDocuments.set(t,n)),n.add(e)}return[...o]}errorOutAllQueries(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set;for(const e of r){const r=this.ongoingQueries.get(e);r&&r.subject.error(t)}}notifyAllSubscriptions(e){const t=new Set;for(const r of e){const e=this.ongoingQueries.get(r);if(!e)continue;if(!e.gotResponseFromServer||!e.activated)continue;const n=this.clientRequestIdToLocalDocuments.get(r),o=this.documentStore.sortAndLimitDocs(n,e.query);let s=!1;for(const t of e.supportedQueries)s=s||this.updateOngoingQueryWithNewDataFromSupportingQuery(o,t);let a=e;for(;!a.allObservables;)a=(0,i.truthy)(null==a?void 0:a.supportingOngoingQuery);s&&t.add(a),e.subject.next(o)}for(const e of t){const t=this.collectAllObservables(e);(0,i.truthy)(e.allObservables).next(t)}}processQuery(e,t,r,n,i){return(0,s.defer)((()=>{const u=this.createOngoingQueryGraph(e,t,r,n,i,!0);this.sendQueryToServer(u),u.allObservables=new s.ReplaySubject(1);const c=u.allObservables.pipe((0,s.switchMap)((e=>(0,s.combineLatest)(e).pipe((0,a.map)((e=>this.joinResults(e,n,u)))))),(0,a.filter)((()=>this.allOngoingQueriesGotServerResult(u))),(0,s.startWith)(void 0),(0,s.pairwise)(),(0,a.filter)((([e,t])=>!o.isEqual(e,t))),(0,a.map)((([e,t])=>t)),i?(0,s.tap)():(0,s.take)(1),(0,s.finalize)((()=>{var e;u.subject.complete(),this.completeAllSupportedQueries(u),null===(e=u.allObservables)||void 0===e||e.complete()}))),l=this.collectAllObservables(u);return u.allObservables.next(l),c})).pipe((0,s.share)())}hasOngoingQueryForDocId(e){const t=this.localDocumentToClientRequestIds.get(e);return!!t&&!!t.size}removeClientRequestIdMapping(e){const t=this.clientRequestIdToLocalDocuments.get(e);if(!t)return;this.clientRequestIdToLocalDocuments.delete(e);const r=[];for(const n of t){const t=(0,i.truthy)(this.localDocumentToClientRequestIds.get(n));t.delete(e),t.size||(this.localDocumentToClientRequestIds.delete(n),r.push(n))}r.length&&this.onOrphanDocuments.next(r)}async waitForAllQueriesToFinish(){return(0,s.firstValueFrom)(this.inflightQueriesCount.pipe((0,a.filter)((e=>0===e)))).then((()=>{}))}registerQueryFinalizer(e){const t=e.clientRequestId,r=(0,i.getQuerySubscriptionId)(this.clientIdService.getClientId(),t);e.subject.pipe((0,s.finalize)((()=>{if(this.queryMappingManager.removeQuery(t,r).then(),this.ongoingQueries.delete(t),e.subscribe&&!e.isEmptyForJoin&&e.activated){const r={clientId:this.clientIdService.getClientId(),clientRequestId:t};this.rpcManager.post("query/unsubscribe",r).catch((t=>{console.error("Got error while unsubscribing from query",e.query,t)}))}this.removeClientRequestIdMapping(t),this.ongoingQueries.delete(t)}))).subscribe({error:()=>{}})}createOngoingQueryGraph(e,t,r,n,o,a,u={}){if(u[t])return u[t];const c=(0,i.generateId)(),l=[],f={clientRequestId:c,activated:a,alias:t,query:e,subscribe:o,subject:new s.ReplaySubject(1),supportedQueries:l,supportingOngoingQuery:void 0,joinCondition:void 0,gotResponseFromServer:!1,isEmptyForJoin:!1};this.registerQueryFinalizer(f),this.ongoingQueries.set(c,f),u[t]=f;for(const[e,i]of Object.entries(n)){const s=i.leftAlias;if(s!==t&&e!==t)continue;const a=s===t?e:s;if(s===t){const e=this.createOngoingQueryGraph(r[a],a,r,n,o,!1,u);e.joinCondition=i,l.push(e)}else f.supportingOngoingQuery=this.createOngoingQueryGraph(r[a],a,r,n,o,!1,u)}return f}collectAllObservables(e,t=[]){if(e.isEmptyForJoin)return t;const r=e.alias;t.push(e.subject.pipe((0,a.map)((e=>({docs:e,alias:r})))));for(const r of e.supportedQueries)this.collectAllObservables(r,t);return t}joinResults(e,t,r){const n=[],i=e.reduce(((e,t)=>(e[t.alias]?e[t.alias].push(...t.docs):e[t.alias]=[...t.docs],e)),{});i[r.alias].forEach((e=>{n.push({[r.alias]:e})}));const o=this.getOngoingQueriesBfs(r),s=new Set;for(let e=1;e<o.length;e++){const r=o[e].alias;s.has(r)||(s.add(r),this.join(n,r,i[r],t))}return n}join(e,t,r,n){var o;if(!e.length)return;const s=Object.keys(e[0]),a=n[t];if(!a||!s.includes(a.leftAlias))return;const u=new Map;(r||[]).forEach((e=>{const t=e[a.rightFieldName];u.has(t)||u.set(t,[]),(0,i.truthy)(u.get(t)).push(e)}));for(const r of[...e]){const n=u.get(null===(o=r[a.leftAlias])||void 0===o?void 0:o[a.leftFieldName])||[];if(n.length)for(const i of n)r[t]?e.push(Object.assign(Object.assign({},r),{[t]:i})):r[t]=i;else r[t]||(r[t]=void 0)}}getOngoingQueriesBfs(e){const t=[],r=[e];for(;r.length;){const e=(0,i.truthy)(r.shift());e.isEmptyForJoin||(t.push(e),r.push(...e.supportedQueries))}return t}updateOngoingQueryWithNewDataFromSupportingQuery(e,t){var r;const n=(0,i.truthy)(t.joinCondition),a=t.query;if(t.activated){const u=(0,i.truthy)(null===(r=t.supportingOngoingQuery)||void 0===r?void 0:r.supportedQueries).filter((e=>e.alias===t.alias)),c=new Set(e.map((e=>{var t;return null!==(t=e[n.leftFieldName])&&void 0!==t?t:null})));for(const e of u)e.query.conditions.filter((e=>e.fieldName===n.rightFieldName)).forEach((e=>{c.delete(e.value)}));if(0===c.size)return!1;const l=o.cloneDeep(a);l.conditions=l.conditions.filter((e=>e.fieldName!==n.rightFieldName)),[...c].forEach((e=>{l.conditions.push({fieldName:n.rightFieldName,operator:"==",value:e})}));const f=Object.assign(Object.assign({},t),{query:l,activated:!0,gotResponseFromServer:!1,subject:new s.ReplaySubject(1),clientRequestId:(0,i.generateId)(),isEmptyForJoin:!1});return this.registerQueryFinalizer(f),this.ongoingQueries.set(f.clientRequestId,f),(0,i.truthy)(t.supportingOngoingQuery).supportedQueries.push(f),this.sendQueryToServer(f),!0}{const r=e.map((e=>{var t;return{fieldName:n.rightFieldName,operator:"==",value:null!==(t=e[n.leftFieldName])&&void 0!==t?t:null}}));return t.activated=!0,r.length?(a.conditions.push(...r),this.sendQueryToServer(t)):t.isEmptyForJoin=!0,!0}}allOngoingQueriesGotServerResult(e){return!!e.isEmptyForJoin||!!e.gotResponseFromServer&&(!e.supportedQueries.length||e.supportedQueries.every((e=>this.allOngoingQueriesGotServerResult(e))))}completeAllSupportedQueries(e){const t=[...e.supportedQueries||[]];for(;t.length;){const e=(0,i.truthy)(t.shift());t.push(...e.supportedQueries||[]),e.subject.complete()}}predestruct(){this.safeToSendQueriesToServer.next(!1),this.safeToSendQueriesToServer.complete(),this.unsubscribe()}unsubscribe(){var e;const t=[...this.ongoingQueries.values()];for(const r of t)r.subject.complete(),null===(e=r.allObservables)||void 0===e||e.complete()}hasSubscription(e){var t;return!!(null===(t=this.ongoingQueries.get(e))||void 0===t?void 0:t.subscribe)}sendQueryToServer(e){const t=e.query,r=e.clientRequestId,n={query:t,clientRequestId:r,subscribe:e.subscribe,clientId:this.clientIdService.getClientId()},o=(0,i.getQuerySubscriptionId)(this.clientIdService.getClientId(),r);this.queryMappingManager.addQuery(c,t,o).then(),this.ongoingQueries.set(r,e),this.safeToSendQueriesToServer.pipe((0,a.filter)(Boolean),(0,s.take)(1)).subscribe((()=>{e.subject.closed||(this.inflightQueriesCount.next(this.inflightQueriesCount.value+1),this.rpcManager.post("query/query",n).catch((t=>{e.subject.error(t)})).finally((()=>{this.inflightQueriesCount.next(this.inflightQueriesCount.value-1)})))}))}refreshOngoingQueries(){for(const e of this.ongoingQueries.values())this.sendQueryToServer(e)}migrateDocIds(e){const t=Object.keys(e);for(const r of this.clientRequestIdToLocalDocuments.values())t.forEach((t=>{r.has(t)&&(r.delete(t),r.add(e[t]))}));t.forEach((t=>{(0,i.replaceKeyInMap)(this.localDocumentToClientRequestIds,t,e[t])}))}};class l extends i.SimpleQueryMappingManager{constructor(){super(...arguments),this.stateService=new u.StateService,this.querySubscriptionIdToQuery={}}async addQuery(e,t,r){this.stateService.runInBatch((()=>{let e=0;const n=new Set;for(const o of t.conditions){const s=this.getConditionStatePath(t,o),a=[...this.stateService.getStateInPath(s)||[]];if((0,i.insertSorted)(a,r),["==","!="].includes(o.operator)){const t=(0,i.encodeValueForMapping)(o.fieldName);n.has(t)||(e++,n.add(t))}else e++;this.stateService.setInPath(s,a)}if(!t.conditions.length){const e=["queryMapping",t.collectionName,t.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.insertSorted)(n,r),this.stateService.setInPath(e,n)}this.stateService.setInPath([...this.getQueryMetadataStatePath(t,r),"condCount"],e)})),this.querySubscriptionIdToQuery[r]=t}async removeQuery(e,t){const r=this.querySubscriptionIdToQuery[t];if(r)return this.stateService.runInBatch((()=>{for(const e of r.conditions){const n=this.getConditionStatePath(r,e),o=[...this.stateService.getStateInPath(n)||[]];(0,i.removeSorted)(o,t),o.length?this.stateService.setInPath(n,o):this.stateService.deletePath(n)}if(!r.conditions.length){const e=["queryMapping",r.collectionName,r.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.removeSorted)(n,t),this.stateService.setInPath(e,n)}this.stateService.deletePath(this.getQueryMetadataStatePath(r,t))})),r}getMapping(e,t,r){return this.stateService.getStateInPath(["queryMapping",t,r,"mapping"])}getQueryMetadataStatePath(e,t){return["queryMapping",e.collectionName,e.integrationId,"mapping","queriesMetadata",`${t}`]}getConditionStatePath(e,t){const r=(0,i.encodeValueForMapping)(t.fieldName),n=(0,i.encodeValueForMapping)(t.value);return["queryMapping",e.collectionName,e.integrationId,"mapping","conditional",`${r}`,`${t.operator}`,`${n}`]}}},602:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RpcError=t.RpcManager=void 0;const n=r(9312),i=r(575),o=n.__importDefault(r(9031)),s=r(2937);t.RpcManager=class{constructor(e,t,r,n={},o,a){this.rpcEndpoint=e,this.socketManager=t,this.destructManager=r,this.headers=n,this.authManager=o,this.clientIdService=a,this.staticHeaders={},this.onGoingRpcCounter=new s.BehaviorSubject(0),(0,i.assertTruthy)(e,"Http endpoint must be provided.");for(const[e,t]of Object.entries(n))this.setStaticHeader(e,t);const u=this.authManager.getApiKey();u&&this.setStaticHeader("Authorization",`ApiKey ${u}`),this.rpcEndpoint.endsWith("/")||(this.rpcEndpoint+="/"),this.authManager.observeAuthIdToken().subscribe((e=>{if(e.token){let t=`Bearer ${e.token}`;e.integrationId&&(t+=`; IntegrationId ${e.integrationId}`),this.setStaticHeader("Authorization",t)}else this.deleteStaticHeader("Authorization")})),r.onDestruct((async()=>{await this.awaitAllSettled()}))}async awaitAllSettled(){await(0,s.firstValueFrom)(this.onGoingRpcCounter.pipe((0,s.filter)((e=>0===e))))}setStaticHeader(e,t){this.staticHeaders[e]=t}deleteStaticHeader(e){delete this.staticHeaders[e]}getEndpoint(){return this.rpcEndpoint}getStaticHeaders(){return this.staticHeaders}async post(e,t){this.onGoingRpcCounter.next(this.onGoingRpcCounter.value+1);try{await(0,s.firstValueFrom)((0,s.race)(this.socketManager.observeConnectionReady().pipe((0,s.filter)(Boolean)),this.destructManager.isDestructingObservable)),t.clientId&&(t.clientId=this.clientIdService.getClientId()),await this.authManager.waitForReadyState();let r={"Content-Type":"application/json"};Object.keys(this.staticHeaders)&&(r=Object.assign(Object.assign({},r),this.staticHeaders));const n=await(0,o.default)(`${this.rpcEndpoint}${e}`,{method:"POST",body:(0,i.serializeObj)(t),headers:r});let u,c;try{u=await n.text();try{c=JSON.parse(u)}catch(e){}}catch(e){u="Cannot read body"}if(!n.ok)throw new a(n.status,n.statusText,n.headers,n.url,null==c?void 0:c.message);return c||u}finally{this.onGoingRpcCounter.next(this.onGoingRpcCounter.value-1)}}};class a extends Error{constructor(e,t,r,n,i){super(i||`RPC error ${e} ${t} calling ${n}`),this.statusCode=e,this.statusText=t,this.headers=r,this.url=n}}t.RpcError=a},3474:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketManager=void 0;const n=r(575),i=r(2937),o=r(8087),s=r(266);t.SocketManager=class{constructor(e,t,r=s.NOOP_FN,n,o={},a){this.clientIdService=e,this.socketIoEndpoint=t,this.messageNotificationWrapper=r,this.destructManager=n,this.authManager=a,this.webSocketObserver=new i.Subject,this.allMessagesObserver=new i.Subject,this.connectionReady=new i.BehaviorSubject(!1),this.seenMessageIds=new Set,this.firstConnection=!0,this.clientTooOldThreshold=3e5,this.destructManager.onDestruct((async()=>{await this.destruct()})),this.setupMessageAcknowledgments(),this.connect(Object.assign({},o)),this.connectionReady.pipe((0,i.skip)(1),(0,i.filter)((e=>!e)),(0,i.switchMap)((()=>(0,i.race)((0,i.timer)(this.clientTooOldThreshold),this.connectionReady.pipe((0,i.filter)(Boolean)),this.destructManager.isDestructingObservable)))).subscribe((()=>{this.connectionReady.value||this.destructManager.isDestructing||(this.clientIdService.notifyClientTooOld(),this.connect(Object.assign({},o)))})),this.connectionReady.pipe((0,i.filter)(Boolean)).subscribe((()=>{this.clientIdService.isClientTooOld()&&this.clientIdService.notifyClientReadyToBeRegenerated()}))}observeNotifications(){return this.webSocketObserver.asObservable()}observeConnectionReady(){return this.connectionReady.asObservable().pipe((0,i.distinctUntilChanged)())}sendMessage(e){this.authManager.waitForReadyState().then((()=>{(0,i.firstValueFrom)(this.connectionReady.pipe((0,i.filter)(Boolean))).then((()=>{const t=this.authManager.getAuthToken();(0,n.truthy)(this.socket).emit("message",Object.assign(Object.assign({},e),{authToken:t}))}))}))}connect(e){this.socket=(0,o.io)(this.socketIoEndpoint,{query:{clientId:this.clientIdService.getClientId()},reconnectionDelay:5e3,transports:["websocket"],extraHeaders:e}),this.socket.on("connect",(()=>{})),this.socket.on("disconnect",((e,t)=>{this.connectionReady.next(!1)})),this.socket.on("connectionReady",(()=>{this.connectionReady.next(!0),this.firstConnection||this.sendMessage({type:"catchup"}),this.firstConnection=!1})),this.socket.on("connect_error",(e=>{console.log("An error occurred while connecting to the socket with url: ",this.socketIoEndpoint)})),this.socket.on("message",(e=>{const t=(0,n.deserializeObj)(e);for(const e of t)this.allMessagesObserver.next(e),this.seenMessageIds.has(e.messageId)||(this.seenMessageIds.add(e.messageId),this.messageNotificationWrapper((()=>{this.webSocketObserver.next(e)})))}))}setupMessageAcknowledgments(){const e=new i.Subject;this.allMessagesObserver.subscribe((t=>{(null==t?void 0:t.messageId)&&e.next(t.messageId)}));const t=[];e.pipe((0,i.tap)((e=>t.push(e))),(0,i.debounceTime)(100)).subscribe((async()=>{const e=[...t.splice(0)];this.sendMessage({type:"acknowledge",payload:e})}))}async destruct(){var e;this.sendMessage({type:"kill"}),this.connectionReady.next(!1),await(0,i.firstValueFrom)((0,i.timer)(0)),null===(e=this.socket)||void 0===e||e.disconnect(),this.webSocketObserver.complete(),this.allMessagesObserver.complete()}}},5395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Squid=void 0;const n=r(9312),i=r(575),o=r(2937),s=r(5969),a=r(4268),u=r(9526),c=r(8862),l=r(7378),f=r(1600),p=r(4967),d=r(7787),h=r(4605),y=n.__importDefault(r(2256)),v=r(2417),m=r(5182),b=r(5621),g=r(7718),_=r(9194),w=r(9732),O=r(6891),S=r(4661),E=r(602),I=r(3474);class T{constructor(e){this.destructManager=new d.DestructManager,this.setAuthIdToken=(e,t)=>{this.authManager.setAuthIdToken(e,t)},this.collection=(e,t=i.IntegrationType.built_in_db)=>(this.validateNotDestructed(),this.collectionReferenceFactory.get(e,t)),this.runInTransaction=e=>(this.validateNotDestructed(),this.dataManager.runInTransaction(e)),this.executeFunction=(e,...t)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.backendFunctionManager.executeFunctionAndSubscribe(e,...t))),this.executeNamedQuery=(e,t,r)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.namedQueryManager.executeNamedQueryAndSubscribe(e,t,r))),this.callApi=(e,t,r={})=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.apiManager.callApiAndSubscribe(e,t,r))),this.graphql=e=>(this.validateNotDestructed(),this.graphqlClientFactory.get(e)),this.ai=()=>(this.validateNotDestructed(),{assistant:e=>this.aiClientFactory.getAssistant(e)}),this.acquireLock=(e,t=!0)=>(this.validateNotDestructed(),this.distributedLockManager.lock(e,t)),this.destruct=async()=>{if(!this.destructManager.isDestructing)return this.destructManager.destruct().finally((()=>{const e=Object.entries(T.squidInstancesMap).find((([,e])=>e===this));e&&delete T.squidInstancesMap[e[0]]}))},this.unsubscribe=async()=>{this.querySubscriptionManager.unsubscribe(),await this.rpcManager.awaitAllSettled()},(0,i.assertTruthy)(e.appId,"APP_ID_MUST_BE_PROVIDED");const t=(0,i.getApplicationUrl)(e.region,e.appId),r=(0,i.getApplicationHttpHeaders)(e.region,e.appId);this.clientIdService=new l.ClientIdService(this.destructManager),this.authManager=new u.AuthManager(this.destructManager,e.apiKey),this.socketManager=new I.SocketManager(this.clientIdService,t,e.messageNotificationWrapper,this.destructManager,r,this.authManager),this.rpcManager=new E.RpcManager(t,this.socketManager,this.destructManager,r,this.authManager,this.clientIdService),this.documentStore=new m.DocumentStore,this.lockManager=new i.LockManager,this.distributedLockManager=new h.DistributedLockManager(this.socketManager,this.destructManager),this.documentIdentityService=new y.default(this.documentStore,this.destructManager),this.documentReferenceFactory=new v.DocumentReferenceFactory,this.querySubscriptionManager=new S.QuerySubscriptionManager(this.rpcManager,this.clientIdService,this.documentStore,this.destructManager,this.documentIdentityService);const n=new g.MutationSender(this.clientIdService,this.rpcManager,this.lockManager,this.querySubscriptionManager);this.queryBuilderFactory=new O.QueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.documentIdentityService),this.joinQueryBuilderFactory=new w.JoinQueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.queryBuilderFactory),this.collectionReferenceFactory=new f.CollectionReferenceFactory(this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory,this.documentIdentityService),this.dataManager=new p.DataManager(this.documentStore,n,this.socketManager,this.querySubscriptionManager,this.queryBuilderFactory,this.lockManager,this.destructManager,this.documentIdentityService),this.documentReferenceFactory.setDataManager(this.dataManager),this.backendFunctionManager=new c.BackendFunctionManager(this.clientIdService,this.rpcManager,this.socketManager),this.namedQueryManager=new _.NamedQueryManager(this.clientIdService,this.rpcManager,this.socketManager),this.apiManager=new a.ApiManager(this.clientIdService,this.rpcManager,this.socketManager,e.apiServerUrlOverrideMapping),this.graphqlClientFactory=new b.GraphQLClientFactory(this.rpcManager),this.aiClientFactory=new s.AiClientFactory(this.clientIdService,this.rpcManager,this.socketManager)}static getInstance(e){const t=(0,i.normalizeJsonAsString)(e);let r=T.squidInstancesMap[t];return r||(r=new T(e),T.squidInstancesMap[t]=r,r)}static getInstances(){return Object.values(T.squidInstancesMap)}validateNotDestructed(){(0,i.assertTruthy)(!this.destructManager.isDestructing,"The client was already destructed.")}}t.Squid=T,T.squidInstancesMap={}},1064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStateObject=t.apply=void 0;const n=r(1496);function i(e){return"object"==typeof e}function o(e,t){let r=e;if((0,n.isPathAction)(t))r=function(e,t,r=[]){switch(t.type){case n.ActionType.DELETE_PATH:return s(e,t.path);case n.ActionType.SET_PATH:const i=t;return function(e,t,r,n){return a(e,t,r,n)}(e,t.path,r,i.payload);case n.ActionType.BATCH_ACTION:throw new Error("Unsupported")}}(e,t,[]);else{if(!(0,n.isBatchAction)(t))throw new Error(`Invalid action type: ${t.type}`);r=t.payload.reduce(((e,t)=>o(e,t)),e)}return r}function s(e,t){if(!t.length)throw new Error("can not delete an empty path");const r=t[0];if(1===t.length)return function(e,t){if(e instanceof Array)throw new Error("Cannot remove an item from an array");const r=Object.assign({},e);return delete r[t],r}(e,r);const n=t.slice(1),o=c(e,r);if(!o)return e;if(!i(o))throw new Error("Cannot delete from a non object state.");const a=s(o,n);return a===o?e:u(e,r,a)}function a(e,t,r,n){if(!t.length){if(i(n))return n;throw new Error("Relative path cannot be of length 0 when the new value is not an object.")}const o=t[0],s=[...r,o];if(1===t.length)return u(e,o,n);const l=t.slice(1),f=c(e,o);return void 0!==f&&i(f)?u(e,o,a(f,l,s,n)):a(e=u(e,o,{}),t,r,n)}function u(e,t,r){return(e=Object.assign({},e))[t]=r,e}function c(e,t){return e instanceof Array?e[function(e){const t=Number(e);if(isNaN(t))throw new Error(`The value is not a number: Actual: ${e}`);return Math.floor(t)}(t)]:e[t]}t.apply=function(e,t){return o(e,t)},t.isStateObject=i},1496:(e,t)=>{"use strict";var r;function n(e){return[r.SET_PATH,r.DELETE_PATH].includes(e.type)}function i(e){return e.type===r.BATCH_ACTION}Object.defineProperty(t,"__esModule",{value:!0}),t.getSingleAction=t.extractAllPathActions=t.isBatchAction=t.isDeletePathAction=t.isSetPathAction=t.isPathAction=t.ActionType=void 0,function(e){e.DELETE_PATH="DELETE_PATH",e.SET_PATH="SET_PATH",e.BATCH_ACTION="BATCH_ACTION"}(r=t.ActionType||(t.ActionType={})),t.isPathAction=n,t.isSetPathAction=function(e){return e.type===r.SET_PATH},t.isDeletePathAction=function(e){return e.type===r.DELETE_PATH},t.isBatchAction=i,t.extractAllPathActions=function e(t){const r=[];if(n(t))r.push(t);else if(i(t))for(const n of t.payload)r.push(...e(n));return r},t.getSingleAction=function(e){return 1===e.length?e[0]:{type:r.BATCH_ACTION,payload:e}}},8336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathTrieFromAction=t.PathTrieNode=t.PathTrie=void 0;const n=r(1496);class i{constructor(){this.root=new o}getOrCreatePathTrieNode(e,t){let r=this.root;for(const t of e)r.children.get(t)||r.children.set(t,new o),r=r.children.get(t);return void 0!==t&&(r.nodeData=t),r}getPathTrieNode(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}return t}getPathTrie(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}if(t){const e=new i;return e.root=t,e}}iterateBfs(e){this.iterateInternal(this.root,e,[])}removeNode(e){e.length||(this.root=new o);const t=[this.root];for(const r of e){const e=t[t.length-1].children.get(r);if(!e)throw new Error("Node does not exist");t.push(e)}for(let r=t.length-1;r>0;r--){const n=t[r],i=e[r-1];if((n.nodeData||n.children.size)&&r!==t.length-1)break;t[r-1].children.delete(i)}}clearNodeData(e){const t=this.getPathTrieNode(e);t&&(t.nodeData=void 0,t.children.size||this.removeNode(e))}getNodeList(e){const t=[];let r=this.root;for(const n of e){if(!r)return t;t.push(r),r=r.children.get(n)}return t}iterateInternal(e,t,r){if(!1!==t(e.nodeData,r))for(const[n,i]of e.children)this.iterateInternal(i,t,r.concat(n))}}t.PathTrie=i;class o{constructor(){this.children=new Map([])}}t.PathTrieNode=o,t.getPathTrieFromAction=function(e,t){const r=new i;for(const i of(0,n.extractAllPathActions)(e)){let e=r.getOrCreatePathTrieNode(i.path);if(!t||e.nodeData)continue;let n=t.getPathTrieNode(i.path);if(n){const t=[[e,n]];for(;t.length;){const r=t.shift();if(e=r[0],n=r[1],!e.nodeData){for(const[r,i]of n.children)e.children.get(r)||e.children.set(r,new o),t.push([e.children.get(r),i]);e.nodeData=!0}}}}return r}},1122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const n=r(2937),i=r(9978),o=r(1064),s=r(1496),a=r(8336);function u(e,t){let r=e;for(const e of t){if(null==r)return;if(!(0,o.isStateObject)(r))throw new Error("result must be a state object");r=r[e]}return r}t.StateService=class{constructor(){this.subscriptionsTree=new a.PathTrie,this.state={},this.batchCount=0,this.batchedActions=[]}dispatch(e){this.batchCount>0&&this.batchedActions.push(e),this.state=(0,o.apply)(this.state,e),0===this.batchCount&&this.dispatchSubscriptions(e)}runInBatch(e){this.batchCount++;try{e()}finally{if(this.batchCount--,0===this.batchCount&&this.batchedActions.length){const e={type:s.ActionType.BATCH_ACTION,payload:[...this.batchedActions]};this.batchedActions.splice(0),this.dispatch(e)}}}observePath(e,t){return new n.Observable((r=>{const n=this.getOrCreateSubjectForPath(e);r.next(this.getStateInPath(e));const o=n.pipe((0,i.filter)((e=>{if(!t)return!0;const r=new a.PathTrie,n=t();for(const e of n)r.getOrCreatePathTrieNode(e,!0);const i=(0,s.extractAllPathActions)(e.action).map((e=>e.path));let o=!1;for(const e of i)if(0===r.getNodeList(e).length){o=!0;break}return o})),(0,i.map)((e=>e.data))).subscribe(r);return()=>{o.unsubscribe(),n.observed||(n.complete(),this.subscriptionsTree.clearNodeData(e))}}))}setKeyInPath(e,t,r,n=!1){this.setInPath([...e,t],r,n)}setPartial(e,t,r=!1){let n=this.getStateInPath(e);n||(n={}),this.setInPath(e,Object.assign(Object.assign({},n),t),r)}setInPath(e,t,r=!1){if(r&&this.getStateInPath(e)===t)return;const n={type:s.ActionType.SET_PATH,path:e,payload:t};this.dispatch(n)}pushToArray(e,t){let r=this.getStateInPath(e);r=r?[...r]:[],r.push(t),this.setInPath(e,r)}deletePath(e){const t={type:s.ActionType.DELETE_PATH,path:e};this.dispatch(t)}getState(){return this.state}getStateInPath(e){return u(this.state,e)}destroy(){this.subscriptionsTree.iterateBfs((e=>{e&&e.subject&&e.subject.complete()}))}getOrCreateSubjectForPath(e){const t=this.subscriptionsTree.getOrCreatePathTrieNode(e);t.nodeData||(t.nodeData=new c);const r=t.nodeData;return r.subject||(r.subject=new n.Subject),r.subject}dispatchSubscriptions(e){(0,a.getPathTrieFromAction)(e,this.subscriptionsTree).iterateBfs(((t,r)=>{const n=this.subscriptionsTree.getPathTrieNode(r);n&&n.nodeData&&n.nodeData.subject.next({action:e,data:u(this.getState(),r)})}))}};class c{}},266:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP_FN=void 0,t.NOOP_FN=e=>e()},9312:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>I,__asyncGenerator:()=>E,__asyncValues:()=>T,__await:()=>S,__awaiter:()=>h,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>k,__classPrivateFieldSet:()=>M,__createBinding:()=>v,__decorate:()=>a,__esDecorate:()=>c,__exportStar:()=>m,__extends:()=>i,__generator:()=>y,__importDefault:()=>A,__importStar:()=>x,__makeTemplateObject:()=>j,__metadata:()=>d,__param:()=>u,__propKey:()=>f,__read:()=>g,__rest:()=>s,__runInitializers:()=>l,__setFunctionName:()=>p,__spread:()=>_,__spreadArray:()=>O,__spreadArrays:()=>w,__values:()=>b});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var v=(0,r[d])("accessor"===u?{get:f.get,set:f.set}:f[c],h);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(a=s(v.get))&&(f.get=a),(a=s(v.set))&&(f.set=a),(a=s(v.init))&&i.push(a)}else(a=s(v))&&("field"===u?i.push(a):f[c]=a)}l&&Object.defineProperty(l,n.name,f),p=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function y(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function E(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof S?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:i?i(t):t}:i}}function T(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function j(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return P(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function N(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function M(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function k(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},2371:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),s=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",u=t("[\\:\\/\\?\\#\\[\\]\\@]",a),c=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),f=r(n+t(n,i,"[\\+\\-\\.]")+"*"),p=r(r(s+"|"+t(l,a,"[\\:]"))+"*"),d=(r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("[1-9]"+i)+"|"+i),r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i)),h=r(d+"\\."+d+"\\."+d+"\\."+d),y=r(o+"{1,4}"),v=r(r(y+"\\:"+y)+"|"+h),m=r(r(y+"\\:")+"{6}"+v),b=r("\\:\\:"+r(y+"\\:")+"{5}"+v),g=r(r(y)+"?\\:\\:"+r(y+"\\:")+"{4}"+v),_=r(r(r(y+"\\:")+"{0,1}"+y)+"?\\:\\:"+r(y+"\\:")+"{3}"+v),w=r(r(r(y+"\\:")+"{0,2}"+y)+"?\\:\\:"+r(y+"\\:")+"{2}"+v),O=r(r(r(y+"\\:")+"{0,3}"+y)+"?\\:\\:"+y+"\\:"+v),S=r(r(r(y+"\\:")+"{0,4}"+y)+"?\\:\\:"+v),E=r(r(r(y+"\\:")+"{0,5}"+y)+"?\\:\\:"+y),I=r(r(r(y+"\\:")+"{0,6}"+y)+"?\\:\\:"),T=r([m,b,g,_,w,O,S,E,I].join("|")),j=r(r(l+"|"+s)+"+"),P=(r(T+"\\%25"+j),r(T+r("\\%25|\\%(?!"+o+"{2})")+j)),x=r("[vV]"+o+"+\\."+t(l,a,"[\\:]")+"+"),A=r("\\["+r(P+"|"+T+"|"+x)+"\\]"),N=r(r(s+"|"+t(l,a))+"*"),M=r(A+"|"+h+"(?!"+N+")|"+N),k=r(i+"*"),D=r(r(p+"@")+"?"+M+r("\\:"+k)+"?"),R=r(s+"|"+t(l,a,"[\\:\\@]")),C=r(R+"*"),$=r(R+"+"),F=r(r(s+"|"+t(l,a,"[\\@]"))+"+"),q=r(r("\\/"+C)+"*"),L=r("\\/"+r($+q)+"?"),B=r(F+q),U=r($+q),V="(?!"+R+")",z=(r(q+"|"+L+"|"+B+"|"+U+"|"+V),r(r(R+"|"+t("[\\/\\?]",c))+"*")),Q=r(r(R+"|[\\/\\?]")+"*"),Y=r(r("\\/\\/"+D+q)+"|"+L+"|"+U+"|"+V),W=r(f+"\\:"+Y+r("\\?"+z)+"?"+r("\\#"+Q)+"?"),H=r(r("\\/\\/"+D+q)+"|"+L+"|"+B+"|"+V),K=r(H+r("\\?"+z)+"?"+r("\\#"+Q)+"?");return r(W+"|"+K),r(f+"\\:"+Y+r("\\?"+z)+"?"),r(r("\\/\\/("+r("("+p+")@")+"?("+M+")"+r("\\:("+k+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+M+")"+r("\\:("+k+")")+"?)")+"?("+q+"|"+L+"|"+B+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+M+")"+r("\\:("+k+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r("("+p+")@"),r("\\:("+k+")"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,a),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,u),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+T+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+j+")")+"?\\]?$")}}var s=o(!1),a=o(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=36,f=/^xn--/,p=/[^\0-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=Math.floor,v=String.fromCharCode;function m(e){throw new RangeError(h[e])}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(d,".")).split("."),t).join(".")}function g(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var _=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},w=function(e,t,r){var n=0;for(e=r?y(e/700):e>>1,e+=y(e/t);e>455;n+=l)e=y(e/35);return y(n+36*e/(e+38))},O=function(e){var t,r=[],n=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var u=0;u<a;++u)e.charCodeAt(u)>=128&&m("not-basic"),r.push(e.charCodeAt(u));for(var f=a>0?a+1:0;f<n;){for(var p=i,d=1,h=l;;h+=l){f>=n&&m("invalid-input");var v=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l;(v>=l||v>y((c-i)/d))&&m("overflow"),i+=v*d;var b=h<=s?1:h>=s+26?26:h-s;if(v<b)break;var g=l-b;d>y(c/g)&&m("overflow"),d*=g}var _=r.length+1;s=w(i-p,_,0==p),y(i/_)>c-o&&m("overflow"),o+=y(i/_),i%=_,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},S=function(e){var t=[],r=(e=g(e)).length,n=128,i=0,o=72,s=!0,a=!1,u=void 0;try{for(var f,p=e[Symbol.iterator]();!(s=(f=p.next()).done);s=!0){var d=f.value;d<128&&t.push(v(d))}}catch(e){a=!0,u=e}finally{try{!s&&p.return&&p.return()}finally{if(a)throw u}}var h=t.length,b=h;for(h&&t.push("-");b<r;){var O=c,S=!0,E=!1,I=void 0;try{for(var T,j=e[Symbol.iterator]();!(S=(T=j.next()).done);S=!0){var P=T.value;P>=n&&P<O&&(O=P)}}catch(e){E=!0,I=e}finally{try{!S&&j.return&&j.return()}finally{if(E)throw I}}var x=b+1;O-n>y((c-i)/x)&&m("overflow"),i+=(O-n)*x,n=O;var A=!0,N=!1,M=void 0;try{for(var k,D=e[Symbol.iterator]();!(A=(k=D.next()).done);A=!0){var R=k.value;if(R<n&&++i>c&&m("overflow"),R==n){for(var C=i,$=l;;$+=l){var F=$<=o?1:$>=o+26?26:$-o;if(C<F)break;var q=C-F,L=l-F;t.push(v(_(F+q%L,0))),C=y(q/L)}t.push(v(_(C,0))),o=w(i,x,b==h),i=0,++b}}}catch(e){N=!0,M=e}finally{try{!A&&D.return&&D.return()}finally{if(N)throw M}}++i,++n}return t.join("")},E={version:"2.1.0",ucs2:{decode:g,encode:function(e){return String.fromCodePoint.apply(String,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(e))}},decode:O,encode:S,toASCII:function(e){return b(e,(function(e){return p.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return b(e,(function(e){return f.test(e)?O(e.slice(4).toLowerCase()):e}))}},I={};function T(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function j(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var s=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function P(e,t){function r(e){var r=j(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,T).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,T).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,T).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,T).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,T).replace(t.PCT_ENCODED,i)),e}function x(e){return e.replace(/^0*(.*)/,"$1")||"0"}function A(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(x).join("."):e}function N(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),i=n[1],o=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=u(s,2),c=a[0],l=a[1],f=l?l.split(":").map(x):[],p=c.split(":").map(x),d=t.IPV4ADDRESS.test(p[p.length-1]),h=d?7:8,y=p.length-h,v=Array(h),m=0;m<h;++m)v[m]=f[m]||p[y+m]||"";d&&(v[h-1]=A(v[h-1],t));var b=v.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],g=void 0;if(b&&b.length>1){var _=v.slice(0,b.index),w=v.slice(b.index+b.length);g=_.join(":")+"::"+w.join(":")}else g=v.join(":");return o&&(g+="%"+o),g}return e}var M=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,k=void 0==="".match(/(){0}/)[1];function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(M);if(i){k?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=N(A(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=I[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)P(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=E.toASCII(r.host.replace(n.PCT_ENCODED,j).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}P(r,s)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}var R=/^\.\.?\//,C=/^\/\.(\/|$)/,$=/^\/\.\.(\/|$)/,F=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var t=[];e.length;)if(e.match(R))e=e.replace(R,"");else if(e.match(C))e=e.replace(C,"/");else if(e.match($))e=e.replace($,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(F);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:s,n=[],i=I[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?E.toUnicode(e.host):E.toASCII(e.host.replace(r.PCT_ENCODED,j).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}P(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=function(e,t){var r=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(N(A(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||i&&i.absolutePath||(u=q(u)),void 0===o&&(u=u.replace(/^\/\//,"/%2F")),n.push(u)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function B(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=D(L(e,r),r),t=D(L(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=q(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=q(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=q(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=q(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function U(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,j)}var V={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},z={scheme:"https",domainHost:V.domainHost,parse:V.parse,serialize:V.serialize};function Q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var Y={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=Q(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(Q(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=u(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},W={scheme:"wss",domainHost:Y.domainHost,parse:Y.parse,serialize:Y.serialize},H={},K="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",G="[0-9A-Fa-f]",J=r(r("%[EFef]"+G+"%"+G+G+"%"+G+G)+"|"+r("%[89A-Fa-f]"+G+"%"+G+G)+"|"+r("%"+G+G)),Z=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),X=new RegExp(K,"g"),ee=new RegExp(J,"g"),te=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Z),"g"),re=new RegExp(t("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ne=re;function ie(e){var t=j(e);return t.match(X)?t:e}var oe={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},s=r.query.split("&"),a=0,u=s.length;a<u;++a){var c=s[a].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,p=l.length;f<p;++f)n.push(l[f]);break;case"subject":r.subject=U(c[1],t);break;case"body":r.body=U(c[1],t);break;default:i=!0,o[U(c[0],t)]=U(c[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var d=0,h=n.length;d<h;++d){var y=n[d].split("@");if(y[0]=U(y[0]),t.unicodeSupport)y[1]=U(y[1],t).toLowerCase();else try{y[1]=E.toASCII(U(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=y.join("@")}return r},serialize:function(e,t){var r,n=e,o=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(o){for(var s=0,a=o.length;s<a;++s){var u=String(o[s]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(ee,ie).replace(ee,i).replace(te,T),f=u.slice(c+1);try{f=t.iri?E.toUnicode(f):E.toASCII(U(f,t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}o[s]=l+"@"+f}n.path=o.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var d=[];for(var h in p)p[h]!==H[h]&&d.push(h.replace(ee,ie).replace(ee,i).replace(re,T)+"="+p[h].replace(ee,ie).replace(ee,i).replace(ne,T));return d.length&&(n.query=d.join("&")),n}},se=/^([^\:]+)\:(.*)/,ae={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(se),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),s=r[2],a=i+":"+(t.nid||o),u=I[a];n.nid=o,n.nss=s,n.path=void 0,u&&(n=u.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=I[i];o&&(e=o.serialize(e,t));var s=e,a=e.nss;return s.path=(n||t.nid)+":"+a,s}},ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(ue)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};I[V.scheme]=V,I[z.scheme]=z,I[Y.scheme]=Y,I[W.scheme]=W,I[oe.scheme]=oe,I[ae.scheme]=ae,I[ce.scheme]=ce,e.SCHEMES=I,e.pctEncChar=T,e.pctDecChars=j,e.parse=D,e.removeDotSegments=q,e.serialize=L,e.resolveComponents=B,e.resolve=function(e,t,r){var n=function(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}({scheme:"null"},r);return L(B(D(e,n),D(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=L(D(e,t),t):"object"===n(e)&&(e=D(L(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=L(D(e,r),r):"object"===n(e)&&(e=L(e,r)),"string"==typeof t?t=L(D(t,r),r):"object"===n(t)&&(t=L(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?a.ESCAPE:s.ESCAPE,T)},e.unescapeComponent=U,Object.defineProperty(e,"__esModule",{value:!0})}(t)},9031:e=>{"use strict";e.exports=require("cross-fetch")},8087:e=>{"use strict";e.exports=require("socket.io-client")},2948:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ApolloCache:()=>An,ApolloClient:()=>xn,ApolloError:()=>br,ApolloLink:()=>_e,Cache:()=>jn,HttpLink:()=>Ot,InMemoryCache:()=>xi,MissingFieldError:()=>Nn,NetworkStatus:()=>mr,Observable:()=>W,ObservableQuery:()=>Tr,checkFetcher:()=>Ge,concat:()=>ki,createHttpLink:()=>wt,createSignalIfSupported:()=>mt,defaultDataIdFromObject:()=>Rn,defaultPrinter:()=>ht,disableExperimentalFragmentVariables:()=>To,disableFragmentWarnings:()=>Eo,empty:()=>Ai,enableExperimentalFragmentVariables:()=>Io,execute:()=>we,fallbackHttpConfig:()=>dt,from:()=>Ni,fromError:()=>gt,fromPromise:()=>Ri,gql:()=>Oo,isApolloError:()=>vr,isReference:()=>X,makeReference:()=>Z,makeVar:()=>mn,mergeOptions:()=>Tn,parseAndCheckHttpResponse:()=>Ke,resetCaches:()=>So,rewriteURIForGET:()=>bt,selectHttpOptionsAndBody:()=>yt,selectHttpOptionsAndBodyInternal:()=>vt,selectURI:()=>$e,serializeFetchParameter:()=>Ce,setLogVerbosity:()=>p,split:()=>Mi,throwServerError:()=>ze,toPromise:()=>Di});var n=r(9312),i="Invariant Violation",o=Object.setPrototypeOf,s=void 0===o?function(e,t){return e.__proto__=t,e}:o,a=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"==typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,s(n,t.prototype),n}return(0,n.__extends)(t,e),t}(Error);function u(e,t){if(!e)throw new a(t)}var c=["debug","log","warn","error","silent"],l=c.indexOf("log");function f(e){return function(){if(c.indexOf(e)>=l)return(console[e]||console.log).apply(console,arguments)}}function p(e){var t=c[l];return l=Math.max(0,c.indexOf(e)),t}function d(e){try{return e()}catch(e){}}!function(e){e.debug=f("debug"),e.log=f("log"),e.warn=f("warn"),e.error=f("error")}(u||(u={}));const h=d((function(){return globalThis}))||d((function(){return window}))||d((function(){return self}))||d((function(){return global}))||d((function(){return d.constructor("return this")()}));var y="__",v=[y,y].join("DEV");const m=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(h,v,{value:"production"!==d((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),h[v]}}();function b(e){try{return e()}catch(e){}}var g=b((function(){return globalThis}))||b((function(){return window}))||b((function(){return self}))||b((function(){return global}))||b((function(){return b.constructor("return this")()})),_=!1;function w(e,t){if(!Boolean(e))throw new Error(t)}!g||b((function(){return"production"}))||b((function(){return process}))||(Object.defineProperty(g,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0);const O=10,S=2;function E(e){return I(e,[])}function I(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:I(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>S)return"[Array]";const r=Math.min(O,e.length),n=e.length-r,i=[];for(let n=0;n<r;++n)i.push(I(e[n],t));return 1===n?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>S)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const n=r.map((([e,r])=>e+": "+I(r,t)));return"{ "+n.join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}class T{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||w(!1,`Body must be a string. Received: ${E(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||w(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||w(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function P(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function x(e,t,r){return t&&P(e.prototype,t),r&&P(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}_&&(delete g.process,_=!1),__DEV__?u("boolean"==typeof m,m):u("boolean"==typeof m,39);var A=function(){return"function"==typeof Symbol},N=function(e){return A()&&Boolean(Symbol[e])},M=function(e){return N(e)?Symbol[e]:"@@"+e};A()&&!N("observable")&&(Symbol.observable=Symbol("observable"));var k=M("iterator"),D=M("observable"),R=M("species");function C(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function $(e){var t=e.constructor;return void 0!==t&&null===(t=t[R])&&(t=void 0),void 0!==t?t:W}function F(e){return e instanceof W}function q(e){q.log?q.log(e):setTimeout((function(){throw e}))}function L(e){Promise.resolve().then((function(){try{e()}catch(e){q(e)}}))}function B(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=C(t,"unsubscribe");r&&r.call(t)}}catch(e){q(e)}}function U(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function V(e,t,r){e._state="running";var n=e._observer;try{var i=C(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(U(e),!i)throw r;i.call(n,r);break;case"complete":U(e),i&&i.call(n)}}catch(e){q(e)}"closed"===e._state?B(e):"running"===e._state&&(e._state="ready")}function z(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void L((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(V(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void V(e,t,r);e._queue.push({type:t,value:r})}}var Q=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new Y(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(U(this),B(this))},x(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),Y=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){z(this._subscription,"next",e)},t.error=function(e){z(this._subscription,"error",e)},t.complete=function(){z(this._subscription,"complete")},x(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),W=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new Q(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new($(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new($(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=$(this),n=arguments.length>1,i=!1,o=arguments[1];return new r((function(r){return t.subscribe({next:function(t){var s=!i;if(i=!0,!s||n)try{o=e(o,t)}catch(e){return r.error(e)}else o=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(o),r.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=$(this);return new i((function(t){var n,o=0;return function e(s){n=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=$(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),s()}});i.push(o)},error:function(e){n.error(e)},complete:function(){s()}});function s(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[D]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=C(t,D);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return F(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(N("iterator")&&(n=C(t,k)))return new r((function(e){L((function(){if(!e.closed){for(var r,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){L((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)((function(e){L((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))},x(e,null,[{key:R,get:function(){return this}}]),e}();function H(e){return null!==e&&"object"==typeof e}function K(e,t){var r=t,i=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new a("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new a(44);"FragmentDefinition"===e.kind&&i.push(e)})),void 0===r&&(__DEV__?u(1===i.length,"Found ".concat(i.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):u(1===i.length,45),r=i[0].name.value),(0,n.__assign)((0,n.__assign)({},e),{definitions:(0,n.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function G(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function J(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=e.name.value;if("function"==typeof t)return t(r);var n=t&&t[r];return __DEV__?u(n,"No fragment named ".concat(r)):u(n,46),n||null;default:return null}}function Z(e){return{__ref:String(e)}}function X(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function ee(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var i={};r.fields.map((function(e){return ee(i,e.name,e.value,n)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return ee(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw __DEV__?new a('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new a(55);e[t.value]=null}}A()&&Object.defineProperty(W,Symbol("extensions"),{value:{symbol:D,hostReportError:q},configurable:!0});var te=["connection","include","skip","client","rest","export"],re=Object.assign((function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),"".concat(r.connection.key,"(").concat(ne(i),")")}return r.connection.key}var o=e;if(t){var s=ne(t);o+="(".concat(s,")")}return r&&Object.keys(r).forEach((function(e){-1===te.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(ne(r[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=ne;return ne=e,t}}),ne=function(e){return JSON.stringify(e,ie)};function ie(e,t){return H(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{})),t}function oe(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return ee(r,n,i,t)})),r}return null}function se(e){return e.alias?e.alias.value:e.name.value}function ae(e,t,r){if("string"==typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var o=i[n];if(ue(o)){if("__typename"===o.name.value)return e[se(o)]}else{var s=ae(e,J(o,r).selectionSet,r);if("string"==typeof s)return s}}}function ue(e){return"Field"===e.kind}function ce(e){__DEV__?u(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u(e&&"Document"===e.kind,47);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new a('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new a(48);return e}));return __DEV__?u(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):u(t.length<=1,49),e}function le(e){return ce(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function fe(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function pe(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function de(e){var t=le(e);return __DEV__?u(t&&"query"===t.operation,"Must contain a query definition."):u(t&&"query"===t.operation,50),t}function he(e){var t;ce(e);for(var r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new a("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new a(54)}function ye(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach((function(e){e.defaultValue&&ee(t,e.variable.name,e.defaultValue)})),t}function ve(e,t){return t?t(e):W.of()}function me(e){return"function"==typeof e?new _e(e):e}function be(e){return e.request.length<=1}var ge=function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}return(0,n.__extends)(t,e),t}(Error),_e=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return W.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(me).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=me(r),o=me(n||new e(ve));return be(i)&&be(o)?new e((function(e){return t(e)?i.request(e)||W.of():o.request(e)||W.of()})):new e((function(e,r){return t(e)?i.request(e,r)||W.of():o.request(e,r)||W.of()}))},e.execute=function(e,t){return e.request(function(e,t){var r=(0,n.__assign)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?(0,n.__assign)((0,n.__assign)({},r),e(r)):(0,n.__assign)((0,n.__assign)({},r),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,n.__assign)({},r)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?fe(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw __DEV__?new a("illegal argument: ".concat(i)):new a(27)}return e}(t))))||W.of()},e.concat=function(t,r){var n=me(t);if(be(n))return __DEV__&&u.warn(new ge("You are calling concat on a terminating link, which will have no effect",n)),n;var i=me(r);return be(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||W.of()}))||W.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||W.of()}))||W.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(ve)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new a("request is not implemented"):new a(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),we=_e.execute;class Oe{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Se{constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Ee={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Ie=new Set(Object.keys(Ee));function Te(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&Ie.has(t)}var je,Pe,xe;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(je||(je={})),(xe=Pe||(Pe={})).NAME="Name",xe.DOCUMENT="Document",xe.OPERATION_DEFINITION="OperationDefinition",xe.VARIABLE_DEFINITION="VariableDefinition",xe.SELECTION_SET="SelectionSet",xe.FIELD="Field",xe.ARGUMENT="Argument",xe.FRAGMENT_SPREAD="FragmentSpread",xe.INLINE_FRAGMENT="InlineFragment",xe.FRAGMENT_DEFINITION="FragmentDefinition",xe.VARIABLE="Variable",xe.INT="IntValue",xe.FLOAT="FloatValue",xe.STRING="StringValue",xe.BOOLEAN="BooleanValue",xe.NULL="NullValue",xe.ENUM="EnumValue",xe.LIST="ListValue",xe.OBJECT="ObjectValue",xe.OBJECT_FIELD="ObjectField",xe.DIRECTIVE="Directive",xe.NAMED_TYPE="NamedType",xe.LIST_TYPE="ListType",xe.NON_NULL_TYPE="NonNullType",xe.SCHEMA_DEFINITION="SchemaDefinition",xe.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",xe.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",xe.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",xe.FIELD_DEFINITION="FieldDefinition",xe.INPUT_VALUE_DEFINITION="InputValueDefinition",xe.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",xe.UNION_TYPE_DEFINITION="UnionTypeDefinition",xe.ENUM_TYPE_DEFINITION="EnumTypeDefinition",xe.ENUM_VALUE_DEFINITION="EnumValueDefinition",xe.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",xe.DIRECTIVE_DEFINITION="DirectiveDefinition",xe.SCHEMA_EXTENSION="SchemaExtension",xe.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",xe.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",xe.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",xe.UNION_TYPE_EXTENSION="UnionTypeExtension",xe.ENUM_TYPE_EXTENSION="EnumTypeExtension",xe.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";const Ae=Object.freeze({});function Ne(e,t,r=Ee){const n=new Map;for(const e of Object.values(Pe))n.set(e,Me(t,e));let i,o,s,a=Array.isArray(e),u=[e],c=-1,l=[],f=e;const p=[],d=[];do{c++;const e=c===u.length,m=e&&0!==l.length;if(e){if(o=0===d.length?void 0:p[p.length-1],f=s,s=d.pop(),m)if(a){f=f.slice();let e=0;for(const[t,r]of l){const n=t-e;null===r?(f.splice(n,1),e++):f[n]=r}}else{f=Object.defineProperties({},Object.getOwnPropertyDescriptors(f));for(const[e,t]of l)f[e]=t}c=i.index,u=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(s){if(o=a?c:u[c],f=s[o],null==f)continue;p.push(o)}let b;if(!Array.isArray(f)){var h,y;Te(f)||w(!1,`Invalid AST Node: ${E(f)}.`);const r=e?null===(h=n.get(f.kind))||void 0===h?void 0:h.leave:null===(y=n.get(f.kind))||void 0===y?void 0:y.enter;if(b=null==r?void 0:r.call(t,f,o,s,p,d),b===Ae)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(l.push([o,b]),!e)){if(!Te(b)){p.pop();continue}f=b}}var v;void 0===b&&m&&l.push([o,f]),e?p.pop():(i={inArray:a,index:c,keys:u,edits:l,prev:i},a=Array.isArray(f),u=a?f:null!==(v=r[f.kind])&&void 0!==v?v:[],c=-1,l=[],s&&d.push(s),s=f)}while(void 0!==i);return 0!==l.length?l[l.length-1][1]:e}function Me(e,t){const r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function ke(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments,n=e.name.value;__DEV__?u(r&&1===r.length,"Incorrect number of arguments for the @".concat(n," directive.")):u(r&&1===r.length,41);var i=r[0];__DEV__?u(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(n," directive.")):u(i.name&&"if"===i.name.value,42);var o=i.value;__DEV__?u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @".concat(n," directive must be a variable or a boolean value.")):u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),43),t.push({directive:e,ifArgument:i})}})),t}(r).every((function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?(i=t&&t[n.value.name.value],__DEV__?u(void 0!==i,"Invalid variable referenced in @".concat(r.name.value," directive.")):u(void 0!==i,40)):i=n.value.value,"skip"===r.name.value?!i:i}))}function De(e,t,r){var n=new Set(e),i=n.size;return Ne(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return Ae}}),r?!n.size:n.size<i}function Re(e){return e&&De(["client","export"],e,!0)}var Ce=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=__DEV__?new a("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new a(24);throw n.parseError=e,n}return r},$e=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},Fe="function"==typeof WeakMap&&"ReactNative"!==d((function(){return navigator.product})),qe="function"==typeof WeakSet,Le="function"==typeof Symbol&&"function"==typeof Symbol.for,Be=Le&&Symbol.asyncIterator;function Ue(e){var t={next:function(){return e.read()}};return Be&&(t[Symbol.asyncIterator]=function(){return this}),t}function Ve(e){var t,r,n,i,o=e;if(e.body&&(o=e.body),i=o,Be&&i[Symbol.asyncIterator])return function(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}(o);if(function(e){return!!e.getReader}(o))return Ue(o.getReader());if(function(e){return!!e.stream}(o))return Ue(o.stream().getReader());if(function(e){return!!e.arrayBuffer}(o))return t=o.arrayBuffer(),r=!1,n={next:function(){return r?Promise.resolve({value:void 0,done:!0}):(r=!0,new Promise((function(e,r){t.then((function(t){e({value:t,done:!1})})).catch(r)})))}},Be&&(n[Symbol.asyncIterator]=function(){return this}),n;if(function(e){return!!e.pipe}(o))return function(e){var t=null,r=null,n=!1,i=[],o=[];function s(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function a(e){r=e,o.slice().forEach((function(t){t[1](e)})),!t||t()}function u(){n=!0,o.slice().forEach((function(e){e[0]({value:void 0,done:!0})})),!t||t()}t=function(){t=null,e.removeListener("data",s),e.removeListener("error",a),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",s),e.on("error",a),e.on("end",u),e.on("finish",u),e.on("close",u);var c={next:function(){return new Promise((function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])}))}};return Be&&(c[Symbol.asyncIterator]=function(){return this}),c}(o);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}d((function(){return window.document.createElement})),d((function(){return navigator.userAgent.indexOf("jsdom")>=0}));var ze=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},Qe=Object.prototype.hasOwnProperty;function Ye(e){var t={};return e.split("\n").forEach((function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}})),t}function We(e,t){e.status>=300&&ze(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function He(e,t){var r,n;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(r=t.next)||void 0===r||r.call(t,e.result)),null===(n=t.error)||void 0===n||n.call(t,e))}function Ke(e){return function(t){return t.text().then((function(e){return We(t,e)})).then((function(r){return t.status>=300&&ze(t,r,"Response not successful: Received status code ".concat(t.status)),Array.isArray(r)||Qe.call(r,"data")||Qe.call(r,"errors")||ze(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),r}))}}var Ge=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new a("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new a(23)};function Je(e){return 9===e||32===e}function Ze(e){return e>=48&&e<=57}function Xe(e){return e>=97&&e<=122||e>=65&&e<=90}function et(e){return Xe(e)||95===e}function tt(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let t=0;t<e.length;++t){var o;const s=e[t],a=rt(s);a!==s.length&&(n=null!==(o=n)&&void 0!==o?o:t,i=t,0!==t&&a<r&&(r=a))}return e.map(((e,t)=>0===t?e:e.slice(r))).slice(null!==(t=n)&&void 0!==t?t:0,i+1)}function rt(e){let t=0;for(;t<e.length&&Je(e.charCodeAt(t));)++t;return t}const nt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function it(e){return ot[e.charCodeAt(0)]}const ot=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function st(e){return Ne(e,at)}const at={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ut(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=lt("(",ut(e.variableDefinitions,", "),")"),r=ut([e.operation,ut([e.name,t]),ut(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+lt(" = ",r)+lt(" ",ut(n," "))},SelectionSet:{leave:({selections:e})=>ct(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=lt("",e,": ")+t;let s=o+lt("(",ut(r,", "),")");return s.length>80&&(s=o+lt("(\n",ft(ut(r,"\n")),"\n)")),ut([s,ut(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+lt(" ",ut(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>ut(["...",lt("on ",e),ut(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${lt("(",ut(r,", "),")")} on ${t} ${lt("",ut(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=1===n.length,o=n.length>1&&n.slice(1).every((e=>0===e.length||Je(e.charCodeAt(0)))),s=r.endsWith('\\"""'),a=e.endsWith('"')&&!s,u=e.endsWith("\\"),c=a||u,l=!i||e.length>70||c||o||s;let f="";const p=i&&Je(e.charCodeAt(0));return(l&&!p||o)&&(f+="\n"),f+=r,(l||c)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(nt,it)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ut(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ut(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+lt("(",ut(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>lt("",e,"\n")+ut(["schema",ut(t," "),ct(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>lt("",e,"\n")+ut(["scalar",t,ut(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>lt("",e,"\n")+ut(["type",t,lt("implements ",ut(r," & ")),ut(n," "),ct(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>lt("",e,"\n")+t+(pt(r)?lt("(\n",ft(ut(r,"\n")),"\n)"):lt("(",ut(r,", "),")"))+": "+n+lt(" ",ut(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>lt("",e,"\n")+ut([t+": "+r,lt("= ",n),ut(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>lt("",e,"\n")+ut(["interface",t,lt("implements ",ut(r," & ")),ut(n," "),ct(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>lt("",e,"\n")+ut(["union",t,ut(r," "),lt("= ",ut(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>lt("",e,"\n")+ut(["enum",t,ut(r," "),ct(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>lt("",e,"\n")+ut([t,ut(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>lt("",e,"\n")+ut(["input",t,ut(r," "),ct(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>lt("",e,"\n")+"directive @"+t+(pt(r)?lt("(\n",ft(ut(r,"\n")),"\n)"):lt("(",ut(r,", "),")"))+(n?" repeatable":"")+" on "+ut(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ut(["extend schema",ut(e," "),ct(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ut(["extend scalar",e,ut(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>ut(["extend type",e,lt("implements ",ut(t," & ")),ut(r," "),ct(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>ut(["extend interface",e,lt("implements ",ut(t," & ")),ut(r," "),ct(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>ut(["extend union",e,ut(t," "),lt("= ",ut(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>ut(["extend enum",e,ut(t," "),ct(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>ut(["extend input",e,ut(t," "),ct(r)]," ")}};function ut(e,t=""){var r;return null!==(r=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==r?r:""}function ct(e){return lt("{\n",ft(ut(e,"\n")),"\n}")}function lt(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function ft(e){return lt(" ",e.replace(/\n/g,"\n "))}function pt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var dt={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},ht=function(e,t){return t(e)};function yt(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return r.unshift(t),vt.apply(void 0,(0,n.__spreadArray)([e,ht],r,!1))}function vt(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o={},s={};r.forEach((function(e){o=(0,n.__assign)((0,n.__assign)((0,n.__assign)({},o),e.options),{headers:(0,n.__assign)((0,n.__assign)({},o.headers),e.headers)}),e.credentials&&(o.credentials=e.credentials),s=(0,n.__assign)((0,n.__assign)({},s),e.http)})),o.headers&&(o.headers=function(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach((function(t){r[t.toLowerCase()]=e[t]})),r}var n=Object.create(null);Object.keys(Object(e)).forEach((function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}}));var i=Object.create(null);return Object.keys(n).forEach((function(e){i[n[e].originalName]=n[e].value})),i}(o.headers,s.preserveHeaderCase));var a=e.operationName,u=e.extensions,c=e.variables,l=e.query,f={operationName:a,variables:c};return s.includeExtensions&&(f.extensions=u),s.includeQuery&&(f.query=t(l,st)),{options:o,body:f}}var mt=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function bt(e,t){var r=[],n=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=Ce(t.variables,"Variables map")}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=Ce(t.extensions,"Extensions map")}catch(e){return{parseError:e}}n("extensions",o)}var s="",a=e,u=e.indexOf("#");-1!==u&&(s=e.substr(u),a=e.substr(0,u));var c=-1===a.indexOf("?")?"?":"&";return{newURI:a+c+r.join("&")+s}}function gt(e){return new W((function(t){t.error(e)}))}var _t=d((function(){return fetch})),wt=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,i=e.fetch,o=e.print,s=void 0===o?ht:o,a=e.includeExtensions,u=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,f=void 0!==l&&l,p=(0,n.__rest)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&Ge(i||_t);var h={http:{includeExtensions:a,preserveHeaderCase:u},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return new _e((function(e){var t=$e(e,r),o=e.getContext(),a={};if(o.clientAwareness){var u=o.clientAwareness,l=u.name,p=u.version;l&&(a["apollographql-client-name"]=l),p&&(a["apollographql-client-version"]=p)}var y,v=(0,n.__assign)((0,n.__assign)({},a),o.headers),m={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:v},b=vt(e,s,dt,h,m),g=b.options,_=b.body;if(_.variables&&!f){var w=new Set(Object.keys(_.variables));Ne(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&w.delete(e.name.value)}}),w.size&&(_.variables=(0,n.__assign)({},_.variables),w.forEach((function(e){delete _.variables[e]})))}if(!g.signal){var O=mt(),S=O.controller,E=O.signal;(y=S)&&(g.signal=E)}if(c&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(g.method="GET"),De(["defer"],e.query)&&(g.headers=g.headers||{},g.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),"GET"===g.method){var I=bt(t,_),T=I.newURI,j=I.parseError;if(j)return gt(j);t=T}else try{g.body=Ce(_,"Payload")}catch(j){return gt(j)}return new W((function(r){return(i||d((function(){return fetch}))||_t)(t,g).then((function(t){var i;e.setContext({response:t});var o=null===(i=t.headers)||void 0===i?void 0:i.get("content-type");return null!==o&&/^multipart\/mixed/i.test(o)?function(e,t){var r,i,o;return(0,n.__awaiter)(this,void 0,void 0,(function(){var s,a,u,c,l,f,p,d,h,y,v,m,b,g,_,w,O,S,E,I;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");s=new TextDecoder("utf-8"),a=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),u="boundary=",c=(null==a?void 0:a.includes(u))?null==a?void 0:a.substring((null==a?void 0:a.indexOf(u))+9).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(c),f="",p=Ve(e),d=!0,n.label=1;case 1:return d?[4,p.next()]:[3,3];case 2:for(h=n.sent(),y=h.value,v=h.done,m="string"==typeof y?y:s.decode(y),d=!v,b=(f+=m).indexOf(l);b>-1;){if(g=void 0,I=[f.slice(0,b),f.slice(b+l.length)],f=I[1],(g=I[0]).trim()){if(_=g.indexOf("\r\n\r\n"),w=Ye(g.slice(0,_)),(O=w["content-type"])&&-1===O.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");S=g.slice(_);try{E=We(e,S.replace("\r\n","")),(Object.keys(E).length>1||"data"in E||"incremental"in E||"errors"in E)&&(null===(i=t.next)||void 0===i||i.call(t,E))}catch(e){He(e,t)}}b=f.indexOf(l)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}}))}))}(t,r):function(e,t,r){Ke(t)(e).then((function(e){var t,n;null===(t=r.next)||void 0===t||t.call(r,e),null===(n=r.complete)||void 0===n||n.call(r)})).catch((function(e){return He(e,r)}))}(t,e,r)})).catch((function(e){return He(e,r)})),function(){y&&y.abort()}}))}))},Ot=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,wt(t).request)||this;return r.options=t,r}return(0,n.__extends)(t,e),t}(_e),St=Object.prototype,Et=St.toString,It=St.hasOwnProperty,Tt=Function.prototype.toString,jt=new Map;function Pt(e,t){try{return xt(e,t)}finally{jt.clear()}}function xt(e,t){if(e===t)return!0;var r,n,i,o=Et.call(e);if(o!==Et.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(kt(e,t))return!0;var s=At(e),a=At(t),u=s.length;if(u!==a.length)return!1;for(var c=0;c<u;++c)if(!It.call(t,s[c]))return!1;for(c=0;c<u;++c){var l=s[c];if(!xt(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(kt(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var d=f.next();if(d.done)break;var h=d.value,y=h[0],v=h[1];if(!t.has(y))return!1;if(p&&!xt(v,t.get(y)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var b=Tt.call(e);return b===Tt.call(t)&&(n=Mt,!((i=(r=b).length-n.length)>=0&&r.indexOf(n,i)===i))}return!1}function At(e){return Object.keys(e).filter(Nt,e)}function Nt(e){return void 0!==this[e]}var Mt="{ [native code] }";function kt(e,t){var r=jt.get(e);if(r){if(r.has(t))return!0}else jt.set(e,r=new Set);return r.add(t),!1}var Dt=Array.isArray;function Rt(e){return Array.isArray(e)&&e.length>0}var Ct=Object.prototype.hasOwnProperty;function $t(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ft(e)}function Ft(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new Lt,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var qt=function(e,t,r){return this.merge(e[r],t[r])},Lt=function(){function e(e){void 0===e&&(e=qt),this.reconciler=e,this.isObject=H,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return H(t)&&H(e)?(Object.keys(t).forEach((function(o){if(Ct.call(e,o)){var s=e[o];if(t[o]!==s){var a=r.reconciler.apply(r,(0,n.__spreadArray)([e,t,o],i,!1));a!==s&&((e=r.shallowCopyForMerge(e))[o]=a)}}else(e=r.shallowCopyForMerge(e))[o]=t[o]})),e):t},e.prototype.shallowCopyForMerge=function(e){return H(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},e}();function Bt(e){return"incremental"in e}function Ut(e,t){var r=e,n=new Lt;return Bt(t)&&Rt(t.incremental)&&t.incremental.forEach((function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var s=i[o],a=isNaN(+s)?{}:[];a[s]=t,t=a}r=n.merge(r,t)})),r}var Vt,zt,Qt=function(){return Object.create(null)},Yt=Array.prototype,Wt=Yt.forEach,Ht=Yt.slice,Kt=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=Qt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return Wt.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Ht.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}(),Gt=function(){function e(){this.known=new(qe?WeakSet:Set),this.pool=new Kt(Fe),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return H(e)&&this.known.has(e)},e.prototype.pass=function(e){if(H(e)){var t=function(e){return H(e)?Dt(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(H(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var n=e.map(this.admit,this);return(a=this.pool.lookupArray(n)).array||(this.known.add(a.array=n),__DEV__&&Object.freeze(n)),a.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],s=this.sortedKeys(e);o.push(s.json);var a,u=o.length;if(s.sorted.forEach((function(r){o.push(t.admit(e[r]))})),!(a=this.pool.lookupArray(o)).object){var c=a.object=Object.create(i);this.known.add(c),s.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return a.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}(),Jt=Object.assign((function(e){if(H(e)){void 0===Vt&&Zt();var t=Vt.admit(e),r=zt.get(t);return void 0===r&&zt.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)}),{reset:Zt});function Zt(){Vt=new Gt,zt=new(Fe?WeakMap:Map)}function Xt(e,t,r){return new W((function(n){var i=n.next,o=n.error,s=n.complete,a=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++a;var r=function(){return e(t)};c=c.then(r,r).then((function(e){--a,i&&i.call(n,e),u&&f.complete()}),(function(e){throw--a,e})).catch((function(e){o&&o.call(n,e)}))}:function(e){return t&&t.call(n,e)}}var f={next:l(t,i),error:l(r,o),complete:function(){u=!0,a||s&&s.call(n)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function er(e){return Rt(tr(e))}function tr(e){var t=Rt(e.errors)?e.errors.slice(0):[];return Bt(e)&&Rt(e.incremental)&&e.incremental.forEach((function(e){e.errors&&t.push.apply(t,e.errors)})),t}var rr={kind:Pe.FIELD,name:{kind:Pe.NAME,value:"__typename"}};function nr(e,t){return!e||e.selectionSet.selections.every((function(e){return e.kind===Pe.FRAGMENT_SPREAD&&nr(t[e.name.value],t)}))}function ir(e){return nr(le(e)||function(e){__DEV__?u("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u("Document"===e.kind,51),__DEV__?u(e.definitions.length<=1,"Fragment must have exactly one definition."):u(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?u("FragmentDefinition"===t.kind,"Must be a fragment definition."):u("FragmentDefinition"===t.kind,53),t}(e),G(pe(e)))?null:e}function or(e){var t=new Map;return function(r){void 0===r&&(r=e);var n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function sr(e,t){for(var r=or(""),i=or(""),o=function(e){for(var t=0,n=void 0;t<e.length&&(n=e[t]);++t)if(!Dt(n)){if(n.kind===Pe.OPERATION_DEFINITION)return r(n.name&&n.name.value);if(n.kind===Pe.FRAGMENT_DEFINITION)return i(n.name.value)}return __DEV__&&u.error("Could not find operation or fragment"),null},s=0,a=t.definitions.length-1;a>=0;--a)t.definitions[a].kind===Pe.OPERATION_DEFINITION&&++s;var c=function(e){var t=new Set,r=[];return e.forEach((function(e){e.name?t.add(e.name):e.test&&r.push(e.test)})),function(e){return t.has(e.name.value)||r.some((function(t){return t(e)}))}}(e),l=e.some((function(e){return e.remove})),f=function(e){return l&&e&&e.some(c)},p=new Map,d=!1,h={enter:function(e){if(f(e.directives))return d=!0,null}},y=Ne(t,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var s=o(i);s&&s.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(f(e.directives))return d=!0,null;var s=o(i);s&&s.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){p.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===p.get(JSON.stringify(n))?e:s>0&&e.selectionSet.selections.every((function(e){return e.kind===Pe.FIELD&&"__typename"===e.name.value}))?(i(e.name.value).removed=!0,d=!0,null):void 0}},Directive:{leave:function(e){if(c(e))return d=!0,null}}});if(!d)return t;var v=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach((function(t){v(i(t)).transitiveVars.forEach((function(t){e.transitiveVars.add(t)}))}))),e},m=new Set;y.definitions.forEach((function(e){e.kind===Pe.OPERATION_DEFINITION?v(r(e.name&&e.name.value)).fragmentSpreads.forEach((function(e){m.add(e)})):e.kind!==Pe.FRAGMENT_DEFINITION||0!==s||i(e.name.value).removed||m.add(e.name.value)})),m.forEach((function(e){v(i(e)).fragmentSpreads.forEach((function(e){m.add(e)}))}));var b={enter:function(e){if(t=e.name.value,!m.has(t)||i(t).removed)return null;var t}};return ir(Ne(y,{FragmentSpread:b,FragmentDefinition:b,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=v(r(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,n.__assign)((0,n.__assign)({},e),{variableDefinitions:e.variableDefinitions.filter((function(e){return t.has(e.variable.name.value)}))})}}}}))}var ar=Object.assign((function(e){return Ne(e,{SelectionSet:{enter:function(e,t,r){if(!r||r.kind!==Pe.OPERATION_DEFINITION){var i=e.selections;if(i&&!i.some((function(e){return ue(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=r;if(!(ue(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return(0,n.__assign)((0,n.__assign)({},e),{selections:(0,n.__spreadArray)((0,n.__spreadArray)([],i,!0),[rr],!1)})}}}}})}),{added:function(e){return e===rr}}),ur={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&u.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function cr(e){return"query"===he(e).operation?e:Ne(e,{OperationDefinition:{enter:function(e){return(0,n.__assign)((0,n.__assign)({},e),{operation:"query"})}}})}var lr=new Map;function fr(e){var t=lr.get(e)||1;return lr.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function pr(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function dr(e){function t(t){Object.defineProperty(e,t,{value:W})}return Le&&Symbol.species&&t(Symbol.species),t("@@species"),e}function hr(e){return e&&"function"==typeof e.then}var yr=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),pr(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),pr(r.observers,"error",e))},complete:function(){var e=r,t=e.sub,n=e.sources;if(null!==t){var i=(void 0===n?[]:n).shift();i?hr(i)?i.then((function(e){return r.sub=e.subscribe(r.handlers)})):r.sub=i.subscribe(r.handlers):(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),pr(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch((function(e){})),"function"==typeof t&&(t=[new W(t)]),hr(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return(0,n.__extends)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach((function(r){return r(e,t)})))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add((function(r,n){t||(t=!0,e(r,n))}))},t}(W);function vr(e){return e.hasOwnProperty("graphQLErrors")}dr(yr);var mr,br=function(e){function t(r){var n,i,o=r.graphQLErrors,s=r.clientErrors,a=r.networkError,u=r.errorMessage,c=r.extraInfo,l=e.call(this,u)||this;return l.name="ApolloError",l.graphQLErrors=o||[],l.clientErrors=s||[],l.networkError=a||null,l.message=u||(i="",(Rt((n=l).graphQLErrors)||Rt(n.clientErrors))&&(n.graphQLErrors||[]).concat(n.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),n.networkError&&(i+="".concat(n.networkError.message,"\n")),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,n.__extends)(t,e),t}(Error);function gr(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(mr||(mr={}));var _r=Object.prototype.toString;function wr(e){return Or(e)}function Or(e,t){switch(_r.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=Or(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=Or(e[r],t)})),n;default:return e}}function Sr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}var Er=Object.assign,Ir=Object.hasOwnProperty,Tr=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,o=t.options,s=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=Pr)}catch(e){}var r=!s.observers.size;s.observers.add(e);var n=s.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(n.result),r&&s.reobserve().catch((function(){})),function(){s.observers.delete(e)&&!s.observers.size&&s.tearDownQuery()}}))||this;s.observers=new Set,s.subscriptions=new Set,s.queryInfo=i,s.queryManager=r,s.isTornDown=!1;var a=r.defaultOptions.watchQuery,u=(void 0===a?{}:a).fetchPolicy,c=void 0===u?"cache-first":u,l=o.fetchPolicy,f=void 0===l?c:l,p=o.initialFetchPolicy,d=void 0===p?"standby"===f?c:f:p;s.options=(0,n.__assign)((0,n.__assign)({},o),{initialFetchPolicy:d,fetchPolicy:f}),s.queryId=i.queryId||r.generateQueryId();var h=le(s.query);return s.queryName=h&&h.name&&h.name.value,s}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||mr.ready,i=(0,n.__assign)((0,n.__assign)({},t),{loading:gr(r),networkStatus:r}),o=this.options.fetchPolicy,s=void 0===o?"cache-first":o;if("network-only"===s||"no-cache"===s||"standby"===s||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(i.data=a.result),Pt(i.data,{})&&(i.data=void 0),a.complete?(delete i.partial,!a.complete||i.networkStatus!==mr.loading||"cache-first"!==s&&"cache-only"!==s||(i.networkStatus=mr.ready,i.loading=!1)):i.partial=!0,!__DEV__||a.complete||this.options.partialRefetch||i.loading||i.data||i.error||xr(a.missing)}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!Pt(this.last.result,e)||t&&!Pt(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||Pt(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0},i=this.options.fetchPolicy;if(r.fetchPolicy="cache-and-network"===i?i:"no-cache"===i?"no-cache":"network-only",__DEV__&&e&&Ir.call(e,"variables")){var o=de(this.query),s=o.variableDefinitions;s&&s.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&u.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=o.name)||void 0===t?void 0:t.value)||JSON.stringify(o),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!Pt(this.options.variables,e)&&(r.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,mr.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),{query:this.query}),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId(),o=this.queryInfo,s=o.networkStatus;o.networkStatus=mr.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var a=new Set;return this.queryManager.fetchQuery(i,r,mr.fetchMore).then((function(n){return t.queryManager.removeQuery(i),o.networkStatus===mr.fetchMore&&(o.networkStatus=s),t.queryManager.cache.batch({update:function(i){var o=e.updateQuery;o?i.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},(function(e){return o(e,{fetchMoreResult:n.data,variables:r.variables})})):i.writeQuery({query:r.query,variables:r.variables,data:n.data})},onWatchUpdated:function(e){a.add(e.query)}}),n})).finally((function(){a.has(t.query)||jr(t)}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&u.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return Pt(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},mr.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,i=t.initialFetchPolicy,o=void 0===i?n:i;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:o}):t.fetchPolicy="variables-changed"===e?o:t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(r){if(!t||t.interval!==r){__DEV__?u(r,"Attempted to start a polling query without a polling interval."):u(r,13),(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(gr(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},mr.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,n.__assign)((0,n.__assign)({},this.last),{result:this.queryManager.assumeImmutableResults?e:wr(e),variables:t}),Rt(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var r=this;this.isTornDown=!1;var i=t===mr.refetch||t===mr.fetchMore||t===mr.poll,o=this.options.variables,s=this.options.fetchPolicy,a=Sr(this.options,e||{}),u=i?a:Er(this.options,a);i||(this.updatePolling(),e&&e.variables&&!Pt(e.variables,o)&&"standby"!==u.fetchPolicy&&u.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",u),void 0===t&&(t=mr.setVariables)));var c=u.variables&&(0,n.__assign)({},u.variables),l=this.fetch(u,t),f={next:function(e){r.reportResult(e,c)},error:function(e){r.reportError(e,c)}};return i||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=l,this.observer=f),l.addObserver(f),l.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError();(r||this.isDifferentFromLastResult(e,t))&&((r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),pr(this.observers,"next",e))},t.prototype.reportError=function(e,t){var r=(0,n.__assign)((0,n.__assign)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:mr.error,loading:!1});this.updateLastResult(r,t),pr(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(W);function jr(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,"function"==typeof n?n.apply(this,arguments):r}}):e.reobserve()}function Pr(e){__DEV__&&u.error("Unhandled error",e.message,e.stack)}function xr(e){__DEV__&&e&&__DEV__&&u.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function Ar(e){return e.kind===Pe.FIELD||e.kind===Pe.FRAGMENT_SPREAD||e.kind===Pe.INLINE_FRAGMENT}dr(Tr);var Nr=null,Mr={},kr=1;function Dr(e){try{return e()}catch(e){}}var Rr="@wry/context:Slot",Cr=Dr((function(){return globalThis}))||Dr((function(){return r.g}))||Object.create(null),$r=Cr[Rr]||Array[Rr]||function(e){try{Object.defineProperty(Cr,Rr,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(function(){function e(){this.id=["slot",kr++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Nr;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Mr)break;return e!==Nr&&(Nr.slots[this.id]=t),!0}return Nr&&(Nr.slots[this.id]=Mr),!1},e.prototype.getValue=function(){if(this.hasValue())return Nr.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),s=Nr;Nr={parent:s,slots:o};try{return t.apply(n,r)}finally{Nr=s}},e.bind=function(e){var t=Nr;return function(){var r=Nr;try{return Nr=t,e.apply(this,arguments)}finally{Nr=r}}},e.noContext=function(e,t,r){if(!Nr)return e.apply(r,t);var n=Nr;try{return Nr=null,e.apply(r,t)}finally{Nr=n}},e}());function Fr(){}$r.bind,$r.noContext;var qr,Lr=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=Fr),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Br=new $r,Ur=Object.prototype.hasOwnProperty,Vr=void 0===(qr=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:qr;function zr(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var Qr=[],Yr=100;function Wr(e,t){if(!e)throw new Error(t||"assertion failure")}function Hr(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Kr=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!Zr(this))return Gr(this),this.value[0]},e.prototype.recompute=function(e){return Wr(!this.recomputing,"already recomputing"),Gr(this),Zr(this)?function(e,t){return sn(e),Br.withValue(e,Jr,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{zr(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Zr(e)||en(e)}(e),Hr(e.value)}(this,e):Hr(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Xr(this),zr(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),sn(this),tn(this,(function(t,r){t.setDirty(),an(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=Qr.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Vr(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),Qr.push(this.deps),this.deps=null)},e.count=0,e}();function Gr(e){var t=Br.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Zr(e)?rn(t,e):nn(t,e),t}function Jr(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function Zr(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Xr(e){tn(e,rn)}function en(e){tn(e,nn)}function tn(e,t){var r=e.parents.size;if(r)for(var n=Vr(e.parents),i=0;i<r;++i)t(n[i],e)}function rn(e,t){Wr(e.childValues.has(t)),Wr(Zr(t));var r=!Zr(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=Qr.pop()||new Set;e.dirtyChildren.add(t),r&&Xr(e)}function nn(e,t){Wr(e.childValues.has(t)),Wr(!Zr(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),on(e,t),Zr(e)||en(e)}function on(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(Qr.length<Yr&&Qr.push(r),e.dirtyChildren=null))}function sn(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){an(e,r)})),e.forgetDeps(),Wr(null===e.dirtyChildren)}function an(e,t){t.parents.delete(e),e.childValues.delete(t),on(e,t)}var un={setDirty:!0,dispose:!0,forget:!0};function cn(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=Br.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(zr(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){var n=t.get(e);if(n){var i=r&&Ur.call(un,r)?r:"setDirty";Vr(n).forEach((function(e){return e[i]()})),t.delete(e),zr(n)}},n}function ln(){var e=new Kt("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}ln();var fn=new Set;function pn(e,t){void 0===t&&(t=Object.create(null));var r=new Lr(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=t.keyArgs,i=t.makeCacheKey||ln(),o=function(){var o=i.apply(null,n?n.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var s=r.get(o);s||(r.set(o,s=new Kr(e)),s.subscribe=t.subscribe,s.forget=function(){return r.delete(o)});var a=s.recompute(Array.prototype.slice.call(arguments));return r.set(o,s),fn.add(r),Br.hasValue()||(fn.forEach((function(e){return e.clean()})),fn.clear()),a};function s(e){var t=r.get(e);t&&t.setDirty()}function a(e){var t=r.get(e);if(t)return t.peek()}function u(e){return r.delete(e)}return Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=s,o.dirty=function(){s(i.apply(null,arguments))},o.peekKey=a,o.peek=function(){return a(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var dn=new $r,hn=new WeakMap;function yn(e){var t=hn.get(e);return t||hn.set(e,t={vars:new Set,dep:cn()}),t}function vn(e){yn(e).vars.forEach((function(t){return t.forgetCache(e)}))}function mn(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){yn(e).dep.dirty(n),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)}));var s=Array.from(r);r.clear(),s.forEach((function(t){return t(e)}))}}else{var a=dn.getValue();a&&(i(a),yn(a).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),yn(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}var bn=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=$t(t.resolvers,e)})):this.resolvers=$t(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,i=e.context,o=e.variables,s=e.onlyRunForcedResolvers,a=void 0!==s&&s;return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,i,o,this.fragmentMatcher,a).then((function(e){return(0,n.__assign)((0,n.__assign)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return De(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){return ce(e),sr([{test:function(e){return"client"===e.name.value},remove:!0}],e)}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)}))]:[2,(0,n.__assign)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Ne(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return Ae}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:cr(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,i,o,s){return void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===s&&(s=!1),(0,n.__awaiter)(this,void 0,void 0,(function(){var a,u,c,l,f,p,d,h,y,v;return(0,n.__generator)(this,(function(m){return a=he(e),u=pe(e),c=G(u),l=this.collectSelectionsToResolve(a,c),f=a.operation,p=f?f.charAt(0).toUpperCase()+f.slice(1):"Query",h=(d=this).cache,y=d.client,v={fragmentMap:c,context:(0,n.__assign)((0,n.__assign)({},r),{cache:h,client:y}),variables:i,fragmentMatcher:o,defaultOperationType:p,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(a.selectionSet,!1,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,s,a,c,l,f=this;return(0,n.__generator)(this,(function(p){return o=i.fragmentMap,s=i.context,a=i.variables,c=[r],l=function(e){return(0,n.__awaiter)(f,void 0,void 0,(function(){var l,f;return(0,n.__generator)(this,(function(n){return(t||i.selectionsToResolve.has(e))&&ke(e,a)?ue(e)?[2,this.resolveField(e,t,r,i).then((function(t){var r;void 0!==t&&c.push(((r={})[se(e)]=t,r))}))]:(function(e){return"InlineFragment"===e.kind}(e)?l=e:(l=o[e.name.value],__DEV__?u(l,"No fragment named ".concat(e.name.value)):u(l,11)),l&&l.typeCondition&&(f=l.typeCondition.name.value,i.fragmentMatcher(r,f,s))?[2,this.resolveSelectionSet(l.selectionSet,t,r,i).then((function(e){c.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(l)).then((function(){return Ft(c)}))]}))}))},e.prototype.resolveField=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,s,a,u,c,l,f,p,d,h=this;return(0,n.__generator)(this,(function(n){return r?(o=i.variables,s=e.name.value,a=se(e),u=s!==a,c=r[a]||r[s],l=Promise.resolve(c),i.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=r.__typename||i.defaultOperationType,(p=this.resolvers&&this.resolvers[f])&&(d=p[u?s:a])&&(l=Promise.resolve(dn.withValue(this.cache,d,[r,oe(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}])))),[2,l.then((function(r){var n,o;if(void 0===r&&(r=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(i.exportedVariables[e.value.value]=r)}))})),!e.selectionSet)return r;if(null==r)return r;var s=null!==(o=null===(n=e.directives)||void 0===n?void 0:n.some((function(e){return"client"===e.name.value})))&&void 0!==o&&o;return Array.isArray(r)?h.resolveSubSelectedArray(e,t||s,r,i):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||s,r,i):void 0}))]):[2,null]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map((function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0})))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(i){if(!n.has(i)){var o=new Set;n.set(i,o),Ne(i,{Directive:function(e,t,n,i,s){"client"===e.name.value&&s.forEach((function(e){r(e)&&Ar(e)&&o.add(e)}))},FragmentSpread:function(n,i,s,a,c){var l=t[n.name.value];__DEV__?u(l,"No fragment named ".concat(n.name.value)):u(l,12);var f=e(l);f.size>0&&(c.forEach((function(e){r(e)&&Ar(e)&&o.add(e)})),o.add(n),f.forEach((function(e){o.add(e)})))}})}return n.get(i)}(e)},e}(),gn=new(Fe?WeakMap:Map);function _n(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return gn.set(e,(gn.get(e)+1)%1e15),r.apply(this,arguments)})}function wn(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var On=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;gn.has(r)||(gn.set(r,0),_n(r,"evict"),_n(r,"modify"),_n(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||mr.loading;return this.variables&&this.networkStatus!==mr.loading&&!Pt(this.variables,e.variables)&&(t=mr.setVariables),Pt(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){wn(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&Pt(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var r=this.observableQuery;if(r&&"no-cache"===r.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,r=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||Pt(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():jr(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;wn(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(gr(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var i=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&Pt(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===gn.get(this.cache)&&Pt(t,r.variables)&&Pt(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new Lt,s=Rt(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&Rt(e.incremental)){var a=Ut(this.getDiff().result,e);e.data=a}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=o.merge(u.result,e.data)}this.graphQLErrors=s,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(Sn(e,r.errorPolicy)?this.cache.performTransaction((function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:gn.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete)return void(e.data=i.lastDiff.diff.result);var s=i.getDiffOptions(r.variables),a=o.diff(s);i.stopped||i.updateWatch(r.variables),i.updateLastDiff(a,s),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=mr.ready},e.prototype.markError=function(e){return this.networkStatus=mr.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function Sn(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!er(e);return!n&&r&&e.data&&(n=!0),n}var En=Object.prototype.hasOwnProperty,In=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.queryDeduplication,o=void 0!==i&&i,s=e.onBroadcast,a=e.ssrMode,u=void 0!==a&&a,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,p=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Fe?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=o,this.clientAwareness=l,this.localState=f||new bn({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!p,(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches(__DEV__?new a("QueryManager stopped while query was in flight"):new a(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,i=e.mutation,o=e.variables,s=e.optimisticResponse,a=e.updateQueries,c=e.refetchQueries,l=void 0===c?[]:c,f=e.awaitRefetchQueries,p=void 0!==f&&f,d=e.update,h=e.onQueryUpdated,y=e.fetchPolicy,v=void 0===y?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":y,m=e.errorPolicy,b=void 0===m?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":m,g=e.keepRootFields,_=e.context;return(0,n.__awaiter)(this,void 0,void 0,(function(){var e,t,r,c,f,y;return(0,n.__generator)(this,(function(m){switch(m.label){case 0:return __DEV__?u(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):u(i,15),__DEV__?u("network-only"===v||"no-cache"===v,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):u("network-only"===v||"no-cache"===v,16),e=this.generateMutationId(),t=this.transform(i),r=t.document,c=t.hasClientExports,i=this.cache.transformForLink(r),o=this.getVariables(i,o),c?[4,this.localState.addExportedVariables(i,o,_)]:[3,2];case 1:o=m.sent(),m.label=2;case 2:return f=this.mutationStore&&(this.mutationStore[e]={mutation:i,variables:o,loading:!0,error:null}),s&&this.markMutationOptimistic(s,{mutationId:e,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,updateQueries:a,update:d,keepRootFields:g}),this.broadcastQueries(),y=this,[2,new Promise((function(t,r){return Xt(y.getObservableFromLink(i,(0,n.__assign)((0,n.__assign)({},_),{optimisticResponse:s}),o,!1),(function(t){if(er(t)&&"none"===b)throw new br({graphQLErrors:tr(t)});f&&(f.loading=!1,f.error=null);var r=(0,n.__assign)({},t);return"function"==typeof l&&(l=l(r)),"ignore"===b&&er(r)&&delete r.errors,y.markMutationResult({mutationId:e,result:r,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,update:d,updateQueries:a,awaitRefetchQueries:p,refetchQueries:l,removeOptimistic:s?e:void 0,onQueryUpdated:h,keepRootFields:g})})).subscribe({next:function(e){y.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){f&&(f.loading=!1,f.error=t),s&&y.cache.removeOptimistic(e),y.broadcastQueries(),r(t instanceof br?t:new br({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var i=e.result,o=[],s="no-cache"===e.fetchPolicy;if(!s&&Sn(i,e.errorPolicy)){if(Bt(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),Bt(i)&&Rt(i.incremental)){var a=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),u=void 0;a.result&&(u=Ut(a.result,i)),void 0!==u&&(i.data=u,o.push({result:u,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach((function(e,n){var s=e.observableQuery,a=s&&s.queryName;if(a&&En.call(c,a)){var u=c[a],l=r.queries.get(n),f=l.document,p=l.variables,d=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),h=d.result;if(d.complete&&h){var y=u(h,{mutationResult:i,queryName:f&&fe(f)||void 0,queryVariables:p});y&&o.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(o.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var l=[];if(this.refetchQueries({updateCache:function(t){s||o.forEach((function(e){return t.write(e)}));var a,u=e.update,c=!(Bt(a=i)||function(e){return"hasNext"in e&&"data"in e}(a))||Bt(i)&&!i.hasNext;if(u){if(!s){var l=t.diff({id:"ROOT_MUTATION",query:r.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});l.complete&&("incremental"in(i=(0,n.__assign)((0,n.__assign)({},i),{data:l.result}))&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}c&&u(t,i,{context:e.context,variables:e.variables})}s||e.keepRootFields||!c||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return l.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(l).then((function(){return i}))}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var r=this,i="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:i}}),e)}catch(e){__DEV__&&u.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),i=sr([ur],ce(r)),o=this.localState.clientQuery(r),s=i&&this.localState.serverQuery(i),a={document:r,hasClientExports:Re(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:s,defaultVars:ye(le(r)),asQuery:(0,n.__assign)((0,n.__assign)({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e}))})},u=function(e){e&&!t.has(e)&&t.set(e,a)};u(e),u(r),u(o),u(s)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new On(this),r=new Tr({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:r.query,observableQuery:r,variables:r.variables}),r},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?u(e.query,"query option is required. You must specify your GraphQL document in the query option."):u(e.query,17),__DEV__?u("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):u("Document"===e.query.kind,18),__DEV__?u(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):u(!e.returnPartialData,19),__DEV__?u(!e.pollInterval,"pollInterval option only supported on watchQuery."):u(!e.pollInterval,20),this.fetchQuery(t,e).finally((function(){return r.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new a("Store reset while query was in flight (not completed in link chain)"):new a(21)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=mr.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,i=new Map,o=new Set;return Array.isArray(e)&&e.forEach((function(e){var r;"string"==typeof e?i.set(e,!1):H(r=e)&&"Document"===r.kind&&Array.isArray(r.definitions)?i.set(t.transform(e).document,!1):H(e)&&e.query&&o.add(e)})),this.queries.forEach((function(t,n){var o=t.observableQuery,s=t.document;if(o){if("all"===e)return void r.set(n,o);var a=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||a&&i.has(a)||s&&i.has(s))&&(r.set(n,o),a&&i.set(a,!0),s&&i.set(s,!0))}})),o.size&&o.forEach((function(e){var i=fr("legacyOneTimeQuery"),o=t.getQuery(i).init({document:e.query,variables:e.variables}),s=new Tr({queryManager:t,queryInfo:o,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});u(s.queryId===i),o.setObservableQuery(s),r.set(i,s)})),__DEV__&&i.size&&i.forEach((function(e,t){e||__DEV__&&u.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach((function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=e.variables,s=e.context,a=void 0===s?{}:s;r=this.transform(r).document,o=this.getVariables(r,o);var u=function(e){return t.getObservableFromLink(r,a,e).map((function(o){if("no-cache"!==n&&(Sn(o,i)&&t.cache.write({query:r,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),er(o))throw new br({graphQLErrors:o.errors});return o}))};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,o,a).then(u);return new W((function(e){var t=null;return c.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i){var o,s,a=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var u=this.transform(e).serverQuery;if(u){var c=this.inFlightLinkObservables,l=this.link,f={query:u,variables:r,operationName:fe(u)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!i}))};if(t=f.context,i){var p=c.get(u)||new Map;c.set(u,p);var d=Jt(r);if(!(s=p.get(d))){var h=new yr([we(l,f)]);p.set(d,s=h),h.beforeNext((function(){p.delete(d)&&p.size<1&&c.delete(u)}))}}else s=new yr([we(l,f)])}else s=new yr([W.of({data:{}})]),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(s=Xt(s,(function(e){return a.localState.runResolvers({document:y,remoteResult:e,context:t,variables:r})}))),s},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return Xt(this.getObservableFromLink(i,r.context,r.variables),(function(o){var s=tr(o),a=s.length>0;if(n>=e.lastRequestId){if(a&&"none"===r.errorPolicy)throw e.markError(new br({graphQLErrors:s}));e.markResult(o,i,r,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:mr.ready};return a&&"ignore"!==r.errorPolicy&&(u.errors=s,u.networkStatus=mr.error),u}),(function(t){var r=vr(t)?t:new br({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=mr.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),s=this.getQuery(e),a=this.defaultOptions.watchQuery,u=t.fetchPolicy,c=void 0===u?a&&a.fetchPolicy||"cache-first":u,l=t.errorPolicy,f=void 0===l?a&&a.errorPolicy||"none":l,p=t.returnPartialData,d=void 0!==p&&p,h=t.notifyOnNetworkStatusChange,y=void 0!==h&&h,v=t.context,m=void 0===v?{}:v,b=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:f,returnPartialData:d,notifyOnNetworkStatusChange:y,context:m}),g=function(e){b.variables=e;var i=n.fetchQueryByPolicy(s,b,r);return"standby"!==b.fetchPolicy&&i.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",t),i},_=function(){return n.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,(function(e){_(),setTimeout((function(){return w.cancel(e)}))}));var w=new yr(this.transform(b.query).hasClientExports?this.localState.addExportedVariables(b.query,b.variables,b.context).then(g):g(b.variables));return w.promise.then(_,_),w},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,s=e.removeOptimistic,a=void 0===s?o?fr("refetchQueries"):void 0:s,u=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach((function(e,r){c.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})}));var l=new Map;return r&&this.cache.batch({update:r,optimistic:o&&a||!1,removeOptimistic:a,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof On&&e.watcher.observableQuery;if(n){if(u){c.delete(n.queryId);var i=u(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&l.set(n,i),i}null!==u&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach((function(e,r){var n,i=e.oq,o=e.lastDiff,s=e.diff;if(u){if(!s){var a=i.queryInfo;a.reset(),s=a.getDiff()}n=u(i,s,o)}u&&!0!==n||(n=i.refetch()),!1!==n&&l.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)})),a&&this.cache.removeOptimistic(a),l},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,o=t.query,s=t.variables,a=t.fetchPolicy,u=t.refetchWritePolicy,c=t.errorPolicy,l=t.returnPartialData,f=t.context,p=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(o).document,variables:s,networkStatus:r});var h=function(){return e.getDiff(s)},y=function(t,r){void 0===r&&(r=e.networkStatus||mr.loading);var a=t.result;!__DEV__||l||Pt(a,{})||xr(t.missing);var u=function(e){return W.of((0,n.__assign)({data:e,loading:gr(r),networkStatus:r},t.complete?null:{partial:!0}))};return a&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:a},context:f,variables:s,onlyRunForcedResolvers:!0}).then((function(e){return u(e.data||void 0)})):"none"===c&&r===mr.refetch&&Array.isArray(t.missing)?u(void 0):u(a)},v="no-cache"===a?0:r===mr.refetch&&"merge"!==u?1:2,m=function(){return i.getResultsFromLink(e,v,{variables:s,context:f,fetchPolicy:a,errorPolicy:c})},b=p&&"number"==typeof d&&d!==r&&gr(r);switch(a){default:case"cache-first":return(g=h()).complete?[y(g,e.markReady())]:l||b?[y(g),m()]:[m()];case"cache-and-network":var g;return(g=h()).complete||l||b?[y(g),m()]:[m()];case"cache-only":return[y(h(),e.markReady())];case"network-only":return b?[y(h()),m()]:[m()];case"no-cache":return b?[y(e.getDiff()),m()]:[m()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new On(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)({},t),{clientAwareness:this.clientAwareness})},e}();function Tn(e,t){return Sr(e,t,t.variables&&{variables:(0,n.__assign)((0,n.__assign)({},e&&e.variables),t.variables)})}var jn,Pn=!1,xn=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,i=e.headers,o=e.cache,s=e.ssrMode,c=void 0!==s&&s,l=e.ssrForceFetchDelay,f=void 0===l?0:l,p=e.connectToDevTools,d=void 0===p?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:p,h=e.queryDeduplication,y=void 0===h||h,v=e.defaultOptions,m=e.assumeImmutableResults,b=void 0!==m&&m,g=e.resolvers,_=e.typeDefs,w=e.fragmentMatcher,O=e.name,S=e.version,E=e.link;if(E||(E=r?new Ot({uri:r,credentials:n,headers:i}):_e.empty()),!o)throw __DEV__?new a("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new a(9);if(this.link=E,this.cache=o,this.disableNetworkFetches=c||f>0,this.queryDeduplication=y,this.defaultOptions=v||Object.create(null),this.typeDefs=_,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),d&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Pn&&d&&__DEV__&&(Pn=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var I=window.navigator,T=I&&I.userAgent,j=void 0;"string"==typeof T&&(T.indexOf("Chrome/")>-1?j="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":T.indexOf("Firefox/")>-1&&(j="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),j&&__DEV__&&u.log("Download the Apollo DevTools for a better development experience: "+j)}this.version="3.7.9",this.localState=new bn({cache:o,client:this,resolvers:g,fragmentMatcher:w}),this.queryManager=new In({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:y,ssrMode:c,clientAwareness:{name:O,version:S},localState:this.localState,assumeImmutableResults:b,onBroadcast:d?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Tn(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Tn(this.defaultOptions.query,e)),__DEV__?u("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):u("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Tn(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return we(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach((function(e,t){r.push(t),n.push(e)}));var i=Promise.all(n);return i.queries=r,i.results=n,i.catch((function(e){__DEV__&&u.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}();jn||(jn={});var An=function(){function e(){this.getFragmentDoc=pn(K)}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(r)}),n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n.__rest)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,s=(0,n.__rest)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(s,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return null==o?i:(r.writeQuery((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return null==o?i:(r.writeFragment((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e}(),Nn=function(e){function t(r,n,i,o){var s,a=e.call(this,r)||this;if(a.message=r,a.path=n,a.query=i,a.variables=o,Array.isArray(a.path)){a.missing=a.message;for(var u=a.path.length-1;u>=0;--u)a.missing=((s={})[a.path[u]]=a.missing,s)}else a.missing=a.path;return a.__proto__=t.prototype,a}return(0,n.__extends)(t,e),t}(Error);function Mn(e){return __DEV__&&(t=e,(r=new Set([t])).forEach((function(e){H(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){H(e[t])&&r.add(e[t])}))}))),e;var t,r}var kn=Object.prototype.hasOwnProperty;function Dn(e){return null==e}function Rn(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=Dn(n)?Dn(i)?void 0:{_id:i}:{id:n}),Dn(n)&&!Dn(i)&&(n=i),!Dn(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var Cn={dataIdFromObject:Rn,addTypename:!0,resultCaching:!0,canonizeResults:!1};function $n(e){var t=e.canonizeResults;return void 0===t?Cn.canonizeResults:t}var Fn=/^[_a-z][_0-9a-z]*/i;function qn(e){var t=e.match(Fn);return t?t[0]:e}function Ln(e,t,r){return!!H(t)&&(Dt(t)?t.every((function(t){return Ln(e,t,r)})):e.selections.every((function(e){if(ue(e)&&ke(e,r)){var n=se(e);return kn.call(t,n)&&(!e.selectionSet||Ln(e.selectionSet,t[n],r))}return!0})))}function Bn(e){return H(e)&&!X(e)&&!Dt(e)}function Un(e,t){var r=G(pe(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var Vn=Object.create(null),zn=function(){return Vn},Qn=Object.create(null),Yn=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return Mn(X(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return X(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return Z(e);if(X(e))return e;var n=r.policies.identify(e)[0];if(n){var i=Z(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,n.__assign)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),kn.call(this.data,e)){var r=this.data[e];if(r&&kn.call(r,t))return r[t]}return"__typename"===t&&kn.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Gn?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),kn.call(this.data,e)?this.data[e]:this instanceof Gn?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;X(e)&&(e=e.__ref),X(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(r=e):e,o="string"==typeof t?this.lookup(r=t):t;if(o){__DEV__?u("string"==typeof r,"store.merge expects a string ID"):u("string"==typeof r,1);var s=new Lt(Zn).merge(i,o);if(this.data[r]=s,s!==i&&(delete this.refs[r],this.group.caching)){var a=Object.create(null);i||(a.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==s[e]){a[e]=1;var t=qn(e);t===e||n.policies.hasKeyArgs(s.__typename,t)||(a[t]=1),void 0!==s[e]||n instanceof Gn||delete s[e]}})),!a.__typename||i&&i.__typename||this.policies.rootTypenamesById[r]!==s.__typename||delete a.__typename,Object.keys(a).forEach((function(e){return n.group.dirty(r,e)}))}}},e.prototype.modify=function(e,t){var r=this,i=this.lookup(e);if(i){var o=Object.create(null),s=!1,a=!0,u={DELETE:Vn,INVALIDATE:Qn,isReference:X,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||Z(e)}:t,{store:r})}};if(Object.keys(i).forEach((function(c){var l=qn(c),f=i[c];if(void 0!==f){var p="function"==typeof t?t:t[c]||t[l];if(p){var d=p===zn?Vn:p(Mn(f),(0,n.__assign)((0,n.__assign)({},u),{fieldName:l,storeFieldName:c,storage:r.getStorage(e,c)}));d===Qn?r.group.dirty(e,c):(d===Vn&&(d=void 0),d!==f&&(o[c]=d,s=!0,f=d))}void 0!==f&&(a=!1)}})),s)return this.merge(e,o),a&&(this instanceof Gn?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),s=t&&r?this.policies.getStoreFieldName({typename:o,fieldName:t,args:r}):t;return this.modify(e,s?((n={})[s]=zn,n):zn)}return!1},e.prototype.evict=function(e,t){var r=!1;return e.id&&(kn.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof Gn&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach((function(t){kn.call(e.policies.rootTypenamesById,t)||r.push(t)})),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(r){e&&kn.call(e,r)||t.delete(r)})),e){var r=e.__META,i=(0,n.__rest)(e,["__META"]);Object.keys(i).forEach((function(e){t.merge(e,i[e])})),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Gn?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){kn.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof Gn;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!kn.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach((function(e){X(e)&&(t[e.__ref]=!0),H(e)&&Object.keys(e).forEach((function(t){var r=e[t];H(r)&&n.add(r)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Wn=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?cn():null,this.keyMaker=new Kt(Fe)},e.prototype.depend=function(e,t){if(this.d){this.d(Hn(e,t));var r=qn(t);r!==t&&this.d(Hn(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Hn(e,t),"__exists"===t?"forget":"setDirty")},e}();function Hn(e,t){return t+"#"+e}function Kn(e,t){Xn(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,s=e.call(this,r,new Wn(i))||this;return s.stump=new Jn(s),s.storageTrie=new Kt(Fe),o&&s.replace(o),s}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Yn||(Yn={}));var Gn=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach((function(r){Pt(n[r],i[r])||t.group.dirty(e,r)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(r){t.group.dirty(e,r)}))):t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.__assign)((0,n.__assign)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return kn.call(this.data,t)?(0,n.__assign)((0,n.__assign)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Yn),Jn=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Wn(t.group.caching,t.group))||this}return(0,n.__extends)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Gn);function Zn(e,t,r){var n=e[r],i=t[r];return Pt(n,i)?n:i}function Xn(e){return!!(e instanceof Yn&&e.group.caching)}function ei(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ti=function(){function e(e){var t=this;this.knownResults=new(Fe?WeakMap:Map),this.config=Sr(e,{addTypename:!1!==e.addTypename,canonizeResults:$n(e)}),this.canon=e.canon||new Gt,this.executeSelectionSet=pn((function(e){var r,i=e.context.canonizeResults,o=ei(e);o[3]=!i;var s=(r=t.executeSelectionSet).peek.apply(r,o);return s?i?(0,n.__assign)((0,n.__assign)({},s),{result:t.canon.admit(s.result)}):s:(Kn(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:ei,makeCacheKey:function(e,t,r,n){if(Xn(r.store))return r.store.makeCacheKey(e,X(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=pn((function(e){return Kn(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(Xn(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Gt},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,i=e.rootId,o=void 0===i?"ROOT_QUERY":i,s=e.variables,a=e.returnPartialData,u=void 0===a||a,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;s=(0,n.__assign)((0,n.__assign)({},ye(de(r))),s);var p,d=Z(o),h=this.executeSelectionSet({selectionSet:he(r).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,n.__assign)({store:t,query:r,policies:f,variables:s,varString:Jt(s),canonizeResults:l},Un(r,this.config.fragments))});if(h.missing&&(p=[new Nn(ri(h.missing),h.missing,r,s)],!u))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(e,t,r,n){if(Xn(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.enclosingRef,o=e.context;if(X(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(n.__ref," object")};var s,u=o.variables,c=o.policies,l=o.store.getFieldValue(n,"__typename"),f=[],p=new Lt;function d(e,t){var r;return e.missing&&(s=p.merge(s,((r={})[t]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof l&&!c.rootIdsByTypename[l]&&f.push({__typename:l});var h=new Set(r.selections);h.forEach((function(e){var r,y;if(ke(e,u))if(ue(e)){var v=c.readField({fieldName:e.name.value,field:e,variables:o.variables,from:n},o),m=se(e);void 0===v?ar.added(e)||(s=p.merge(s,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(X(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)),r))):Dt(v)?v=d(t.executeSubSelectedArray({field:e,array:v,enclosingRef:i,context:o}),m):e.selectionSet?null!=v&&(v=d(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:v,enclosingRef:X(v)?v:i,context:o}),m)):o.canonizeResults&&(v=t.canon.pass(v)),void 0!==v&&f.push(((y={})[m]=v,y))}else{var b=J(e,o.lookupFragment);if(!b&&e.kind===Pe.FRAGMENT_SPREAD)throw __DEV__?new a("No fragment named ".concat(e.name.value)):new a(5);b&&c.fragmentMatches(b,l)&&b.selectionSet.selections.forEach(h.add,h)}}));var y={result:Ft(f),missing:s},v=o.canonizeResults?this.canon.admit(y):Mn(y);return v.result&&this.knownResults.set(v.result,r),v},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,s=e.context,a=new Lt;function c(e,r){var n;return e.missing&&(t=a.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(s.store.canRead)),i=i.map((function(e,t){return null===e?null:Dt(e)?c(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:s}),t):n.selectionSet?c(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:X(e)?e:o,context:s}),t):(__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach((function(r){H(r)&&(__DEV__?u(!X(r),"Missing selection set for object of type ".concat(function(e,t){return X(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,r)," returned for query field ").concat(t.name.value)):u(!X(r),6),Object.values(r).forEach(n.add,n))}))}}(s.store,n,e),e)})),{result:s.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function ri(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var ni=Object.create(null);function ii(e){var t=JSON.stringify(e);return ni[t]||(ni[t]=Object.create(null))}function oi(e){var t=ii(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},i=r.keyObject=ai(e,(function(e){var i=li(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&kn.call(t,e[0])&&(i=li(t,e,ci)),__DEV__?u(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):u(void 0!==i,2),i}));return"".concat(r.typename,":").concat(JSON.stringify(i))})}function si(e){var t=ii(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,s=ai(e,(function(e){var r=e[0],o=r.charAt(0);if("@"!==o)if("$"!==o){if(t)return li(t,e)}else{var s=r.slice(1);if(i&&kn.call(i,s)){var a=e.slice(0);return a[0]=s,li(i,a)}}else if(n&&Rt(n.directives)){var u=r.slice(1),c=n.directives.find((function(e){return e.name.value===u})),l=c&&oe(c,i);return l&&li(l,e.slice(1))}})),a=JSON.stringify(s);return(t||"{}"!==a)&&(o+=":"+a),o})}function ai(e,t){var r=new Lt;return ui(e).reduce((function(e,n){var i,o=t(n);if(void 0!==o){for(var s=n.length-1;s>=0;--s)(i={})[n[s]]=o,o=i;e=r.merge(e,o)}return e}),Object.create(null))}function ui(e){var t=ii(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach((function(t,i){Dt(t)?(ui(t).forEach((function(e){return r.push(n.concat(e))})),n.length=0):(n.push(t),Dt(e[i+1])||(r.push(n.slice(0)),n.length=0))}))}return t.paths}function ci(e,t){return e[t]}function li(e,t,r){return r=r||ci,fi(t.reduce((function e(t,n){return Dt(t)?t.map((function(t){return e(t,n)})):t&&r(t,n)}),e))}function fi(e){return H(e)?Dt(e)?e.map(fi):ai(Object.keys(e).sort(),(function(t){return li(e,t)})):e}function pi(e){return void 0!==e.args?e.args:e.field?oe(e.field,e.variables):null}re.setStringify(Jt);var di=function(){},hi=function(e,t){return t.fieldName},yi=function(e,t,r){return(0,r.mergeObjects)(e,t)},vi=function(e,t){return t},mi=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.__assign)({dataIdFromObject:Rn},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,i=this,o=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var s,a=t&&t.storeObject||e,u=(0,n.__assign)((0,n.__assign)({},t),{typename:o,storeObject:a,readField:t&&t.readField||function(){var e=gi(arguments,a);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),c=o&&this.getTypePolicy(o),l=c&&c.keyFn||this.config.dataIdFromObject;l;){var f=l(e,u);if(!Dt(f)){s=f;break}l=oi(f)}return s=s?String(s):void 0,u.keyObject?[s,u.keyObject]:[s]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var i=e[r],o=i.queryType,s=i.mutationType,a=i.subscriptionType,u=(0,n.__rest)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",r),s&&t.setRootTypename("Mutation",r),a&&t.setRootTypename("Subscription",r),kn.call(t.toBeAdded,r)?t.toBeAdded[r].push(u):t.toBeAdded[r]=[u]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function s(e,t){e.merge="function"==typeof t?t:!0===t?yi:!1===t?vi:e.merge}s(n,t.merge),n.keyFn=!1===i?di:Dt(i)?oi(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var a=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===a?hi:Dt(a)?si(a):"function"==typeof a?a:n.keyFn,"function"==typeof u&&(n.read=u),s(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||hi)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&(__DEV__?u(!n||n===e,"Cannot change root ".concat(e," __typename more than once")):u(!n||n===e,3),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(Fn);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!kn.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(e);i&&i.size&&i.forEach((function(e){var i=t.getTypePolicy(e),o=i.fields,s=(0,n.__rest)(i,["fields"]);Object.assign(r,s),Object.assign(r.fields,o)}))}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach((function(r){t.updateTypePolicy(e,r)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var s=this.getSupertypeSet(t,!0),a=[s],c=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&a.indexOf(t)<0&&a.push(t)},l=!(!r||!this.fuzzySubtypes.size),f=!1,p=0;p<a.length;++p){var d=a[p];if(d.has(o))return s.has(o)||(f&&__DEV__&&u.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),s.add(o)),!0;d.forEach(c),l&&p===a.length-1&&Ln(e.selectionSet,r,n)&&(l=!1,f=!0,this.fuzzySubtypes.forEach((function(e,r){var n=t.match(e);n&&n[0]===t&&c(r)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!(!r||!r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),o=i&&i.keyFn;if(o&&r)for(var s={typename:r,fieldName:n,field:e.field||null,variables:e.variables},a=pi(e);o;){var u=o(a,s);if(!Dt(u)){t=u||n;break}o=si(u)}return void 0===t&&(t=e.field?function(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,o=n.value;return ee(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return ee(n,r,i,t)}))),re(e.name.value,n,r)}(e.field,e.variables):re(n,pi(e))),!1===t?n:n===qn(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),o=qn(i),s=t.store.getFieldValue(r,i),a=this.getFieldPolicy(e.typename,o,!1),u=a&&a.read;if(u){var c=bi(this,r,e,t,t.store.getStorage(X(r)?r.__ref:r,i));return dn.withValue(this.cache,u,[s,c])}return s}},e.prototype.getReadFunction=function(e,t){var r=this.getFieldPolicy(e,t,!1);return r&&r.read},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var o=r.field,s=r.typename,a=r.merge;return a===yi?_i(n.store)(e,t):a===vi?t:(n.overwrite&&(e=void 0),a(e,t,bi(this,void 0,{typename:s,fieldName:o.name.value,field:o,variables:n.variables},n,i||Object.create(null))))},e}();function bi(e,t,r,n,i){var o=e.getStoreFieldName(r),s=qn(o),a=r.variables||n.variables,u=n.store,c=u.toReference,l=u.canRead;return{args:pi(r),field:r.field||null,fieldName:s,storeFieldName:o,variables:a,isReference:X,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(gi(arguments,t,a),n)},mergeObjects:_i(n.store)}}function gi(e,t,r){var i,o,s,a=e[0],c=e[1],l=e.length;return"string"==typeof a?i={fieldName:a,from:l>1?c:t}:(i=(0,n.__assign)({},a),kn.call(i,"from")||(i.from=t)),__DEV__&&void 0===i.from&&__DEV__&&u.warn("Undefined 'from' passed to readField with arguments ".concat((o=Array.from(e),s=fr("stringifyForDisplay"),JSON.stringify(o,(function(e,t){return void 0===t?s:t})).split(JSON.stringify(s)).join("<undefined>")))),void 0===i.variables&&(i.variables=r),i}function _i(e){return function(t,r){if(Dt(t)||Dt(r))throw __DEV__?new a("Cannot automatically merge arrays"):new a(4);if(H(t)&&H(r)){var i=e.getFieldValue(t,"__typename"),o=e.getFieldValue(r,"__typename");if(i&&o&&i!==o)return r;if(X(t)&&Bn(r))return e.merge(t.__ref,r),t;if(Bn(t)&&X(r))return e.merge(t,r.__ref),r;if(Bn(t)&&Bn(r))return(0,n.__assign)((0,n.__assign)({},t),r)}return r}}function wi(e,t,r){var i="".concat(t).concat(r),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===r?e:(0,n.__assign)((0,n.__assign)({},e),{clientOnly:t,deferred:r})),o}var Oi=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,i=t.query,o=t.result,s=t.dataId,c=t.variables,l=t.overwrite,f=le(i),p=new Lt;c=(0,n.__assign)((0,n.__assign)({},ye(f)),c);var d=(0,n.__assign)((0,n.__assign)({store:e,written:Object.create(null),merge:function(e,t){return p.merge(e,t)},variables:c,varString:Jt(c)},Un(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:o||Object.create(null),dataId:s,selectionSet:f.selectionSet,mergeTree:{map:new Map},context:d});if(!X(h))throw __DEV__?new a("Could not identify object ".concat(JSON.stringify(o))):new a(7);return d.incomingById.forEach((function(t,n){var i=t.storeObject,o=t.mergeTree,s=t.fieldNodeSet,a=Z(n);if(o&&o.map.size){var c=r.applyMerges(o,a,i,d);if(X(c))return;i=c}if(__DEV__&&!d.overwrite){var l=Object.create(null);s.forEach((function(e){e.selectionSet&&(l[e.name.value]=!0)})),Object.keys(i).forEach((function(e){(function(e){return!0===l[qn(e)]})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,r,n){var i=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},o=i(e);if(o){var s=i(t);if(s&&!X(o)&&!Pt(o,s)&&!Object.keys(o).every((function(e){return void 0!==n.getFieldValue(s,e)}))){var a=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=qn(r),l="".concat(a,".").concat(c);if(!Pi.has(l)){Pi.add(l);var f=[];Dt(o)||Dt(s)||[o,s].forEach((function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||f.includes(t)||f.push(t)})),__DEV__&&u.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(a," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(s).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(a,i,e,d.store)}))}e.merge(n,i)})),e.retain(h.__ref),h},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,i=e.result,o=e.selectionSet,s=e.context,a=e.mergeTree,c=this.cache.policies,l=Object.create(null),f=r&&c.rootTypenamesById[r]||ae(i,o,s.fragmentMap)||r&&s.store.get(r,"__typename");"string"==typeof f&&(l.__typename=f);var p=function(){var e=gi(arguments,l,s.variables);if(X(e.from)){var t=s.incomingById.get(e.from.__ref);if(t){var r=c.readField((0,n.__assign)((0,n.__assign)({},e),{from:t.storeObject}),s);if(void 0!==r)return r}}return c.readField(e,s)},d=new Set;this.flattenFields(o,i,s,f).forEach((function(e,r){var n,o=se(r),s=i[o];if(d.add(r),void 0!==s){var h=c.getStoreFieldName({typename:f,fieldName:r.name.value,field:r,variables:e.variables}),y=Ei(a,h),v=t.processFieldValue(s,r,r.selectionSet?wi(e,!1,!1):e,y),m=void 0;r.selectionSet&&(X(v)||Bn(v))&&(m=p("__typename",v));var b=c.getMergeFunction(f,r.name.value,m);b?y.info={field:r,typename:f,merge:b}:ji(a,h),l=e.merge(l,((n={})[h]=v,n))}else!__DEV__||e.clientOnly||e.deferred||ar.added(r)||c.getReadFunction(f,r.name.value)||__DEV__&&u.error("Missing field '".concat(se(r),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))}));try{var h=c.identify(i,{typename:f,selectionSet:o,fragmentMap:s.fragmentMap,storeObject:l,readField:p}),y=h[0],v=h[1];r=r||y,v&&(l=s.merge(l,v))}catch(e){if(!r)throw e}if("string"==typeof r){var m=Z(r),b=s.written[r]||(s.written[r]=[]);if(b.indexOf(o)>=0)return m;if(b.push(o),this.reader&&this.reader.isFresh(i,m,o,s))return m;var g=s.incomingById.get(r);return g?(g.storeObject=s.merge(g.storeObject,l),g.mergeTree=Ii(g.mergeTree,a),d.forEach((function(e){return g.fieldNodeSet.add(e)}))):s.incomingById.set(r,{storeObject:l,mergeTree:Ti(a)?void 0:a,fieldNodeSet:d}),m}return l},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Dt(e)?e.map((function(e,o){var s=i.processFieldValue(e,t,r,Ei(n,o));return ji(n,o),s})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):__DEV__?wr(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=ae(t,e,r.fragmentMap));var i=new Map,o=this.cache.policies,s=new Kt(!1);return function e(u,c){var l=s.lookup(u,c.clientOnly,c.deferred);l.visited||(l.visited=!0,u.selections.forEach((function(s){if(ke(s,r.variables)){var u=c.clientOnly,l=c.deferred;if(u&&l||!Rt(s.directives)||s.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(u=!0),"defer"===t){var n=oe(e,r.variables);n&&!1===n.if||(l=!0)}})),ue(s)){var f=i.get(s);f&&(u=u&&f.clientOnly,l=l&&f.deferred),i.set(s,wi(r,u,l))}else{var p=J(s,r.lookupFragment);if(!p&&s.kind===Pe.FRAGMENT_SPREAD)throw __DEV__?new a("No fragment named ".concat(s.name.value)):new a(8);p&&o.fragmentMatches(p,n,t,r.variables)&&e(p.selectionSet,wi(r,u,l))}}})))}(e,r),i},e.prototype.applyMerges=function(e,t,r,i,o){var s,a=this;if(e.map.size&&!X(r)){var c,l=Dt(r)||!X(t)&&!Bn(t)?void 0:t,f=r;l&&!o&&(o=[X(l)?l.__ref:l]);var p=function(e,t){return Dt(e)?"number"==typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var r=p(l,t),n=p(f,t);if(void 0!==n){o&&o.push(t);var s=a.applyMerges(e,r,n,i,o);s!==n&&(c=c||new Map).set(t,s),o&&u(o.pop()===t)}})),c&&(r=Dt(f)?f.slice(0):(0,n.__assign)({},f),c.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,i,o&&(s=i.store).getStorage.apply(s,o)):r},e}(),Si=[];function Ei(e,t){var r=e.map;return r.has(t)||r.set(t,Si.pop()||{map:new Map}),r.get(t)}function Ii(e,t){if(e===t||!t||Ti(t))return e;if(!e||Ti(e))return t;var r=e.info&&t.info?(0,n.__assign)((0,n.__assign)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:r,map:i?new Map:e.map.size?e.map:t.map};if(i){var s=new Set(t.map.keys());e.map.forEach((function(e,r){o.map.set(r,Ii(e,t.map.get(r))),s.delete(r)})),s.forEach((function(r){o.map.set(r,Ii(t.map.get(r),e.map.get(r)))}))}return o}function Ti(e){return!e||!(e.info||e.map.size)}function ji(e,t){var r=e.map,n=r.get(t);n&&Ti(n)&&(Si.push(n),r.delete(t))}var Pi=new Set,xi=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=mn,r.txCount=0,r.config=function(e){return Sr(Cn,e)}(t),r.addTypename=!!r.config.addTypename,r.policies=new mi({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,n.__extends)(t,e),t.prototype.init=function(){var e=this.data=new Yn.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new Oi(this,this.storeReader=new ti({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:$n(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=pn((function(e,r){return t.broadcastWatch(e,r)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(Xn(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,Jt({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(e){if(e instanceof Nn)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(kn.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,r=this;return this.watches.size||yn(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){r.watches.delete(e)&&!r.watches.size&&vn(r),r.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Jt.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(X(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&u.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(kn.call(e,"id"))return!1;e=(0,n.__assign)((0,n.__assign)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),Jt.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),vn(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,i=e.update,o=e.optimistic,s=void 0===o||o,a=e.removeOptimistic,u=e.onWatchUpdated,c=function(e){var n=r,o=n.data,s=n.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=i(r)}finally{--r.txCount,r.data=o,r.optimisticData=s}},l=new Set;return u&&!this.txCount&&this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof s?this.optimisticData=this.optimisticData.addLayer(s,c):!1===s?c(this.data):c(),"string"==typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),u&&l.size?(this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e,t){var r=u.call(this,e,t);return!1!==r&&l.delete(e),r}})),l.size&&l.forEach((function(e){return r.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=ar(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,n,r))||r&&Pt(r.result,n.result)||e.callback(e.lastDiff=n,r)},t}(An),Ai=_e.empty,Ni=_e.from,Mi=_e.split,ki=_e.concat;function Di(e){var t=!1;return new Promise((function(r,n){e.subscribe({next:function(e){t?__DEV__&&u.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,r(e))},error:n})}))}function Ri(e){return new W((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function Ci(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const $i=/\r\n|[\n\r]/g;function Fi(e,t){let r=0,n=1;for(const i of e.body.matchAll($i)){if("number"==typeof i.index||Ci(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function qi(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?r:0,u=t.column+a,c=`${e.name}:${s}:${u}\n`,l=n.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,r=[];for(let e=0;e<f.length;e+=80)r.push(f.slice(e,e+80));return c+Li([[`${s} |`,r[0]],...r.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",r[e+1]]])}return c+Li([[s-1+" |",l[i-1]],[`${s} |`,f],["|","^".padStart(u)],[`${s+1} |`,l[i+1]]])}function Li(e){const t=e.filter((([e,t])=>void 0!==t)),r=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(r)+(t?" "+t:""))).join("\n")}class Bi extends Error{constructor(e,...t){var r,n,i;const{nodes:o,source:s,positions:a,path:u,originalError:c,extensions:l}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=u?u:void 0,this.originalError=null!=c?c:void 0,this.nodes=Ui(Array.isArray(o)?o:o?[o]:void 0);const f=Ui(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=s?s:null==f||null===(n=f[0])||void 0===n?void 0:n.source,this.positions=null!=a?a:null==f?void 0:f.map((e=>e.start)),this.locations=a&&s?a.map((e=>Fi(s,e))):null==f?void 0:f.map((e=>Fi(e.source,e.start)));const p="object"==typeof(d=null==c?void 0:c.extensions)&&null!==d?null==c?void 0:c.extensions:void 0;var d;this.extensions=null!==(i=null!=l?l:p)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Bi):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(e+="\n\n"+qi((t=r.loc).source,Fi(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+qi(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function Ui(e){return void 0===e||0===e.length?void 0:e}function Vi(e,t,r){return new Bi(`Syntax Error: ${r}`,{source:e,positions:[t]})}var zi,Qi,Yi;!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(zi||(zi={})),(Yi=Qi||(Qi={})).SOF="<SOF>",Yi.EOF="<EOF>",Yi.BANG="!",Yi.DOLLAR="$",Yi.AMP="&",Yi.PAREN_L="(",Yi.PAREN_R=")",Yi.SPREAD="...",Yi.COLON=":",Yi.EQUALS="=",Yi.AT="@",Yi.BRACKET_L="[",Yi.BRACKET_R="]",Yi.BRACE_L="{",Yi.PIPE="|",Yi.BRACE_R="}",Yi.NAME="Name",Yi.INT="Int",Yi.FLOAT="Float",Yi.STRING="String",Yi.BLOCK_STRING="BlockString",Yi.COMMENT="Comment";class Wi{constructor(e){const t=new Se(Qi.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Qi.EOF)do{if(e.next)e=e.next;else{const t=eo(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Qi.COMMENT);return e}}function Hi(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Ki(e,t){return Gi(e.charCodeAt(t))&&Ji(e.charCodeAt(t+1))}function Gi(e){return e>=55296&&e<=56319}function Ji(e){return e>=56320&&e<=57343}function Zi(e,t){const r=e.source.body.codePointAt(t);if(void 0===r)return Qi.EOF;if(r>=32&&r<=126){const e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Xi(e,t,r,n,i){const o=e.line,s=1+r-e.lineStart;return new Se(t,r,n,o,s,i)}function eo(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const t=r.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===r.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return to(e,i);case 33:return Xi(e,Qi.BANG,i,i+1);case 36:return Xi(e,Qi.DOLLAR,i,i+1);case 38:return Xi(e,Qi.AMP,i,i+1);case 40:return Xi(e,Qi.PAREN_L,i,i+1);case 41:return Xi(e,Qi.PAREN_R,i,i+1);case 46:if(46===r.charCodeAt(i+1)&&46===r.charCodeAt(i+2))return Xi(e,Qi.SPREAD,i,i+3);break;case 58:return Xi(e,Qi.COLON,i,i+1);case 61:return Xi(e,Qi.EQUALS,i,i+1);case 64:return Xi(e,Qi.AT,i,i+1);case 91:return Xi(e,Qi.BRACKET_L,i,i+1);case 93:return Xi(e,Qi.BRACKET_R,i,i+1);case 123:return Xi(e,Qi.BRACE_L,i,i+1);case 124:return Xi(e,Qi.PIPE,i,i+1);case 125:return Xi(e,Qi.BRACE_R,i,i+1);case 34:return 34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)?lo(e,i):io(e,i)}if(Ze(t)||45===t)return ro(e,i,t);if(et(t))return fo(e,i);throw Vi(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Hi(t)||Ki(r,i)?`Unexpected character: ${Zi(e,i)}.`:`Invalid character: ${Zi(e,i)}.`)}return Xi(e,Qi.EOF,n,n)}function to(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const e=r.charCodeAt(i);if(10===e||13===e)break;if(Hi(e))++i;else{if(!Ki(r,i))break;i+=2}}return Xi(e,Qi.COMMENT,t,i,r.slice(t+1,i))}function ro(e,t,r){const n=e.source.body;let i=t,o=r,s=!1;if(45===o&&(o=n.charCodeAt(++i)),48===o){if(o=n.charCodeAt(++i),Ze(o))throw Vi(e.source,i,`Invalid number, unexpected digit after 0: ${Zi(e,i)}.`)}else i=no(e,i,o),o=n.charCodeAt(i);if(46===o&&(s=!0,o=n.charCodeAt(++i),i=no(e,i,o),o=n.charCodeAt(i)),69!==o&&101!==o||(s=!0,o=n.charCodeAt(++i),43!==o&&45!==o||(o=n.charCodeAt(++i)),i=no(e,i,o),o=n.charCodeAt(i)),46===o||et(o))throw Vi(e.source,i,`Invalid number, expected digit but got: ${Zi(e,i)}.`);return Xi(e,s?Qi.FLOAT:Qi.INT,t,i,n.slice(t,i))}function no(e,t,r){if(!Ze(r))throw Vi(e.source,t,`Invalid number, expected digit but got: ${Zi(e,t)}.`);const n=e.source.body;let i=t+1;for(;Ze(n.charCodeAt(i));)++i;return i}function io(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,s="";for(;i<n;){const n=r.charCodeAt(i);if(34===n)return s+=r.slice(o,i),Xi(e,Qi.STRING,t,i+1,s);if(92!==n){if(10===n||13===n)break;if(Hi(n))++i;else{if(!Ki(r,i))throw Vi(e.source,i,`Invalid character within String: ${Zi(e,i)}.`);i+=2}}else{s+=r.slice(o,i);const t=117===r.charCodeAt(i+1)?123===r.charCodeAt(i+2)?oo(e,i):so(e,i):co(e,i);s+=t.value,i+=t.size,o=i}}throw Vi(e.source,i,"Unterminated string.")}function oo(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const e=r.charCodeAt(t+i++);if(125===e){if(i<5||!Hi(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|uo(e),n<0)break}throw Vi(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function so(e,t){const r=e.source.body,n=ao(r,t+2);if(Hi(n))return{value:String.fromCodePoint(n),size:6};if(Gi(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){const e=ao(r,t+8);if(Ji(e))return{value:String.fromCodePoint(n,e),size:12}}throw Vi(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function ao(e,t){return uo(e.charCodeAt(t))<<12|uo(e.charCodeAt(t+1))<<8|uo(e.charCodeAt(t+2))<<4|uo(e.charCodeAt(t+3))}function uo(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function co(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Vi(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function lo(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,s=o,a="";const u=[];for(;o<n;){const n=r.charCodeAt(o);if(34===n&&34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)){a+=r.slice(s,o),u.push(a);const n=Xi(e,Qi.BLOCK_STRING,t,o+3,tt(u).join("\n"));return e.line+=u.length-1,e.lineStart=i,n}if(92!==n||34!==r.charCodeAt(o+1)||34!==r.charCodeAt(o+2)||34!==r.charCodeAt(o+3))if(10!==n&&13!==n)if(Hi(n))++o;else{if(!Ki(r,o))throw Vi(e.source,o,`Invalid character within String: ${Zi(e,o)}.`);o+=2}else a+=r.slice(s,o),u.push(a),13===n&&10===r.charCodeAt(o+1)?o+=2:++o,a="",s=o,i=o;else a+=r.slice(s,o),s=o+1,o+=4}throw Vi(e.source,o,"Unterminated string.")}function fo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n&&(Xe(o=r.charCodeAt(i))||Ze(o)||95===o);)++i;var o;return Xi(e,Qi.NAME,t,i,r.slice(t,i))}class po{constructor(e,t={}){const r=function(e){return e instanceof T}(e)?e:new T(e);this._lexer=new Wi(r),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(Qi.NAME);return this.node(e,{kind:Pe.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Pe.DOCUMENT,definitions:this.many(Qi.SOF,this.parseDefinition,Qi.EOF)})}parseDefinition(){if(this.peek(Qi.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===Qi.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Vi(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Qi.BRACE_L))return this.node(e,{kind:Pe.OPERATION_DEFINITION,operation:je.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let r;return this.peek(Qi.NAME)&&(r=this.parseName()),this.node(e,{kind:Pe.OPERATION_DEFINITION,operation:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Qi.NAME);switch(e.value){case"query":return je.QUERY;case"mutation":return je.MUTATION;case"subscription":return je.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Qi.PAREN_L,this.parseVariableDefinition,Qi.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Pe.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Qi.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Qi.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Qi.DOLLAR),this.node(e,{kind:Pe.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Pe.SELECTION_SET,selections:this.many(Qi.BRACE_L,this.parseSelection,Qi.BRACE_R)})}parseSelection(){return this.peek(Qi.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let r,n;return this.expectOptionalToken(Qi.COLON)?(r=t,n=this.parseName()):n=t,this.node(e,{kind:Pe.FIELD,alias:r,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Qi.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Qi.PAREN_L,t,Qi.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,r=this.parseName();return this.expectToken(Qi.COLON),this.node(t,{kind:Pe.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Qi.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Qi.NAME)?this.node(e,{kind:Pe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Pe.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:Pe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:Pe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Qi.BRACKET_L:return this.parseList(e);case Qi.BRACE_L:return this.parseObject(e);case Qi.INT:return this.advanceLexer(),this.node(t,{kind:Pe.INT,value:t.value});case Qi.FLOAT:return this.advanceLexer(),this.node(t,{kind:Pe.FLOAT,value:t.value});case Qi.STRING:case Qi.BLOCK_STRING:return this.parseStringLiteral();case Qi.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:Pe.BOOLEAN,value:!0});case"false":return this.node(t,{kind:Pe.BOOLEAN,value:!1});case"null":return this.node(t,{kind:Pe.NULL});default:return this.node(t,{kind:Pe.ENUM,value:t.value})}case Qi.DOLLAR:if(e){if(this.expectToken(Qi.DOLLAR),this._lexer.token.kind===Qi.NAME){const e=this._lexer.token.value;throw Vi(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:Pe.STRING,value:e.value,block:e.kind===Qi.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:Pe.LIST,values:this.any(Qi.BRACKET_L,(()=>this.parseValueLiteral(e)),Qi.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:Pe.OBJECT,fields:this.any(Qi.BRACE_L,(()=>this.parseObjectField(e)),Qi.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,r=this.parseName();return this.expectToken(Qi.COLON),this.node(t,{kind:Pe.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Qi.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Qi.AT),this.node(t,{kind:Pe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Qi.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(Qi.BRACKET_R),t=this.node(e,{kind:Pe.LIST_TYPE,type:r})}else t=this.parseNamedType();return this.expectOptionalToken(Qi.BANG)?this.node(e,{kind:Pe.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:Pe.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Qi.STRING)||this.peek(Qi.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.many(Qi.BRACE_L,this.parseOperationTypeDefinition,Qi.BRACE_R);return this.node(e,{kind:Pe.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Qi.COLON);const r=this.parseNamedType();return this.node(e,{kind:Pe.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:Pe.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Pe.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Qi.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Qi.BRACE_L,this.parseFieldDefinition,Qi.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(Qi.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:Pe.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(Qi.PAREN_L,this.parseInputValueDef,Qi.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(Qi.COLON);const n=this.parseTypeReference();let i;this.expectOptionalToken(Qi.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:Pe.INPUT_VALUE_DEFINITION,description:t,name:r,type:n,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Pe.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:Pe.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(Qi.EQUALS)?this.delimitedMany(Qi.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:Pe.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(Qi.BRACE_L,this.parseEnumValueDefinition,Qi.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:Pe.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Vi(this._lexer.source,this._lexer.token.start,`${ho(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:Pe.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(Qi.BRACE_L,this.parseInputValueDef,Qi.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Qi.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),r=this.optionalMany(Qi.BRACE_L,this.parseOperationTypeDefinition,Qi.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Pe.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:Pe.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Pe.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Pe.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Pe.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Pe.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Pe.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Qi.AT);const r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Pe.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Qi.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(zi,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new Oe(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Vi(this._lexer.source,t.start,`Expected ${yo(e)}, found ${ho(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Qi.NAME||t.value!==e)throw Vi(this._lexer.source,t.start,`Expected "${e}", found ${ho(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Qi.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Vi(this._lexer.source,t.start,`Unexpected ${ho(t)}.`)}any(e,t,r){this.expectToken(e);const n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);const n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);const r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==Qi.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw Vi(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function ho(e){const t=e.value;return yo(e.kind)+(null!=t?` "${t}"`:"")}function yo(e){return function(e){return e===Qi.BANG||e===Qi.DOLLAR||e===Qi.AMP||e===Qi.PAREN_L||e===Qi.PAREN_R||e===Qi.SPREAD||e===Qi.COLON||e===Qi.EQUALS||e===Qi.AT||e===Qi.BRACKET_L||e===Qi.BRACKET_R||e===Qi.BRACE_L||e===Qi.PIPE||e===Qi.BRACE_R}(e)?`"${e}"`:e}var vo=new Map,mo=new Map,bo=!0,go=!1;function _o(e){return e.replace(/[\s,]+/g," ").trim()}function wo(e){var t,r,i,o=_o(e);if(!vo.has(o)){var s=function(e,t){return new po(e,t).parseDocument()}(e,{experimentalFragmentVariables:go,allowLegacyFragmentVariables:go});if(!s||"Document"!==s.kind)throw new Error("Not a valid GraphQL document.");vo.set(o,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}((t=s,r=new Set,i=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,n=_o((s=e.loc).source.body.substring(s.start,s.end)),o=mo.get(t);o&&!o.has(n)?bo&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||mo.set(t,o=new Set),o.add(n),r.has(n)||(r.add(n),i.push(e))}else i.push(e);var s})),(0,n.__assign)((0,n.__assign)({},t),{definitions:i}))))}return vo.get(o)}function Oo(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),wo(n)}function So(){vo.clear(),mo.clear()}function Eo(){bo=!1}function Io(){go=!0}function To(){go=!1}var jo,Po=Oo,xo=So,Ao=Eo,No=Io,Mo=To;(jo=Oo||(Oo={})).gql=Po,jo.resetCaches=xo,jo.disableFragmentWarnings=Ao,jo.enableExperimentalFragmentVariables=No,jo.disableExperimentalFragmentVariables=Mo,Oo.default=Oo,p(m?"log":"silent")},1143:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},1512:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.GraphQLClient=e.Squid=e.QueryBuilder=e.Changes=e.JoinQueryBuilder=e.DocumentReference=e.CollectionReference=void 0;var t=r(5660);Object.defineProperty(e,"CollectionReference",{enumerable:!0,get:function(){return t.CollectionReference}});var i=r(4516);Object.defineProperty(e,"DocumentReference",{enumerable:!0,get:function(){return i.DocumentReference}});var o=r(9732);Object.defineProperty(e,"JoinQueryBuilder",{enumerable:!0,get:function(){return o.JoinQueryBuilder}});var s=r(6891);Object.defineProperty(e,"Changes",{enumerable:!0,get:function(){return s.Changes}}),Object.defineProperty(e,"QueryBuilder",{enumerable:!0,get:function(){return s.QueryBuilder}});var a=r(5395);Object.defineProperty(e,"Squid",{enumerable:!0,get:function(){return a.Squid}});var u=r(5857);Object.defineProperty(e,"GraphQLClient",{enumerable:!0,get:function(){return u.GraphQLClient}})})();var i=exports;for(var o in n)i[o]=n[o];n.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
12
+ `})).data}}},7718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationSender=void 0;const n=r(575);t.MutationSender=class{constructor(e,t,r,n){this.clientIdService=e,this.rpcManager=t,this.lockManager=r,this.querySubscriptionManager=n}async sendMutations(e,t){const r=(0,n.reduceMutations)(e),i=r.map((e=>`sendMutation_${(0,n.getSquidDocId)(e.squidDocIdObj)}`));await this.lockManager.lock(...i),await this.querySubscriptionManager.waitForAllQueriesToFinish();try{const e={clientId:this.clientIdService.getClientId(),mutations:r,integrationId:t};return await this.rpcManager.post("mutation/mutate",e)}finally{this.lockManager.release(...i)}}}},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.NamedQueryManager=class{constructor(e,t,r){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.ongoingNamedQueryExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"namedQuery"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleNamedQueryResponse(e.clientRequestId,e.payload)}))}executeNamedQueryAndSubscribe(e,t,r){const o=(0,n.generateId)(),s=new i.Subject;this.ongoingNamedQueryExecutions[o]=s;const a={integrationId:e,queryName:t,paramsRecordStr:(0,n.serializeObj)(r),clientId:this.clientIdService.getClientId(),clientRequestId:o};return this.rpcManager.post("named-query/execute",a).catch((r=>{console.error("Got error while executing named query",t,"for integration",e,r),s.error(r),s.complete()})),s.pipe((0,i.finalize)((()=>{delete this.ongoingNamedQueryExecutions[o]})),(0,i.share)())}handleNamedQueryResponse(e,t){const r=this.ongoingNamedQueryExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.result):(r.error(new Error(i.result)),r.complete())}}},9732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinQueryBuilder=t.JoinQueryBuilderFactory=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937),a=r(9978);t.JoinQueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.queryBuilderFactory=r}getForJoin(e,t,r){return new u(e,t,this.querySubscriptionManager,this.documentReferenceFactory,r,this,this.queryBuilderFactory)}};class u{constructor(e,t,r,n,o,s,a){this.collectionName=e,this.integrationId=t,this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.alias=o,this.joinQueryBuilderFactory=s,this.queryBuilderFactory=a,this.joins={},this.joinConditions={},this.simpleQueryBuilder=new i.SimpleQueryBuilder(e,t)}where(e,t,r){return this.simpleQueryBuilder.where(e,t,r),this}limit(e){return this.simpleQueryBuilder.limit(e),this}sortBy(e,t=!0){return this.simpleQueryBuilder.sortBy(e,t),this}join(e,t,r){const n={leftFieldName:t,rightFieldName:r,leftAlias:this.alias};this.joins[e.alias]=e.build(),Object.entries(e.joins).forEach((([e,t])=>{this.joins[e]=t}));for(const[t,r]of Object.entries(e.joinConditions))this.joinConditions[t]=r;return this.joinConditions[e.alias]=n,this}snapshot(){return(0,s.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.alias,o.cloneDeep(this.joins),o.cloneDeep(this.joinConditions),e).pipe((0,a.map)((e=>e.map((e=>{const t={};for(const[r,n]of Object.entries(e)){const e=r===this.alias?this.collectionName:this.joins[r].collectionName,o=r===this.alias?this.integrationId:this.joins[r].integrationId,s=n?(0,i.getSquidDocId)(n.__docId__,e,o):void 0;t[r]=s?this.documentReferenceFactory.create(s,this.queryBuilderFactory):void 0}return t})))))}build(){return this.simpleQueryBuilder.build()}}t.JoinQueryBuilder=u},6891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Changes=t.QueryBuilder=t.QueryBuilderFactory=void 0;const n=r(575),i=r(2937),o=r(9978);t.QueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.documentIdentityService=r}getForDocument(e){const{collectionName:t,integrationId:r,docId:i}=(0,n.parseSquidDocId)(e),o=(0,n.deserializeObj)(i),s=this.get(t,r);return Object.entries(o).forEach((([e,t])=>{s.where(e,"==",t)})),s}get(e,t){return new s(e,t,this.querySubscriptionManager,this.documentReferenceFactory,this,this.documentIdentityService)}};class s extends n.SimpleQueryBuilder{constructor(e,t,r,n,i,o){super(e,t),this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.queryBuilderFactory=i,this.documentIdentityService=o}getSortOrder(){return this.query.sortOrder}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.collectionName,{},{},e).pipe((0,o.map)((e=>e.map((e=>{(0,n.assertTruthy)(1===Object.keys(e).length);const t=e[this.collectionName],r=(0,n.getSquidDocId)((0,n.truthy)(t).__docId__,this.collectionName,this.integrationId);return this.documentReferenceFactory.create(r,this.queryBuilderFactory)})))))}changes(){let e,t=new Set;return this.snapshots().pipe((0,i.combineLatestWith)(this.documentIdentityService.observeChanges().pipe((0,i.switchMap)((t=>(Object.entries(t).forEach((([t,r])=>{(0,n.replaceKeyInRecord)(e||{},t,r)})),i.NEVER))),(0,i.startWith)({}))),(0,o.map)((([r])=>{let n=[];const i=[],o=[];if(e){for(const o of r){const r=o.squidDocId,s=o.data;if(t.has(s))delete e[r],t.delete(s);else if(e[r]){i.push(o);const n=e[r];delete e[r],t.delete(n)}else n.push(o)}for(const e of t)o.push(e)}else n=r;e={},t=new Set;for(const n of r){const r=n.data;e[n.squidDocId]=r,t.add(r)}return new a(n,i,o)})))}get hash(){return(0,n.encodeValueForMapping)(this.build())}}t.QueryBuilder=s;class a{constructor(e,t,r){this.inserts=e,this.updates=t,this.deletes=r}}t.Changes=a},4661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySubscriptionManager=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937),a=r(9978),u=r(1122),c="client";t.QuerySubscriptionManager=class{constructor(e,t,r,n,i){this.rpcManager=e,this.clientIdService=t,this.documentStore=r,this.destructManager=n,this.documentIdentityService=i,this.safeToSendQueriesToServer=new s.BehaviorSubject(!0),this.onOrphanDocuments=new s.Subject,this.ongoingQueries=new Map,this.inflightQueriesCount=new s.BehaviorSubject(0),this.clientRequestIdToLocalDocuments=new Map,this.localDocumentToClientRequestIds=new Map,this.queryMappingManager=new l,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.clientIdService.observeClientReadyToBeRegenerated().subscribe((()=>{this.refreshOngoingQueries()})),this.destructManager.onPreDestruct((()=>{this.predestruct()}))}hasOngoingQuery(e){return this.ongoingQueries.has(e)}getQuery(e){return(0,i.truthy)(this.ongoingQueries.get(e)).query}setGotResponseFromServer(e){const t=(0,i.truthy)(this.ongoingQueries.get(e));t.gotResponseFromServer?this.removeClientRequestIdMapping(e):t.gotResponseFromServer=!0}findQueriesForDocument(e,t){const{collectionName:r,integrationId:n}=(0,i.parseSquidDocId)(t),o=this.queryMappingManager.getMapping(c,r,n);return o?(0,i.findQueriesForDocumentSync)(o,e):[]}setClientRequestIdsForLocalDoc(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set,n=new Set(t?this.findQueriesForDocument(t,e).map((e=>(0,i.parseQuerySubscriptionId)(e).clientRequestId)):[]),o=new Set([...r,...n]);for(const t of[...r]){if(n.has(t))continue;r.delete(t);const i=this.clientRequestIdToLocalDocuments.get(t);i&&(i.delete(e),i.size||this.clientRequestIdToLocalDocuments.delete(t)),r.size||this.localDocumentToClientRequestIds.delete(e)}for(const t of n){let r=this.localDocumentToClientRequestIds.get(e);r||(r=new Set,this.localDocumentToClientRequestIds.set(e,r)),r.add(t);let n=this.clientRequestIdToLocalDocuments.get(t);n||(n=new Set,this.clientRequestIdToLocalDocuments.set(t,n)),n.add(e)}return[...o]}errorOutAllQueries(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set;for(const e of r){const r=this.ongoingQueries.get(e);r&&r.subject.error(t)}}notifyAllSubscriptions(e){const t=new Set;for(const r of e){const e=this.ongoingQueries.get(r);if(!e)continue;if(!e.gotResponseFromServer||!e.activated)continue;const n=this.clientRequestIdToLocalDocuments.get(r),o=this.documentStore.sortAndLimitDocs(n,e.query);let s=!1;for(const t of e.supportedQueries)s=s||this.updateOngoingQueryWithNewDataFromSupportingQuery(o,t);let a=e;for(;!a.allObservables;)a=(0,i.truthy)(null==a?void 0:a.supportingOngoingQuery);s&&t.add(a),e.subject.next(o)}for(const e of t){const t=this.collectAllObservables(e);(0,i.truthy)(e.allObservables).next(t)}}processQuery(e,t,r,n,i){return(0,s.defer)((()=>{const u=this.createOngoingQueryGraph(e,t,r,n,i,!0);this.sendQueryToServer(u),u.allObservables=new s.ReplaySubject(1);const c=u.allObservables.pipe((0,s.switchMap)((e=>(0,s.combineLatest)(e).pipe((0,a.map)((e=>this.joinResults(e,n,u)))))),(0,a.filter)((()=>this.allOngoingQueriesGotServerResult(u))),(0,s.startWith)(void 0),(0,s.pairwise)(),(0,a.filter)((([e,t])=>!o.isEqual(e,t))),(0,a.map)((([e,t])=>t)),i?(0,s.tap)():(0,s.take)(1),(0,s.finalize)((()=>{var e;u.subject.complete(),this.completeAllSupportedQueries(u),null===(e=u.allObservables)||void 0===e||e.complete()}))),l=this.collectAllObservables(u);return u.allObservables.next(l),c})).pipe((0,s.share)())}hasOngoingQueryForDocId(e){const t=this.localDocumentToClientRequestIds.get(e);return!!t&&!!t.size}removeClientRequestIdMapping(e){const t=this.clientRequestIdToLocalDocuments.get(e);if(!t)return;this.clientRequestIdToLocalDocuments.delete(e);const r=[];for(const n of t){const t=(0,i.truthy)(this.localDocumentToClientRequestIds.get(n));t.delete(e),t.size||(this.localDocumentToClientRequestIds.delete(n),r.push(n))}r.length&&this.onOrphanDocuments.next(r)}async waitForAllQueriesToFinish(){return(0,s.firstValueFrom)(this.inflightQueriesCount.pipe((0,a.filter)((e=>0===e)))).then((()=>{}))}registerQueryFinalizer(e){const t=e.clientRequestId,r=(0,i.getQuerySubscriptionId)(this.clientIdService.getClientId(),t);e.subject.pipe((0,s.finalize)((()=>{if(this.queryMappingManager.removeQuery(t,r).then(),this.ongoingQueries.delete(t),e.subscribe&&!e.isEmptyForJoin&&e.activated){const r={clientId:this.clientIdService.getClientId(),clientRequestId:t};this.rpcManager.post("query/unsubscribe",r).catch((t=>{console.error("Got error while unsubscribing from query",e.query,t)}))}this.removeClientRequestIdMapping(t),this.ongoingQueries.delete(t)}))).subscribe({error:()=>{}})}createOngoingQueryGraph(e,t,r,n,o,a,u={}){if(u[t])return u[t];const c=(0,i.generateId)(),l=[],f={clientRequestId:c,activated:a,alias:t,query:e,subscribe:o,subject:new s.ReplaySubject(1),supportedQueries:l,supportingOngoingQuery:void 0,joinCondition:void 0,gotResponseFromServer:!1,isEmptyForJoin:!1};this.registerQueryFinalizer(f),this.ongoingQueries.set(c,f),u[t]=f;for(const[e,i]of Object.entries(n)){const s=i.leftAlias;if(s!==t&&e!==t)continue;const a=s===t?e:s;if(s===t){const e=this.createOngoingQueryGraph(r[a],a,r,n,o,!1,u);e.joinCondition=i,l.push(e)}else f.supportingOngoingQuery=this.createOngoingQueryGraph(r[a],a,r,n,o,!1,u)}return f}collectAllObservables(e,t=[]){if(e.isEmptyForJoin)return t;const r=e.alias;t.push(e.subject.pipe((0,a.map)((e=>({docs:e,alias:r})))));for(const r of e.supportedQueries)this.collectAllObservables(r,t);return t}joinResults(e,t,r){const n=[],i=e.reduce(((e,t)=>(e[t.alias]?e[t.alias].push(...t.docs):e[t.alias]=[...t.docs],e)),{});i[r.alias].forEach((e=>{n.push({[r.alias]:e})}));const o=this.getOngoingQueriesBfs(r),s=new Set;for(let e=1;e<o.length;e++){const r=o[e].alias;s.has(r)||(s.add(r),this.join(n,r,i[r],t))}return n}join(e,t,r,n){var o;if(!e.length)return;const s=Object.keys(e[0]),a=n[t];if(!a||!s.includes(a.leftAlias))return;const u=new Map;(r||[]).forEach((e=>{const t=e[a.rightFieldName];u.has(t)||u.set(t,[]),(0,i.truthy)(u.get(t)).push(e)}));for(const r of[...e]){const n=u.get(null===(o=r[a.leftAlias])||void 0===o?void 0:o[a.leftFieldName])||[];if(n.length)for(const i of n)r[t]?e.push(Object.assign(Object.assign({},r),{[t]:i})):r[t]=i;else r[t]||(r[t]=void 0)}}getOngoingQueriesBfs(e){const t=[],r=[e];for(;r.length;){const e=(0,i.truthy)(r.shift());e.isEmptyForJoin||(t.push(e),r.push(...e.supportedQueries))}return t}updateOngoingQueryWithNewDataFromSupportingQuery(e,t){var r;const n=(0,i.truthy)(t.joinCondition),a=t.query;if(t.activated){const u=(0,i.truthy)(null===(r=t.supportingOngoingQuery)||void 0===r?void 0:r.supportedQueries).filter((e=>e.alias===t.alias)),c=new Set(e.map((e=>{var t;return null!==(t=e[n.leftFieldName])&&void 0!==t?t:null})));for(const e of u)e.query.conditions.filter((e=>e.fieldName===n.rightFieldName)).forEach((e=>{c.delete(e.value)}));if(0===c.size)return!1;const l=o.cloneDeep(a);l.conditions=l.conditions.filter((e=>e.fieldName!==n.rightFieldName)),[...c].forEach((e=>{l.conditions.push({fieldName:n.rightFieldName,operator:"==",value:e})}));const f=Object.assign(Object.assign({},t),{query:l,activated:!0,gotResponseFromServer:!1,subject:new s.ReplaySubject(1),clientRequestId:(0,i.generateId)(),isEmptyForJoin:!1});return this.registerQueryFinalizer(f),this.ongoingQueries.set(f.clientRequestId,f),(0,i.truthy)(t.supportingOngoingQuery).supportedQueries.push(f),this.sendQueryToServer(f),!0}{const r=e.map((e=>{var t;return{fieldName:n.rightFieldName,operator:"==",value:null!==(t=e[n.leftFieldName])&&void 0!==t?t:null}}));return t.activated=!0,r.length?(a.conditions.push(...r),this.sendQueryToServer(t)):t.isEmptyForJoin=!0,!0}}allOngoingQueriesGotServerResult(e){return!!e.isEmptyForJoin||!!e.gotResponseFromServer&&(!e.supportedQueries.length||e.supportedQueries.every((e=>this.allOngoingQueriesGotServerResult(e))))}completeAllSupportedQueries(e){const t=[...e.supportedQueries||[]];for(;t.length;){const e=(0,i.truthy)(t.shift());t.push(...e.supportedQueries||[]),e.subject.complete()}}predestruct(){this.safeToSendQueriesToServer.next(!1),this.safeToSendQueriesToServer.complete(),this.unsubscribe()}unsubscribe(){var e;const t=[...this.ongoingQueries.values()];for(const r of t)r.subject.complete(),null===(e=r.allObservables)||void 0===e||e.complete()}hasSubscription(e){var t;return!!(null===(t=this.ongoingQueries.get(e))||void 0===t?void 0:t.subscribe)}sendQueryToServer(e){const t=e.query,r=e.clientRequestId,n={query:t,clientRequestId:r,subscribe:e.subscribe,clientId:this.clientIdService.getClientId()},o=(0,i.getQuerySubscriptionId)(this.clientIdService.getClientId(),r);this.queryMappingManager.addQuery(c,t,o).then(),this.ongoingQueries.set(r,e),this.safeToSendQueriesToServer.pipe((0,a.filter)(Boolean),(0,s.take)(1)).subscribe((()=>{e.subject.closed||(this.inflightQueriesCount.next(this.inflightQueriesCount.value+1),this.rpcManager.post("query/query",n).catch((t=>{e.subject.error(t)})).finally((()=>{this.inflightQueriesCount.next(this.inflightQueriesCount.value-1)})))}))}refreshOngoingQueries(){for(const e of this.ongoingQueries.values())this.sendQueryToServer(e)}migrateDocIds(e){const t=Object.keys(e);for(const r of this.clientRequestIdToLocalDocuments.values())t.forEach((t=>{r.has(t)&&(r.delete(t),r.add(e[t]))}));t.forEach((t=>{(0,i.replaceKeyInMap)(this.localDocumentToClientRequestIds,t,e[t])}))}};class l extends i.SimpleQueryMappingManager{constructor(){super(...arguments),this.stateService=new u.StateService,this.querySubscriptionIdToQuery={}}async addQuery(e,t,r){this.stateService.runInBatch((()=>{let e=0;const n=new Set;for(const o of t.conditions){const s=this.getConditionStatePath(t,o),a=[...this.stateService.getStateInPath(s)||[]];if((0,i.insertSorted)(a,r),["==","!="].includes(o.operator)){const t=(0,i.encodeValueForMapping)(o.fieldName);n.has(t)||(e++,n.add(t))}else e++;this.stateService.setInPath(s,a)}if(!t.conditions.length){const e=["queryMapping",t.collectionName,t.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.insertSorted)(n,r),this.stateService.setInPath(e,n)}this.stateService.setInPath([...this.getQueryMetadataStatePath(t,r),"condCount"],e)})),this.querySubscriptionIdToQuery[r]=t}async removeQuery(e,t){const r=this.querySubscriptionIdToQuery[t];if(r)return this.stateService.runInBatch((()=>{for(const e of r.conditions){const n=this.getConditionStatePath(r,e),o=[...this.stateService.getStateInPath(n)||[]];(0,i.removeSorted)(o,t),o.length?this.stateService.setInPath(n,o):this.stateService.deletePath(n)}if(!r.conditions.length){const e=["queryMapping",r.collectionName,r.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.removeSorted)(n,t),this.stateService.setInPath(e,n)}this.stateService.deletePath(this.getQueryMetadataStatePath(r,t))})),r}getMapping(e,t,r){return this.stateService.getStateInPath(["queryMapping",t,r,"mapping"])}removeLocalDevAppData(e){return Promise.resolve(void 0)}getQueryMetadataStatePath(e,t){return["queryMapping",e.collectionName,e.integrationId,"mapping","queriesMetadata",`${t}`]}getConditionStatePath(e,t){const r=(0,i.encodeValueForMapping)(t.fieldName),n=(0,i.encodeValueForMapping)(t.value);return["queryMapping",e.collectionName,e.integrationId,"mapping","conditional",`${r}`,`${t.operator}`,`${n}`]}}},602:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RpcError=t.RpcManager=void 0;const n=r(9312),i=r(575),o=n.__importDefault(r(9031)),s=r(2937);t.RpcManager=class{constructor(e,t,r,n={},o,a){this.rpcEndpoint=e,this.socketManager=t,this.destructManager=r,this.headers=n,this.authManager=o,this.clientIdService=a,this.staticHeaders={},this.onGoingRpcCounter=new s.BehaviorSubject(0),(0,i.assertTruthy)(e,"Http endpoint must be provided.");for(const[e,t]of Object.entries(n))this.setStaticHeader(e,t);const u=this.authManager.getApiKey();u&&this.setStaticHeader("Authorization",`ApiKey ${u}`),this.rpcEndpoint.endsWith("/")||(this.rpcEndpoint+="/"),this.authManager.observeAuthIdToken().subscribe((e=>{if(e.token){let t=`Bearer ${e.token}`;e.integrationId&&(t+=`; IntegrationId ${e.integrationId}`),this.setStaticHeader("Authorization",t)}else this.deleteStaticHeader("Authorization")})),r.onDestruct((async()=>{await this.awaitAllSettled()}))}async awaitAllSettled(){await(0,s.firstValueFrom)(this.onGoingRpcCounter.pipe((0,s.filter)((e=>0===e))))}setStaticHeader(e,t){this.staticHeaders[e]=t}deleteStaticHeader(e){delete this.staticHeaders[e]}getEndpoint(){return this.rpcEndpoint}getStaticHeaders(){return this.staticHeaders}async post(e,t){this.onGoingRpcCounter.next(this.onGoingRpcCounter.value+1);try{await(0,s.firstValueFrom)((0,s.race)(this.socketManager.observeConnectionReady().pipe((0,s.filter)(Boolean)),this.destructManager.isDestructingObservable)),t.clientId&&(t.clientId=this.clientIdService.getClientId()),await this.authManager.waitForReadyState();let r={"Content-Type":"application/json"};Object.keys(this.staticHeaders)&&(r=Object.assign(Object.assign({},r),this.staticHeaders));const n=await(0,o.default)(`${this.rpcEndpoint}${e}`,{method:"POST",body:(0,i.serializeObj)(t),headers:r});let u,c;try{u=await n.text();try{c=JSON.parse(u)}catch(e){}}catch(e){u="Cannot read body"}if(!n.ok)throw new a(n.status,n.statusText,n.headers,n.url,null==c?void 0:c.message);return c||u}finally{this.onGoingRpcCounter.next(this.onGoingRpcCounter.value-1)}}};class a extends Error{constructor(e,t,r,n,i){super(i||`RPC error ${e} ${t} calling ${n}`),this.statusCode=e,this.statusText=t,this.headers=r,this.url=n}}t.RpcError=a},3474:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketManager=void 0;const n=r(575),i=r(2937),o=r(8087),s=r(266);t.SocketManager=class{constructor(e,t,r=s.NOOP_FN,n,o={},a){this.clientIdService=e,this.socketIoEndpoint=t,this.messageNotificationWrapper=r,this.destructManager=n,this.authManager=a,this.webSocketObserver=new i.Subject,this.allMessagesObserver=new i.Subject,this.connectionReady=new i.BehaviorSubject(!1),this.seenMessageIds=new Set,this.firstConnection=!0,this.clientTooOldThreshold=3e5,this.destructManager.onDestruct((async()=>{await this.destruct()})),this.setupMessageAcknowledgments(),this.connect(Object.assign({},o)),this.connectionReady.pipe((0,i.skip)(1),(0,i.filter)((e=>!e)),(0,i.switchMap)((()=>(0,i.race)((0,i.timer)(this.clientTooOldThreshold),this.connectionReady.pipe((0,i.filter)(Boolean)),this.destructManager.isDestructingObservable)))).subscribe((()=>{this.connectionReady.value||this.destructManager.isDestructing||(this.clientIdService.notifyClientTooOld(),this.connect(Object.assign({},o)))})),this.connectionReady.pipe((0,i.filter)(Boolean)).subscribe((()=>{this.clientIdService.isClientTooOld()&&this.clientIdService.notifyClientReadyToBeRegenerated()}))}observeNotifications(){return this.webSocketObserver.asObservable()}observeConnectionReady(){return this.connectionReady.asObservable().pipe((0,i.distinctUntilChanged)())}sendMessage(e){this.authManager.waitForReadyState().then((()=>{(0,i.firstValueFrom)(this.connectionReady.pipe((0,i.filter)(Boolean))).then((()=>{const t=this.authManager.getAuthToken();(0,n.truthy)(this.socket).emit("message",Object.assign(Object.assign({},e),{authToken:t}))}))}))}connect(e){const t={clientId:this.clientIdService.getClientId()};this.socket=(0,o.io)(this.socketIoEndpoint,{query:t,reconnectionDelay:5e3,transports:["websocket"],extraHeaders:e}),this.socket.on("connect",(()=>{console.log("Connected to socket")})),this.socket.on("disconnect",((e,t)=>{this.connectionReady.next(!1)})),this.socket.on("connectionReady",(()=>{console.log("Connection ready"),this.connectionReady.next(!0),this.firstConnection||this.sendMessage({type:"catchup"}),this.firstConnection=!1})),this.socket.on("connect_error",(e=>{console.log("An error occurred while connecting to the socket with url: ",this.socketIoEndpoint)})),this.socket.on("message",(e=>{const t=(0,n.deserializeObj)(e);for(const e of t)this.allMessagesObserver.next(e),this.seenMessageIds.has(e.messageId)||(this.seenMessageIds.add(e.messageId),this.messageNotificationWrapper((()=>{this.webSocketObserver.next(e)})))}))}setupMessageAcknowledgments(){const e=new i.Subject;this.allMessagesObserver.subscribe((t=>{(null==t?void 0:t.messageId)&&e.next(t.messageId)}));const t=[];e.pipe((0,i.tap)((e=>t.push(e))),(0,i.debounceTime)(100)).subscribe((async()=>{const e=[...t.splice(0)];this.sendMessage({type:"acknowledge",payload:e})}))}async destruct(){var e;this.sendMessage({type:"kill"}),this.connectionReady.next(!1),await(0,i.firstValueFrom)((0,i.timer)(0)),null===(e=this.socket)||void 0===e||e.disconnect(),this.webSocketObserver.complete(),this.allMessagesObserver.complete()}}},5395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Squid=void 0;const n=r(9312),i=r(575),o=r(2937),s=r(5969),a=r(4268),u=r(9526),c=r(8862),l=r(7378),f=r(1600),p=r(4967),d=r(7787),h=r(4605),y=n.__importDefault(r(2256)),v=r(2417),m=r(5182),b=r(5621),g=r(7718),_=r(9194),w=r(9732),O=r(6891),S=r(4661),E=r(602),I=r(3474);class T{constructor(e){this.destructManager=new d.DestructManager,this.setAuthIdToken=(e,t)=>{this.authManager.setAuthIdToken(e,t)},this.collection=(e,t=i.IntegrationType.built_in_db)=>(this.validateNotDestructed(),this.collectionReferenceFactory.get(e,t)),this.runInTransaction=e=>(this.validateNotDestructed(),this.dataManager.runInTransaction(e)),this.executeFunction=(e,...t)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.backendFunctionManager.executeFunctionAndSubscribe(e,...t))),this.executeNamedQuery=(e,t,r)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.namedQueryManager.executeNamedQueryAndSubscribe(e,t,r))),this.callApi=(e,t,r={})=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.apiManager.callApiAndSubscribe(e,t,r))),this.graphql=e=>(this.validateNotDestructed(),this.graphqlClientFactory.get(e)),this.ai=()=>(this.validateNotDestructed(),{assistant:e=>this.aiClientFactory.getAssistant(e)}),this.acquireLock=(e,t=!0)=>(this.validateNotDestructed(),this.distributedLockManager.lock(e,t)),this.destruct=async()=>{if(!this.destructManager.isDestructing)return this.destructManager.destruct().finally((()=>{const e=Object.entries(T.squidInstancesMap).find((([,e])=>e===this));e&&delete T.squidInstancesMap[e[0]]}))},this.unsubscribe=async()=>{this.querySubscriptionManager.unsubscribe(),await this.rpcManager.awaitAllSettled()},(0,i.assertTruthy)(e.appId,"APP_ID_MUST_BE_PROVIDED");const t=(0,i.appIdWithEnvironmentId)(e.appId,e.environmentId)+(e.squidDeveloperId?`_${e.squidDeveloperId}`:""),r=(0,i.getApplicationUrl)(e.region,t),n=(0,i.getApplicationHttpHeaders)(e.region,t);this.clientIdService=new l.ClientIdService(this.destructManager),this.authManager=new u.AuthManager(this.destructManager,e.apiKey),this.socketManager=new I.SocketManager(this.clientIdService,r,e.messageNotificationWrapper,this.destructManager,n,this.authManager),this.rpcManager=new E.RpcManager(r,this.socketManager,this.destructManager,n,this.authManager,this.clientIdService),this.documentStore=new m.DocumentStore,this.lockManager=new i.LockManager,this.distributedLockManager=new h.DistributedLockManager(this.socketManager,this.destructManager),this.documentIdentityService=new y.default(this.documentStore,this.destructManager),this.documentReferenceFactory=new v.DocumentReferenceFactory,this.querySubscriptionManager=new S.QuerySubscriptionManager(this.rpcManager,this.clientIdService,this.documentStore,this.destructManager,this.documentIdentityService);const j=new g.MutationSender(this.clientIdService,this.rpcManager,this.lockManager,this.querySubscriptionManager);this.queryBuilderFactory=new O.QueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.documentIdentityService),this.joinQueryBuilderFactory=new w.JoinQueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.queryBuilderFactory),this.collectionReferenceFactory=new f.CollectionReferenceFactory(this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory,this.documentIdentityService),this.dataManager=new p.DataManager(this.documentStore,j,this.socketManager,this.querySubscriptionManager,this.queryBuilderFactory,this.lockManager,this.destructManager,this.documentIdentityService),this.documentReferenceFactory.setDataManager(this.dataManager),this.backendFunctionManager=new c.BackendFunctionManager(this.clientIdService,this.rpcManager,this.socketManager),this.namedQueryManager=new _.NamedQueryManager(this.clientIdService,this.rpcManager,this.socketManager),this.apiManager=new a.ApiManager(this.clientIdService,this.rpcManager,this.socketManager,e.apiServerUrlOverrideMapping),this.graphqlClientFactory=new b.GraphQLClientFactory(this.rpcManager),this.aiClientFactory=new s.AiClientFactory(this.clientIdService,this.rpcManager,this.socketManager)}static getInstance(e){const t=(0,i.normalizeJsonAsString)(e);let r=T.squidInstancesMap[t];return r||(r=new T(e),T.squidInstancesMap[t]=r,r)}static getInstances(){return Object.values(T.squidInstancesMap)}validateNotDestructed(){(0,i.assertTruthy)(!this.destructManager.isDestructing,"The client was already destructed.")}}t.Squid=T,T.squidInstancesMap={}},1064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStateObject=t.apply=void 0;const n=r(1496);function i(e){return"object"==typeof e}function o(e,t){let r=e;if((0,n.isPathAction)(t))r=function(e,t,r=[]){switch(t.type){case n.ActionType.DELETE_PATH:return s(e,t.path);case n.ActionType.SET_PATH:const i=t;return function(e,t,r,n){return a(e,t,r,n)}(e,t.path,r,i.payload);case n.ActionType.BATCH_ACTION:throw new Error("Unsupported")}}(e,t,[]);else{if(!(0,n.isBatchAction)(t))throw new Error(`Invalid action type: ${t.type}`);r=t.payload.reduce(((e,t)=>o(e,t)),e)}return r}function s(e,t){if(!t.length)throw new Error("can not delete an empty path");const r=t[0];if(1===t.length)return function(e,t){if(e instanceof Array)throw new Error("Cannot remove an item from an array");const r=Object.assign({},e);return delete r[t],r}(e,r);const n=t.slice(1),o=c(e,r);if(!o)return e;if(!i(o))throw new Error("Cannot delete from a non object state.");const a=s(o,n);return a===o?e:u(e,r,a)}function a(e,t,r,n){if(!t.length){if(i(n))return n;throw new Error("Relative path cannot be of length 0 when the new value is not an object.")}const o=t[0],s=[...r,o];if(1===t.length)return u(e,o,n);const l=t.slice(1),f=c(e,o);return void 0!==f&&i(f)?u(e,o,a(f,l,s,n)):a(e=u(e,o,{}),t,r,n)}function u(e,t,r){return(e=Object.assign({},e))[t]=r,e}function c(e,t){return e instanceof Array?e[function(e){const t=Number(e);if(isNaN(t))throw new Error(`The value is not a number: Actual: ${e}`);return Math.floor(t)}(t)]:e[t]}t.apply=function(e,t){return o(e,t)},t.isStateObject=i},1496:(e,t)=>{"use strict";var r;function n(e){return[r.SET_PATH,r.DELETE_PATH].includes(e.type)}function i(e){return e.type===r.BATCH_ACTION}Object.defineProperty(t,"__esModule",{value:!0}),t.getSingleAction=t.extractAllPathActions=t.isBatchAction=t.isDeletePathAction=t.isSetPathAction=t.isPathAction=t.ActionType=void 0,function(e){e.DELETE_PATH="DELETE_PATH",e.SET_PATH="SET_PATH",e.BATCH_ACTION="BATCH_ACTION"}(r=t.ActionType||(t.ActionType={})),t.isPathAction=n,t.isSetPathAction=function(e){return e.type===r.SET_PATH},t.isDeletePathAction=function(e){return e.type===r.DELETE_PATH},t.isBatchAction=i,t.extractAllPathActions=function e(t){const r=[];if(n(t))r.push(t);else if(i(t))for(const n of t.payload)r.push(...e(n));return r},t.getSingleAction=function(e){return 1===e.length?e[0]:{type:r.BATCH_ACTION,payload:e}}},8336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathTrieFromAction=t.PathTrieNode=t.PathTrie=void 0;const n=r(1496);class i{constructor(){this.root=new o}getOrCreatePathTrieNode(e,t){let r=this.root;for(const t of e)r.children.get(t)||r.children.set(t,new o),r=r.children.get(t);return void 0!==t&&(r.nodeData=t),r}getPathTrieNode(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}return t}getPathTrie(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}if(t){const e=new i;return e.root=t,e}}iterateBfs(e){this.iterateInternal(this.root,e,[])}removeNode(e){e.length||(this.root=new o);const t=[this.root];for(const r of e){const e=t[t.length-1].children.get(r);if(!e)throw new Error("Node does not exist");t.push(e)}for(let r=t.length-1;r>0;r--){const n=t[r],i=e[r-1];if((n.nodeData||n.children.size)&&r!==t.length-1)break;t[r-1].children.delete(i)}}clearNodeData(e){const t=this.getPathTrieNode(e);t&&(t.nodeData=void 0,t.children.size||this.removeNode(e))}getNodeList(e){const t=[];let r=this.root;for(const n of e){if(!r)return t;t.push(r),r=r.children.get(n)}return t}iterateInternal(e,t,r){if(!1!==t(e.nodeData,r))for(const[n,i]of e.children)this.iterateInternal(i,t,r.concat(n))}}t.PathTrie=i;class o{constructor(){this.children=new Map([])}}t.PathTrieNode=o,t.getPathTrieFromAction=function(e,t){const r=new i;for(const i of(0,n.extractAllPathActions)(e)){let e=r.getOrCreatePathTrieNode(i.path);if(!t||e.nodeData)continue;let n=t.getPathTrieNode(i.path);if(n){const t=[[e,n]];for(;t.length;){const r=t.shift();if(e=r[0],n=r[1],!e.nodeData){for(const[r,i]of n.children)e.children.get(r)||e.children.set(r,new o),t.push([e.children.get(r),i]);e.nodeData=!0}}}}return r}},1122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const n=r(2937),i=r(9978),o=r(1064),s=r(1496),a=r(8336);function u(e,t){let r=e;for(const e of t){if(null==r)return;if(!(0,o.isStateObject)(r))throw new Error("result must be a state object");r=r[e]}return r}t.StateService=class{constructor(){this.subscriptionsTree=new a.PathTrie,this.state={},this.batchCount=0,this.batchedActions=[]}dispatch(e){this.batchCount>0&&this.batchedActions.push(e),this.state=(0,o.apply)(this.state,e),0===this.batchCount&&this.dispatchSubscriptions(e)}runInBatch(e){this.batchCount++;try{e()}finally{if(this.batchCount--,0===this.batchCount&&this.batchedActions.length){const e={type:s.ActionType.BATCH_ACTION,payload:[...this.batchedActions]};this.batchedActions.splice(0),this.dispatch(e)}}}observePath(e,t){return new n.Observable((r=>{const n=this.getOrCreateSubjectForPath(e);r.next(this.getStateInPath(e));const o=n.pipe((0,i.filter)((e=>{if(!t)return!0;const r=new a.PathTrie,n=t();for(const e of n)r.getOrCreatePathTrieNode(e,!0);const i=(0,s.extractAllPathActions)(e.action).map((e=>e.path));let o=!1;for(const e of i)if(0===r.getNodeList(e).length){o=!0;break}return o})),(0,i.map)((e=>e.data))).subscribe(r);return()=>{o.unsubscribe(),n.observed||(n.complete(),this.subscriptionsTree.clearNodeData(e))}}))}setKeyInPath(e,t,r,n=!1){this.setInPath([...e,t],r,n)}setPartial(e,t,r=!1){let n=this.getStateInPath(e);n||(n={}),this.setInPath(e,Object.assign(Object.assign({},n),t),r)}setInPath(e,t,r=!1){if(r&&this.getStateInPath(e)===t)return;const n={type:s.ActionType.SET_PATH,path:e,payload:t};this.dispatch(n)}pushToArray(e,t){let r=this.getStateInPath(e);r=r?[...r]:[],r.push(t),this.setInPath(e,r)}deletePath(e){const t={type:s.ActionType.DELETE_PATH,path:e};this.dispatch(t)}getState(){return this.state}getStateInPath(e){return u(this.state,e)}destroy(){this.subscriptionsTree.iterateBfs((e=>{e&&e.subject&&e.subject.complete()}))}getOrCreateSubjectForPath(e){const t=this.subscriptionsTree.getOrCreatePathTrieNode(e);t.nodeData||(t.nodeData=new c);const r=t.nodeData;return r.subject||(r.subject=new n.Subject),r.subject}dispatchSubscriptions(e){(0,a.getPathTrieFromAction)(e,this.subscriptionsTree).iterateBfs(((t,r)=>{const n=this.subscriptionsTree.getPathTrieNode(r);n&&n.nodeData&&n.nodeData.subject.next({action:e,data:u(this.getState(),r)})}))}};class c{}},266:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP_FN=void 0,t.NOOP_FN=e=>e()},9312:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>I,__asyncGenerator:()=>E,__asyncValues:()=>T,__await:()=>S,__awaiter:()=>h,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>k,__classPrivateFieldSet:()=>M,__createBinding:()=>v,__decorate:()=>a,__esDecorate:()=>c,__exportStar:()=>m,__extends:()=>i,__generator:()=>y,__importDefault:()=>A,__importStar:()=>x,__makeTemplateObject:()=>j,__metadata:()=>d,__param:()=>u,__propKey:()=>f,__read:()=>g,__rest:()=>s,__runInitializers:()=>l,__setFunctionName:()=>p,__spread:()=>_,__spreadArray:()=>O,__spreadArrays:()=>w,__values:()=>b});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var v=(0,r[d])("accessor"===u?{get:f.get,set:f.set}:f[c],h);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(a=s(v.get))&&(f.get=a),(a=s(v.set))&&(f.set=a),(a=s(v.init))&&i.push(a)}else(a=s(v))&&("field"===u?i.push(a):f[c]=a)}l&&Object.defineProperty(l,n.name,f),p=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function y(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function E(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof S?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:i?i(t):t}:i}}function T(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function j(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return P(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function N(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function M(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function k(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},2371:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),s=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",u=t("[\\:\\/\\?\\#\\[\\]\\@]",a),c=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),f=r(n+t(n,i,"[\\+\\-\\.]")+"*"),p=r(r(s+"|"+t(l,a,"[\\:]"))+"*"),d=(r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("[1-9]"+i)+"|"+i),r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i)),h=r(d+"\\."+d+"\\."+d+"\\."+d),y=r(o+"{1,4}"),v=r(r(y+"\\:"+y)+"|"+h),m=r(r(y+"\\:")+"{6}"+v),b=r("\\:\\:"+r(y+"\\:")+"{5}"+v),g=r(r(y)+"?\\:\\:"+r(y+"\\:")+"{4}"+v),_=r(r(r(y+"\\:")+"{0,1}"+y)+"?\\:\\:"+r(y+"\\:")+"{3}"+v),w=r(r(r(y+"\\:")+"{0,2}"+y)+"?\\:\\:"+r(y+"\\:")+"{2}"+v),O=r(r(r(y+"\\:")+"{0,3}"+y)+"?\\:\\:"+y+"\\:"+v),S=r(r(r(y+"\\:")+"{0,4}"+y)+"?\\:\\:"+v),E=r(r(r(y+"\\:")+"{0,5}"+y)+"?\\:\\:"+y),I=r(r(r(y+"\\:")+"{0,6}"+y)+"?\\:\\:"),T=r([m,b,g,_,w,O,S,E,I].join("|")),j=r(r(l+"|"+s)+"+"),P=(r(T+"\\%25"+j),r(T+r("\\%25|\\%(?!"+o+"{2})")+j)),x=r("[vV]"+o+"+\\."+t(l,a,"[\\:]")+"+"),A=r("\\["+r(P+"|"+T+"|"+x)+"\\]"),N=r(r(s+"|"+t(l,a))+"*"),M=r(A+"|"+h+"(?!"+N+")|"+N),k=r(i+"*"),D=r(r(p+"@")+"?"+M+r("\\:"+k)+"?"),R=r(s+"|"+t(l,a,"[\\:\\@]")),C=r(R+"*"),$=r(R+"+"),F=r(r(s+"|"+t(l,a,"[\\@]"))+"+"),q=r(r("\\/"+C)+"*"),L=r("\\/"+r($+q)+"?"),B=r(F+q),U=r($+q),V="(?!"+R+")",z=(r(q+"|"+L+"|"+B+"|"+U+"|"+V),r(r(R+"|"+t("[\\/\\?]",c))+"*")),Q=r(r(R+"|[\\/\\?]")+"*"),Y=r(r("\\/\\/"+D+q)+"|"+L+"|"+U+"|"+V),W=r(f+"\\:"+Y+r("\\?"+z)+"?"+r("\\#"+Q)+"?"),K=r(r("\\/\\/"+D+q)+"|"+L+"|"+B+"|"+V),H=r(K+r("\\?"+z)+"?"+r("\\#"+Q)+"?");return r(W+"|"+H),r(f+"\\:"+Y+r("\\?"+z)+"?"),r(r("\\/\\/("+r("("+p+")@")+"?("+M+")"+r("\\:("+k+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+M+")"+r("\\:("+k+")")+"?)")+"?("+q+"|"+L+"|"+B+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+M+")"+r("\\:("+k+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r("("+p+")@"),r("\\:("+k+")"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,a),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,u),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+T+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+j+")")+"?\\]?$")}}var s=o(!1),a=o(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=36,f=/^xn--/,p=/[^\0-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=Math.floor,v=String.fromCharCode;function m(e){throw new RangeError(h[e])}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(d,".")).split("."),t).join(".")}function g(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var _=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},w=function(e,t,r){var n=0;for(e=r?y(e/700):e>>1,e+=y(e/t);e>455;n+=l)e=y(e/35);return y(n+36*e/(e+38))},O=function(e){var t,r=[],n=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var u=0;u<a;++u)e.charCodeAt(u)>=128&&m("not-basic"),r.push(e.charCodeAt(u));for(var f=a>0?a+1:0;f<n;){for(var p=i,d=1,h=l;;h+=l){f>=n&&m("invalid-input");var v=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l;(v>=l||v>y((c-i)/d))&&m("overflow"),i+=v*d;var b=h<=s?1:h>=s+26?26:h-s;if(v<b)break;var g=l-b;d>y(c/g)&&m("overflow"),d*=g}var _=r.length+1;s=w(i-p,_,0==p),y(i/_)>c-o&&m("overflow"),o+=y(i/_),i%=_,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},S=function(e){var t=[],r=(e=g(e)).length,n=128,i=0,o=72,s=!0,a=!1,u=void 0;try{for(var f,p=e[Symbol.iterator]();!(s=(f=p.next()).done);s=!0){var d=f.value;d<128&&t.push(v(d))}}catch(e){a=!0,u=e}finally{try{!s&&p.return&&p.return()}finally{if(a)throw u}}var h=t.length,b=h;for(h&&t.push("-");b<r;){var O=c,S=!0,E=!1,I=void 0;try{for(var T,j=e[Symbol.iterator]();!(S=(T=j.next()).done);S=!0){var P=T.value;P>=n&&P<O&&(O=P)}}catch(e){E=!0,I=e}finally{try{!S&&j.return&&j.return()}finally{if(E)throw I}}var x=b+1;O-n>y((c-i)/x)&&m("overflow"),i+=(O-n)*x,n=O;var A=!0,N=!1,M=void 0;try{for(var k,D=e[Symbol.iterator]();!(A=(k=D.next()).done);A=!0){var R=k.value;if(R<n&&++i>c&&m("overflow"),R==n){for(var C=i,$=l;;$+=l){var F=$<=o?1:$>=o+26?26:$-o;if(C<F)break;var q=C-F,L=l-F;t.push(v(_(F+q%L,0))),C=y(q/L)}t.push(v(_(C,0))),o=w(i,x,b==h),i=0,++b}}}catch(e){N=!0,M=e}finally{try{!A&&D.return&&D.return()}finally{if(N)throw M}}++i,++n}return t.join("")},E={version:"2.1.0",ucs2:{decode:g,encode:function(e){return String.fromCodePoint.apply(String,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(e))}},decode:O,encode:S,toASCII:function(e){return b(e,(function(e){return p.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return b(e,(function(e){return f.test(e)?O(e.slice(4).toLowerCase()):e}))}},I={};function T(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function j(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var s=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function P(e,t){function r(e){var r=j(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,T).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,T).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,T).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,T).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,T).replace(t.PCT_ENCODED,i)),e}function x(e){return e.replace(/^0*(.*)/,"$1")||"0"}function A(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(x).join("."):e}function N(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),i=n[1],o=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=u(s,2),c=a[0],l=a[1],f=l?l.split(":").map(x):[],p=c.split(":").map(x),d=t.IPV4ADDRESS.test(p[p.length-1]),h=d?7:8,y=p.length-h,v=Array(h),m=0;m<h;++m)v[m]=f[m]||p[y+m]||"";d&&(v[h-1]=A(v[h-1],t));var b=v.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],g=void 0;if(b&&b.length>1){var _=v.slice(0,b.index),w=v.slice(b.index+b.length);g=_.join(":")+"::"+w.join(":")}else g=v.join(":");return o&&(g+="%"+o),g}return e}var M=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,k=void 0==="".match(/(){0}/)[1];function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(M);if(i){k?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=N(A(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=I[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)P(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=E.toASCII(r.host.replace(n.PCT_ENCODED,j).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}P(r,s)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}var R=/^\.\.?\//,C=/^\/\.(\/|$)/,$=/^\/\.\.(\/|$)/,F=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var t=[];e.length;)if(e.match(R))e=e.replace(R,"");else if(e.match(C))e=e.replace(C,"/");else if(e.match($))e=e.replace($,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(F);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:s,n=[],i=I[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?E.toUnicode(e.host):E.toASCII(e.host.replace(r.PCT_ENCODED,j).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}P(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=function(e,t){var r=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(N(A(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||i&&i.absolutePath||(u=q(u)),void 0===o&&(u=u.replace(/^\/\//,"/%2F")),n.push(u)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function B(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=D(L(e,r),r),t=D(L(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=q(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=q(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=q(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=q(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function U(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,j)}var V={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},z={scheme:"https",domainHost:V.domainHost,parse:V.parse,serialize:V.serialize};function Q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var Y={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=Q(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(Q(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=u(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},W={scheme:"wss",domainHost:Y.domainHost,parse:Y.parse,serialize:Y.serialize},K={},H="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",G="[0-9A-Fa-f]",J=r(r("%[EFef]"+G+"%"+G+G+"%"+G+G)+"|"+r("%[89A-Fa-f]"+G+"%"+G+G)+"|"+r("%"+G+G)),Z=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),X=new RegExp(H,"g"),ee=new RegExp(J,"g"),te=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Z),"g"),re=new RegExp(t("[^]",H,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ne=re;function ie(e){var t=j(e);return t.match(X)?t:e}var oe={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},s=r.query.split("&"),a=0,u=s.length;a<u;++a){var c=s[a].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,p=l.length;f<p;++f)n.push(l[f]);break;case"subject":r.subject=U(c[1],t);break;case"body":r.body=U(c[1],t);break;default:i=!0,o[U(c[0],t)]=U(c[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var d=0,h=n.length;d<h;++d){var y=n[d].split("@");if(y[0]=U(y[0]),t.unicodeSupport)y[1]=U(y[1],t).toLowerCase();else try{y[1]=E.toASCII(U(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=y.join("@")}return r},serialize:function(e,t){var r,n=e,o=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(o){for(var s=0,a=o.length;s<a;++s){var u=String(o[s]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(ee,ie).replace(ee,i).replace(te,T),f=u.slice(c+1);try{f=t.iri?E.toUnicode(f):E.toASCII(U(f,t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}o[s]=l+"@"+f}n.path=o.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var d=[];for(var h in p)p[h]!==K[h]&&d.push(h.replace(ee,ie).replace(ee,i).replace(re,T)+"="+p[h].replace(ee,ie).replace(ee,i).replace(ne,T));return d.length&&(n.query=d.join("&")),n}},se=/^([^\:]+)\:(.*)/,ae={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(se),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),s=r[2],a=i+":"+(t.nid||o),u=I[a];n.nid=o,n.nss=s,n.path=void 0,u&&(n=u.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=I[i];o&&(e=o.serialize(e,t));var s=e,a=e.nss;return s.path=(n||t.nid)+":"+a,s}},ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(ue)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};I[V.scheme]=V,I[z.scheme]=z,I[Y.scheme]=Y,I[W.scheme]=W,I[oe.scheme]=oe,I[ae.scheme]=ae,I[ce.scheme]=ce,e.SCHEMES=I,e.pctEncChar=T,e.pctDecChars=j,e.parse=D,e.removeDotSegments=q,e.serialize=L,e.resolveComponents=B,e.resolve=function(e,t,r){var n=function(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}({scheme:"null"},r);return L(B(D(e,n),D(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=L(D(e,t),t):"object"===n(e)&&(e=D(L(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=L(D(e,r),r):"object"===n(e)&&(e=L(e,r)),"string"==typeof t?t=L(D(t,r),r):"object"===n(t)&&(t=L(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?a.ESCAPE:s.ESCAPE,T)},e.unescapeComponent=U,Object.defineProperty(e,"__esModule",{value:!0})}(t)},9031:e=>{"use strict";e.exports=require("cross-fetch")},8087:e=>{"use strict";e.exports=require("socket.io-client")},2948:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ApolloCache:()=>An,ApolloClient:()=>xn,ApolloError:()=>br,ApolloLink:()=>_e,Cache:()=>jn,HttpLink:()=>Ot,InMemoryCache:()=>xi,MissingFieldError:()=>Nn,NetworkStatus:()=>mr,Observable:()=>W,ObservableQuery:()=>Tr,checkFetcher:()=>Ge,concat:()=>ki,createHttpLink:()=>wt,createSignalIfSupported:()=>mt,defaultDataIdFromObject:()=>Rn,defaultPrinter:()=>ht,disableExperimentalFragmentVariables:()=>To,disableFragmentWarnings:()=>Eo,empty:()=>Ai,enableExperimentalFragmentVariables:()=>Io,execute:()=>we,fallbackHttpConfig:()=>dt,from:()=>Ni,fromError:()=>gt,fromPromise:()=>Ri,gql:()=>Oo,isApolloError:()=>vr,isReference:()=>X,makeReference:()=>Z,makeVar:()=>mn,mergeOptions:()=>Tn,parseAndCheckHttpResponse:()=>He,resetCaches:()=>So,rewriteURIForGET:()=>bt,selectHttpOptionsAndBody:()=>yt,selectHttpOptionsAndBodyInternal:()=>vt,selectURI:()=>$e,serializeFetchParameter:()=>Ce,setLogVerbosity:()=>p,split:()=>Mi,throwServerError:()=>ze,toPromise:()=>Di});var n=r(9312),i="Invariant Violation",o=Object.setPrototypeOf,s=void 0===o?function(e,t){return e.__proto__=t,e}:o,a=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"==typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,s(n,t.prototype),n}return(0,n.__extends)(t,e),t}(Error);function u(e,t){if(!e)throw new a(t)}var c=["debug","log","warn","error","silent"],l=c.indexOf("log");function f(e){return function(){if(c.indexOf(e)>=l)return(console[e]||console.log).apply(console,arguments)}}function p(e){var t=c[l];return l=Math.max(0,c.indexOf(e)),t}function d(e){try{return e()}catch(e){}}!function(e){e.debug=f("debug"),e.log=f("log"),e.warn=f("warn"),e.error=f("error")}(u||(u={}));const h=d((function(){return globalThis}))||d((function(){return window}))||d((function(){return self}))||d((function(){return global}))||d((function(){return d.constructor("return this")()}));var y="__",v=[y,y].join("DEV");const m=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(h,v,{value:"production"!==d((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),h[v]}}();function b(e){try{return e()}catch(e){}}var g=b((function(){return globalThis}))||b((function(){return window}))||b((function(){return self}))||b((function(){return global}))||b((function(){return b.constructor("return this")()})),_=!1;function w(e,t){if(!Boolean(e))throw new Error(t)}!g||b((function(){return"production"}))||b((function(){return process}))||(Object.defineProperty(g,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0);const O=10,S=2;function E(e){return I(e,[])}function I(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:I(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>S)return"[Array]";const r=Math.min(O,e.length),n=e.length-r,i=[];for(let n=0;n<r;++n)i.push(I(e[n],t));return 1===n?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>S)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const n=r.map((([e,r])=>e+": "+I(r,t)));return"{ "+n.join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}class T{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||w(!1,`Body must be a string. Received: ${E(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||w(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||w(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function P(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function x(e,t,r){return t&&P(e.prototype,t),r&&P(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}_&&(delete g.process,_=!1),__DEV__?u("boolean"==typeof m,m):u("boolean"==typeof m,39);var A=function(){return"function"==typeof Symbol},N=function(e){return A()&&Boolean(Symbol[e])},M=function(e){return N(e)?Symbol[e]:"@@"+e};A()&&!N("observable")&&(Symbol.observable=Symbol("observable"));var k=M("iterator"),D=M("observable"),R=M("species");function C(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function $(e){var t=e.constructor;return void 0!==t&&null===(t=t[R])&&(t=void 0),void 0!==t?t:W}function F(e){return e instanceof W}function q(e){q.log?q.log(e):setTimeout((function(){throw e}))}function L(e){Promise.resolve().then((function(){try{e()}catch(e){q(e)}}))}function B(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=C(t,"unsubscribe");r&&r.call(t)}}catch(e){q(e)}}function U(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function V(e,t,r){e._state="running";var n=e._observer;try{var i=C(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(U(e),!i)throw r;i.call(n,r);break;case"complete":U(e),i&&i.call(n)}}catch(e){q(e)}"closed"===e._state?B(e):"running"===e._state&&(e._state="ready")}function z(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void L((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(V(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void V(e,t,r);e._queue.push({type:t,value:r})}}var Q=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new Y(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(U(this),B(this))},x(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),Y=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){z(this._subscription,"next",e)},t.error=function(e){z(this._subscription,"error",e)},t.complete=function(){z(this._subscription,"complete")},x(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),W=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new Q(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new($(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new($(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=$(this),n=arguments.length>1,i=!1,o=arguments[1];return new r((function(r){return t.subscribe({next:function(t){var s=!i;if(i=!0,!s||n)try{o=e(o,t)}catch(e){return r.error(e)}else o=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(o),r.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=$(this);return new i((function(t){var n,o=0;return function e(s){n=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=$(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),s()}});i.push(o)},error:function(e){n.error(e)},complete:function(){s()}});function s(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[D]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=C(t,D);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return F(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(N("iterator")&&(n=C(t,k)))return new r((function(e){L((function(){if(!e.closed){for(var r,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){L((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)((function(e){L((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))},x(e,null,[{key:R,get:function(){return this}}]),e}();function K(e){return null!==e&&"object"==typeof e}function H(e,t){var r=t,i=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new a("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new a(44);"FragmentDefinition"===e.kind&&i.push(e)})),void 0===r&&(__DEV__?u(1===i.length,"Found ".concat(i.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):u(1===i.length,45),r=i[0].name.value),(0,n.__assign)((0,n.__assign)({},e),{definitions:(0,n.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function G(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function J(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=e.name.value;if("function"==typeof t)return t(r);var n=t&&t[r];return __DEV__?u(n,"No fragment named ".concat(r)):u(n,46),n||null;default:return null}}function Z(e){return{__ref:String(e)}}function X(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function ee(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var i={};r.fields.map((function(e){return ee(i,e.name,e.value,n)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return ee(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw __DEV__?new a('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new a(55);e[t.value]=null}}A()&&Object.defineProperty(W,Symbol("extensions"),{value:{symbol:D,hostReportError:q},configurable:!0});var te=["connection","include","skip","client","rest","export"],re=Object.assign((function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),"".concat(r.connection.key,"(").concat(ne(i),")")}return r.connection.key}var o=e;if(t){var s=ne(t);o+="(".concat(s,")")}return r&&Object.keys(r).forEach((function(e){-1===te.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(ne(r[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=ne;return ne=e,t}}),ne=function(e){return JSON.stringify(e,ie)};function ie(e,t){return K(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{})),t}function oe(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return ee(r,n,i,t)})),r}return null}function se(e){return e.alias?e.alias.value:e.name.value}function ae(e,t,r){if("string"==typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var o=i[n];if(ue(o)){if("__typename"===o.name.value)return e[se(o)]}else{var s=ae(e,J(o,r).selectionSet,r);if("string"==typeof s)return s}}}function ue(e){return"Field"===e.kind}function ce(e){__DEV__?u(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u(e&&"Document"===e.kind,47);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new a('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new a(48);return e}));return __DEV__?u(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):u(t.length<=1,49),e}function le(e){return ce(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function fe(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function pe(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function de(e){var t=le(e);return __DEV__?u(t&&"query"===t.operation,"Must contain a query definition."):u(t&&"query"===t.operation,50),t}function he(e){var t;ce(e);for(var r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new a("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new a(54)}function ye(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach((function(e){e.defaultValue&&ee(t,e.variable.name,e.defaultValue)})),t}function ve(e,t){return t?t(e):W.of()}function me(e){return"function"==typeof e?new _e(e):e}function be(e){return e.request.length<=1}var ge=function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}return(0,n.__extends)(t,e),t}(Error),_e=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return W.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(me).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=me(r),o=me(n||new e(ve));return be(i)&&be(o)?new e((function(e){return t(e)?i.request(e)||W.of():o.request(e)||W.of()})):new e((function(e,r){return t(e)?i.request(e,r)||W.of():o.request(e,r)||W.of()}))},e.execute=function(e,t){return e.request(function(e,t){var r=(0,n.__assign)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?(0,n.__assign)((0,n.__assign)({},r),e(r)):(0,n.__assign)((0,n.__assign)({},r),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,n.__assign)({},r)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?fe(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw __DEV__?new a("illegal argument: ".concat(i)):new a(27)}return e}(t))))||W.of()},e.concat=function(t,r){var n=me(t);if(be(n))return __DEV__&&u.warn(new ge("You are calling concat on a terminating link, which will have no effect",n)),n;var i=me(r);return be(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||W.of()}))||W.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||W.of()}))||W.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(ve)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new a("request is not implemented"):new a(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),we=_e.execute;class Oe{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Se{constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Ee={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Ie=new Set(Object.keys(Ee));function Te(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&Ie.has(t)}var je,Pe,xe;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(je||(je={})),(xe=Pe||(Pe={})).NAME="Name",xe.DOCUMENT="Document",xe.OPERATION_DEFINITION="OperationDefinition",xe.VARIABLE_DEFINITION="VariableDefinition",xe.SELECTION_SET="SelectionSet",xe.FIELD="Field",xe.ARGUMENT="Argument",xe.FRAGMENT_SPREAD="FragmentSpread",xe.INLINE_FRAGMENT="InlineFragment",xe.FRAGMENT_DEFINITION="FragmentDefinition",xe.VARIABLE="Variable",xe.INT="IntValue",xe.FLOAT="FloatValue",xe.STRING="StringValue",xe.BOOLEAN="BooleanValue",xe.NULL="NullValue",xe.ENUM="EnumValue",xe.LIST="ListValue",xe.OBJECT="ObjectValue",xe.OBJECT_FIELD="ObjectField",xe.DIRECTIVE="Directive",xe.NAMED_TYPE="NamedType",xe.LIST_TYPE="ListType",xe.NON_NULL_TYPE="NonNullType",xe.SCHEMA_DEFINITION="SchemaDefinition",xe.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",xe.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",xe.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",xe.FIELD_DEFINITION="FieldDefinition",xe.INPUT_VALUE_DEFINITION="InputValueDefinition",xe.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",xe.UNION_TYPE_DEFINITION="UnionTypeDefinition",xe.ENUM_TYPE_DEFINITION="EnumTypeDefinition",xe.ENUM_VALUE_DEFINITION="EnumValueDefinition",xe.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",xe.DIRECTIVE_DEFINITION="DirectiveDefinition",xe.SCHEMA_EXTENSION="SchemaExtension",xe.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",xe.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",xe.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",xe.UNION_TYPE_EXTENSION="UnionTypeExtension",xe.ENUM_TYPE_EXTENSION="EnumTypeExtension",xe.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";const Ae=Object.freeze({});function Ne(e,t,r=Ee){const n=new Map;for(const e of Object.values(Pe))n.set(e,Me(t,e));let i,o,s,a=Array.isArray(e),u=[e],c=-1,l=[],f=e;const p=[],d=[];do{c++;const e=c===u.length,m=e&&0!==l.length;if(e){if(o=0===d.length?void 0:p[p.length-1],f=s,s=d.pop(),m)if(a){f=f.slice();let e=0;for(const[t,r]of l){const n=t-e;null===r?(f.splice(n,1),e++):f[n]=r}}else{f=Object.defineProperties({},Object.getOwnPropertyDescriptors(f));for(const[e,t]of l)f[e]=t}c=i.index,u=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(s){if(o=a?c:u[c],f=s[o],null==f)continue;p.push(o)}let b;if(!Array.isArray(f)){var h,y;Te(f)||w(!1,`Invalid AST Node: ${E(f)}.`);const r=e?null===(h=n.get(f.kind))||void 0===h?void 0:h.leave:null===(y=n.get(f.kind))||void 0===y?void 0:y.enter;if(b=null==r?void 0:r.call(t,f,o,s,p,d),b===Ae)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(l.push([o,b]),!e)){if(!Te(b)){p.pop();continue}f=b}}var v;void 0===b&&m&&l.push([o,f]),e?p.pop():(i={inArray:a,index:c,keys:u,edits:l,prev:i},a=Array.isArray(f),u=a?f:null!==(v=r[f.kind])&&void 0!==v?v:[],c=-1,l=[],s&&d.push(s),s=f)}while(void 0!==i);return 0!==l.length?l[l.length-1][1]:e}function Me(e,t){const r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function ke(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments,n=e.name.value;__DEV__?u(r&&1===r.length,"Incorrect number of arguments for the @".concat(n," directive.")):u(r&&1===r.length,41);var i=r[0];__DEV__?u(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(n," directive.")):u(i.name&&"if"===i.name.value,42);var o=i.value;__DEV__?u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @".concat(n," directive must be a variable or a boolean value.")):u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),43),t.push({directive:e,ifArgument:i})}})),t}(r).every((function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?(i=t&&t[n.value.name.value],__DEV__?u(void 0!==i,"Invalid variable referenced in @".concat(r.name.value," directive.")):u(void 0!==i,40)):i=n.value.value,"skip"===r.name.value?!i:i}))}function De(e,t,r){var n=new Set(e),i=n.size;return Ne(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return Ae}}),r?!n.size:n.size<i}function Re(e){return e&&De(["client","export"],e,!0)}var Ce=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=__DEV__?new a("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new a(24);throw n.parseError=e,n}return r},$e=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},Fe="function"==typeof WeakMap&&"ReactNative"!==d((function(){return navigator.product})),qe="function"==typeof WeakSet,Le="function"==typeof Symbol&&"function"==typeof Symbol.for,Be=Le&&Symbol.asyncIterator;function Ue(e){var t={next:function(){return e.read()}};return Be&&(t[Symbol.asyncIterator]=function(){return this}),t}function Ve(e){var t,r,n,i,o=e;if(e.body&&(o=e.body),i=o,Be&&i[Symbol.asyncIterator])return function(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}(o);if(function(e){return!!e.getReader}(o))return Ue(o.getReader());if(function(e){return!!e.stream}(o))return Ue(o.stream().getReader());if(function(e){return!!e.arrayBuffer}(o))return t=o.arrayBuffer(),r=!1,n={next:function(){return r?Promise.resolve({value:void 0,done:!0}):(r=!0,new Promise((function(e,r){t.then((function(t){e({value:t,done:!1})})).catch(r)})))}},Be&&(n[Symbol.asyncIterator]=function(){return this}),n;if(function(e){return!!e.pipe}(o))return function(e){var t=null,r=null,n=!1,i=[],o=[];function s(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function a(e){r=e,o.slice().forEach((function(t){t[1](e)})),!t||t()}function u(){n=!0,o.slice().forEach((function(e){e[0]({value:void 0,done:!0})})),!t||t()}t=function(){t=null,e.removeListener("data",s),e.removeListener("error",a),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",s),e.on("error",a),e.on("end",u),e.on("finish",u),e.on("close",u);var c={next:function(){return new Promise((function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])}))}};return Be&&(c[Symbol.asyncIterator]=function(){return this}),c}(o);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}d((function(){return window.document.createElement})),d((function(){return navigator.userAgent.indexOf("jsdom")>=0}));var ze=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},Qe=Object.prototype.hasOwnProperty;function Ye(e){var t={};return e.split("\n").forEach((function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}})),t}function We(e,t){e.status>=300&&ze(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function Ke(e,t){var r,n;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(r=t.next)||void 0===r||r.call(t,e.result)),null===(n=t.error)||void 0===n||n.call(t,e))}function He(e){return function(t){return t.text().then((function(e){return We(t,e)})).then((function(r){return t.status>=300&&ze(t,r,"Response not successful: Received status code ".concat(t.status)),Array.isArray(r)||Qe.call(r,"data")||Qe.call(r,"errors")||ze(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),r}))}}var Ge=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new a("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new a(23)};function Je(e){return 9===e||32===e}function Ze(e){return e>=48&&e<=57}function Xe(e){return e>=97&&e<=122||e>=65&&e<=90}function et(e){return Xe(e)||95===e}function tt(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let t=0;t<e.length;++t){var o;const s=e[t],a=rt(s);a!==s.length&&(n=null!==(o=n)&&void 0!==o?o:t,i=t,0!==t&&a<r&&(r=a))}return e.map(((e,t)=>0===t?e:e.slice(r))).slice(null!==(t=n)&&void 0!==t?t:0,i+1)}function rt(e){let t=0;for(;t<e.length&&Je(e.charCodeAt(t));)++t;return t}const nt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function it(e){return ot[e.charCodeAt(0)]}const ot=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function st(e){return Ne(e,at)}const at={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ut(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=lt("(",ut(e.variableDefinitions,", "),")"),r=ut([e.operation,ut([e.name,t]),ut(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+lt(" = ",r)+lt(" ",ut(n," "))},SelectionSet:{leave:({selections:e})=>ct(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=lt("",e,": ")+t;let s=o+lt("(",ut(r,", "),")");return s.length>80&&(s=o+lt("(\n",ft(ut(r,"\n")),"\n)")),ut([s,ut(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+lt(" ",ut(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>ut(["...",lt("on ",e),ut(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${lt("(",ut(r,", "),")")} on ${t} ${lt("",ut(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=1===n.length,o=n.length>1&&n.slice(1).every((e=>0===e.length||Je(e.charCodeAt(0)))),s=r.endsWith('\\"""'),a=e.endsWith('"')&&!s,u=e.endsWith("\\"),c=a||u,l=!i||e.length>70||c||o||s;let f="";const p=i&&Je(e.charCodeAt(0));return(l&&!p||o)&&(f+="\n"),f+=r,(l||c)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(nt,it)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ut(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ut(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+lt("(",ut(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>lt("",e,"\n")+ut(["schema",ut(t," "),ct(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>lt("",e,"\n")+ut(["scalar",t,ut(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>lt("",e,"\n")+ut(["type",t,lt("implements ",ut(r," & ")),ut(n," "),ct(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>lt("",e,"\n")+t+(pt(r)?lt("(\n",ft(ut(r,"\n")),"\n)"):lt("(",ut(r,", "),")"))+": "+n+lt(" ",ut(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>lt("",e,"\n")+ut([t+": "+r,lt("= ",n),ut(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>lt("",e,"\n")+ut(["interface",t,lt("implements ",ut(r," & ")),ut(n," "),ct(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>lt("",e,"\n")+ut(["union",t,ut(r," "),lt("= ",ut(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>lt("",e,"\n")+ut(["enum",t,ut(r," "),ct(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>lt("",e,"\n")+ut([t,ut(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>lt("",e,"\n")+ut(["input",t,ut(r," "),ct(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>lt("",e,"\n")+"directive @"+t+(pt(r)?lt("(\n",ft(ut(r,"\n")),"\n)"):lt("(",ut(r,", "),")"))+(n?" repeatable":"")+" on "+ut(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ut(["extend schema",ut(e," "),ct(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ut(["extend scalar",e,ut(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>ut(["extend type",e,lt("implements ",ut(t," & ")),ut(r," "),ct(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>ut(["extend interface",e,lt("implements ",ut(t," & ")),ut(r," "),ct(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>ut(["extend union",e,ut(t," "),lt("= ",ut(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>ut(["extend enum",e,ut(t," "),ct(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>ut(["extend input",e,ut(t," "),ct(r)]," ")}};function ut(e,t=""){var r;return null!==(r=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==r?r:""}function ct(e){return lt("{\n",ft(ut(e,"\n")),"\n}")}function lt(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function ft(e){return lt(" ",e.replace(/\n/g,"\n "))}function pt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var dt={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},ht=function(e,t){return t(e)};function yt(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return r.unshift(t),vt.apply(void 0,(0,n.__spreadArray)([e,ht],r,!1))}function vt(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o={},s={};r.forEach((function(e){o=(0,n.__assign)((0,n.__assign)((0,n.__assign)({},o),e.options),{headers:(0,n.__assign)((0,n.__assign)({},o.headers),e.headers)}),e.credentials&&(o.credentials=e.credentials),s=(0,n.__assign)((0,n.__assign)({},s),e.http)})),o.headers&&(o.headers=function(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach((function(t){r[t.toLowerCase()]=e[t]})),r}var n=Object.create(null);Object.keys(Object(e)).forEach((function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}}));var i=Object.create(null);return Object.keys(n).forEach((function(e){i[n[e].originalName]=n[e].value})),i}(o.headers,s.preserveHeaderCase));var a=e.operationName,u=e.extensions,c=e.variables,l=e.query,f={operationName:a,variables:c};return s.includeExtensions&&(f.extensions=u),s.includeQuery&&(f.query=t(l,st)),{options:o,body:f}}var mt=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function bt(e,t){var r=[],n=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=Ce(t.variables,"Variables map")}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=Ce(t.extensions,"Extensions map")}catch(e){return{parseError:e}}n("extensions",o)}var s="",a=e,u=e.indexOf("#");-1!==u&&(s=e.substr(u),a=e.substr(0,u));var c=-1===a.indexOf("?")?"?":"&";return{newURI:a+c+r.join("&")+s}}function gt(e){return new W((function(t){t.error(e)}))}var _t=d((function(){return fetch})),wt=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,i=e.fetch,o=e.print,s=void 0===o?ht:o,a=e.includeExtensions,u=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,f=void 0!==l&&l,p=(0,n.__rest)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&Ge(i||_t);var h={http:{includeExtensions:a,preserveHeaderCase:u},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return new _e((function(e){var t=$e(e,r),o=e.getContext(),a={};if(o.clientAwareness){var u=o.clientAwareness,l=u.name,p=u.version;l&&(a["apollographql-client-name"]=l),p&&(a["apollographql-client-version"]=p)}var y,v=(0,n.__assign)((0,n.__assign)({},a),o.headers),m={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:v},b=vt(e,s,dt,h,m),g=b.options,_=b.body;if(_.variables&&!f){var w=new Set(Object.keys(_.variables));Ne(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&w.delete(e.name.value)}}),w.size&&(_.variables=(0,n.__assign)({},_.variables),w.forEach((function(e){delete _.variables[e]})))}if(!g.signal){var O=mt(),S=O.controller,E=O.signal;(y=S)&&(g.signal=E)}if(c&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(g.method="GET"),De(["defer"],e.query)&&(g.headers=g.headers||{},g.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),"GET"===g.method){var I=bt(t,_),T=I.newURI,j=I.parseError;if(j)return gt(j);t=T}else try{g.body=Ce(_,"Payload")}catch(j){return gt(j)}return new W((function(r){return(i||d((function(){return fetch}))||_t)(t,g).then((function(t){var i;e.setContext({response:t});var o=null===(i=t.headers)||void 0===i?void 0:i.get("content-type");return null!==o&&/^multipart\/mixed/i.test(o)?function(e,t){var r,i,o;return(0,n.__awaiter)(this,void 0,void 0,(function(){var s,a,u,c,l,f,p,d,h,y,v,m,b,g,_,w,O,S,E,I;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");s=new TextDecoder("utf-8"),a=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),u="boundary=",c=(null==a?void 0:a.includes(u))?null==a?void 0:a.substring((null==a?void 0:a.indexOf(u))+9).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(c),f="",p=Ve(e),d=!0,n.label=1;case 1:return d?[4,p.next()]:[3,3];case 2:for(h=n.sent(),y=h.value,v=h.done,m="string"==typeof y?y:s.decode(y),d=!v,b=(f+=m).indexOf(l);b>-1;){if(g=void 0,I=[f.slice(0,b),f.slice(b+l.length)],f=I[1],(g=I[0]).trim()){if(_=g.indexOf("\r\n\r\n"),w=Ye(g.slice(0,_)),(O=w["content-type"])&&-1===O.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");S=g.slice(_);try{E=We(e,S.replace("\r\n","")),(Object.keys(E).length>1||"data"in E||"incremental"in E||"errors"in E)&&(null===(i=t.next)||void 0===i||i.call(t,E))}catch(e){Ke(e,t)}}b=f.indexOf(l)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}}))}))}(t,r):function(e,t,r){He(t)(e).then((function(e){var t,n;null===(t=r.next)||void 0===t||t.call(r,e),null===(n=r.complete)||void 0===n||n.call(r)})).catch((function(e){return Ke(e,r)}))}(t,e,r)})).catch((function(e){return Ke(e,r)})),function(){y&&y.abort()}}))}))},Ot=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,wt(t).request)||this;return r.options=t,r}return(0,n.__extends)(t,e),t}(_e),St=Object.prototype,Et=St.toString,It=St.hasOwnProperty,Tt=Function.prototype.toString,jt=new Map;function Pt(e,t){try{return xt(e,t)}finally{jt.clear()}}function xt(e,t){if(e===t)return!0;var r,n,i,o=Et.call(e);if(o!==Et.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(kt(e,t))return!0;var s=At(e),a=At(t),u=s.length;if(u!==a.length)return!1;for(var c=0;c<u;++c)if(!It.call(t,s[c]))return!1;for(c=0;c<u;++c){var l=s[c];if(!xt(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(kt(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var d=f.next();if(d.done)break;var h=d.value,y=h[0],v=h[1];if(!t.has(y))return!1;if(p&&!xt(v,t.get(y)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var b=Tt.call(e);return b===Tt.call(t)&&(n=Mt,!((i=(r=b).length-n.length)>=0&&r.indexOf(n,i)===i))}return!1}function At(e){return Object.keys(e).filter(Nt,e)}function Nt(e){return void 0!==this[e]}var Mt="{ [native code] }";function kt(e,t){var r=jt.get(e);if(r){if(r.has(t))return!0}else jt.set(e,r=new Set);return r.add(t),!1}var Dt=Array.isArray;function Rt(e){return Array.isArray(e)&&e.length>0}var Ct=Object.prototype.hasOwnProperty;function $t(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ft(e)}function Ft(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new Lt,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var qt=function(e,t,r){return this.merge(e[r],t[r])},Lt=function(){function e(e){void 0===e&&(e=qt),this.reconciler=e,this.isObject=K,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return K(t)&&K(e)?(Object.keys(t).forEach((function(o){if(Ct.call(e,o)){var s=e[o];if(t[o]!==s){var a=r.reconciler.apply(r,(0,n.__spreadArray)([e,t,o],i,!1));a!==s&&((e=r.shallowCopyForMerge(e))[o]=a)}}else(e=r.shallowCopyForMerge(e))[o]=t[o]})),e):t},e.prototype.shallowCopyForMerge=function(e){return K(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},e}();function Bt(e){return"incremental"in e}function Ut(e,t){var r=e,n=new Lt;return Bt(t)&&Rt(t.incremental)&&t.incremental.forEach((function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var s=i[o],a=isNaN(+s)?{}:[];a[s]=t,t=a}r=n.merge(r,t)})),r}var Vt,zt,Qt=function(){return Object.create(null)},Yt=Array.prototype,Wt=Yt.forEach,Kt=Yt.slice,Ht=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=Qt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return Wt.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Kt.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}(),Gt=function(){function e(){this.known=new(qe?WeakSet:Set),this.pool=new Ht(Fe),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return K(e)&&this.known.has(e)},e.prototype.pass=function(e){if(K(e)){var t=function(e){return K(e)?Dt(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(K(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var n=e.map(this.admit,this);return(a=this.pool.lookupArray(n)).array||(this.known.add(a.array=n),__DEV__&&Object.freeze(n)),a.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],s=this.sortedKeys(e);o.push(s.json);var a,u=o.length;if(s.sorted.forEach((function(r){o.push(t.admit(e[r]))})),!(a=this.pool.lookupArray(o)).object){var c=a.object=Object.create(i);this.known.add(c),s.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return a.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}(),Jt=Object.assign((function(e){if(K(e)){void 0===Vt&&Zt();var t=Vt.admit(e),r=zt.get(t);return void 0===r&&zt.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)}),{reset:Zt});function Zt(){Vt=new Gt,zt=new(Fe?WeakMap:Map)}function Xt(e,t,r){return new W((function(n){var i=n.next,o=n.error,s=n.complete,a=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++a;var r=function(){return e(t)};c=c.then(r,r).then((function(e){--a,i&&i.call(n,e),u&&f.complete()}),(function(e){throw--a,e})).catch((function(e){o&&o.call(n,e)}))}:function(e){return t&&t.call(n,e)}}var f={next:l(t,i),error:l(r,o),complete:function(){u=!0,a||s&&s.call(n)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function er(e){return Rt(tr(e))}function tr(e){var t=Rt(e.errors)?e.errors.slice(0):[];return Bt(e)&&Rt(e.incremental)&&e.incremental.forEach((function(e){e.errors&&t.push.apply(t,e.errors)})),t}var rr={kind:Pe.FIELD,name:{kind:Pe.NAME,value:"__typename"}};function nr(e,t){return!e||e.selectionSet.selections.every((function(e){return e.kind===Pe.FRAGMENT_SPREAD&&nr(t[e.name.value],t)}))}function ir(e){return nr(le(e)||function(e){__DEV__?u("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u("Document"===e.kind,51),__DEV__?u(e.definitions.length<=1,"Fragment must have exactly one definition."):u(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?u("FragmentDefinition"===t.kind,"Must be a fragment definition."):u("FragmentDefinition"===t.kind,53),t}(e),G(pe(e)))?null:e}function or(e){var t=new Map;return function(r){void 0===r&&(r=e);var n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function sr(e,t){for(var r=or(""),i=or(""),o=function(e){for(var t=0,n=void 0;t<e.length&&(n=e[t]);++t)if(!Dt(n)){if(n.kind===Pe.OPERATION_DEFINITION)return r(n.name&&n.name.value);if(n.kind===Pe.FRAGMENT_DEFINITION)return i(n.name.value)}return __DEV__&&u.error("Could not find operation or fragment"),null},s=0,a=t.definitions.length-1;a>=0;--a)t.definitions[a].kind===Pe.OPERATION_DEFINITION&&++s;var c=function(e){var t=new Set,r=[];return e.forEach((function(e){e.name?t.add(e.name):e.test&&r.push(e.test)})),function(e){return t.has(e.name.value)||r.some((function(t){return t(e)}))}}(e),l=e.some((function(e){return e.remove})),f=function(e){return l&&e&&e.some(c)},p=new Map,d=!1,h={enter:function(e){if(f(e.directives))return d=!0,null}},y=Ne(t,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var s=o(i);s&&s.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(f(e.directives))return d=!0,null;var s=o(i);s&&s.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){p.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===p.get(JSON.stringify(n))?e:s>0&&e.selectionSet.selections.every((function(e){return e.kind===Pe.FIELD&&"__typename"===e.name.value}))?(i(e.name.value).removed=!0,d=!0,null):void 0}},Directive:{leave:function(e){if(c(e))return d=!0,null}}});if(!d)return t;var v=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach((function(t){v(i(t)).transitiveVars.forEach((function(t){e.transitiveVars.add(t)}))}))),e},m=new Set;y.definitions.forEach((function(e){e.kind===Pe.OPERATION_DEFINITION?v(r(e.name&&e.name.value)).fragmentSpreads.forEach((function(e){m.add(e)})):e.kind!==Pe.FRAGMENT_DEFINITION||0!==s||i(e.name.value).removed||m.add(e.name.value)})),m.forEach((function(e){v(i(e)).fragmentSpreads.forEach((function(e){m.add(e)}))}));var b={enter:function(e){if(t=e.name.value,!m.has(t)||i(t).removed)return null;var t}};return ir(Ne(y,{FragmentSpread:b,FragmentDefinition:b,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=v(r(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,n.__assign)((0,n.__assign)({},e),{variableDefinitions:e.variableDefinitions.filter((function(e){return t.has(e.variable.name.value)}))})}}}}))}var ar=Object.assign((function(e){return Ne(e,{SelectionSet:{enter:function(e,t,r){if(!r||r.kind!==Pe.OPERATION_DEFINITION){var i=e.selections;if(i&&!i.some((function(e){return ue(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=r;if(!(ue(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return(0,n.__assign)((0,n.__assign)({},e),{selections:(0,n.__spreadArray)((0,n.__spreadArray)([],i,!0),[rr],!1)})}}}}})}),{added:function(e){return e===rr}}),ur={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&u.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function cr(e){return"query"===he(e).operation?e:Ne(e,{OperationDefinition:{enter:function(e){return(0,n.__assign)((0,n.__assign)({},e),{operation:"query"})}}})}var lr=new Map;function fr(e){var t=lr.get(e)||1;return lr.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function pr(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function dr(e){function t(t){Object.defineProperty(e,t,{value:W})}return Le&&Symbol.species&&t(Symbol.species),t("@@species"),e}function hr(e){return e&&"function"==typeof e.then}var yr=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),pr(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),pr(r.observers,"error",e))},complete:function(){var e=r,t=e.sub,n=e.sources;if(null!==t){var i=(void 0===n?[]:n).shift();i?hr(i)?i.then((function(e){return r.sub=e.subscribe(r.handlers)})):r.sub=i.subscribe(r.handlers):(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),pr(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch((function(e){})),"function"==typeof t&&(t=[new W(t)]),hr(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return(0,n.__extends)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach((function(r){return r(e,t)})))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add((function(r,n){t||(t=!0,e(r,n))}))},t}(W);function vr(e){return e.hasOwnProperty("graphQLErrors")}dr(yr);var mr,br=function(e){function t(r){var n,i,o=r.graphQLErrors,s=r.clientErrors,a=r.networkError,u=r.errorMessage,c=r.extraInfo,l=e.call(this,u)||this;return l.name="ApolloError",l.graphQLErrors=o||[],l.clientErrors=s||[],l.networkError=a||null,l.message=u||(i="",(Rt((n=l).graphQLErrors)||Rt(n.clientErrors))&&(n.graphQLErrors||[]).concat(n.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),n.networkError&&(i+="".concat(n.networkError.message,"\n")),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,n.__extends)(t,e),t}(Error);function gr(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(mr||(mr={}));var _r=Object.prototype.toString;function wr(e){return Or(e)}function Or(e,t){switch(_r.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=Or(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=Or(e[r],t)})),n;default:return e}}function Sr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}var Er=Object.assign,Ir=Object.hasOwnProperty,Tr=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,o=t.options,s=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=Pr)}catch(e){}var r=!s.observers.size;s.observers.add(e);var n=s.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(n.result),r&&s.reobserve().catch((function(){})),function(){s.observers.delete(e)&&!s.observers.size&&s.tearDownQuery()}}))||this;s.observers=new Set,s.subscriptions=new Set,s.queryInfo=i,s.queryManager=r,s.isTornDown=!1;var a=r.defaultOptions.watchQuery,u=(void 0===a?{}:a).fetchPolicy,c=void 0===u?"cache-first":u,l=o.fetchPolicy,f=void 0===l?c:l,p=o.initialFetchPolicy,d=void 0===p?"standby"===f?c:f:p;s.options=(0,n.__assign)((0,n.__assign)({},o),{initialFetchPolicy:d,fetchPolicy:f}),s.queryId=i.queryId||r.generateQueryId();var h=le(s.query);return s.queryName=h&&h.name&&h.name.value,s}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||mr.ready,i=(0,n.__assign)((0,n.__assign)({},t),{loading:gr(r),networkStatus:r}),o=this.options.fetchPolicy,s=void 0===o?"cache-first":o;if("network-only"===s||"no-cache"===s||"standby"===s||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(i.data=a.result),Pt(i.data,{})&&(i.data=void 0),a.complete?(delete i.partial,!a.complete||i.networkStatus!==mr.loading||"cache-first"!==s&&"cache-only"!==s||(i.networkStatus=mr.ready,i.loading=!1)):i.partial=!0,!__DEV__||a.complete||this.options.partialRefetch||i.loading||i.data||i.error||xr(a.missing)}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!Pt(this.last.result,e)||t&&!Pt(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||Pt(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0},i=this.options.fetchPolicy;if(r.fetchPolicy="cache-and-network"===i?i:"no-cache"===i?"no-cache":"network-only",__DEV__&&e&&Ir.call(e,"variables")){var o=de(this.query),s=o.variableDefinitions;s&&s.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&u.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=o.name)||void 0===t?void 0:t.value)||JSON.stringify(o),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!Pt(this.options.variables,e)&&(r.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,mr.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),{query:this.query}),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId(),o=this.queryInfo,s=o.networkStatus;o.networkStatus=mr.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var a=new Set;return this.queryManager.fetchQuery(i,r,mr.fetchMore).then((function(n){return t.queryManager.removeQuery(i),o.networkStatus===mr.fetchMore&&(o.networkStatus=s),t.queryManager.cache.batch({update:function(i){var o=e.updateQuery;o?i.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},(function(e){return o(e,{fetchMoreResult:n.data,variables:r.variables})})):i.writeQuery({query:r.query,variables:r.variables,data:n.data})},onWatchUpdated:function(e){a.add(e.query)}}),n})).finally((function(){a.has(t.query)||jr(t)}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&u.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return Pt(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},mr.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,i=t.initialFetchPolicy,o=void 0===i?n:i;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:o}):t.fetchPolicy="variables-changed"===e?o:t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(r){if(!t||t.interval!==r){__DEV__?u(r,"Attempted to start a polling query without a polling interval."):u(r,13),(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(gr(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},mr.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,n.__assign)((0,n.__assign)({},this.last),{result:this.queryManager.assumeImmutableResults?e:wr(e),variables:t}),Rt(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var r=this;this.isTornDown=!1;var i=t===mr.refetch||t===mr.fetchMore||t===mr.poll,o=this.options.variables,s=this.options.fetchPolicy,a=Sr(this.options,e||{}),u=i?a:Er(this.options,a);i||(this.updatePolling(),e&&e.variables&&!Pt(e.variables,o)&&"standby"!==u.fetchPolicy&&u.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",u),void 0===t&&(t=mr.setVariables)));var c=u.variables&&(0,n.__assign)({},u.variables),l=this.fetch(u,t),f={next:function(e){r.reportResult(e,c)},error:function(e){r.reportError(e,c)}};return i||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=l,this.observer=f),l.addObserver(f),l.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError();(r||this.isDifferentFromLastResult(e,t))&&((r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),pr(this.observers,"next",e))},t.prototype.reportError=function(e,t){var r=(0,n.__assign)((0,n.__assign)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:mr.error,loading:!1});this.updateLastResult(r,t),pr(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(W);function jr(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,"function"==typeof n?n.apply(this,arguments):r}}):e.reobserve()}function Pr(e){__DEV__&&u.error("Unhandled error",e.message,e.stack)}function xr(e){__DEV__&&e&&__DEV__&&u.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function Ar(e){return e.kind===Pe.FIELD||e.kind===Pe.FRAGMENT_SPREAD||e.kind===Pe.INLINE_FRAGMENT}dr(Tr);var Nr=null,Mr={},kr=1;function Dr(e){try{return e()}catch(e){}}var Rr="@wry/context:Slot",Cr=Dr((function(){return globalThis}))||Dr((function(){return r.g}))||Object.create(null),$r=Cr[Rr]||Array[Rr]||function(e){try{Object.defineProperty(Cr,Rr,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(function(){function e(){this.id=["slot",kr++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Nr;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Mr)break;return e!==Nr&&(Nr.slots[this.id]=t),!0}return Nr&&(Nr.slots[this.id]=Mr),!1},e.prototype.getValue=function(){if(this.hasValue())return Nr.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),s=Nr;Nr={parent:s,slots:o};try{return t.apply(n,r)}finally{Nr=s}},e.bind=function(e){var t=Nr;return function(){var r=Nr;try{return Nr=t,e.apply(this,arguments)}finally{Nr=r}}},e.noContext=function(e,t,r){if(!Nr)return e.apply(r,t);var n=Nr;try{return Nr=null,e.apply(r,t)}finally{Nr=n}},e}());function Fr(){}$r.bind,$r.noContext;var qr,Lr=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=Fr),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Br=new $r,Ur=Object.prototype.hasOwnProperty,Vr=void 0===(qr=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:qr;function zr(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var Qr=[],Yr=100;function Wr(e,t){if(!e)throw new Error(t||"assertion failure")}function Kr(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Hr=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!Zr(this))return Gr(this),this.value[0]},e.prototype.recompute=function(e){return Wr(!this.recomputing,"already recomputing"),Gr(this),Zr(this)?function(e,t){return sn(e),Br.withValue(e,Jr,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{zr(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Zr(e)||en(e)}(e),Kr(e.value)}(this,e):Kr(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Xr(this),zr(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),sn(this),tn(this,(function(t,r){t.setDirty(),an(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=Qr.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Vr(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),Qr.push(this.deps),this.deps=null)},e.count=0,e}();function Gr(e){var t=Br.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Zr(e)?rn(t,e):nn(t,e),t}function Jr(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function Zr(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Xr(e){tn(e,rn)}function en(e){tn(e,nn)}function tn(e,t){var r=e.parents.size;if(r)for(var n=Vr(e.parents),i=0;i<r;++i)t(n[i],e)}function rn(e,t){Wr(e.childValues.has(t)),Wr(Zr(t));var r=!Zr(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=Qr.pop()||new Set;e.dirtyChildren.add(t),r&&Xr(e)}function nn(e,t){Wr(e.childValues.has(t)),Wr(!Zr(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),on(e,t),Zr(e)||en(e)}function on(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(Qr.length<Yr&&Qr.push(r),e.dirtyChildren=null))}function sn(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){an(e,r)})),e.forgetDeps(),Wr(null===e.dirtyChildren)}function an(e,t){t.parents.delete(e),e.childValues.delete(t),on(e,t)}var un={setDirty:!0,dispose:!0,forget:!0};function cn(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=Br.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(zr(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){var n=t.get(e);if(n){var i=r&&Ur.call(un,r)?r:"setDirty";Vr(n).forEach((function(e){return e[i]()})),t.delete(e),zr(n)}},n}function ln(){var e=new Ht("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}ln();var fn=new Set;function pn(e,t){void 0===t&&(t=Object.create(null));var r=new Lr(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=t.keyArgs,i=t.makeCacheKey||ln(),o=function(){var o=i.apply(null,n?n.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var s=r.get(o);s||(r.set(o,s=new Hr(e)),s.subscribe=t.subscribe,s.forget=function(){return r.delete(o)});var a=s.recompute(Array.prototype.slice.call(arguments));return r.set(o,s),fn.add(r),Br.hasValue()||(fn.forEach((function(e){return e.clean()})),fn.clear()),a};function s(e){var t=r.get(e);t&&t.setDirty()}function a(e){var t=r.get(e);if(t)return t.peek()}function u(e){return r.delete(e)}return Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=s,o.dirty=function(){s(i.apply(null,arguments))},o.peekKey=a,o.peek=function(){return a(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var dn=new $r,hn=new WeakMap;function yn(e){var t=hn.get(e);return t||hn.set(e,t={vars:new Set,dep:cn()}),t}function vn(e){yn(e).vars.forEach((function(t){return t.forgetCache(e)}))}function mn(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){yn(e).dep.dirty(n),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)}));var s=Array.from(r);r.clear(),s.forEach((function(t){return t(e)}))}}else{var a=dn.getValue();a&&(i(a),yn(a).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),yn(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}var bn=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=$t(t.resolvers,e)})):this.resolvers=$t(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,i=e.context,o=e.variables,s=e.onlyRunForcedResolvers,a=void 0!==s&&s;return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,i,o,this.fragmentMatcher,a).then((function(e){return(0,n.__assign)((0,n.__assign)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return De(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){return ce(e),sr([{test:function(e){return"client"===e.name.value},remove:!0}],e)}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)}))]:[2,(0,n.__assign)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Ne(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return Ae}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:cr(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,i,o,s){return void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===s&&(s=!1),(0,n.__awaiter)(this,void 0,void 0,(function(){var a,u,c,l,f,p,d,h,y,v;return(0,n.__generator)(this,(function(m){return a=he(e),u=pe(e),c=G(u),l=this.collectSelectionsToResolve(a,c),f=a.operation,p=f?f.charAt(0).toUpperCase()+f.slice(1):"Query",h=(d=this).cache,y=d.client,v={fragmentMap:c,context:(0,n.__assign)((0,n.__assign)({},r),{cache:h,client:y}),variables:i,fragmentMatcher:o,defaultOperationType:p,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(a.selectionSet,!1,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,s,a,c,l,f=this;return(0,n.__generator)(this,(function(p){return o=i.fragmentMap,s=i.context,a=i.variables,c=[r],l=function(e){return(0,n.__awaiter)(f,void 0,void 0,(function(){var l,f;return(0,n.__generator)(this,(function(n){return(t||i.selectionsToResolve.has(e))&&ke(e,a)?ue(e)?[2,this.resolveField(e,t,r,i).then((function(t){var r;void 0!==t&&c.push(((r={})[se(e)]=t,r))}))]:(function(e){return"InlineFragment"===e.kind}(e)?l=e:(l=o[e.name.value],__DEV__?u(l,"No fragment named ".concat(e.name.value)):u(l,11)),l&&l.typeCondition&&(f=l.typeCondition.name.value,i.fragmentMatcher(r,f,s))?[2,this.resolveSelectionSet(l.selectionSet,t,r,i).then((function(e){c.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(l)).then((function(){return Ft(c)}))]}))}))},e.prototype.resolveField=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,s,a,u,c,l,f,p,d,h=this;return(0,n.__generator)(this,(function(n){return r?(o=i.variables,s=e.name.value,a=se(e),u=s!==a,c=r[a]||r[s],l=Promise.resolve(c),i.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=r.__typename||i.defaultOperationType,(p=this.resolvers&&this.resolvers[f])&&(d=p[u?s:a])&&(l=Promise.resolve(dn.withValue(this.cache,d,[r,oe(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}])))),[2,l.then((function(r){var n,o;if(void 0===r&&(r=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(i.exportedVariables[e.value.value]=r)}))})),!e.selectionSet)return r;if(null==r)return r;var s=null!==(o=null===(n=e.directives)||void 0===n?void 0:n.some((function(e){return"client"===e.name.value})))&&void 0!==o&&o;return Array.isArray(r)?h.resolveSubSelectedArray(e,t||s,r,i):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||s,r,i):void 0}))]):[2,null]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map((function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0})))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(i){if(!n.has(i)){var o=new Set;n.set(i,o),Ne(i,{Directive:function(e,t,n,i,s){"client"===e.name.value&&s.forEach((function(e){r(e)&&Ar(e)&&o.add(e)}))},FragmentSpread:function(n,i,s,a,c){var l=t[n.name.value];__DEV__?u(l,"No fragment named ".concat(n.name.value)):u(l,12);var f=e(l);f.size>0&&(c.forEach((function(e){r(e)&&Ar(e)&&o.add(e)})),o.add(n),f.forEach((function(e){o.add(e)})))}})}return n.get(i)}(e)},e}(),gn=new(Fe?WeakMap:Map);function _n(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return gn.set(e,(gn.get(e)+1)%1e15),r.apply(this,arguments)})}function wn(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var On=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;gn.has(r)||(gn.set(r,0),_n(r,"evict"),_n(r,"modify"),_n(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||mr.loading;return this.variables&&this.networkStatus!==mr.loading&&!Pt(this.variables,e.variables)&&(t=mr.setVariables),Pt(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){wn(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&Pt(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var r=this.observableQuery;if(r&&"no-cache"===r.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,r=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||Pt(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():jr(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;wn(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(gr(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var i=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&Pt(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===gn.get(this.cache)&&Pt(t,r.variables)&&Pt(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new Lt,s=Rt(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&Rt(e.incremental)){var a=Ut(this.getDiff().result,e);e.data=a}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=o.merge(u.result,e.data)}this.graphQLErrors=s,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(Sn(e,r.errorPolicy)?this.cache.performTransaction((function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:gn.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete)return void(e.data=i.lastDiff.diff.result);var s=i.getDiffOptions(r.variables),a=o.diff(s);i.stopped||i.updateWatch(r.variables),i.updateLastDiff(a,s),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=mr.ready},e.prototype.markError=function(e){return this.networkStatus=mr.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function Sn(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!er(e);return!n&&r&&e.data&&(n=!0),n}var En=Object.prototype.hasOwnProperty,In=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.queryDeduplication,o=void 0!==i&&i,s=e.onBroadcast,a=e.ssrMode,u=void 0!==a&&a,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,p=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Fe?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=o,this.clientAwareness=l,this.localState=f||new bn({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!p,(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches(__DEV__?new a("QueryManager stopped while query was in flight"):new a(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,i=e.mutation,o=e.variables,s=e.optimisticResponse,a=e.updateQueries,c=e.refetchQueries,l=void 0===c?[]:c,f=e.awaitRefetchQueries,p=void 0!==f&&f,d=e.update,h=e.onQueryUpdated,y=e.fetchPolicy,v=void 0===y?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":y,m=e.errorPolicy,b=void 0===m?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":m,g=e.keepRootFields,_=e.context;return(0,n.__awaiter)(this,void 0,void 0,(function(){var e,t,r,c,f,y;return(0,n.__generator)(this,(function(m){switch(m.label){case 0:return __DEV__?u(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):u(i,15),__DEV__?u("network-only"===v||"no-cache"===v,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):u("network-only"===v||"no-cache"===v,16),e=this.generateMutationId(),t=this.transform(i),r=t.document,c=t.hasClientExports,i=this.cache.transformForLink(r),o=this.getVariables(i,o),c?[4,this.localState.addExportedVariables(i,o,_)]:[3,2];case 1:o=m.sent(),m.label=2;case 2:return f=this.mutationStore&&(this.mutationStore[e]={mutation:i,variables:o,loading:!0,error:null}),s&&this.markMutationOptimistic(s,{mutationId:e,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,updateQueries:a,update:d,keepRootFields:g}),this.broadcastQueries(),y=this,[2,new Promise((function(t,r){return Xt(y.getObservableFromLink(i,(0,n.__assign)((0,n.__assign)({},_),{optimisticResponse:s}),o,!1),(function(t){if(er(t)&&"none"===b)throw new br({graphQLErrors:tr(t)});f&&(f.loading=!1,f.error=null);var r=(0,n.__assign)({},t);return"function"==typeof l&&(l=l(r)),"ignore"===b&&er(r)&&delete r.errors,y.markMutationResult({mutationId:e,result:r,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,update:d,updateQueries:a,awaitRefetchQueries:p,refetchQueries:l,removeOptimistic:s?e:void 0,onQueryUpdated:h,keepRootFields:g})})).subscribe({next:function(e){y.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){f&&(f.loading=!1,f.error=t),s&&y.cache.removeOptimistic(e),y.broadcastQueries(),r(t instanceof br?t:new br({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var i=e.result,o=[],s="no-cache"===e.fetchPolicy;if(!s&&Sn(i,e.errorPolicy)){if(Bt(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),Bt(i)&&Rt(i.incremental)){var a=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),u=void 0;a.result&&(u=Ut(a.result,i)),void 0!==u&&(i.data=u,o.push({result:u,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach((function(e,n){var s=e.observableQuery,a=s&&s.queryName;if(a&&En.call(c,a)){var u=c[a],l=r.queries.get(n),f=l.document,p=l.variables,d=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),h=d.result;if(d.complete&&h){var y=u(h,{mutationResult:i,queryName:f&&fe(f)||void 0,queryVariables:p});y&&o.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(o.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var l=[];if(this.refetchQueries({updateCache:function(t){s||o.forEach((function(e){return t.write(e)}));var a,u=e.update,c=!(Bt(a=i)||function(e){return"hasNext"in e&&"data"in e}(a))||Bt(i)&&!i.hasNext;if(u){if(!s){var l=t.diff({id:"ROOT_MUTATION",query:r.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});l.complete&&("incremental"in(i=(0,n.__assign)((0,n.__assign)({},i),{data:l.result}))&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}c&&u(t,i,{context:e.context,variables:e.variables})}s||e.keepRootFields||!c||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return l.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(l).then((function(){return i}))}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var r=this,i="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:i}}),e)}catch(e){__DEV__&&u.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),i=sr([ur],ce(r)),o=this.localState.clientQuery(r),s=i&&this.localState.serverQuery(i),a={document:r,hasClientExports:Re(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:s,defaultVars:ye(le(r)),asQuery:(0,n.__assign)((0,n.__assign)({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e}))})},u=function(e){e&&!t.has(e)&&t.set(e,a)};u(e),u(r),u(o),u(s)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new On(this),r=new Tr({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:r.query,observableQuery:r,variables:r.variables}),r},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?u(e.query,"query option is required. You must specify your GraphQL document in the query option."):u(e.query,17),__DEV__?u("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):u("Document"===e.query.kind,18),__DEV__?u(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):u(!e.returnPartialData,19),__DEV__?u(!e.pollInterval,"pollInterval option only supported on watchQuery."):u(!e.pollInterval,20),this.fetchQuery(t,e).finally((function(){return r.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new a("Store reset while query was in flight (not completed in link chain)"):new a(21)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=mr.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,i=new Map,o=new Set;return Array.isArray(e)&&e.forEach((function(e){var r;"string"==typeof e?i.set(e,!1):K(r=e)&&"Document"===r.kind&&Array.isArray(r.definitions)?i.set(t.transform(e).document,!1):K(e)&&e.query&&o.add(e)})),this.queries.forEach((function(t,n){var o=t.observableQuery,s=t.document;if(o){if("all"===e)return void r.set(n,o);var a=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||a&&i.has(a)||s&&i.has(s))&&(r.set(n,o),a&&i.set(a,!0),s&&i.set(s,!0))}})),o.size&&o.forEach((function(e){var i=fr("legacyOneTimeQuery"),o=t.getQuery(i).init({document:e.query,variables:e.variables}),s=new Tr({queryManager:t,queryInfo:o,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});u(s.queryId===i),o.setObservableQuery(s),r.set(i,s)})),__DEV__&&i.size&&i.forEach((function(e,t){e||__DEV__&&u.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach((function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=e.variables,s=e.context,a=void 0===s?{}:s;r=this.transform(r).document,o=this.getVariables(r,o);var u=function(e){return t.getObservableFromLink(r,a,e).map((function(o){if("no-cache"!==n&&(Sn(o,i)&&t.cache.write({query:r,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),er(o))throw new br({graphQLErrors:o.errors});return o}))};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,o,a).then(u);return new W((function(e){var t=null;return c.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i){var o,s,a=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var u=this.transform(e).serverQuery;if(u){var c=this.inFlightLinkObservables,l=this.link,f={query:u,variables:r,operationName:fe(u)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!i}))};if(t=f.context,i){var p=c.get(u)||new Map;c.set(u,p);var d=Jt(r);if(!(s=p.get(d))){var h=new yr([we(l,f)]);p.set(d,s=h),h.beforeNext((function(){p.delete(d)&&p.size<1&&c.delete(u)}))}}else s=new yr([we(l,f)])}else s=new yr([W.of({data:{}})]),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(s=Xt(s,(function(e){return a.localState.runResolvers({document:y,remoteResult:e,context:t,variables:r})}))),s},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return Xt(this.getObservableFromLink(i,r.context,r.variables),(function(o){var s=tr(o),a=s.length>0;if(n>=e.lastRequestId){if(a&&"none"===r.errorPolicy)throw e.markError(new br({graphQLErrors:s}));e.markResult(o,i,r,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:mr.ready};return a&&"ignore"!==r.errorPolicy&&(u.errors=s,u.networkStatus=mr.error),u}),(function(t){var r=vr(t)?t:new br({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=mr.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),s=this.getQuery(e),a=this.defaultOptions.watchQuery,u=t.fetchPolicy,c=void 0===u?a&&a.fetchPolicy||"cache-first":u,l=t.errorPolicy,f=void 0===l?a&&a.errorPolicy||"none":l,p=t.returnPartialData,d=void 0!==p&&p,h=t.notifyOnNetworkStatusChange,y=void 0!==h&&h,v=t.context,m=void 0===v?{}:v,b=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:f,returnPartialData:d,notifyOnNetworkStatusChange:y,context:m}),g=function(e){b.variables=e;var i=n.fetchQueryByPolicy(s,b,r);return"standby"!==b.fetchPolicy&&i.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",t),i},_=function(){return n.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,(function(e){_(),setTimeout((function(){return w.cancel(e)}))}));var w=new yr(this.transform(b.query).hasClientExports?this.localState.addExportedVariables(b.query,b.variables,b.context).then(g):g(b.variables));return w.promise.then(_,_),w},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,s=e.removeOptimistic,a=void 0===s?o?fr("refetchQueries"):void 0:s,u=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach((function(e,r){c.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})}));var l=new Map;return r&&this.cache.batch({update:r,optimistic:o&&a||!1,removeOptimistic:a,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof On&&e.watcher.observableQuery;if(n){if(u){c.delete(n.queryId);var i=u(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&l.set(n,i),i}null!==u&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach((function(e,r){var n,i=e.oq,o=e.lastDiff,s=e.diff;if(u){if(!s){var a=i.queryInfo;a.reset(),s=a.getDiff()}n=u(i,s,o)}u&&!0!==n||(n=i.refetch()),!1!==n&&l.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)})),a&&this.cache.removeOptimistic(a),l},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,o=t.query,s=t.variables,a=t.fetchPolicy,u=t.refetchWritePolicy,c=t.errorPolicy,l=t.returnPartialData,f=t.context,p=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(o).document,variables:s,networkStatus:r});var h=function(){return e.getDiff(s)},y=function(t,r){void 0===r&&(r=e.networkStatus||mr.loading);var a=t.result;!__DEV__||l||Pt(a,{})||xr(t.missing);var u=function(e){return W.of((0,n.__assign)({data:e,loading:gr(r),networkStatus:r},t.complete?null:{partial:!0}))};return a&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:a},context:f,variables:s,onlyRunForcedResolvers:!0}).then((function(e){return u(e.data||void 0)})):"none"===c&&r===mr.refetch&&Array.isArray(t.missing)?u(void 0):u(a)},v="no-cache"===a?0:r===mr.refetch&&"merge"!==u?1:2,m=function(){return i.getResultsFromLink(e,v,{variables:s,context:f,fetchPolicy:a,errorPolicy:c})},b=p&&"number"==typeof d&&d!==r&&gr(r);switch(a){default:case"cache-first":return(g=h()).complete?[y(g,e.markReady())]:l||b?[y(g),m()]:[m()];case"cache-and-network":var g;return(g=h()).complete||l||b?[y(g),m()]:[m()];case"cache-only":return[y(h(),e.markReady())];case"network-only":return b?[y(h()),m()]:[m()];case"no-cache":return b?[y(e.getDiff()),m()]:[m()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new On(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)({},t),{clientAwareness:this.clientAwareness})},e}();function Tn(e,t){return Sr(e,t,t.variables&&{variables:(0,n.__assign)((0,n.__assign)({},e&&e.variables),t.variables)})}var jn,Pn=!1,xn=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,i=e.headers,o=e.cache,s=e.ssrMode,c=void 0!==s&&s,l=e.ssrForceFetchDelay,f=void 0===l?0:l,p=e.connectToDevTools,d=void 0===p?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:p,h=e.queryDeduplication,y=void 0===h||h,v=e.defaultOptions,m=e.assumeImmutableResults,b=void 0!==m&&m,g=e.resolvers,_=e.typeDefs,w=e.fragmentMatcher,O=e.name,S=e.version,E=e.link;if(E||(E=r?new Ot({uri:r,credentials:n,headers:i}):_e.empty()),!o)throw __DEV__?new a("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new a(9);if(this.link=E,this.cache=o,this.disableNetworkFetches=c||f>0,this.queryDeduplication=y,this.defaultOptions=v||Object.create(null),this.typeDefs=_,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),d&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Pn&&d&&__DEV__&&(Pn=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var I=window.navigator,T=I&&I.userAgent,j=void 0;"string"==typeof T&&(T.indexOf("Chrome/")>-1?j="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":T.indexOf("Firefox/")>-1&&(j="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),j&&__DEV__&&u.log("Download the Apollo DevTools for a better development experience: "+j)}this.version="3.7.9",this.localState=new bn({cache:o,client:this,resolvers:g,fragmentMatcher:w}),this.queryManager=new In({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:y,ssrMode:c,clientAwareness:{name:O,version:S},localState:this.localState,assumeImmutableResults:b,onBroadcast:d?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Tn(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Tn(this.defaultOptions.query,e)),__DEV__?u("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):u("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Tn(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return we(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach((function(e,t){r.push(t),n.push(e)}));var i=Promise.all(n);return i.queries=r,i.results=n,i.catch((function(e){__DEV__&&u.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}();jn||(jn={});var An=function(){function e(){this.getFragmentDoc=pn(H)}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(r)}),n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n.__rest)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,s=(0,n.__rest)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(s,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return null==o?i:(r.writeQuery((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return null==o?i:(r.writeFragment((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e}(),Nn=function(e){function t(r,n,i,o){var s,a=e.call(this,r)||this;if(a.message=r,a.path=n,a.query=i,a.variables=o,Array.isArray(a.path)){a.missing=a.message;for(var u=a.path.length-1;u>=0;--u)a.missing=((s={})[a.path[u]]=a.missing,s)}else a.missing=a.path;return a.__proto__=t.prototype,a}return(0,n.__extends)(t,e),t}(Error);function Mn(e){return __DEV__&&(t=e,(r=new Set([t])).forEach((function(e){K(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){K(e[t])&&r.add(e[t])}))}))),e;var t,r}var kn=Object.prototype.hasOwnProperty;function Dn(e){return null==e}function Rn(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=Dn(n)?Dn(i)?void 0:{_id:i}:{id:n}),Dn(n)&&!Dn(i)&&(n=i),!Dn(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var Cn={dataIdFromObject:Rn,addTypename:!0,resultCaching:!0,canonizeResults:!1};function $n(e){var t=e.canonizeResults;return void 0===t?Cn.canonizeResults:t}var Fn=/^[_a-z][_0-9a-z]*/i;function qn(e){var t=e.match(Fn);return t?t[0]:e}function Ln(e,t,r){return!!K(t)&&(Dt(t)?t.every((function(t){return Ln(e,t,r)})):e.selections.every((function(e){if(ue(e)&&ke(e,r)){var n=se(e);return kn.call(t,n)&&(!e.selectionSet||Ln(e.selectionSet,t[n],r))}return!0})))}function Bn(e){return K(e)&&!X(e)&&!Dt(e)}function Un(e,t){var r=G(pe(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var Vn=Object.create(null),zn=function(){return Vn},Qn=Object.create(null),Yn=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return Mn(X(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return X(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return Z(e);if(X(e))return e;var n=r.policies.identify(e)[0];if(n){var i=Z(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,n.__assign)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),kn.call(this.data,e)){var r=this.data[e];if(r&&kn.call(r,t))return r[t]}return"__typename"===t&&kn.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Gn?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),kn.call(this.data,e)?this.data[e]:this instanceof Gn?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;X(e)&&(e=e.__ref),X(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(r=e):e,o="string"==typeof t?this.lookup(r=t):t;if(o){__DEV__?u("string"==typeof r,"store.merge expects a string ID"):u("string"==typeof r,1);var s=new Lt(Zn).merge(i,o);if(this.data[r]=s,s!==i&&(delete this.refs[r],this.group.caching)){var a=Object.create(null);i||(a.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==s[e]){a[e]=1;var t=qn(e);t===e||n.policies.hasKeyArgs(s.__typename,t)||(a[t]=1),void 0!==s[e]||n instanceof Gn||delete s[e]}})),!a.__typename||i&&i.__typename||this.policies.rootTypenamesById[r]!==s.__typename||delete a.__typename,Object.keys(a).forEach((function(e){return n.group.dirty(r,e)}))}}},e.prototype.modify=function(e,t){var r=this,i=this.lookup(e);if(i){var o=Object.create(null),s=!1,a=!0,u={DELETE:Vn,INVALIDATE:Qn,isReference:X,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||Z(e)}:t,{store:r})}};if(Object.keys(i).forEach((function(c){var l=qn(c),f=i[c];if(void 0!==f){var p="function"==typeof t?t:t[c]||t[l];if(p){var d=p===zn?Vn:p(Mn(f),(0,n.__assign)((0,n.__assign)({},u),{fieldName:l,storeFieldName:c,storage:r.getStorage(e,c)}));d===Qn?r.group.dirty(e,c):(d===Vn&&(d=void 0),d!==f&&(o[c]=d,s=!0,f=d))}void 0!==f&&(a=!1)}})),s)return this.merge(e,o),a&&(this instanceof Gn?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),s=t&&r?this.policies.getStoreFieldName({typename:o,fieldName:t,args:r}):t;return this.modify(e,s?((n={})[s]=zn,n):zn)}return!1},e.prototype.evict=function(e,t){var r=!1;return e.id&&(kn.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof Gn&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach((function(t){kn.call(e.policies.rootTypenamesById,t)||r.push(t)})),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(r){e&&kn.call(e,r)||t.delete(r)})),e){var r=e.__META,i=(0,n.__rest)(e,["__META"]);Object.keys(i).forEach((function(e){t.merge(e,i[e])})),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Gn?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){kn.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof Gn;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!kn.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach((function(e){X(e)&&(t[e.__ref]=!0),K(e)&&Object.keys(e).forEach((function(t){var r=e[t];K(r)&&n.add(r)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Wn=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?cn():null,this.keyMaker=new Ht(Fe)},e.prototype.depend=function(e,t){if(this.d){this.d(Kn(e,t));var r=qn(t);r!==t&&this.d(Kn(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Kn(e,t),"__exists"===t?"forget":"setDirty")},e}();function Kn(e,t){return t+"#"+e}function Hn(e,t){Xn(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,s=e.call(this,r,new Wn(i))||this;return s.stump=new Jn(s),s.storageTrie=new Ht(Fe),o&&s.replace(o),s}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Yn||(Yn={}));var Gn=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach((function(r){Pt(n[r],i[r])||t.group.dirty(e,r)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(r){t.group.dirty(e,r)}))):t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.__assign)((0,n.__assign)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return kn.call(this.data,t)?(0,n.__assign)((0,n.__assign)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Yn),Jn=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Wn(t.group.caching,t.group))||this}return(0,n.__extends)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Gn);function Zn(e,t,r){var n=e[r],i=t[r];return Pt(n,i)?n:i}function Xn(e){return!!(e instanceof Yn&&e.group.caching)}function ei(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ti=function(){function e(e){var t=this;this.knownResults=new(Fe?WeakMap:Map),this.config=Sr(e,{addTypename:!1!==e.addTypename,canonizeResults:$n(e)}),this.canon=e.canon||new Gt,this.executeSelectionSet=pn((function(e){var r,i=e.context.canonizeResults,o=ei(e);o[3]=!i;var s=(r=t.executeSelectionSet).peek.apply(r,o);return s?i?(0,n.__assign)((0,n.__assign)({},s),{result:t.canon.admit(s.result)}):s:(Hn(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:ei,makeCacheKey:function(e,t,r,n){if(Xn(r.store))return r.store.makeCacheKey(e,X(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=pn((function(e){return Hn(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(Xn(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Gt},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,i=e.rootId,o=void 0===i?"ROOT_QUERY":i,s=e.variables,a=e.returnPartialData,u=void 0===a||a,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;s=(0,n.__assign)((0,n.__assign)({},ye(de(r))),s);var p,d=Z(o),h=this.executeSelectionSet({selectionSet:he(r).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,n.__assign)({store:t,query:r,policies:f,variables:s,varString:Jt(s),canonizeResults:l},Un(r,this.config.fragments))});if(h.missing&&(p=[new Nn(ri(h.missing),h.missing,r,s)],!u))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(e,t,r,n){if(Xn(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.enclosingRef,o=e.context;if(X(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(n.__ref," object")};var s,u=o.variables,c=o.policies,l=o.store.getFieldValue(n,"__typename"),f=[],p=new Lt;function d(e,t){var r;return e.missing&&(s=p.merge(s,((r={})[t]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof l&&!c.rootIdsByTypename[l]&&f.push({__typename:l});var h=new Set(r.selections);h.forEach((function(e){var r,y;if(ke(e,u))if(ue(e)){var v=c.readField({fieldName:e.name.value,field:e,variables:o.variables,from:n},o),m=se(e);void 0===v?ar.added(e)||(s=p.merge(s,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(X(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)),r))):Dt(v)?v=d(t.executeSubSelectedArray({field:e,array:v,enclosingRef:i,context:o}),m):e.selectionSet?null!=v&&(v=d(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:v,enclosingRef:X(v)?v:i,context:o}),m)):o.canonizeResults&&(v=t.canon.pass(v)),void 0!==v&&f.push(((y={})[m]=v,y))}else{var b=J(e,o.lookupFragment);if(!b&&e.kind===Pe.FRAGMENT_SPREAD)throw __DEV__?new a("No fragment named ".concat(e.name.value)):new a(5);b&&c.fragmentMatches(b,l)&&b.selectionSet.selections.forEach(h.add,h)}}));var y={result:Ft(f),missing:s},v=o.canonizeResults?this.canon.admit(y):Mn(y);return v.result&&this.knownResults.set(v.result,r),v},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,s=e.context,a=new Lt;function c(e,r){var n;return e.missing&&(t=a.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(s.store.canRead)),i=i.map((function(e,t){return null===e?null:Dt(e)?c(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:s}),t):n.selectionSet?c(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:X(e)?e:o,context:s}),t):(__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach((function(r){K(r)&&(__DEV__?u(!X(r),"Missing selection set for object of type ".concat(function(e,t){return X(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,r)," returned for query field ").concat(t.name.value)):u(!X(r),6),Object.values(r).forEach(n.add,n))}))}}(s.store,n,e),e)})),{result:s.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function ri(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var ni=Object.create(null);function ii(e){var t=JSON.stringify(e);return ni[t]||(ni[t]=Object.create(null))}function oi(e){var t=ii(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},i=r.keyObject=ai(e,(function(e){var i=li(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&kn.call(t,e[0])&&(i=li(t,e,ci)),__DEV__?u(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):u(void 0!==i,2),i}));return"".concat(r.typename,":").concat(JSON.stringify(i))})}function si(e){var t=ii(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,s=ai(e,(function(e){var r=e[0],o=r.charAt(0);if("@"!==o)if("$"!==o){if(t)return li(t,e)}else{var s=r.slice(1);if(i&&kn.call(i,s)){var a=e.slice(0);return a[0]=s,li(i,a)}}else if(n&&Rt(n.directives)){var u=r.slice(1),c=n.directives.find((function(e){return e.name.value===u})),l=c&&oe(c,i);return l&&li(l,e.slice(1))}})),a=JSON.stringify(s);return(t||"{}"!==a)&&(o+=":"+a),o})}function ai(e,t){var r=new Lt;return ui(e).reduce((function(e,n){var i,o=t(n);if(void 0!==o){for(var s=n.length-1;s>=0;--s)(i={})[n[s]]=o,o=i;e=r.merge(e,o)}return e}),Object.create(null))}function ui(e){var t=ii(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach((function(t,i){Dt(t)?(ui(t).forEach((function(e){return r.push(n.concat(e))})),n.length=0):(n.push(t),Dt(e[i+1])||(r.push(n.slice(0)),n.length=0))}))}return t.paths}function ci(e,t){return e[t]}function li(e,t,r){return r=r||ci,fi(t.reduce((function e(t,n){return Dt(t)?t.map((function(t){return e(t,n)})):t&&r(t,n)}),e))}function fi(e){return K(e)?Dt(e)?e.map(fi):ai(Object.keys(e).sort(),(function(t){return li(e,t)})):e}function pi(e){return void 0!==e.args?e.args:e.field?oe(e.field,e.variables):null}re.setStringify(Jt);var di=function(){},hi=function(e,t){return t.fieldName},yi=function(e,t,r){return(0,r.mergeObjects)(e,t)},vi=function(e,t){return t},mi=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.__assign)({dataIdFromObject:Rn},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,i=this,o=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var s,a=t&&t.storeObject||e,u=(0,n.__assign)((0,n.__assign)({},t),{typename:o,storeObject:a,readField:t&&t.readField||function(){var e=gi(arguments,a);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),c=o&&this.getTypePolicy(o),l=c&&c.keyFn||this.config.dataIdFromObject;l;){var f=l(e,u);if(!Dt(f)){s=f;break}l=oi(f)}return s=s?String(s):void 0,u.keyObject?[s,u.keyObject]:[s]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var i=e[r],o=i.queryType,s=i.mutationType,a=i.subscriptionType,u=(0,n.__rest)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",r),s&&t.setRootTypename("Mutation",r),a&&t.setRootTypename("Subscription",r),kn.call(t.toBeAdded,r)?t.toBeAdded[r].push(u):t.toBeAdded[r]=[u]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function s(e,t){e.merge="function"==typeof t?t:!0===t?yi:!1===t?vi:e.merge}s(n,t.merge),n.keyFn=!1===i?di:Dt(i)?oi(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var a=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===a?hi:Dt(a)?si(a):"function"==typeof a?a:n.keyFn,"function"==typeof u&&(n.read=u),s(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||hi)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&(__DEV__?u(!n||n===e,"Cannot change root ".concat(e," __typename more than once")):u(!n||n===e,3),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(Fn);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!kn.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(e);i&&i.size&&i.forEach((function(e){var i=t.getTypePolicy(e),o=i.fields,s=(0,n.__rest)(i,["fields"]);Object.assign(r,s),Object.assign(r.fields,o)}))}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach((function(r){t.updateTypePolicy(e,r)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var s=this.getSupertypeSet(t,!0),a=[s],c=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&a.indexOf(t)<0&&a.push(t)},l=!(!r||!this.fuzzySubtypes.size),f=!1,p=0;p<a.length;++p){var d=a[p];if(d.has(o))return s.has(o)||(f&&__DEV__&&u.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),s.add(o)),!0;d.forEach(c),l&&p===a.length-1&&Ln(e.selectionSet,r,n)&&(l=!1,f=!0,this.fuzzySubtypes.forEach((function(e,r){var n=t.match(e);n&&n[0]===t&&c(r)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!(!r||!r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),o=i&&i.keyFn;if(o&&r)for(var s={typename:r,fieldName:n,field:e.field||null,variables:e.variables},a=pi(e);o;){var u=o(a,s);if(!Dt(u)){t=u||n;break}o=si(u)}return void 0===t&&(t=e.field?function(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,o=n.value;return ee(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return ee(n,r,i,t)}))),re(e.name.value,n,r)}(e.field,e.variables):re(n,pi(e))),!1===t?n:n===qn(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),o=qn(i),s=t.store.getFieldValue(r,i),a=this.getFieldPolicy(e.typename,o,!1),u=a&&a.read;if(u){var c=bi(this,r,e,t,t.store.getStorage(X(r)?r.__ref:r,i));return dn.withValue(this.cache,u,[s,c])}return s}},e.prototype.getReadFunction=function(e,t){var r=this.getFieldPolicy(e,t,!1);return r&&r.read},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var o=r.field,s=r.typename,a=r.merge;return a===yi?_i(n.store)(e,t):a===vi?t:(n.overwrite&&(e=void 0),a(e,t,bi(this,void 0,{typename:s,fieldName:o.name.value,field:o,variables:n.variables},n,i||Object.create(null))))},e}();function bi(e,t,r,n,i){var o=e.getStoreFieldName(r),s=qn(o),a=r.variables||n.variables,u=n.store,c=u.toReference,l=u.canRead;return{args:pi(r),field:r.field||null,fieldName:s,storeFieldName:o,variables:a,isReference:X,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(gi(arguments,t,a),n)},mergeObjects:_i(n.store)}}function gi(e,t,r){var i,o,s,a=e[0],c=e[1],l=e.length;return"string"==typeof a?i={fieldName:a,from:l>1?c:t}:(i=(0,n.__assign)({},a),kn.call(i,"from")||(i.from=t)),__DEV__&&void 0===i.from&&__DEV__&&u.warn("Undefined 'from' passed to readField with arguments ".concat((o=Array.from(e),s=fr("stringifyForDisplay"),JSON.stringify(o,(function(e,t){return void 0===t?s:t})).split(JSON.stringify(s)).join("<undefined>")))),void 0===i.variables&&(i.variables=r),i}function _i(e){return function(t,r){if(Dt(t)||Dt(r))throw __DEV__?new a("Cannot automatically merge arrays"):new a(4);if(K(t)&&K(r)){var i=e.getFieldValue(t,"__typename"),o=e.getFieldValue(r,"__typename");if(i&&o&&i!==o)return r;if(X(t)&&Bn(r))return e.merge(t.__ref,r),t;if(Bn(t)&&X(r))return e.merge(t,r.__ref),r;if(Bn(t)&&Bn(r))return(0,n.__assign)((0,n.__assign)({},t),r)}return r}}function wi(e,t,r){var i="".concat(t).concat(r),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===r?e:(0,n.__assign)((0,n.__assign)({},e),{clientOnly:t,deferred:r})),o}var Oi=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,i=t.query,o=t.result,s=t.dataId,c=t.variables,l=t.overwrite,f=le(i),p=new Lt;c=(0,n.__assign)((0,n.__assign)({},ye(f)),c);var d=(0,n.__assign)((0,n.__assign)({store:e,written:Object.create(null),merge:function(e,t){return p.merge(e,t)},variables:c,varString:Jt(c)},Un(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:o||Object.create(null),dataId:s,selectionSet:f.selectionSet,mergeTree:{map:new Map},context:d});if(!X(h))throw __DEV__?new a("Could not identify object ".concat(JSON.stringify(o))):new a(7);return d.incomingById.forEach((function(t,n){var i=t.storeObject,o=t.mergeTree,s=t.fieldNodeSet,a=Z(n);if(o&&o.map.size){var c=r.applyMerges(o,a,i,d);if(X(c))return;i=c}if(__DEV__&&!d.overwrite){var l=Object.create(null);s.forEach((function(e){e.selectionSet&&(l[e.name.value]=!0)})),Object.keys(i).forEach((function(e){(function(e){return!0===l[qn(e)]})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,r,n){var i=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},o=i(e);if(o){var s=i(t);if(s&&!X(o)&&!Pt(o,s)&&!Object.keys(o).every((function(e){return void 0!==n.getFieldValue(s,e)}))){var a=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=qn(r),l="".concat(a,".").concat(c);if(!Pi.has(l)){Pi.add(l);var f=[];Dt(o)||Dt(s)||[o,s].forEach((function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||f.includes(t)||f.push(t)})),__DEV__&&u.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(a," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(s).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(a,i,e,d.store)}))}e.merge(n,i)})),e.retain(h.__ref),h},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,i=e.result,o=e.selectionSet,s=e.context,a=e.mergeTree,c=this.cache.policies,l=Object.create(null),f=r&&c.rootTypenamesById[r]||ae(i,o,s.fragmentMap)||r&&s.store.get(r,"__typename");"string"==typeof f&&(l.__typename=f);var p=function(){var e=gi(arguments,l,s.variables);if(X(e.from)){var t=s.incomingById.get(e.from.__ref);if(t){var r=c.readField((0,n.__assign)((0,n.__assign)({},e),{from:t.storeObject}),s);if(void 0!==r)return r}}return c.readField(e,s)},d=new Set;this.flattenFields(o,i,s,f).forEach((function(e,r){var n,o=se(r),s=i[o];if(d.add(r),void 0!==s){var h=c.getStoreFieldName({typename:f,fieldName:r.name.value,field:r,variables:e.variables}),y=Ei(a,h),v=t.processFieldValue(s,r,r.selectionSet?wi(e,!1,!1):e,y),m=void 0;r.selectionSet&&(X(v)||Bn(v))&&(m=p("__typename",v));var b=c.getMergeFunction(f,r.name.value,m);b?y.info={field:r,typename:f,merge:b}:ji(a,h),l=e.merge(l,((n={})[h]=v,n))}else!__DEV__||e.clientOnly||e.deferred||ar.added(r)||c.getReadFunction(f,r.name.value)||__DEV__&&u.error("Missing field '".concat(se(r),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))}));try{var h=c.identify(i,{typename:f,selectionSet:o,fragmentMap:s.fragmentMap,storeObject:l,readField:p}),y=h[0],v=h[1];r=r||y,v&&(l=s.merge(l,v))}catch(e){if(!r)throw e}if("string"==typeof r){var m=Z(r),b=s.written[r]||(s.written[r]=[]);if(b.indexOf(o)>=0)return m;if(b.push(o),this.reader&&this.reader.isFresh(i,m,o,s))return m;var g=s.incomingById.get(r);return g?(g.storeObject=s.merge(g.storeObject,l),g.mergeTree=Ii(g.mergeTree,a),d.forEach((function(e){return g.fieldNodeSet.add(e)}))):s.incomingById.set(r,{storeObject:l,mergeTree:Ti(a)?void 0:a,fieldNodeSet:d}),m}return l},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Dt(e)?e.map((function(e,o){var s=i.processFieldValue(e,t,r,Ei(n,o));return ji(n,o),s})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):__DEV__?wr(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=ae(t,e,r.fragmentMap));var i=new Map,o=this.cache.policies,s=new Ht(!1);return function e(u,c){var l=s.lookup(u,c.clientOnly,c.deferred);l.visited||(l.visited=!0,u.selections.forEach((function(s){if(ke(s,r.variables)){var u=c.clientOnly,l=c.deferred;if(u&&l||!Rt(s.directives)||s.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(u=!0),"defer"===t){var n=oe(e,r.variables);n&&!1===n.if||(l=!0)}})),ue(s)){var f=i.get(s);f&&(u=u&&f.clientOnly,l=l&&f.deferred),i.set(s,wi(r,u,l))}else{var p=J(s,r.lookupFragment);if(!p&&s.kind===Pe.FRAGMENT_SPREAD)throw __DEV__?new a("No fragment named ".concat(s.name.value)):new a(8);p&&o.fragmentMatches(p,n,t,r.variables)&&e(p.selectionSet,wi(r,u,l))}}})))}(e,r),i},e.prototype.applyMerges=function(e,t,r,i,o){var s,a=this;if(e.map.size&&!X(r)){var c,l=Dt(r)||!X(t)&&!Bn(t)?void 0:t,f=r;l&&!o&&(o=[X(l)?l.__ref:l]);var p=function(e,t){return Dt(e)?"number"==typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var r=p(l,t),n=p(f,t);if(void 0!==n){o&&o.push(t);var s=a.applyMerges(e,r,n,i,o);s!==n&&(c=c||new Map).set(t,s),o&&u(o.pop()===t)}})),c&&(r=Dt(f)?f.slice(0):(0,n.__assign)({},f),c.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,i,o&&(s=i.store).getStorage.apply(s,o)):r},e}(),Si=[];function Ei(e,t){var r=e.map;return r.has(t)||r.set(t,Si.pop()||{map:new Map}),r.get(t)}function Ii(e,t){if(e===t||!t||Ti(t))return e;if(!e||Ti(e))return t;var r=e.info&&t.info?(0,n.__assign)((0,n.__assign)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:r,map:i?new Map:e.map.size?e.map:t.map};if(i){var s=new Set(t.map.keys());e.map.forEach((function(e,r){o.map.set(r,Ii(e,t.map.get(r))),s.delete(r)})),s.forEach((function(r){o.map.set(r,Ii(t.map.get(r),e.map.get(r)))}))}return o}function Ti(e){return!e||!(e.info||e.map.size)}function ji(e,t){var r=e.map,n=r.get(t);n&&Ti(n)&&(Si.push(n),r.delete(t))}var Pi=new Set,xi=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=mn,r.txCount=0,r.config=function(e){return Sr(Cn,e)}(t),r.addTypename=!!r.config.addTypename,r.policies=new mi({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,n.__extends)(t,e),t.prototype.init=function(){var e=this.data=new Yn.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new Oi(this,this.storeReader=new ti({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:$n(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=pn((function(e,r){return t.broadcastWatch(e,r)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(Xn(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,Jt({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(e){if(e instanceof Nn)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(kn.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,r=this;return this.watches.size||yn(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){r.watches.delete(e)&&!r.watches.size&&vn(r),r.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Jt.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(X(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&u.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(kn.call(e,"id"))return!1;e=(0,n.__assign)((0,n.__assign)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),Jt.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),vn(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,i=e.update,o=e.optimistic,s=void 0===o||o,a=e.removeOptimistic,u=e.onWatchUpdated,c=function(e){var n=r,o=n.data,s=n.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=i(r)}finally{--r.txCount,r.data=o,r.optimisticData=s}},l=new Set;return u&&!this.txCount&&this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof s?this.optimisticData=this.optimisticData.addLayer(s,c):!1===s?c(this.data):c(),"string"==typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),u&&l.size?(this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e,t){var r=u.call(this,e,t);return!1!==r&&l.delete(e),r}})),l.size&&l.forEach((function(e){return r.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=ar(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,n,r))||r&&Pt(r.result,n.result)||e.callback(e.lastDiff=n,r)},t}(An),Ai=_e.empty,Ni=_e.from,Mi=_e.split,ki=_e.concat;function Di(e){var t=!1;return new Promise((function(r,n){e.subscribe({next:function(e){t?__DEV__&&u.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,r(e))},error:n})}))}function Ri(e){return new W((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function Ci(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const $i=/\r\n|[\n\r]/g;function Fi(e,t){let r=0,n=1;for(const i of e.body.matchAll($i)){if("number"==typeof i.index||Ci(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function qi(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?r:0,u=t.column+a,c=`${e.name}:${s}:${u}\n`,l=n.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,r=[];for(let e=0;e<f.length;e+=80)r.push(f.slice(e,e+80));return c+Li([[`${s} |`,r[0]],...r.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",r[e+1]]])}return c+Li([[s-1+" |",l[i-1]],[`${s} |`,f],["|","^".padStart(u)],[`${s+1} |`,l[i+1]]])}function Li(e){const t=e.filter((([e,t])=>void 0!==t)),r=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(r)+(t?" "+t:""))).join("\n")}class Bi extends Error{constructor(e,...t){var r,n,i;const{nodes:o,source:s,positions:a,path:u,originalError:c,extensions:l}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=u?u:void 0,this.originalError=null!=c?c:void 0,this.nodes=Ui(Array.isArray(o)?o:o?[o]:void 0);const f=Ui(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=s?s:null==f||null===(n=f[0])||void 0===n?void 0:n.source,this.positions=null!=a?a:null==f?void 0:f.map((e=>e.start)),this.locations=a&&s?a.map((e=>Fi(s,e))):null==f?void 0:f.map((e=>Fi(e.source,e.start)));const p="object"==typeof(d=null==c?void 0:c.extensions)&&null!==d?null==c?void 0:c.extensions:void 0;var d;this.extensions=null!==(i=null!=l?l:p)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Bi):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(e+="\n\n"+qi((t=r.loc).source,Fi(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+qi(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function Ui(e){return void 0===e||0===e.length?void 0:e}function Vi(e,t,r){return new Bi(`Syntax Error: ${r}`,{source:e,positions:[t]})}var zi,Qi,Yi;!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(zi||(zi={})),(Yi=Qi||(Qi={})).SOF="<SOF>",Yi.EOF="<EOF>",Yi.BANG="!",Yi.DOLLAR="$",Yi.AMP="&",Yi.PAREN_L="(",Yi.PAREN_R=")",Yi.SPREAD="...",Yi.COLON=":",Yi.EQUALS="=",Yi.AT="@",Yi.BRACKET_L="[",Yi.BRACKET_R="]",Yi.BRACE_L="{",Yi.PIPE="|",Yi.BRACE_R="}",Yi.NAME="Name",Yi.INT="Int",Yi.FLOAT="Float",Yi.STRING="String",Yi.BLOCK_STRING="BlockString",Yi.COMMENT="Comment";class Wi{constructor(e){const t=new Se(Qi.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Qi.EOF)do{if(e.next)e=e.next;else{const t=eo(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Qi.COMMENT);return e}}function Ki(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Hi(e,t){return Gi(e.charCodeAt(t))&&Ji(e.charCodeAt(t+1))}function Gi(e){return e>=55296&&e<=56319}function Ji(e){return e>=56320&&e<=57343}function Zi(e,t){const r=e.source.body.codePointAt(t);if(void 0===r)return Qi.EOF;if(r>=32&&r<=126){const e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Xi(e,t,r,n,i){const o=e.line,s=1+r-e.lineStart;return new Se(t,r,n,o,s,i)}function eo(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const t=r.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===r.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return to(e,i);case 33:return Xi(e,Qi.BANG,i,i+1);case 36:return Xi(e,Qi.DOLLAR,i,i+1);case 38:return Xi(e,Qi.AMP,i,i+1);case 40:return Xi(e,Qi.PAREN_L,i,i+1);case 41:return Xi(e,Qi.PAREN_R,i,i+1);case 46:if(46===r.charCodeAt(i+1)&&46===r.charCodeAt(i+2))return Xi(e,Qi.SPREAD,i,i+3);break;case 58:return Xi(e,Qi.COLON,i,i+1);case 61:return Xi(e,Qi.EQUALS,i,i+1);case 64:return Xi(e,Qi.AT,i,i+1);case 91:return Xi(e,Qi.BRACKET_L,i,i+1);case 93:return Xi(e,Qi.BRACKET_R,i,i+1);case 123:return Xi(e,Qi.BRACE_L,i,i+1);case 124:return Xi(e,Qi.PIPE,i,i+1);case 125:return Xi(e,Qi.BRACE_R,i,i+1);case 34:return 34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)?lo(e,i):io(e,i)}if(Ze(t)||45===t)return ro(e,i,t);if(et(t))return fo(e,i);throw Vi(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Ki(t)||Hi(r,i)?`Unexpected character: ${Zi(e,i)}.`:`Invalid character: ${Zi(e,i)}.`)}return Xi(e,Qi.EOF,n,n)}function to(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const e=r.charCodeAt(i);if(10===e||13===e)break;if(Ki(e))++i;else{if(!Hi(r,i))break;i+=2}}return Xi(e,Qi.COMMENT,t,i,r.slice(t+1,i))}function ro(e,t,r){const n=e.source.body;let i=t,o=r,s=!1;if(45===o&&(o=n.charCodeAt(++i)),48===o){if(o=n.charCodeAt(++i),Ze(o))throw Vi(e.source,i,`Invalid number, unexpected digit after 0: ${Zi(e,i)}.`)}else i=no(e,i,o),o=n.charCodeAt(i);if(46===o&&(s=!0,o=n.charCodeAt(++i),i=no(e,i,o),o=n.charCodeAt(i)),69!==o&&101!==o||(s=!0,o=n.charCodeAt(++i),43!==o&&45!==o||(o=n.charCodeAt(++i)),i=no(e,i,o),o=n.charCodeAt(i)),46===o||et(o))throw Vi(e.source,i,`Invalid number, expected digit but got: ${Zi(e,i)}.`);return Xi(e,s?Qi.FLOAT:Qi.INT,t,i,n.slice(t,i))}function no(e,t,r){if(!Ze(r))throw Vi(e.source,t,`Invalid number, expected digit but got: ${Zi(e,t)}.`);const n=e.source.body;let i=t+1;for(;Ze(n.charCodeAt(i));)++i;return i}function io(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,s="";for(;i<n;){const n=r.charCodeAt(i);if(34===n)return s+=r.slice(o,i),Xi(e,Qi.STRING,t,i+1,s);if(92!==n){if(10===n||13===n)break;if(Ki(n))++i;else{if(!Hi(r,i))throw Vi(e.source,i,`Invalid character within String: ${Zi(e,i)}.`);i+=2}}else{s+=r.slice(o,i);const t=117===r.charCodeAt(i+1)?123===r.charCodeAt(i+2)?oo(e,i):so(e,i):co(e,i);s+=t.value,i+=t.size,o=i}}throw Vi(e.source,i,"Unterminated string.")}function oo(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const e=r.charCodeAt(t+i++);if(125===e){if(i<5||!Ki(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|uo(e),n<0)break}throw Vi(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function so(e,t){const r=e.source.body,n=ao(r,t+2);if(Ki(n))return{value:String.fromCodePoint(n),size:6};if(Gi(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){const e=ao(r,t+8);if(Ji(e))return{value:String.fromCodePoint(n,e),size:12}}throw Vi(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function ao(e,t){return uo(e.charCodeAt(t))<<12|uo(e.charCodeAt(t+1))<<8|uo(e.charCodeAt(t+2))<<4|uo(e.charCodeAt(t+3))}function uo(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function co(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Vi(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function lo(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,s=o,a="";const u=[];for(;o<n;){const n=r.charCodeAt(o);if(34===n&&34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)){a+=r.slice(s,o),u.push(a);const n=Xi(e,Qi.BLOCK_STRING,t,o+3,tt(u).join("\n"));return e.line+=u.length-1,e.lineStart=i,n}if(92!==n||34!==r.charCodeAt(o+1)||34!==r.charCodeAt(o+2)||34!==r.charCodeAt(o+3))if(10!==n&&13!==n)if(Ki(n))++o;else{if(!Hi(r,o))throw Vi(e.source,o,`Invalid character within String: ${Zi(e,o)}.`);o+=2}else a+=r.slice(s,o),u.push(a),13===n&&10===r.charCodeAt(o+1)?o+=2:++o,a="",s=o,i=o;else a+=r.slice(s,o),s=o+1,o+=4}throw Vi(e.source,o,"Unterminated string.")}function fo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n&&(Xe(o=r.charCodeAt(i))||Ze(o)||95===o);)++i;var o;return Xi(e,Qi.NAME,t,i,r.slice(t,i))}class po{constructor(e,t={}){const r=function(e){return e instanceof T}(e)?e:new T(e);this._lexer=new Wi(r),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(Qi.NAME);return this.node(e,{kind:Pe.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Pe.DOCUMENT,definitions:this.many(Qi.SOF,this.parseDefinition,Qi.EOF)})}parseDefinition(){if(this.peek(Qi.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===Qi.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Vi(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Qi.BRACE_L))return this.node(e,{kind:Pe.OPERATION_DEFINITION,operation:je.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let r;return this.peek(Qi.NAME)&&(r=this.parseName()),this.node(e,{kind:Pe.OPERATION_DEFINITION,operation:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Qi.NAME);switch(e.value){case"query":return je.QUERY;case"mutation":return je.MUTATION;case"subscription":return je.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Qi.PAREN_L,this.parseVariableDefinition,Qi.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Pe.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Qi.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Qi.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Qi.DOLLAR),this.node(e,{kind:Pe.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Pe.SELECTION_SET,selections:this.many(Qi.BRACE_L,this.parseSelection,Qi.BRACE_R)})}parseSelection(){return this.peek(Qi.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let r,n;return this.expectOptionalToken(Qi.COLON)?(r=t,n=this.parseName()):n=t,this.node(e,{kind:Pe.FIELD,alias:r,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Qi.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Qi.PAREN_L,t,Qi.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,r=this.parseName();return this.expectToken(Qi.COLON),this.node(t,{kind:Pe.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Qi.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Qi.NAME)?this.node(e,{kind:Pe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Pe.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:Pe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:Pe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Qi.BRACKET_L:return this.parseList(e);case Qi.BRACE_L:return this.parseObject(e);case Qi.INT:return this.advanceLexer(),this.node(t,{kind:Pe.INT,value:t.value});case Qi.FLOAT:return this.advanceLexer(),this.node(t,{kind:Pe.FLOAT,value:t.value});case Qi.STRING:case Qi.BLOCK_STRING:return this.parseStringLiteral();case Qi.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:Pe.BOOLEAN,value:!0});case"false":return this.node(t,{kind:Pe.BOOLEAN,value:!1});case"null":return this.node(t,{kind:Pe.NULL});default:return this.node(t,{kind:Pe.ENUM,value:t.value})}case Qi.DOLLAR:if(e){if(this.expectToken(Qi.DOLLAR),this._lexer.token.kind===Qi.NAME){const e=this._lexer.token.value;throw Vi(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:Pe.STRING,value:e.value,block:e.kind===Qi.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:Pe.LIST,values:this.any(Qi.BRACKET_L,(()=>this.parseValueLiteral(e)),Qi.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:Pe.OBJECT,fields:this.any(Qi.BRACE_L,(()=>this.parseObjectField(e)),Qi.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,r=this.parseName();return this.expectToken(Qi.COLON),this.node(t,{kind:Pe.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Qi.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Qi.AT),this.node(t,{kind:Pe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Qi.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(Qi.BRACKET_R),t=this.node(e,{kind:Pe.LIST_TYPE,type:r})}else t=this.parseNamedType();return this.expectOptionalToken(Qi.BANG)?this.node(e,{kind:Pe.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:Pe.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Qi.STRING)||this.peek(Qi.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.many(Qi.BRACE_L,this.parseOperationTypeDefinition,Qi.BRACE_R);return this.node(e,{kind:Pe.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Qi.COLON);const r=this.parseNamedType();return this.node(e,{kind:Pe.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:Pe.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Pe.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Qi.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Qi.BRACE_L,this.parseFieldDefinition,Qi.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(Qi.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:Pe.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(Qi.PAREN_L,this.parseInputValueDef,Qi.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(Qi.COLON);const n=this.parseTypeReference();let i;this.expectOptionalToken(Qi.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:Pe.INPUT_VALUE_DEFINITION,description:t,name:r,type:n,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Pe.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:Pe.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(Qi.EQUALS)?this.delimitedMany(Qi.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:Pe.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(Qi.BRACE_L,this.parseEnumValueDefinition,Qi.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:Pe.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Vi(this._lexer.source,this._lexer.token.start,`${ho(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:Pe.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(Qi.BRACE_L,this.parseInputValueDef,Qi.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Qi.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),r=this.optionalMany(Qi.BRACE_L,this.parseOperationTypeDefinition,Qi.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Pe.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:Pe.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Pe.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Pe.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Pe.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Pe.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Pe.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Qi.AT);const r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Pe.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Qi.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(zi,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new Oe(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Vi(this._lexer.source,t.start,`Expected ${yo(e)}, found ${ho(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Qi.NAME||t.value!==e)throw Vi(this._lexer.source,t.start,`Expected "${e}", found ${ho(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Qi.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Vi(this._lexer.source,t.start,`Unexpected ${ho(t)}.`)}any(e,t,r){this.expectToken(e);const n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);const n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);const r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==Qi.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw Vi(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function ho(e){const t=e.value;return yo(e.kind)+(null!=t?` "${t}"`:"")}function yo(e){return function(e){return e===Qi.BANG||e===Qi.DOLLAR||e===Qi.AMP||e===Qi.PAREN_L||e===Qi.PAREN_R||e===Qi.SPREAD||e===Qi.COLON||e===Qi.EQUALS||e===Qi.AT||e===Qi.BRACKET_L||e===Qi.BRACKET_R||e===Qi.BRACE_L||e===Qi.PIPE||e===Qi.BRACE_R}(e)?`"${e}"`:e}var vo=new Map,mo=new Map,bo=!0,go=!1;function _o(e){return e.replace(/[\s,]+/g," ").trim()}function wo(e){var t,r,i,o=_o(e);if(!vo.has(o)){var s=function(e,t){return new po(e,t).parseDocument()}(e,{experimentalFragmentVariables:go,allowLegacyFragmentVariables:go});if(!s||"Document"!==s.kind)throw new Error("Not a valid GraphQL document.");vo.set(o,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}((t=s,r=new Set,i=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,n=_o((s=e.loc).source.body.substring(s.start,s.end)),o=mo.get(t);o&&!o.has(n)?bo&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||mo.set(t,o=new Set),o.add(n),r.has(n)||(r.add(n),i.push(e))}else i.push(e);var s})),(0,n.__assign)((0,n.__assign)({},t),{definitions:i}))))}return vo.get(o)}function Oo(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),wo(n)}function So(){vo.clear(),mo.clear()}function Eo(){bo=!1}function Io(){go=!0}function To(){go=!1}var jo,Po=Oo,xo=So,Ao=Eo,No=Io,Mo=To;(jo=Oo||(Oo={})).gql=Po,jo.resetCaches=xo,jo.disableFragmentWarnings=Ao,jo.enableExperimentalFragmentVariables=No,jo.disableExperimentalFragmentVariables=Mo,Oo.default=Oo,p(m?"log":"silent")},1143:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},1512:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.GraphQLClient=e.Squid=e.QueryBuilder=e.Changes=e.JoinQueryBuilder=e.DocumentReference=e.CollectionReference=void 0;var t=r(5660);Object.defineProperty(e,"CollectionReference",{enumerable:!0,get:function(){return t.CollectionReference}});var i=r(4516);Object.defineProperty(e,"DocumentReference",{enumerable:!0,get:function(){return i.DocumentReference}});var o=r(9732);Object.defineProperty(e,"JoinQueryBuilder",{enumerable:!0,get:function(){return o.JoinQueryBuilder}});var s=r(6891);Object.defineProperty(e,"Changes",{enumerable:!0,get:function(){return s.Changes}}),Object.defineProperty(e,"QueryBuilder",{enumerable:!0,get:function(){return s.QueryBuilder}});var a=r(5395);Object.defineProperty(e,"Squid",{enumerable:!0,get:function(){return a.Squid}});var u=r(5857);Object.defineProperty(e,"GraphQLClient",{enumerable:!0,get:function(){return u.GraphQLClient}})})();var i=exports;for(var o in n)i[o]=n[o];n.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();