neo4j-driver 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jest.browser.config.ts +3 -2
- package/jest.config.ts +8 -142
- package/lib/browser/neo4j-web.esm.js +4700 -4051
- package/lib/browser/neo4j-web.esm.min.js +1 -1
- package/lib/browser/neo4j-web.js +4700 -4051
- package/lib/browser/neo4j-web.min.js +1 -1
- package/lib/docs.js +1 -1
- package/lib/driver.js +3 -2
- package/lib/index.js +7 -5
- package/lib/version.js +1 -1
- package/package.json +44 -51
- package/types/index.d.ts +16 -5
- package/.v8flags-2-10.2.154.26-node.28.d41d8cd98f00b204e9800998ecf8427e.json +0 -1
- package/jest.integration.config.ts +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).neo4j=t()}(this,function(){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L={},U={},e={},t={},F={},n={},B=(Object.defineProperty(n,"__esModule",{value:!0}),n.createBrokenObject=function(r,e){void 0===e&&(e={});function n(){throw r}return new Proxy(e,{get:function(e,t){return t===B||(t===V?r:void("toJSON"!==t&&n()))},set:n,apply:n,construct:n,defineProperty:n,deleteProperty:n,getOwnPropertyDescriptor:n,getPrototypeOf:n,has:n,isExtensible:n,ownKeys:n,preventExtensions:n,setPrototypeOf:n})},n.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[B]},n.getBrokenObjectReason=function(e){return e[V]},"__isBrokenObject__"),V="__reason__";Object.defineProperty(F,"__esModule",{value:!0}),F.stringify=function(e,t){return JSON.stringify(e,function(e,r){return(0,q.isBrokenObject)(r)?{__isBrokenObject__:!0,__reason__:(0,q.getBrokenObjectReason)(r)}:"bigint"==typeof r?"".concat(r,"n"):!0!==(null==t?void 0:t.sortedElements)||"object"!=typeof r||Array.isArray(r)?!0!==(null==t?void 0:t.useCustomToString)||"object"!=typeof r||Array.isArray(r)||"function"!=typeof r.toString||r.toString===Object.prototype.toString?r:null==r?void 0:r.toString():Object.keys(r).sort().reduce(function(e,t){return e[t]=r[t],e},{})})};var q=n;var W,z,H,G={},o=(o=G,Object.defineProperty(o,"__esModule",{value:!0}),o.rawPolyfilledDiagnosticRecord=void 0,o.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(o.rawPolyfilledDiagnosticRecord),r&&r.__extends||(W=function(e,t){return(W=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])})(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}W(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Y=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),K=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=r&&r.__importStar||(z=function(e){return(z=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=z(e),n=0;n<r.length;n++)"default"!==r[n]&&Y(t,e,r[n]);return K(t,e),t}),Z=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.GQLError=t.Neo4jError=t.isRetryableError=t.isRetriableError=void 0,t.newError=function(e,t,r,n,o,i){return new oe(e,null!=t?t:ee,null!=n?n:"50N42",null!=o?o:"error: general processing exception - unexpected error. "+e,null!=i?i:Q.rawPolyfilledDiagnosticRecord,r)},t.newGQLError=function(e,t,r,n,o){return new te(e,null!=r?r:"50N42",null!=n?n:"error: general processing exception - unexpected error. "+e,null!=o?o:Q.rawPolyfilledDiagnosticRecord,t)},i(F)),Q=G,i={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"},X=(Object.freeze(i),Object.values(i)),J="ServiceUnavailable",$=(t.SERVICE_UNAVAILABLE=J,"SessionExpired"),ee=(t.SESSION_EXPIRED=$,t.PROTOCOL_ERROR="ProtocolError","N/A"),te=(H=Error,o(re,H),re.prototype.containsGqlCause=function(e){return void 0!==this.findByGqlStatus(e)},re.prototype.findByGqlStatus=function(e){return this.gqlStatus===e?this:void 0!==this.cause&&(this.cause instanceof re||this.cause instanceof oe)?this.cause.findByGqlStatus(e):void 0},Object.defineProperty(re.prototype,"diagnosticRecordAsJsonString",{get:function(){return Z.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),re);function re(e,t,r,n,o){e=H.call(this,e,null!=o?{cause:o}:void 0)||this;return e.constructor=re,e.__proto__=re.prototype,e.cause=null!=o?o:void 0,e.gqlStatus=t,e.gqlStatusDescription=r,e.diagnosticRecord=n,e.classification=void 0!==(o=e.diagnosticRecord)&&void 0!==o._classification&&X.includes(o._classification)?null==o?void 0:o._classification:"UNKNOWN",e.rawClassification=null!=(t=null==n?void 0:n._classification)?t:void 0,e.name="GQLError",e}t.GQLError=te;o(ie,ne=te),ie.isRetriable=function(e){return this.isRetryable(e)},ie.isRetryable=function(e){return null!=e&&e instanceof ie&&e.retryable};var ne,oe=ie;function ie(e,t,r,n,o,i){e=ne.call(this,e,r,n,o,i)||this,e.constructor=ie,e.__proto__=ie.prototype,e.code=t,e.name="Neo4jError",n=(r=t)===J||r===$||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r);return e.retriable=n,e.retryable=n,e}i=(t.Neo4jError=oe).isRetriable,t.isRetriableError=i,o=oe.isRetryable;t.isRetryableError=o;var i={},ue=(Object.defineProperty(i,"__esModule",{value:!0}),i.toString=i.toNumber=i.inSafeRange=i.isInt=i.int=void 0,t),ae=new Map,o=(d.prototype.inSafeRange=function(){return this.greaterThanOrEqual(d.MIN_SAFE_VALUE)&&this.lessThanOrEqual(d.MAX_SAFE_VALUE)},d.prototype.toInt=function(){return this.low},d.prototype.toNumber=function(){return this.high*ye+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(ye)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(ye)+BigInt(e.low>>>0)))},d.prototype.toNumberOrInfinity=function(){return this.lessThan(d.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(d.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},d.prototype.toString=function(e){if((e=null!=e?e:10)<2||36<e)throw RangeError("radix out of range: "+e.toString());if(this.isZero())return"0";var t,r,n;if(this.isNegative())return this.equals(d.MIN_VALUE)?(t=d.fromNumber(e),n=(r=this.div(t)).multiply(t).subtract(this),r.toString(e)+n.toInt().toString(e)):"-"+this.negate().toString(e);for(var o=d.fromNumber(Math.pow(e,6)),i=(n=this,"");;){var u=n.div(o),a=(n.subtract(u.multiply(o)).toInt()>>>0).toString(e);if((n=u).isZero())return a+i;for(;a.length<6;)a="0"+a;i=""+a+i}},d.prototype.valueOf=function(){return this.toBigInt()},d.prototype.getHighBits=function(){return this.high},d.prototype.getLowBits=function(){return this.low},d.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(d.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,t=0,t=31;0<t&&0==(e&1<<t);t--);return 0!==this.high?t+33:t+1},d.prototype.isZero=function(){return 0===this.high&&0===this.low},d.prototype.isNegative=function(){return this.high<0},d.prototype.isPositive=function(){return 0<=this.high},d.prototype.isOdd=function(){return 1==(1&this.low)},d.prototype.isEven=function(){return 0==(1&this.low)},d.prototype.equals=function(e){e=d.fromValue(e);return this.high===e.high&&this.low===e.low},d.prototype.notEquals=function(e){return!this.equals(e)},d.prototype.lessThan=function(e){return this.compare(e)<0},d.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},d.prototype.greaterThan=function(e){return 0<this.compare(e)},d.prototype.greaterThanOrEqual=function(e){return 0<=this.compare(e)},d.prototype.compare=function(e){e=d.fromValue(e);if(this.equals(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r||(t||!r)&&this.subtract(e).isNegative()?-1:1},d.prototype.negate=function(){return this.equals(d.MIN_VALUE)?d.MIN_VALUE:this.not().add(d.ONE)},d.prototype.add=function(e){var e=d.fromValue(e),t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,s=0,c=0,l=0,f=0;return c+=(l=l+((f+=o+(65535&e.low))>>>16)+(n+a))>>>16,d.fromBits((l&=65535)<<16|(f&=65535),((s+=(c+=r+u)>>>16)+(t+i)&65535)<<16|(c&=65535))},d.prototype.subtract=function(e){e=d.fromValue(e);return this.add(e.negate())},d.prototype.multiply=function(e){if(this.isZero())return d.ZERO;e=d.fromValue(e);if(e.isZero())return d.ZERO;if(this.equals(d.MIN_VALUE))return e.isOdd()?d.MIN_VALUE:d.ZERO;if(e.equals(d.MIN_VALUE))return this.isOdd()?d.MIN_VALUE:d.ZERO;if(this.isNegative())return e.isNegative()?this.negate().multiply(e.negate()):this.negate().multiply(e).negate();if(e.isNegative())return this.multiply(e.negate()).negate();if(this.lessThan(ve)&&e.lessThan(ve))return d.fromNumber(this.toNumber()*e.toNumber());var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,e=65535&e.low,s=0,c=0,l=0,f=(f=0)+((c=c+((l+=o*e)>>>16)+n*e)>>>16)+((c=(c&65535)+o*a)>>>16);return d.fromBits((c&=65535)<<16|(l&=65535),((s+=(f+=r*e)>>>16)+((f=(f&65535)+n*a)>>>16)+((f=(f&65535)+o*u)>>>16)+(t*e+r*a+n*u+o*i)&65535)<<16|(f&=65535))},d.prototype.div=function(e){var t,r,n,o=d.fromValue(e);if(o.isZero())throw(0,ue.newError)("division by zero");if(this.isZero())return d.ZERO;{if(this.equals(d.MIN_VALUE))return o.equals(d.ONE)||o.equals(d.NEG_ONE)?d.MIN_VALUE:o.equals(d.MIN_VALUE)?d.ONE:(n=this.shiftRight(1).div(o).shiftLeft(1)).equals(d.ZERO)?o.isNegative()?d.ONE:d.NEG_ONE:(t=this.subtract(o.multiply(n)),n.add(t.div(o)));if(o.equals(d.MIN_VALUE))return d.ZERO}if(this.isNegative())return o.isNegative()?this.negate().div(o.negate()):this.negate().div(o).negate();if(o.isNegative())return this.div(o.negate()).negate();for(r=d.ZERO,t=this;t.greaterThanOrEqual(o);){n=Math.max(1,Math.floor(t.toNumber()/o.toNumber()));for(var i=Math.ceil(Math.log(n)/Math.LN2),u=i<=48?1:Math.pow(2,i-48),a=d.fromNumber(n),s=a.multiply(o);s.isNegative()||s.greaterThan(t);)s=(a=d.fromNumber(n-=u)).multiply(o);a.isZero()&&(a=d.ONE),r=r.add(a),t=t.subtract(s)}return r},d.prototype.modulo=function(e){e=d.fromValue(e);return this.subtract(this.div(e).multiply(e))},d.prototype.not=function(){return d.fromBits(~this.low,~this.high)},d.prototype.and=function(e){e=d.fromValue(e);return d.fromBits(this.low&e.low,this.high&e.high)},d.prototype.or=function(e){e=d.fromValue(e);return d.fromBits(this.low|e.low,this.high|e.high)},d.prototype.xor=function(e){e=d.fromValue(e);return d.fromBits(this.low^e.low,this.high^e.high)},d.prototype.shiftLeft=function(e){e=d.toNumber(e);return 0==(e&=63)?d.ZERO:e<32?d.fromBits(this.low<<e,this.high<<e|this.low>>>32-e):d.fromBits(0,this.low<<e-32)},d.prototype.shiftRight=function(e){var t=d.toNumber(e),e=d.toNumber(e);return 0==(t&=63)?d.ZERO:e<32?d.fromBits(this.low>>>t|this.high<<32-t,this.high>>t):d.fromBits(this.high>>t-32,0<=this.high?0:-1)},d.isInteger=function(e){return!0===(null==e?void 0:e.__isInteger__)},d.fromInt=function(e){if(-128<=(e|=0)&&e<128&&null!=(t=ae.get(e)))return t;var t=new d(e,e<0?-1:0);return-128<=e&&e<128&&ae.set(e,t),t},d.fromBits=function(e,t){return new d(e,t)},d.fromNumber=function(e){return isNaN(e)||!isFinite(e)?d.ZERO:e<=-_e?d.MIN_VALUE:_e<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%ye|0,e/ye|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,ue.newError)("number format error: empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return d.ZERO;if((t=null!=t?t:10)<2||36<t)throw(0,ue.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,ue.newError)('number format error: interior "-" character: '+e);if(0===r)return d.fromString(e.substring(1),t).negate();for(var o,i,u=d.fromNumber(Math.pow(t,8)),a=d.ZERO,s=0;s<e.length;s+=8){var c,l=Math.min(8,e.length-s),f=e.substring(s,s+l),p=parseInt(f,t);if(!0===n&&(o=f,c=p,i=t,Number.isNaN(o)||Number.isNaN(c)||function(e,t,r){e=e.toString(t),t=Math.max(r-e.length,0),r="0".repeat(t);return"".concat(r).concat(e)}(c,i,o.length)!==o.toLowerCase()))throw(0,ue.newError)('number format error: "'.concat(f,'" is NaN in radix ').concat(t,": ").concat(e));a=l<8?(c=d.fromNumber(Math.pow(t,l)),a.multiply(c).add(d.fromNumber(p))):(a=a.multiply(u)).add(d.fromNumber(p))}return a},d.fromValue=function(e,t){return void 0===t&&(t={}),e instanceof d?e:"number"==typeof e?(!0===t.ceilFloat&&(e=Math.ceil(e)),d.fromNumber(e)):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(o.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var se,a,ce,le,fe,s,pe,de,he,be,ye=4294967296,_e=ye*ye/2,ve=o.fromInt(1<<24),u=o.fromValue,u=(i.int=u,o.isInteger),u=(i.isInt=u,o.inSafeRange),u=(i.inSafeRange=u,o.toNumber),u=(i.toNumber=u,o.toString),u=(i.toString=u,i.default=o,{}),o={},c={},me=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ge=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=r&&r.__importStar||(se=function(e){return(se=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=se(e),n=0;n<r.length;n++)"default"!==r[n]&&me(t,e,r[n]);return ge(t,e),t}),Oe=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},we=(Object.defineProperty(c,"__esModule",{value:!0}),c.ENCRYPTION_OFF=c.ENCRYPTION_ON=void 0,c.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!Pe(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},c.isObject=Pe,c.isString=Se,c.assertObject=function(e,t){if(Pe(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,Ee.stringify)(e))},c.assertString=Te,c.assertNumber=function(e,t){if("number"==typeof e)return e;throw new TypeError(t+" expected to be a number but was: "+(0,Ee.stringify)(e))},c.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,we.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,Ee.stringify)(e))},c.assertValidDate=function(e,t){if("[object Date]"!==Object.prototype.toString.call(e))throw new TypeError(t+" expected to be a standard JavaScript Date but was: "+(0,Ee.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,Ee.stringify)(e));return e},c.toNumber=function(e){return e instanceof we.default?e.toNumber():"bigint"==typeof e?(0,we.int)(e).toNumber():e},c.validateQueryAndParameters=function(e,t,r){var n="",t=null!=t?t:{},r=null!=(r=null==r?void 0:r.skipAsserts)&&r;"string"==typeof e?n=e:e instanceof String?n=e.toString():"object"==typeof e&&null!=e.text&&(n=e.text,t=null!=(e=e.parameters)?e:{});r||(function(e){if(Te(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.")}(n),function(e){{var t;if(!Pe(e))throw t=null!=e.constructor?" "+e.constructor.name:"",new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(t," ").concat(JSON.stringify(e)))}}(t));return{validatedQuery:n,params:t}},c.equals=function e(t,r){var n,o;if(t===r)return!0;if(null===t||null===r)return!1;if("object"==typeof t&&"object"==typeof r){var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;try{for(var a=Oe(i),s=a.next();!s.done;s=a.next()){var c=s.value;if(!e(t[c],r[c]))return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return!0}return!1},l(i)),Ee=F;c.ENCRYPTION_ON="ENCRYPTION_ON";function Pe(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function Te(e,t){if(Se(e))return e;throw new TypeError((0,Ee.stringify)(t)+" expected to be string but was: "+(0,Ee.stringify)(e))}function Se(e){return"[object String]"===Object.prototype.toString.call(e)}function je(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,s.int)(e),this._maxInteger=(0,s.int)(t)}function Ce(e){return(0,s.int)(e).div(12)}function Ie(e){return(0,s.int)(e).modulo(12)}function Re(e,t){return(0,s.int)(t).greaterThan(0)&&(0,s.int)(e).lessThan(0)&&(e=(0,s.int)(e).add(1)),(0,s.int)(e).div(a.SECONDS_PER_HOUR)}function Ae(e,t){(0,s.int)(t).greaterThan(0)&&(0,s.int)(e).lessThan(0)&&(e=(0,s.int)(e).add(1));t=(0,s.int)(e).div(a.SECONDS_PER_MINUTE),e=t.isNegative();return De(t=e?t.negate():t,a.MINUTES_PER_HOUR).multiply(e?-1:1)}function ke(e,t,r){e=(0,s.int)(e),t=(0,s.int)(t),r=(0,s.int)(r);var n=e.multiply(365);return n=(n=(n=e.greaterThanOrEqual(0)?n.add(e.add(3).div(4).subtract(e.add(99).div(100)).add(e.add(399).div(400))):n.subtract(e.div(-4).subtract(e.div(-100)).add(e.div(-400)))).add(t.multiply(367).subtract(362).div(12))).add(r.subtract(1)),t.greaterThan(2)&&(n=n.subtract(1),function(e){if((e=(0,s.int)(e)).modulo(4).equals(0))return!e.modulo(100).equals(0)||!!e.modulo(400).equals(0)}(e)||(n=n.subtract(1))),n.subtract(a.DAYS_0000_TO_1970)}function Me(e,t){return 1===e?t%400==0||t%4==0&&t%100!=0?29:28:[0,2,4,6,7,9,11].includes(e)?31:30}function Ne(e,t,r){if((0,de.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,pe.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function xe(e,t){e=(0,s.int)(e),t=(0,s.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function De(e,t){return e=(0,s.int)(e),t=(0,s.int)(t),e.subtract(xe(e,t).multiply(t))}function Le(e){return(e=(0,s.int)(e)).equals(0)?"":"."+Ue(e,9)}function Ue(e,t,r){var n=(e=(0,s.int)(e)).isNegative(),o=(e=n?e.negate():e).toString();if(null!=t)for(;o.length<t;)o="0"+o;return n?"-"+o:!0===(null==r?void 0:r.usePositiveSign)?"+"+o:o}c.ENCRYPTION_OFF="ENCRYPTION_OFF",a=o,le=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),fe=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=r&&r.__importStar||(ce=function(e){return(ce=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=ce(e),n=0;n<r.length;n++)"default"!==r[n]&&le(t,e,r[n]);return fe(t,e),t}),Object.defineProperty(a,"__esModule",{value:!0}),a.SECONDS_PER_DAY=a.DAYS_PER_400_YEAR_CYCLE=a.DAYS_0000_TO_1970=a.NANOS_PER_HOUR=a.NANOS_PER_MINUTE=a.NANOS_PER_MILLISECOND=a.NANOS_PER_SECOND=a.SECONDS_PER_HOUR=a.SECONDS_PER_MINUTE=a.MINUTES_PER_HOUR=a.NANOSECOND_OF_SECOND_RANGE=a.SECOND_OF_MINUTE_RANGE=a.MINUTE_OF_HOUR_RANGE=a.HOUR_OF_DAY_RANGE=a.DAY_OF_MONTH_RANGE=a.MONTH_OF_YEAR_RANGE=a.YEAR_RANGE=void 0,a.normalizeYearsForDuration=Ce,a.normalizeMonthsForDuration=Ie,a.normalizeHoursForDuration=Re,a.normalizeMinutesForDuration=Ae,a.normalizeSecondsForDuration=function(e,t){return(0,s.int)(e).add(xe(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return De(e,a.NANOS_PER_SECOND)},a.localTimeToNanoOfDay=function(e,t,r,n){e=(0,s.int)(e),t=(0,s.int)(t),r=(0,s.int)(r),n=(0,s.int)(n);e=e.multiply(a.NANOS_PER_HOUR);return(e=(e=e.add(t.multiply(a.NANOS_PER_MINUTE))).add(r.multiply(a.NANOS_PER_SECOND))).add(n)},a.localDateTimeToEpochSecond=function(e,t,r,n,o,i,u){e=ke(e,t,r),t=function(e,t,r){e=(0,s.int)(e),t=(0,s.int)(t),r=(0,s.int)(r);e=e.multiply(a.SECONDS_PER_HOUR);return(e=e.add(t.multiply(a.SECONDS_PER_MINUTE))).add(r)}(n,o,i);return e.multiply(a.SECONDS_PER_DAY).add(t)},a.dateToEpochDay=ke,a.durationToIsoString=function(e,t,r,n){if((0,s.int)(e).equals(0)&&(0,s.int)(t).equals(0)&&(0,s.int)(r).equals(0)&&(0,s.int)(n).equals(0))return"PT0S";var o=Ue(Ce(e)),e=Ue(Ie(e)),t=Ue(t),i=Ue(Re(r,n)),u=Ue(Ae(r,n)),r=function(e,t){e=(0,s.int)(e),t=(0,s.int)(t);var r,n=e.isNegative(),o=t.greaterThan(0);e=n&&o?(e=e.add(1).negate().modulo(60).negate(),e.equals(0)?"-0":e.toString()):e.modulo(60).toString();o&&(r=Le((n?t.negate().add(2*a.NANOS_PER_SECOND):t.add(a.NANOS_PER_SECOND)).modulo(a.NANOS_PER_SECOND)));return null!=r?e+r:e}(r,n);return"P".concat("0"!==o?o+"Y":"")+"".concat("0"!==e?e+"M":"")+"".concat("0"!==t?t+"D":"","T")+"".concat("0"!==i?i+"H":"")+"".concat("0"!==u?u+"M":"")+"".concat("0"!==r?r+"S":"")},a.timeToIsoString=function(e,t,r,n){e=Ue(e,2),t=Ue(t,2),r=Ue(r,2),n=Le(n);return"".concat(e,":").concat(t,":").concat(r).concat(n)},a.timeZoneOffsetToIsoString=function(e){if((e=(0,s.int)(e)).equals(0))return"Z";var t=e.isNegative();t&&(e=e.multiply(-1));var t=t?"-":"+",r=Ue(e.div(a.SECONDS_PER_HOUR),2),n=Ue(e.div(a.SECONDS_PER_MINUTE).modulo(a.MINUTES_PER_HOUR),2),e=e.modulo(a.SECONDS_PER_MINUTE),e=e.equals(0)?null:Ue(e,2);return null!=e?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},a.dateToIsoString=function(e,t,r){e=function(e){e=(0,s.int)(e);if(e.isNegative()||e.greaterThan(9999))return Ue(e,6,{usePositiveSign:!0});return Ue(e,4)}(e),t=Ue(t,2),r=Ue(r,2);return"".concat(e,"-").concat(t,"-").concat(r)},a.isoStringToStandardDate=function(e){return new Date(e)},a.toStandardDate=function(e){return new Date(e)},a.newDate=function(e){return new Date(e)},a.totalNanoseconds=function(e,t){t=null!=t?t:0;e=e.getMilliseconds()*a.NANOS_PER_MILLISECOND;return function(e,t){{if(e instanceof s.default)return e.add(t);if("bigint"==typeof e)return e+BigInt(t)}return e+t}(t,e)},a.timeZoneOffsetInSeconds=function(e){var t=e.getSeconds()-e.getUTCSeconds(),r=e.getMinutes()-e.getUTCMinutes(),n=e.getHours()-e.getUTCHours(),e=function(e){return e.getMonth()===e.getUTCMonth()?e.getDate()-e.getUTCDate():e.getFullYear()>e.getUTCFullYear()||e.getMonth()>e.getUTCMonth()&&e.getFullYear()===e.getUTCFullYear()?e.getDate()+Me(e.getUTCMonth(),e.getUTCFullYear())-e.getUTCDate():e.getDate()-(e.getUTCDate()+Me(e.getMonth(),e.getFullYear()))}(e);return n*a.SECONDS_PER_HOUR+r*a.SECONDS_PER_MINUTE+t+e*a.SECONDS_PER_DAY},a.assertValidYear=function(e){return Ne(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return Ne(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return Ne(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return Ne(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return Ne(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return Ne(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return Ne(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},a.assertValidZoneId=function(t,r){var e=he.get(r);if(!0!==e){if(!1===e)throw be(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),he.set(r,!0)}catch(e){throw he.set(r,!1),be(r,t)}}},a.floorDiv=xe,a.floorMod=De,s=l(i),pe=t,de=c,je.prototype.contains=function(e){var t;return(0,s.isInt)(e)&&e instanceof s.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,s.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},je.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},l=je,a.YEAR_RANGE=new l(-999999999,999999999),a.MONTH_OF_YEAR_RANGE=new l(1,12),a.DAY_OF_MONTH_RANGE=new l(1,31),a.HOUR_OF_DAY_RANGE=new l(0,23),a.MINUTE_OF_HOUR_RANGE=new l(0,59),a.SECOND_OF_MINUTE_RANGE=new l(0,59),a.NANOSECOND_OF_SECOND_RANGE=new l(0,999999999),a.MINUTES_PER_HOUR=60,a.SECONDS_PER_MINUTE=60,a.SECONDS_PER_HOUR=a.SECONDS_PER_MINUTE*a.MINUTES_PER_HOUR,a.NANOS_PER_SECOND=1e9,a.NANOS_PER_MILLISECOND=1e6,a.NANOS_PER_MINUTE=a.NANOS_PER_SECOND*a.SECONDS_PER_MINUTE,a.NANOS_PER_HOUR=a.NANOS_PER_MINUTE*a.MINUTES_PER_HOUR,a.DAYS_0000_TO_1970=719528,a.DAYS_PER_400_YEAR_CYCLE=146097,a.SECONDS_PER_DAY=86400,he=new Map,be=function(e,t){return(0,pe.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))};var Fe,Be=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Ve=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=r&&r.__importStar||(Fe=function(e){return(Fe=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Fe(e),n=0;n<r.length;n++)"default"!==r[n]&&Be(t,e,r[n]);return Ve(t,e),t}),qe=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},f=(Object.defineProperty(u,"__esModule",{value:!0}),u.DateTime=u.LocalDateTime=u.Date=u.Time=u.LocalTime=u.Duration=void 0,u.isDuration=function(e){return ot(e,Ge)},u.isLocalTime=function(e){return ot(e,Ye)},u.isTime=function(e){return ot(e,Ke)},u.isDate=function(e){return ot(e,Ze)},u.isLocalDateTime=function(e){return ot(e,Qe)},u.isDateTime=function(e){return ot(e,Xe)},l(o)),We=c,ze=t,He=l(i),l={value:!0,enumerable:!1,configurable:!1,writable:!1},Ge="__isDuration__",Ye="__isLocalTime__",Ke="__isTime__",Ze="__isDate__",Qe="__isLocalDateTime__",Xe="__isDateTime__",p=(Je.prototype.toString=function(){return f.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},Je);function Je(e,t,r,n){this.months=(0,We.assertNumberOrInteger)(e,"Months"),this.days=(0,We.assertNumberOrInteger)(t,"Days"),(0,We.assertNumberOrInteger)(r,"Seconds"),(0,We.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=f.normalizeSecondsForDuration(r,n),"number"==typeof r&&(0,He.isInt)(this.seconds)&&(this.seconds=this.seconds.toNumber()),"bigint"==typeof r&&(0,He.isInt)(this.seconds)&&(this.seconds=this.seconds.toBigInt()),this.nanoseconds=f.normalizeNanosecondsForDuration(n),"number"==typeof n&&(0,He.isInt)(this.nanoseconds)&&(this.nanoseconds=this.nanoseconds.toNumber()),"bigint"==typeof n&&(0,He.isInt)(this.nanoseconds)&&(this.nanoseconds=this.nanoseconds.toBigInt()),Object.freeze(this)}u.Duration=p,Object.defineProperty(p.prototype,Ge,l);$e.fromStandardDate=function(e,t){ut(e,t);t=f.totalNanoseconds(e,t);return new $e(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof He.default?t.toInt():"bigint"==typeof t?(0,He.int)(t).toInt():t)},$e.prototype.toString=function(){return f.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};p=$e;function $e(e,t,r,n){this.hour=f.assertValidHour(e),this.minute=f.assertValidMinute(t),this.second=f.assertValidSecond(r),this.nanosecond=f.assertValidNanosecond(n),Object.freeze(this)}u.LocalTime=p,Object.defineProperty(p.prototype,Ye,l);et.fromStandardDate=function(e,t){return ut(e,t),new et(e.getHours(),e.getMinutes(),e.getSeconds(),(0,He.toNumber)(f.totalNanoseconds(e,t)),f.timeZoneOffsetInSeconds(e))},et.prototype.toString=function(){return f.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+f.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};p=et;function et(e,t,r,n,o){this.hour=f.assertValidHour(e),this.minute=f.assertValidMinute(t),this.second=f.assertValidSecond(r),this.nanosecond=f.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,We.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}u.Time=p,Object.defineProperty(p.prototype,Ke,l);tt.fromStandardDate=function(e){return this.fromStandardDateLocal(e)},tt.fromStandardDateLocal=function(e){return ut(e),new tt(e.getFullYear(),e.getMonth()+1,e.getDate())},tt.fromStandardDateUTC=function(e){return ut(e),new tt(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate())},tt.prototype.toStandardDate=function(){return f.isoStringToStandardDate(this.toString())},tt.prototype.toString=function(){return f.dateToIsoString(this.year,this.month,this.day)};p=tt;function tt(e,t,r){this.year=f.assertValidYear(e),this.month=f.assertValidMonth(t),this.day=f.assertValidDay(r),Object.freeze(this)}u.Date=p,Object.defineProperty(p.prototype,Ze,l);rt.fromStandardDate=function(e,t){return ut(e,t),new rt(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,He.toNumber)(f.totalNanoseconds(e,t)))},rt.prototype.toStandardDate=function(){return f.isoStringToStandardDate(this.toString())},rt.prototype.toString=function(){return it(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};p=rt;function rt(e,t,r,n,o,i,u){this.year=f.assertValidYear(e),this.month=f.assertValidMonth(t),this.day=f.assertValidDay(r),this.hour=f.assertValidHour(n),this.minute=f.assertValidMinute(o),this.second=f.assertValidSecond(i),this.nanosecond=f.assertValidNanosecond(u),Object.freeze(this)}u.LocalDateTime=p,Object.defineProperty(p.prototype,Qe,l);nt.fromStandardDate=function(e,t){return ut(e,t),new nt(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,He.toNumber)(f.totalNanoseconds(e,t)),f.timeZoneOffsetInSeconds(e),null)},nt.prototype.toStandardDate=function(){return f.toStandardDate(this._toUTC())},nt.prototype.toString=function(){var e;return it(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?f.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},nt.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=f.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,He.int)(e).multiply(1e3).add((0,He.int)(this.nanosecond).div(1e6)).toNumber()};p=nt;function nt(e,t,r,n,o,i,u,a,s){this.year=f.assertValidYear(e),this.month=f.assertValidMonth(t),this.day=f.assertValidDay(r),this.hour=f.assertValidHour(n),this.minute=f.assertValidMinute(o),this.second=f.assertValidSecond(i),this.nanosecond=f.assertValidNanosecond(u);e=qe(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,ze.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(e," and id: ").concat(t));var o=[void 0,void 0];r&&((0,We.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,We.assertString)(t,"Time zone ID"),f.assertValidZoneId("Time zone ID",t),o[1]=t);return o}(a,s),2),t=e[0],r=e[1];this.timeZoneOffsetSeconds=t,this.timeZoneId=null!=r?r:void 0,Object.freeze(this)}function ot(e,t){return null!=e&&!0===e[t]}function it(e,t,r,n,o,i,u){return f.dateToIsoString(e,t,r)+"T"+f.timeToIsoString(n,o,i,u)}function ut(e,t){(0,We.assertValidDate)(e,"Standard date"),null!=t&&(0,We.assertNumberOrInteger)(t,"Nanosecond")}u.DateTime=p,Object.defineProperty(p.prototype,Xe,l);var at,st,ct,lt,ft,pt,p={},l={},dt={},ht=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bt=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u};function yt(e,t,r,n){var o=pt(r),e=_t(e.get(null!=(e=null==n?void 0:n.from)?e:o),"".concat(t.constructor.name,"#").concat(r),n);t[r]=null!=e?e:t[r]}function _t(e,t,r){return!0===(null==r?void 0:r.optional)&&null==e?e:("function"==typeof(null==r?void 0:r.validate)&&r.validate(e,t),null!=(null==r?void 0:r.convert)?r.convert(e,t):e)}Object.defineProperty(dt,"__esModule",{value:!0}),dt.nameConventions=dt.StandardCase=void 0,dt.StandardCase={SnakeCase:"snake_case",KebabCase:"kebab-case",ScreamingSnakeCase:"SCREAMING_SNAKE_CASE",PascalCase:"PascalCase",CamelCase:"camelCase"},dt.nameConventions={snake_case:{tokenize:function(e){return e.split("_")},encode:function(e){return e.join("_")}},"kebab-case":{tokenize:function(e){return e.split("-")},encode:function(e){return e.join("-")}},PascalCase:{tokenize:function(e){return e.split(/(?=[A-Z])/).map(function(e){return e.toLowerCase()})},encode:function(e){var t,r,n="";try{for(var o=ht(e),i=o.next();!i.done;i=o.next()){var u=i.value;n+=u=u.charAt(0).toUpperCase()+u.slice(1)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}},camelCase:{tokenize:function(e){return e.split(/(?=[A-Z])/).map(function(e){return e.toLowerCase()})},encode:function(e){var t,r,n="";try{for(var o=ht(e.entries()),i=o.next();!i.done;i=o.next()){var u=bt(i.value,2),a=u[0],s=u[1];n+=s=0!==a?s.charAt(0).toUpperCase()+s.slice(1):s}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}},SCREAMING_SNAKE_CASE:{tokenize:function(e){return e.split("_").map(function(e){return e.toLowerCase()})},encode:function(e){return e.join("_").toUpperCase()}}},at=l,st=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ct=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Object.defineProperty(at,"__esModule",{value:!0}),at.RecordObjectMapping=at.rulesRegistry=void 0,at.as=function(e,t,r){var n,o,i,u,a="function"==typeof t?t:Object,s=function(e,t){t="object"==typeof e?e:t;return null==t?"object"!=typeof e?at.rulesRegistry[e.name]:void 0:t}(t,r),c=[],l=new a;try{for(var f=st(Object.entries(null!=s?s:{})),p=f.next();!p.done;p=f.next()){var d=ct(p.value,2),h=d[0],b=d[1];c.push(h),yt(e,l,h,b)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}try{for(var y=st(Object.getOwnPropertyNames(l)),_=y.next();!_.done;_=y.next()){h=_.value;c.includes(h)||yt(e,l,h,null==s?void 0:s[h])}}catch(e){i={error:e}}finally{try{_&&!_.done&&(u=y.return)&&u.call(y)}finally{if(i)throw i.error}}return l},at.valueAs=_t,lt=t,ft=dt,at.rulesRegistry={},pt=function(e){return e},at.RecordObjectMapping=Object.freeze({clearMappingRegistry:function(){at.rulesRegistry={}},getCaseTranslator:function(t,r){var e=Object.keys(ft.nameConventions);if(!e.includes(t))throw(0,lt.newError)("Naming convention ".concat(t," is not recognized, \n please provide a recognized name convention or manually provide a translation function."));if(e.includes(r))return function(e){return ft.nameConventions[t].encode(ft.nameConventions[r].tokenize(e))};throw(0,lt.newError)("Naming convention ".concat(r," is not recognized, \n please provide a recognized name convention or manually provide a translation function."))},register:function(e,t){at.rulesRegistry[e.name]=t},translateIdentifiers:function(e){pt=e}}),Object.defineProperty(p,"__esModule",{value:!0}),p.PathSegment=p.Path=p.UnboundRelationship=p.Relationship=p.Node=void 0,p.isNode=function(e){return St(e,Ot)},p.isRelationship=function(e){return St(e,wt)},p.isUnboundRelationship=function(e){return St(e,Et)},p.isPath=function(e){return St(e,Pt)},p.isPathSegment=function(e){return St(e,Tt)};var vt=F,mt=l,gt={value:!0,enumerable:!1,configurable:!1,writable:!1},Ot="__isNode__",wt="__isRelationship__",Et="__isUnboundRelationship__",Pt="__isPath__",Tt="__isPathSegment__";function St(e,t){return null!=e&&!0===e[t]}Ct.prototype.as=function(e,t){var r=this;return(0,mt.as)({get:function(e){return r.properties[e]}},e,t)},Ct.prototype.toString=function(){for(var e="("+this.elementId,t=0;t<this.labels.length;t++)e+=":"+this.labels[t];var r=Object.keys(this.properties);if(0<r.length){e+=" {";for(t=0;t<r.length;t++)0<t&&(e+=","),e+=r[t]+":"+(0,vt.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var jt=Ct;function Ct(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=Nt(n,function(){return e.toString()})}p.Node=jt,Object.defineProperty(jt.prototype,Ot,gt);Rt.prototype.as=function(e,t){var r=this;return(0,mt.as)({get:function(e){return r.properties[e]}},e,t)},Rt.prototype.toString=function(){var e="("+this.startNodeElementId+")-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,vt.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var It=Rt;function Rt(e,t,r,n,o,i,u,a){this.identity=e,this.start=t,this.end=r,this.type=n,this.properties=o,this.elementId=Nt(i,function(){return e.toString()}),this.startNodeElementId=Nt(u,function(){return t.toString()}),this.endNodeElementId=Nt(a,function(){return r.toString()})}p.Relationship=It,Object.defineProperty(It.prototype,wt,gt);At.prototype.bind=function(e,t){return new It(this.identity,e,t,this.type,this.properties,this.elementId)},At.prototype.bindTo=function(e,t){return new It(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},At.prototype.as=function(e,t){var r=this;return(0,mt.as)({get:function(e){return r.properties[e]}},e,t)},At.prototype.toString=function(){var e="-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,vt.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};jt=At;function At(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=Nt(n,function(){return e.toString()})}p.UnboundRelationship=jt,Object.defineProperty(jt.prototype,Et,gt);function kt(e,t,r){this.start=e,this.relationship=t,this.end=r}p.PathSegment=kt,Object.defineProperty(kt.prototype,Tt,gt);function Mt(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function Nt(e,t){return null==e?t():e}p.Path=Mt,Object.defineProperty(Mt.prototype,Pt,gt);var jt={},xt=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Dt=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Lt=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ut=(Object.defineProperty(jt,"__esModule",{value:!0}),t),Ft=l;function Bt(e,t,r){var n;this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!=r?r:(n={},e.forEach(function(e,t){n[e]=t}),n)}Bt.prototype.forEach=function(e){var t,r;try{for(var n=Dt(this.entries()),o=n.next();!o.done;o=n.next()){var i=Lt(o.value,2),u=i[0];e(i[1],u,this)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},Bt.prototype.map=function(e){var t,r,n=[];try{for(var o=Dt(this.entries()),i=o.next();!i.done;i=o.next()){var u=Lt(i.value,2),a=u[0],s=u[1];n.push(e(s,a,this))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},Bt.prototype.as=function(e,t){return(0,Ft.as)(this,e,t)},Bt.prototype.entries=function(){var t;return xt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,[this.keys[t],this._fields[t]]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},Bt.prototype.values=function(){var t;return xt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},Bt.prototype[Symbol.iterator]=function(){var t;return xt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},Bt.prototype.toObject=function(){var t,e,r={};try{for(var n=Dt(this.entries()),o=n.next();!o.done;o=n.next()){var i=Lt(o.value,2),u=i[0],a=i[1];r[u]=a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},Bt.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,Ut.newError)("This record has no field with key '".concat(e.toString(),"', available keys are: [")+this.keys.toString()+"].")}else t=e;if(t>this._fields.length-1||t<0)throw(0,Ut.newError)("This record has no field with index '"+t.toString()+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[t]},Bt.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},jt.default=Bt;var gt={},Vt=(Object.defineProperty(gt,"__esModule",{value:!0}),gt.Point=void 0,gt.isPoint=function(e){var t=e;return null!=e&&!0===t[qt]},c),qt="__isPoint__",Wt=(zt.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(Ht(this.srid),", x=").concat(Ht(this.x),", y=").concat(Ht(this.y),"}"):"Point{srid=".concat(Ht(this.srid),", x=").concat(Ht(this.x),", y=").concat(Ht(this.y),", z=").concat(Ht(this.z),"}")},zt);function zt(e,t,r,n){this.srid=(0,Vt.assertNumberOrInteger)(e,"SRID"),this.x=(0,Vt.assertNumber)(t,"X coordinate"),this.y=(0,Vt.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,Vt.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function Ht(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}gt.Point=Wt,Object.defineProperty(Wt.prototype,qt,{value:!0,enumerable:!1,configurable:!1,writable:!1});var Wt={},h={},Gt={},b=(Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.FailedObserver=Gt.CompletedObserver=void 0,Yt.prototype.subscribe=function(e){Zt(e,e.onKeys,[]),Zt(e,e.onCompleted,{})},Yt.prototype.cancel=function(){},Yt.prototype.pause=function(){},Yt.prototype.resume=function(){},Yt.prototype.prepareToHandleSingleResponse=function(){},Yt.prototype.markCompleted=function(){},Yt.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},Yt);function Yt(){}function Kt(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function Zt(e,t,r){null!=t&&t.bind(e)(r)}Gt.CompletedObserver=b,Kt.prototype.subscribe=function(e){Zt(e,e.onError,this._error),this._observers.push(e)},Kt.prototype.onError=function(t){Zt(this,this._beforeError,t),this._observers.forEach(function(e){return Zt(e,e.onError,t)})},Kt.prototype.cancel=function(){},Kt.prototype.pause=function(){},Kt.prototype.resume=function(){},Kt.prototype.markCompleted=function(){},Kt.prototype.prepareToHandleSingleResponse=function(){},Gt.FailedObserver=Kt;var Qt,b={},Xt=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Jt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),y=r&&r.__importStar||(Qt=function(e){return(Qt=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Qt(e),n=0;n<r.length;n++)"default"!==r[n]&&Xt(t,e,r[n]);return Jt(t,e),t}),$t=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},er=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},tr=(Object.defineProperty(b,"__esModule",{value:!0}),b.Bookmarks=void 0,y(c)),y=(rr.empty=function(){return nr},rr.prototype.isEmpty=function(){return 0===this._values.length},rr.prototype.values=function(){return this._values},rr.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},rr.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},rr);function rr(e){this._values=function(e){if(null==e||""===e)return[];if(tr.isString(e))return[e];if(Array.isArray(e)){for(var t=new Set,r=function r(e){return e.reduce(function(e,t){return Array.isArray(t)?e.concat(r(t)):e.concat(t)},[])}(e),n=0;n<r.length;n++){var o=r[n];if(null!=o){if(!tr.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return er([],$t(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var nr=new(b.Bookmarks=y)(null);var y={},or={},_=(Object.defineProperty(or,"__esModule",{value:!0}),or.ProtocolVersion=void 0,ir.prototype.getMajor=function(){return this.major},ir.prototype.getMinor=function(){return this.major},ir.prototype.isLessThan=function(e){return this.major<e.major||this.major===e.major&&this.minor<e.minor},ir.prototype.isGreaterThan=function(e){return this.major>e.major||this.major===e.major&&this.minor>e.minor},ir.prototype.isGreaterOrEqualTo=function(e){return!this.isLessThan(e)},ir.prototype.isLessOrEqualTo=function(e){return!this.isGreaterThan(e)},ir.prototype.isEqualTo=function(e){return this.major===e.major&&this.minor===e.minor},ir.prototype.toString=function(){return this.major.toString()+"."+this.minor.toString()},ir);function ir(e,t){this.major=e,this.minor=t}or.ProtocolVersion=_,Object.defineProperty(y,"__esModule",{value:!0}),y.TELEMETRY_APIS=y.BOLT_PROTOCOL_V6_0=y.BOLT_PROTOCOL_V5_8=y.BOLT_PROTOCOL_V5_7=y.BOLT_PROTOCOL_V5_6=y.BOLT_PROTOCOL_V5_5=y.BOLT_PROTOCOL_V5_4=y.BOLT_PROTOCOL_V5_3=y.BOLT_PROTOCOL_V5_2=y.BOLT_PROTOCOL_V5_1=y.BOLT_PROTOCOL_V5_0=y.BOLT_PROTOCOL_V4_4=y.BOLT_PROTOCOL_V4_3=y.BOLT_PROTOCOL_V4_2=y.BOLT_PROTOCOL_V4_1=y.BOLT_PROTOCOL_V4_0=y.BOLT_PROTOCOL_V3=y.BOLT_PROTOCOL_V2=y.BOLT_PROTOCOL_V1=y.DEFAULT_POOL_MAX_SIZE=y.DEFAULT_POOL_ACQUISITION_TIMEOUT=y.DEFAULT_CONNECTION_TIMEOUT_MILLIS=y.ACCESS_MODE_WRITE=y.ACCESS_MODE_READ=y.FETCH_ALL=void 0;var ur,ar,_=or,v=(y.FETCH_ALL=-1,y.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,y.DEFAULT_POOL_MAX_SIZE=100,y.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,y.ACCESS_MODE_READ="READ",y.ACCESS_MODE_WRITE="WRITE",new _.ProtocolVersion(1,0)),v=(y.BOLT_PROTOCOL_V1=v,new _.ProtocolVersion(2,0)),v=(y.BOLT_PROTOCOL_V2=v,new _.ProtocolVersion(3,0)),v=(y.BOLT_PROTOCOL_V3=v,new _.ProtocolVersion(4,0)),v=(y.BOLT_PROTOCOL_V4_0=v,new _.ProtocolVersion(4,1)),v=(y.BOLT_PROTOCOL_V4_1=v,new _.ProtocolVersion(4,2)),v=(y.BOLT_PROTOCOL_V4_2=v,new _.ProtocolVersion(4,3)),v=(y.BOLT_PROTOCOL_V4_3=v,new _.ProtocolVersion(4,4)),v=(y.BOLT_PROTOCOL_V4_4=v,new _.ProtocolVersion(5,0)),v=(y.BOLT_PROTOCOL_V5_0=v,new _.ProtocolVersion(5,1)),v=(y.BOLT_PROTOCOL_V5_1=v,new _.ProtocolVersion(5,2)),v=(y.BOLT_PROTOCOL_V5_2=v,new _.ProtocolVersion(5,3)),v=(y.BOLT_PROTOCOL_V5_3=v,new _.ProtocolVersion(5,4)),v=(y.BOLT_PROTOCOL_V5_4=v,new _.ProtocolVersion(5,5)),v=(y.BOLT_PROTOCOL_V5_5=v,new _.ProtocolVersion(5,6)),v=(y.BOLT_PROTOCOL_V5_6=v,new _.ProtocolVersion(5,7)),v=(y.BOLT_PROTOCOL_V5_7=v,new _.ProtocolVersion(5,8)),v=(y.BOLT_PROTOCOL_V5_8=v,new _.ProtocolVersion(6,0)),_=(y.BOLT_PROTOCOL_V6_0=v,y.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),v={},sr=r&&r.__extends||(ur=function(e,t){return(ur=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])})(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}ur(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),cr=(Object.defineProperty(v,"__esModule",{value:!0}),v.Logger=void 0,t),lr="error",fr="warn",pr="info",dr="debug",hr=((m={})[lr]=0,m[fr]=1,m[pr]=2,m[dr]=3,m),m=(br.create=function(e){return null!=(null==e?void 0:e.logging)?new br(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=hr[e];if(null!=t||0===t)return e;throw(0,cr.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(hr).toString()))}(e=e.logging),function(e){if(null!=(null==e?void 0:e.logger)){var t=e.logger;if(null!=t&&"function"==typeof t)return t}throw(0,cr.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},br.noOp=function(){return _r},br.prototype.isErrorEnabled=function(){return vr(this._level,lr)},br.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(lr,e)},br.prototype.isWarnEnabled=function(){return vr(this._level,fr)},br.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(fr,e)},br.prototype.isInfoEnabled=function(){return vr(this._level,pr)},br.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(pr,e)},br.prototype.isDebugEnabled=function(){return vr(this._level,dr)},br.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(dr,e)},br);function br(e,t){this._level=e,this._loggerFunction=t}function yr(){return ar.call(this,pr,function(e,t){})||this}v.Logger=m,sr(yr,ar=m),yr.prototype.isErrorEnabled=function(){return!1},yr.prototype.error=function(e){},yr.prototype.isWarnEnabled=function(){return!1},yr.prototype.warn=function(e){},yr.prototype.isInfoEnabled=function(){return!1},yr.prototype.info=function(e){},yr.prototype.isDebugEnabled=function(){return!1},yr.prototype.debug=function(e){};var _r=new yr;function vr(e,t){return hr[e]>=hr[t]}var mr,sr=r&&r.__extends||(mr=function(e,t){return(mr=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])})(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}mr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),gr=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Or=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},wr=(Object.defineProperty(_,"__esModule",{value:!0}),_.EMPTY_CONNECTION_HOLDER=_.ReadOnlyConnectionHolder=_.ConnectionHolder=void 0,t),Er=c,Pr=y,Tr=b,Sr=v,m=(jr.prototype.mode=function(){return this._mode},jr.prototype.database=function(){return this._database},jr.prototype.setDatabase=function(e){this._database=e},jr.prototype.bookmarks=function(){return this._bookmarks},jr.prototype.connectionProvider=function(){return this._connectionProvider},jr.prototype.referenceCount=function(){return this._referenceCount},jr.prototype.initializeConnection=function(e){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider,e),this._referenceCount++,!0)},jr.prototype._createConnectionPromise=function(o,i){return gr(this,void 0,void 0,function(){var t,r,n;return Or(this,function(e){switch(e.label){case 0:return r=(t=o).acquireConnection,n={accessMode:this._mode,database:this._database},[4,this._getBookmarks()];case 1:return[4,r.apply(t,[(n.bookmarks=e.sent(),n.impersonatedUser=this._impersonatedUser,n.onDatabaseNameResolved=this._onDatabaseNameResolved,n.auth=this._auth,n.homeDb=i,n)])];case 2:return[2,e.sent()]}})})},jr.prototype._getBookmarks=function(){return gr(this,void 0,void 0,function(){return Or(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},jr.prototype.getConnection=function(){return this._connectionPromise},jr.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},jr.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},jr.prototype.log=function(){return this._log},jr.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(kr).then(function(){return e.release().then(function(){return null})}):e.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},jr.prototype._logError=function(e){return this._log.isWarnEnabled()&&this._log.warn("ConnectionHolder got an error while releasing the connection. Error ".concat(e,". Stacktrace: ").concat(e.stack)),null},jr);function jr(e){var t=e.mode,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,a=e.getConnectionAcquistionBookmarks,s=e.auth,e=e.log;this._mode=null!=t?t:Pr.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=r?(0,Er.assertString)(r,"database"):"",this._bookmarks=null!=n?n:Tr.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._auth=s,this._log=e,this._logError=this._logError.bind(this),this._getConnectionAcquistionBookmarks=null!=a?a:function(){return Promise.resolve(Tr.Bookmarks.empty())}}_.ConnectionHolder=m;sr(Rr,Cr=m),Rr.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},Rr.prototype.getConnection=function(){return this._connectionHolder.getConnection()},Rr.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},Rr.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var Cr,Ir,g=Rr;function Rr(e){var t=Cr.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider(),log:e.log()})||this;return t._connectionHolder=e,t}function Ar(){return Ir.call(this,{log:Sr.Logger.create({})})||this}_.ReadOnlyConnectionHolder=g,_.default=g,sr(Ar,Ir=m),Ar.prototype.mode=function(){},Ar.prototype.database=function(){},Ar.prototype.initializeConnection=function(){return!0},Ar.prototype.getConnection=function(){return gr(this,void 0,void 0,function(){return Or(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,wr.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},Ar.prototype.releaseConnection=function(){return gr(this,void 0,void 0,function(){return Or(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},Ar.prototype.close=function(){return gr(this,void 0,void 0,function(){return Or(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};g=new Ar;function kr(e){return null}_.EMPTY_CONNECTION_HOLDER=g;var Mr,sr={},Nr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),xr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),m=r&&r.__importStar||(Mr=function(e){return(Mr=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Mr(e),n=0;n<r.length;n++)"default"!==r[n]&&Nr(t,e,r[n]);return xr(t,e),t}),Dr=(Object.defineProperty(sr,"__esModule",{value:!0}),sr.TxConfig=void 0,m(c)),Lr=t,Ur=i,g=(Fr.empty=function(){return Br},Fr.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},Fr);function Fr(e,t){var r;null!=(r=e)&&Dr.assertObject(r,"Transaction config"),this.timeout=function(e,t){if(Dr.isObject(e)&&null!=e.timeout){Dr.assertNumberOrInteger(e.timeout,"Transaction timeout"),!function(e){return"number"==typeof e.timeout&&!Number.isInteger(e.timeout)}(e)||!0!==(null==t?void 0:t.isInfoEnabled())||null==t||t.info("Transaction timeout expected to be an integer, got: ".concat(e.timeout,". The value will be rounded up."));t=(0,Ur.int)(e.timeout,{ceilFloat:!0});if(t.isNegative())throw(0,Lr.newError)("Transaction timeout should not be negative");return t}return null}(e,t),this.metadata=function(e){if(Dr.isObject(e)&&null!=e.metadata){e=e.metadata;if(Dr.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var Br=new(sr.TxConfig=g)({});var m={},Vr=r&&r.__assign||function(){return(Vr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},qr=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Wr=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},zr=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Hr=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Gr=(Object.defineProperty(m,"__esModule",{value:!0}),m.TransactionExecutor=void 0,t),Yr=y;function Kr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,Hr([e,t],zr(r),!1))}function Zr(e){return clearTimeout(e)}function Qr(e,t,r,n,o){void 0===o&&(o={setTimeout:Kr,clearTimeout:Zr}),this._maxRetryTimeMs=Xr(e,3e4),this._initialRetryDelayMs=Xr(t,1e3),this._multiplier=Xr(r,2),this._jitterFactor=Xr(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=Yr.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}function Xr(e,t){return null!=e?e:t}Qr.prototype.execute=function(n,o,i){var u=this,a={apiTransactionConfig:{api:this.telemetryApi,onTelemetrySuccess:function(){a.apiTransactionConfig=void 0}}};return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i,a).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i,a)})},Qr.prototype.close=function(){var t=this;this._inFlightTimeoutIds.forEach(function(e){return t._clearTimeout(e)}),this._inFlightTimeoutIds=[]},Qr.prototype._retryTransactionPromise=function(o,i,e,r,u,a,s){var c=this;return Date.now()-r>this._maxRetryTimeMs||!(0,Gr.isRetryableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=c._computeDelayWithJitter(u),n=c._setTimeout(function(){c._inFlightTimeoutIds=c._inFlightTimeoutIds.filter(function(e){return e!==n}),c._executeTransactionInsidePromise(o,i,e,t,a,s).catch(t)},r);c._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*c._multiplier;return c._retryTransactionPromise(o,i,e,r,t,a,s)})},Qr.prototype._executeTransactionInsidePromise=function(u,a,s,c,l,f){return qr(this,void 0,void 0,function(){var t,r,n,o,i=this;return Wr(this,function(e){switch(e.label){case 0:return(e.trys.push([0,4,,5]),r=u(null!=(null==f?void 0:f.apiTransactionConfig)?Vr({},null==f?void 0:f.apiTransactionConfig):void 0),this.pipelineBegin)?(n=r,[3,3]):[3,1];case 1:return[4,r];case 2:n=e.sent(),e.label=3;case 3:return t=n,[3,5];case 4:return o=e.sent(),c(o),[2];case 5:return o=(null!=l?l:function(e){return e})(t),this._safeExecuteTransactionWork(o,a).then(function(e){return i._handleTransactionWorkSuccess(e,t,s,c)}).catch(function(e){return i._handleTransactionWorkFailure(e,t,c)}),[2]}})})},Qr.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},Qr.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},Qr.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},Qr.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},Qr.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,Gr.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,Gr.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,Gr.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,Gr.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},m.TransactionExecutor=Qr;var g={},Jr=r&&r.__assign||function(){return(Jr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$r=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},en=(Object.defineProperty(g,"__esModule",{value:!0}),g.Url=void 0,g.parseDatabaseUrl=function(e){(0,en.assertString)(e,"URL");var t=function(e){return(e=e.trim()).includes("://")?{schemeMissing:!1,url:e}:{schemeMissing:!0,url:"none://".concat(e)}}(e),r=function(e){function u(e,t){t=e.indexOf(t);return 0<=t?[e.substring(0,t),e[t],e.substring(t+1)]:[e,"",""]}function t(e){var t,r={},n=((t="@")===(t=0<=(t=(o=e).lastIndexOf(t))?[o.substring(0,t),o[t],o.substring(t+1)]:["","",o])[1]&&(r.userInfo=decodeURIComponent(t[0]),e=t[2]),$r((o="]",n=u(n=e,i="["),[(i=u(n[2],o))[0],i[2]]),2)),o=n[0],i=n[1];return""!==o?(r.host=o,t=u(i,":")):(t=u(e,":"),r.host=t[0]),":"===t[1]&&(r.port=t[2]),r}var r,n={};":"===(r=u(e,":"))[1]&&(n.scheme=decodeURIComponent(r[0]),e=r[2]);"#"===(r=u(e,"#"))[1]&&(n.fragment=decodeURIComponent(r[2]),e=r[0]);"?"===(r=u(e,"?"))[1]&&(n.query=r[2],e=r[0]);e.startsWith("//")?(r=u(e.substr(2),"/"),(n=Jr(Jr({},n),t(r[0]))).path=r[1]+r[2]):n.path=e;return n}(t.url),t=t.schemeMissing?null:function(e){if(null==e)return null;":"===(e=e.trim()).charAt(e.length-1)&&(e=e.substring(0,e.length-1));return e}(r.scheme),n=function(e){if(null!=e)return e.trim();throw new Error("Unable to extract host from null or undefined URL")}(r.host),o=function(e){if(""!==e&&null!=e)return e.includes(":")?an(e):e;throw new Error("Illegal host ".concat(e))}(n),i=function(e,t){e="string"==typeof e?parseInt(e,10):e;return null==e||isNaN(e)?sn(t):e}(r.port,t),o="".concat(o,":").concat(i),u=function(e,r){var e=null!=e?function(e){"?"===(null==(e=(null!=e?e:"").trim())?void 0:e.charAt(0))&&(e=e.substring(1,e.length));return e}(e):null,n={};null!=e&&e.split("&").forEach(function(e){e=e.split("=");if(2!==e.length)throw new Error("Invalid parameters: '".concat(e.toString(),"' in URL '").concat(r,"'."));var t=un(e[0],"key",r),e=un(e[1],"value",r);if(void 0!==n[t])throw new Error("Duplicated query parameters with key '".concat(t,"' in URL '").concat(r,"'"));n[t]=e});return n}(null!=(u=r.query)?u:function(e){return"string"==typeof e?$r(e.split("?"),2)[1]:null}(r.resourceName),e);return new on(t,n,i,o,u)},g.defaultPortForScheme=sn,g.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},g.formatIPv6Address=function(e,t){e=an(e);return"".concat(e,":").concat(t)},c),tn=7687,rn=7474,nn=7473,on=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function un(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function an(e){var t="["===e.charAt(0),r="]"===e.charAt(e.length-1);if(t||r){if(t&&r)return e;throw new Error("Illegal IPv6 address ".concat(e))}return"[".concat(e,"]")}function sn(e){return"http"===e?rn:"https"===e?nn:tn}g.Url=on;var cn,ln={},fn=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),pn=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),O=r&&r.__importStar||(cn=function(e){return(cn=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=cn(e),n=0;n<r.length;n++)"default"!==r[n]&&fn(t,e,r[n]);return pn(t,e),t}),dn=(Object.defineProperty(ln,"__esModule",{value:!0}),ln.ServerAddress=void 0,c),hn=O(g);function bn(e,t,r,n){this._host=(0,dn.assertString)(e,"host"),this._resolved=null!=t?(0,dn.assertString)(t,"resolved"):null,this._port=(0,dn.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}bn.prototype.host=function(){return this._host},bn.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},bn.prototype.port=function(){return this._port},bn.prototype.resolveWith=function(e){return new bn(this._host,e,this._port,this._hostPort)},bn.prototype.asHostPort=function(){return this._hostPort},bn.prototype.asKey=function(){return this._hostPort},bn.prototype.toString=function(){return this._stringValue},bn.fromUrl=function(e){e=hn.parseDatabaseUrl(e);return new bn(e.host,null,e.port,e.hostAndPort)},ln.ServerAddress=bn;var O={},w={};function yn(){}Object.defineProperty(w,"__esModule",{value:!0}),yn.prototype.resolve=function(){throw new Error("Abstract function")},yn.prototype._resolveToItself=function(e){return Promise.resolve([e])},w.default=yn;var E={},_n=(Object.defineProperty(E,"__esModule",{value:!0}),ln);function vn(e){return Promise.resolve([e])}function mn(e){this._resolverFunction=null!=e?e:vn}mn.prototype.resolve=function(t){var r=this;return new Promise(function(e){return e(r._resolverFunction(t.asHostPort()))}).then(function(e){if(Array.isArray(e))return e.map(function(e){return _n.ServerAddress.fromUrl(e)});throw new TypeError("Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses."+"Each address is '<host>:<port>'. Got: ".concat(e))})},E.default=mn;var gn,P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},w=(Object.defineProperty(O,"__esModule",{value:!0}),O.ConfiguredCustomResolver=O.BaseHostNameResolver=void 0,P(w)),w=(O.BaseHostNameResolver=w.default,P(E)),P=(O.ConfiguredCustomResolver=w.default,{}),w={};Object.defineProperty(w,"__esModule",{value:!0}),w.fromVersion=function(e,t){void 0===t&&(t=function(){return{get userAgent(){}}});var t=t(),r=null!=t.userAgent?t.userAgent.split("(")[1].split(")")[0]:void 0,t=t.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:r,languageDetails:t}},S=P,gn=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),T=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||gn(t,e,r)},Object.defineProperty(S,"__esModule",{value:!0}),T(w,S);var T={},w={},S=(Object.defineProperty(w,"__esModule",{value:!0}),w.DEFAULT_ACQUISITION_TIMEOUT=w.DEFAULT_MAX_SIZE=void 0,w.DEFAULT_MAX_SIZE=100,w.DEFAULT_ACQUISITION_TIMEOUT=6e4,On.defaultConfig=function(){return new On(100,6e4)},On.fromDriverConfig=function(e){return new On(En(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,En(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},On);function On(e,t){this.maxSize=wn(e,100),this.acquisitionTimeout=wn(t,6e4)}function wn(e,t){return En(e)?e:t}function En(e){return 0===e||null!=e}w.default=S;var S={},Pn=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Tn=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},j=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sn=(Object.defineProperty(S,"__esModule",{value:!0}),j(w)),jn=t,Cn=v,j=(In.prototype.acquire=function(s,c,l){return Pn(this,void 0,void 0,function(){var o,i,t,u,a=this;return Tn(this,function(e){switch(e.label){case 0:if(o=c.asKey(),i=this._acquireRequests,t=i[o],(u=null!=s.startTime&&0!==s.startTime?(new Date).getTime()-s.startTime:0)>=this._acquisitionTimeout)throw this.getAcquisitionTimeoutError(c);return null==t&&(i[o]=[]),[4,new Promise(function(e,t){var r=setTimeout(function(){var e=i[o];null!=e&&(i[o]=e.filter(function(e){return e!==n})),n.isCompleted()||n.reject(a.getAcquisitionTimeoutError(c))},a._acquisitionTimeout-u),n=("object"==typeof r&&r.unref(),new kn(o,s,l,e,t,r,a._log));i[o].push(n),a._processPendingAcquireRequests(c)})];case 1:return[2,e.sent()]}})})},In.prototype.getAcquisitionTimeoutError=function(e){var t=e.asKey(),r=this.activeResourceCount(e),e=this.has(e)?this._pools[t].length:0;return(0,jn.newError)("Connection acquisition timed out in ".concat(this._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(r,", Idle conn count = ").concat(e,"."))},In.prototype.purge=function(t){return Pn(this,void 0,void 0,function(){return Tn(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t.asKey())];case 1:return[2,e.sent()]}})})},In.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},In.prototype.close=function(){return Pn(this,void 0,void 0,function(){var r=this;return Tn(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(t){return Pn(r,void 0,void 0,function(){return Tn(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}})})})).then()];case 1:return[2,e.sent()]}})})},In.prototype.keepAll=function(o){return Pn(this,void 0,void 0,function(){var t,r,n=this;return Tn(this,function(e){switch(e.label){case 0:return t=o.map(function(e){return e.asKey()}),r=Object.keys(this._pools),r=r.filter(function(e){return!t.includes(e)}),[4,Promise.all(r.map(function(t){return Pn(n,void 0,void 0,function(){return Tn(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}})})})).then()];case 1:return[2,e.sent()]}})})},In.prototype.has=function(e){return e.asKey()in this._pools},In.prototype.activeResourceCount=function(e){return null!=(e=this._activeResourceCounts[e.asKey()])?e:0},In.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return null==t&&(t=new Un,this._pools[e]=t,this._pendingCreates[e]=0),t},In.prototype._acquire=function(c,l,f){return Pn(this,void 0,void 0,function(){var t,n,r,o,i,u,a,s=this;return Tn(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,jn.newError)("Pool is closed, it is no more able to serve requests.");if(t=l.asKey(),n=this._getOrInitializePoolFor(t),f)return[3,10];e.label=1;case 1:if(!(0<n.length))return[3,10];if(null==(r=n.pop()))return[3,1];Rn(t,this._activeResourceCounts),null!=this._removeIdleObserver&&this._removeIdleObserver(r),o=!1,e.label=2;case 2:return e.trys.push([2,4,,6]),[4,this._validateOnAcquire(c,r)];case 3:return o=e.sent(),[3,6];case 4:return i=e.sent(),An(t,this._activeResourceCounts),n.removeInUse(r),[4,this._destroy(r)];case 5:throw e.sent(),i;case 6:return o?(this._log.isDebugEnabled()&&this._log.debug("".concat(r," acquired from the pool ").concat(t)),[2,{resource:r,pool:n}]):[3,7];case 7:return An(t,this._activeResourceCounts),n.removeInUse(r),[4,this._destroy(r)];case 8:e.sent(),e.label=9;case 9:return[3,1];case 10:if(0<this._maxSize&&this.activeResourceCount(l)+this._pendingCreates[t]>=this._maxSize)return[2,{resource:null,pool:n}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=11;case 11:return(e.trys.push([11,,15,16]),this.activeResourceCount(l)+n.length>=this._maxSize&&f)?null==(a=n.pop())?[3,13]:(null!=this._removeIdleObserver&&this._removeIdleObserver(a),n.removeInUse(a),[4,this._destroy(a)]):[3,13];case 12:e.sent(),e.label=13;case 13:return[4,this._create(c,l,function(t,r){return Pn(s,void 0,void 0,function(){return Tn(this,function(e){switch(e.label){case 0:return[4,this._release(t,r,n)];case 1:return[2,e.sent()]}})})})];case 14:return u=e.sent(),n.pushInUse(u),Rn(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(u," created for the pool ").concat(t)),[3,16];case 15:return this._pendingCreates[t]=this._pendingCreates[t]-1,[7];case 16:return[2,{resource:u,pool:n}]}})})},In.prototype._release=function(n,o,i){return Pn(this,void 0,void 0,function(){var t,r=this;return Tn(this,function(e){switch(e.label){case 0:t=n.asKey(),e.label=1;case 1:return(e.trys.push([1,,9,10]),i.isActive())?[4,this._validateOnRelease(o)]:[3,6];case 2:return e.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(o," destroyed and can't be released to the pool ").concat(t," because it is not functional")),i.removeInUse(o),[4,this._destroy(o)]);case 3:return e.sent(),[3,5];case 4:null!=this._installIdleObserver&&this._installIdleObserver(o,{onError:function(e){r._log.debug("Idle connection ".concat(o," destroyed because of error: ").concat(e));e=r._pools[t];null!=e&&(r._pools[t]=e.filter(function(e){return e!==o}),e.removeInUse(o)),r._destroy(o).catch(function(){})}}),i.push(o),this._log.isDebugEnabled()&&this._log.debug("".concat(o," released to the pool ").concat(t)),e.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(o," destroyed and can't be released to the pool ").concat(t," because pool has been purged")),i.removeInUse(o),[4,this._destroy(o)];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:return An(t,this._activeResourceCounts),this._processPendingAcquireRequests(n),[7];case 10:return[2]}})})},In.prototype._purgeKey=function(o){return Pn(this,void 0,void 0,function(){var t,r,n;return Tn(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],null==t)return[3,2];for(;0<t.length;)null!=(n=t.pop())&&(null!=this._removeIdleObserver&&this._removeIdleObserver(n),r.push(this._destroy(n)));return t.close(),delete this._pools[o],[4,Promise.all(r)];case 1:e.sent(),e.label=2;case 2:return[2]}})})},In.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];null!=e&&(null!=(n=e.shift())?this._acquire(n.context,r,n.requireNew).catch(function(e){return n.reject(e),{resource:null,pool:null}}).then(function(e){var t=e.resource,e=e.pool;null!=t&&null!=e?n.isCompleted()?o._release(r,t,e).catch(function(e){o._log.isDebugEnabled()&&o._log.debug("".concat(t," could not be release back to the pool. Cause: ").concat(e))}):n.resolve(t):n.isCompleted()||(null==o._acquireRequests[i]&&(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}).catch(function(e){return n.reject(e)}):delete this._acquireRequests[i])},In);function In(e){var t=e.create,t=void 0===t?function(e,t,r){return Pn(s,void 0,void 0,function(){return Tn(this,function(e){switch(e.label){case 0:return[4,Promise.reject(new Error("Not implemented"))];case 1:return[2,e.sent()]}})})}:t,r=e.destroy,r=void 0===r?function(e){return Pn(s,void 0,void 0,function(){return Tn(this,function(e){switch(e.label){case 0:return[4,Promise.resolve()];case 1:return[2,e.sent()]}})})}:r,n=e.validateOnAcquire,n=void 0===n?function(e,t){return!0}:n,o=e.validateOnRelease,o=void 0===o?function(e){return!0}:o,i=e.installIdleObserver,i=void 0===i?function(e,t){}:i,u=e.removeIdleObserver,u=void 0===u?function(e){}:u,a=e.config,a=void 0===a?Sn.default.defaultConfig():a,e=e.log,e=void 0===e?Cn.Logger.noOp():e,s=this;this._create=t,this._destroy=r,this._validateOnAcquire=n,this._validateOnRelease=o,this._installIdleObserver=i,this._removeIdleObserver=u,this._maxSize=a.maxSize,this._acquisitionTimeout=a.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function Rn(e,t){var r=null!=(r=t[e])?r:0;t[e]=r+1}function An(e,t){var r=(null!=(r=t[e])?r:0)-1;0<r?t[e]=r:delete t[e]}Object.defineProperty(Mn.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(Mn.prototype,"requireNew",{get:function(){var e;return null!=(e=this._config.requireNew)&&e},enumerable:!1,configurable:!0}),Mn.prototype.isCompleted=function(){return this._completed},Mn.prototype.resolve=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(e," acquired from the pool ").concat(this._key)),this._resolve(e))},Mn.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var kn=Mn;function Mn(e,t,r,n,o,i,u){this._key=e,this._context=t,this._resolve=n,this._reject=o,this._timeoutId=i,this._log=u,this._completed=!1,this._config=null!=r?r:{}}Fn.prototype.isActive=function(){return this._active},Fn.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},Fn.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},Fn.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(Fn.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),Fn.prototype.pop=function(){var e=this._elements.pop();return null!=e&&this._elementsInUse.add(e),e},Fn.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},Fn.prototype.pushInUse=function(e){this._elementsInUse.add(e)},Fn.prototype.removeInUse=function(e){this._elementsInUse.delete(e)};var Nn,xn,Dn,Ln,Un=Fn;function Fn(){this._active=!0,this._elements=[],this._elementsInUse=new Set}S.default=j,j=T,xn=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Dn=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Hn=r&&r.__importStar||(Nn=function(e){return(Nn=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Nn(e),n=0;n<r.length;n++)"default"!==r[n]&&xn(t,e,r[n]);return Dn(t,e),t}),zn=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(j,"__esModule",{value:!0}),j.DEFAULT_MAX_SIZE=j.DEFAULT_ACQUISITION_TIMEOUT=j.PoolConfig=j.Pool=void 0,Ln=Hn(w),j.PoolConfig=Ln.default,Object.defineProperty(j,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return Ln.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(j,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return Ln.DEFAULT_MAX_SIZE}}),Hn=zn(S),j.Pool=Hn.default,j.default=Hn.default;var Bn,Vn,qn=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Wn=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),w=r&&r.__importStar||(Bn=function(e){return(Bn=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Bn(e),n=0;n<r.length;n++)"default"!==r[n]&&qn(t,e,r[n]);return Wn(t,e),t}),zn=(Object.defineProperty(h,"__esModule",{value:!0}),h.pool=h.boltAgent=h.objectUtil=h.resolver=h.serverAddress=h.urlUtil=h.logger=h.transactionExecutor=h.txConfig=h.connectionHolder=h.constants=h.bookmarks=h.observer=h.temporalUtil=h.util=void 0,w(c)),S=(h.util=zn,w(o)),j=(h.temporalUtil=S,w(Gt)),Hn=(h.observer=j,w(b)),zn=(h.bookmarks=Hn,w(y)),o=(h.constants=zn,w(_)),S=(h.connectionHolder=o,w(sr)),j=(h.txConfig=S,w(m)),Hn=(h.transactionExecutor=j,w(v)),zn=(h.logger=Hn,w(g)),o=(h.urlUtil=zn,w(ln)),S=(h.serverAddress=o,w(O)),j=(h.resolver=S,w(n)),Hn=(h.objectUtil=j,w(P)),g=(h.boltAgent=Hn,w(T)),zn=(h.pool=g,{}),Gn=r&&r.__assign||function(){return(Gn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Yn=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Kn=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ln=r&&r.__importStar||(Vn=function(e){return(Vn=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Vn(e),n=0;n<r.length;n++)"default"!==r[n]&&Yn(t,e,r[n]);return Kn(t,e),t}),Zn=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Qn=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Xn=(Object.defineProperty(zn,"__esModule",{value:!0}),zn.GqlStatusObject=zn.Notification=zn.notificationClassification=zn.notificationCategory=zn.notificationSeverityLevel=void 0,zn.polyfillGqlStatusObject=co,zn.polyfillNotification=so,zn.buildGqlStatusObjectFromMetadata=function(e){if(null!=e.statuses)return e.statuses.map(function(e){return new uo(e)});var t=function(e){return!0===(null==e?void 0:e.have_records_streamed)?lo.SUCCESS:!1===(null==e?void 0:e.has_keys)?lo.OMITTED_RESULT:!0===(null==e?void 0:e.pulled)?lo.NO_DATA:lo.NO_DATA_UNKNOWN_SUBCONDITION}(e.stream_summary);return Qn([t],Zn(null!=(e=null==(t=e.notifications)?void 0:t.map(co))?e:[]),!1).sort(function(e,t){return po(e)-po(t)})},zn.buildNotificationsFromMetadata=function(e){return null==e.notifications?null==e.statuses?[]:e.statuses.map(so).filter(function(e){return null!=e}):e.notifications.map(function(e){return new io(e)})},ln(F)),Jn=h,$n=G,eo={WARNING:{gql_status:"01N42",status_description:"warn: unknown warning"},NO_DATA:{gql_status:"02N42",status_description:"note: no data - unknown subcondition"},INFORMATION:{gql_status:"03N42",status_description:"info: unknown notification"},ERROR:{gql_status:"50N42",status_description:"error: general processing exception - unexpected error"}},to={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},ro=(zn.notificationSeverityLevel=to,Object.freeze(to),Object.values(to)),o={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",SCHEMA:"SCHEMA",UNKNOWN:"UNKNOWN"},no=(zn.notificationCategory=o,Object.freeze(o),Object.values(o)),oo=o,io=(zn.notificationClassification=oo,function(e){this.code=e.code,this.title=e.title,this.description=e.description,this.position=ho(e.position),this.severityLevel=bo(e.severity),this.rawSeverityLevel=e.severity,this.category=yo(e.category),this.rawCategory=e.category}),uo=(zn.Notification=io,Object.defineProperty(ao.prototype,"diagnosticRecordAsJsonString",{get:function(){return Xn.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),ao);function ao(e){var t;this.gqlStatus=e.gql_status,this.statusDescription=e.status_description,this.diagnosticRecord=null!=(t=e.diagnostic_record)?t:{},this.position=null!=this.diagnosticRecord._position?ho(this.diagnosticRecord._position):void 0,this.severity=bo(this.diagnosticRecord._severity),this.rawSeverity=this.diagnosticRecord._severity,this.classification=yo(this.diagnosticRecord._classification),this.rawClassification=this.diagnosticRecord._classification,this.isNotification=null!=e.neo4j_code,Object.freeze(this)}function so(e){var t;if(null!=e.neo4j_code)return new io({code:e.neo4j_code,title:e.title,description:e.description,severity:null==(t=e.diagnostic_record)?void 0:t._severity,category:null==(t=e.diagnostic_record)?void 0:t._classification,position:null==(t=e.diagnostic_record)?void 0:t._position})}function co(e){var t=e.severity===to.WARNING?eo.WARNING:eo.INFORMATION,r={gql_status:t.gql_status,status_description:null!=(r=e.description)?r:t.status_description,neo4j_code:e.code,title:e.title,diagnostic_record:Gn({},$n.rawPolyfilledDiagnosticRecord)};return null!=e.severity&&(r.diagnostic_record._severity=e.severity),null!=e.category&&(r.diagnostic_record._classification=e.category),null!=e.position&&(r.diagnostic_record._position=e.position),new uo(r)}var lo={SUCCESS:new(zn.GqlStatusObject=uo)({gql_status:"00000",status_description:"note: successful completion",diagnostic_record:$n.rawPolyfilledDiagnosticRecord}),NO_DATA:new uo({gql_status:"02000",status_description:"note: no data",diagnostic_record:$n.rawPolyfilledDiagnosticRecord}),NO_DATA_UNKNOWN_SUBCONDITION:new uo(Gn(Gn({},eo.NO_DATA),{diagnostic_record:$n.rawPolyfilledDiagnosticRecord})),OMITTED_RESULT:new uo({gql_status:"00001",status_description:"note: successful completion - omitted result",diagnostic_record:$n.rawPolyfilledDiagnosticRecord})};Object.freeze(lo);var fo=Object.freeze({"02":0,"01":1,"00":2});function po(e){var e=null==(e=e.gqlStatus)?void 0:e.slice(0,2);return null!=(e=fo[e])?e:9999}function ho(e){return null==e?{}:{offset:Jn.util.toNumber(e.offset),line:Jn.util.toNumber(e.line),column:Jn.util.toNumber(e.column)}}function bo(e){return ro.includes(e)?e:to.UNKNOWN}function yo(e){return no.includes(e)?e:oo.UNKNOWN}zn.default=uo,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.Stats=Wt.QueryStatistics=Wt.ProfiledPlan=Wt.Plan=Wt.ServerInfo=Wt.queryType=void 0;var _o=h,vo=zn,O=(mo.prototype.hasPlan=function(){return this.plan instanceof go},mo.prototype.hasProfile=function(){return this.profile instanceof Oo},mo);function mo(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new Eo(null!=(e=r.stats)?e:{}),this.plan=(null!=r.plan||null!=r.profile)&&new go(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new Oo(r.profile),this.notifications=(0,vo.buildNotificationsFromMetadata)(r),this.gqlStatusObjects=(0,vo.buildGqlStatusObjectFromMetadata)(r),this.server=new To(r.server,n),this.resultConsumedAfter=r.result_consumed_after,this.resultAvailableAfter=r.result_available_after,this.database={name:null!=(e=r.db)?e:null}}var go=function t(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.children=null!=e.children?e.children.map(function(e){return new t(e)}):[]},Oo=(Wt.Plan=go,wo.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},wo);function wo(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=So("dbHits",e),this.rows=So("rows",e),this.pageCacheMisses=So("pageCacheMisses",e),this.pageCacheHits=So("pageCacheHits",e),this.pageCacheHitRatio=So("pageCacheHitRatio",e),this.time=So("time",e),this.children=null!=e.children?e.children.map(function(e){return new wo(e)}):[]}Wt.ProfiledPlan=Oo;Wt.Stats=function(){this.nodesCreated=0,this.nodesDeleted=0,this.relationshipsCreated=0,this.relationshipsDeleted=0,this.propertiesSet=0,this.labelsAdded=0,this.labelsRemoved=0,this.indexesAdded=0,this.indexesRemoved=0,this.constraintsAdded=0,this.constraintsRemoved=0},Po.prototype.containsUpdates=function(){var r=this;return void 0!==this._containsUpdates?this._containsUpdates:0<Object.keys(this._stats).reduce(function(e,t){return e+r._stats[t]},0)},Po.prototype.updates=function(){return this._stats},Po.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},Po.prototype.systemUpdates=function(){return this._systemUpdates};var Eo=Po;function Po(r){var n=this;this._stats={nodesCreated:0,nodesDeleted:0,relationshipsCreated:0,relationshipsDeleted:0,propertiesSet:0,labelsAdded:0,labelsRemoved:0,indexesAdded:0,indexesRemoved:0,constraintsAdded:0,constraintsRemoved:0},this._systemUpdates=0,Object.keys(r).forEach(function(e){var t=e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()});t in n._stats?n._stats[t]=_o.util.toNumber(r[e]):"systemUpdates"===t?n._systemUpdates=_o.util.toNumber(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}Wt.QueryStatistics=Eo;var To=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function So(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?(t=t[e],_o.util.toNumber(t)):r}Wt.ServerInfo=To;function jo(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}function Co(e){console.log("Uncaught error when processing result: "+e)}function Io(e){}function Ro(e){}Wt.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},Wt.default=O;var Ao,S={},n=(Object.defineProperty(S,"__esModule",{value:!0}),S.notificationFilterDisabledClassification=S.notificationFilterDisabledCategory=S.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),j=(S.notificationFilterMinimumSeverityLevel=n,Object.freeze(n),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"}),P=(S.notificationFilterDisabledCategory=j,Object.freeze(j),j),Hn=(S.notificationFilterDisabledClassification=P,S.default=jo,{}),w=r&&r.__extends||(Ao=function(e,t){return(Ao=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])})(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}Ao(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ko=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Mo=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},No=(Object.defineProperty(Hn,"__esModule",{value:!0}),T(Wt)),xo=h,Do=t,Lo=xo.connectionHolder.EMPTY_CONNECTION_HOLDER;Uo.prototype.as=function(t,r){if(null!=this._p)throw(0,Do.newError)("Cannot call .as() on a Result that is being consumed");return this._mapper=function(e){return e.as(t,r)},this},Uo.prototype.keys=function(){var n=this;return null!==this._keys?Promise.resolve(this._keys):null!==this._error?Promise.reject(this._error):new Promise(function(t,r){n._streamObserverPromise.then(function(e){return e.subscribe(n._decorateObserver({onKeys:function(e){return t(e)},onError:function(e){return r(e)}}))}).catch(r)})},Uo.prototype.summary=function(){var n=this;return null!==this._summary?Promise.resolve(this._summary):null!==this._error?Promise.reject(this._error):new Promise(function(t,r){n._streamObserverPromise.then(function(e){e.cancel(),e.subscribe(n._decorateObserver({onCompleted:function(e){return t(e)},onError:function(e){return r(e)}}))}).catch(r)})},Uo.prototype._getOrCreatePromise=function(){var o=this;return null==this._p&&(this._p=new Promise(function(t,r){var n=[];o.subscribe({onNext:function(e){null!=o._mapper?n.push(o._mapper(e)):n.push(e)},onCompleted:function(e){t({records:n,summary:e})},onError:function(e){r(e)}})})),this._p},Uo.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,Do.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return ko(n,void 0,void 0,function(){var t;return Mo(this,function(e){switch(e.label){case 0:return void 0!==u.queuedObserver?[3,2]:(u.queuedObserver=this._createQueuedResultObserver(r),t=u,[4,this._subscribe(u.queuedObserver,!0).catch(function(){})]);case 1:t.streaming=e.sent(),r(),e.label=2;case 2:return[2,u.queuedObserver]}})})}function i(e){if(void 0===e)throw(0,Do.newError)("InvalidState: Result stream finished without Summary",Do.PROTOCOL_ERROR);return 1}var u={paused:!0,firstRun:!0,finished:!1},r=function(){var e,t;null!=u.streaming&&(e=(t=null!=(t=null==(t=u.queuedObserver)?void 0:t.size)?t:0)>=n._watermarks.high,t=t<=n._watermarks.low,e&&!u.paused?(u.paused=!0,u.streaming.pause()):(t&&u.paused||u.firstRun&&!e)&&(u.firstRun=!1,u.paused=!1,u.streaming.resume()))};return{next:function(){return ko(n,void 0,void 0,function(){var t;return Mo(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:u.summary}]:[4,o()];case 1:return[4,e.sent().dequeue()];case 2:return!0===(t=e.sent()).done&&(u.finished=t.done,u.summary=t.value),[2,t]}})})},return:function(r){return ko(n,void 0,void 0,function(){var t;return Mo(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:null!=r?r:u.summary}]:(null!=(t=u.streaming)&&t.cancel(),[4,o()]);case 1:return[4,e.sent().dequeueUntilDone()];case 2:return t=e.sent(),u.finished=!0,t.value=null!=r?r:t.value,u.summary=t.value,[2,t]}})})},peek:function(){return ko(n,void 0,void 0,function(){return Mo(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:u.summary}]:[4,o()];case 1:return[4,e.sent().head()];case 2:return[2,e.sent()]}})})}}},Uo.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},Uo.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},Uo.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},Uo.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},Uo.prototype.isOpen=function(){return null===this._summary&&null===this._error},Uo.prototype._subscribe=function(e,t){void 0===t&&(t=!1);var r=this._decorateObserver(e);return this._streamObserverPromise.then(function(e){return t&&e.pause(),e.subscribe(r),e}).catch(function(e){return null!=r.onError&&r.onError(e),Promise.reject(e)})},Uo.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:Io,i=null!=(e=n.onError)?e:Co,r=null!=(e=n.onKeys)?e:Ro;return{onNext:null!=n.onNext?n.onNext.bind(n):void 0,onKeys:function(e){return o._keys=e,r.call(n,e)},onCompleted:function(e){o._releaseConnectionAndGetSummary(e).then(function(e){return null!==o._summary?t.call(n,o._summary):(o._summary=e,t.call(n,e))}).catch(i)},onError:function(r){o._connectionHolder.releaseConnection().then(function(){var e,t;e=r,null!=(t=o._stack)&&(e.stack=e.toString()+"\n"+t),o._error=r,i.call(n,r)}).catch(i)}}},Uo.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},Uo.prototype._releaseConnectionAndGetSummary=function(t){var e=xo.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(e){return o.releaseConnection().then(function(){return null==e?void 0:e.getProtocolVersion()})},function(e){}).then(function(e){return new No.default(r,n,t,e)})},Uo.prototype._createQueuedResultObserver=function(n){var t=this;function o(){var r={};return r.promise=new Promise(function(e,t){r.resolve=e,r.reject=t}),r}function i(e){return e instanceof Error}function r(){return ko(this,void 0,void 0,function(){var t;return Mo(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(t=u.shift())?t:(0,Do.newError)("Unexpected empty buffer",Do.PROTOCOL_ERROR),n(),i(t))throw t;return[2,t]}return a.resolvable=o(),[4,a.resolvable.promise];case 1:return[2,e.sent()]}})})}var u=[],a={resolvable:null},s={onNext:function(e){null!=t._mapper?s._push({done:!1,value:t._mapper(e)}):s._push({done:!1,value:e})},onCompleted:function(e){s._push({done:!0,value:e})},onError:function(e){s._push(e)},_push:function(e){var t;null!==a.resolvable?(t=a.resolvable,a.resolvable=null,i(e)?t.reject(e):t.resolve(e)):(u.push(e),n())},dequeue:r,dequeueUntilDone:function(){return ko(t,void 0,void 0,function(){var t;return Mo(this,function(e){switch(e.label){case 0:return[4,r()];case 1:return!0===(t=e.sent()).done?[2,t]:[3,0];case 2:return[2]}})})},head:function(){return ko(t,void 0,void 0,function(){var t,r;return Mo(this,function(e){switch(e.label){case 0:if(0<u.length){if(i(t=u[0]))throw t;return[2,t]}a.resolvable=o(),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,a.resolvable.promise];case 2:return t=e.sent(),u.unshift(t),[2,t];case 3:throw r=e.sent(),u.unshift(r),r;case 4:return n(),[7];case 5:return[2]}})})},get size(){return u.length}};return s};g=Uo;function Uo(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[Vo]="Result",this._stack=null!=(i=new Error("")).stack?i.stack.replace(/^Error(\n\r)*/,""):null,this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=n?n:Lo,this._keys=null,this._summary=null,this._error=null,this._mapper=null,this._watermarks=o}var Fo,Bo,Vo=Symbol.toStringTag,ln=(w(qo,Fo=g),qo);function qo(){return null!==Fo&&Fo.apply(this,arguments)||this}function Wo(){return null!==Bo&&Bo.apply(this,arguments)||this}w(Wo,Bo=g),Hn.default=ln;G={};Object.defineProperty(G,"__esModule",{value:!0});G.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};o={},Object.defineProperty(o,"__esModule",{value:!0}),o.Releasable=void 0,zo.prototype.release=function(){throw new Error("Not implemented")},O=zo;function zo(){}function Ho(){}o.Releasable=O,Ho.prototype.acquireConnection=function(e){throw Error("Not implemented")},Ho.prototype.supportsMultiDb=function(){throw Error("Not implemented")},Ho.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},Ho.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},Ho.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},Ho.prototype.SSREnabled=function(){return!1},Ho.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},Ho.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},Ho.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},Ho.prototype.close=function(){throw Error("Not implemented")},o.default=Ho;n={};function Go(){}Object.defineProperty(n,"__esModule",{value:!0}),Go.prototype.beginTransaction=function(e){throw new Error("Not implemented")},Go.prototype.run=function(e,t,r){throw new Error("Not implemented")},Go.prototype.commitTransaction=function(e){throw new Error("Not implemented")},Go.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},Go.prototype.resetAndFlush=function(){throw new Error("Not implemented")},Go.prototype.isOpen=function(){throw new Error("Not implemented")},Go.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},Go.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},n.default=Go;var j={},Yo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ko=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zo=(Object.defineProperty(j,"__esModule",{value:!0}),c),Qo=_,Xo=b,Jo=sr,$o=Gt,ei=t,ti=P(Hn);function ri(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,f=this;this._connectionHolder=t,this._reactive=i,this._state=ni.ACTIVE,this._onClose=r,this._onBookmarks=n,this._onConnection=o,this._onError=this._onErrorCallback.bind(this),this._fetchSize=u,this._onComplete=this._onCompleteCallback.bind(this),this._results=[],this._impersonatedUser=a,this._lowRecordWatermark=c,this._highRecordWatermark=s,this._bookmarks=Xo.Bookmarks.empty(),this._notificationFilter=l,this._apiTelemetryConfig=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){f._acceptActive=e})}ri.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return Yo(t,void 0,void 0,function(){var t,r=this;return Ko(this,function(e){switch(e.label){case 0:return(this._onConnection(),null==n)?[3,2]:(t=this,[4,o()]);case 1:return t._bookmarks=e.sent(),[2,n.beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,apiTelemetryConfig:this._apiTelemetryConfig,beforeError:function(e){null!=u&&u.onError(e),r._onError(e).catch(function(){})},afterComplete:function(e){null!=u&&u.onComplete(e),void 0!==e.db&&null!=(null==u?void 0:u.onDB)&&u.onDB(e.db),r._onComplete(e)}})];case 2:throw(0,ei.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},ri.prototype.run=function(e,t){e=(0,Zo.validateQueryAndParameters)(e,t),t=e.validatedQuery,e=e.params,t=this._state.run(t,e,{connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,reactive:this._reactive,fetchSize:this._fetchSize,highRecordWatermark:this._highRecordWatermark,lowRecordWatermark:this._lowRecordWatermark,preparationJob:this._activePromise});return this._results.push(t),t},ri.prototype.commit=function(){var t=this,r=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:function(e){return t._onCompleteCallback(e,t._bookmarks)},onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},ri.prototype.rollback=function(){var r=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},ri.prototype.isOpen=function(){return this._state===ni.ACTIVE},ri.prototype.close=function(){return Yo(this,void 0,void 0,function(){return Ko(this,function(e){switch(e.label){case 0:return this.isOpen()?[4,this.rollback()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},ri.prototype[Symbol.asyncDispose]=function(){return this.close()},ri.prototype._onErrorCallback=function(t){return this._state===ni.FAILED?Promise.resolve(null):(this._state=ni.FAILED,this._onClose(),this._results.forEach(function(e){e.isOpen()&&e._streamObserverPromise.then(function(e){return e.onError(t)}).catch(function(e){})}),this._connectionHolder.releaseConnection())},ri.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new Xo.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:Xo.Bookmarks.empty(),null==e?void 0:e.db)};var ni={ACTIVE:{commit:function(e){return{result:oi(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:ni.SUCCEEDED}},rollback:function(e){return{result:oi(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:ni.ROLLED_BACK}},run:function(t,r,e){var n=e.connectionHolder,o=e.onError,i=e.onComplete,u=e.onConnection,a=e.reactive,s=e.fetchSize,c=e.highRecordWatermark,l=e.lowRecordWatermark,e=e.preparationJob,f=null!=e?e:Promise.resolve();return ii(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.run(t,r,{bookmarks:Xo.Bookmarks.empty(),txConfig:Jo.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,ei.newError)("No connection available")}).catch(function(e){return new $o.FailedObserver({error:e,onError:o})}),t,r,n,c,l)}},FAILED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:ii(new $o.FailedObserver({error:(0,ei.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:r}),"COMMIT",{},t,0,0),state:ni.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:ii(new $o.CompletedObserver,"ROLLBACK",{},t,0,0),state:ni.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,ii(new $o.FailedObserver({error:(0,ei.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:o}),e,t,n,0,0)}},SUCCEEDED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:ii(new $o.FailedObserver({error:(0,ei.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},Qo.EMPTY_CONNECTION_HOLDER,0,0),state:ni.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:ii(new $o.FailedObserver({error:(0,ei.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},Qo.EMPTY_CONNECTION_HOLDER,0,0),state:ni.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,ii(new $o.FailedObserver({error:(0,ei.newError)("Cannot run query in this transaction, because it has already been committed."),onError:o}),e,t,n,0,0)}},ROLLED_BACK:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:ii(new $o.FailedObserver({error:(0,ei.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:ni.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:ii(new $o.FailedObserver({error:(0,ei.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:ni.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,ii(new $o.FailedObserver({error:(0,ei.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function oi(r,e,n,o,i,u,t){var a=null!=t?t:Promise.resolve(),t=e.getConnection().then(function(e){return a.then(function(){return e})}).then(function(t){return i(),u.forEach(function(e){return e._cancel()}),Promise.all(u.map(function(e){return e.summary()})).then(function(e){if(null!=t)return r?t.commitTransaction({beforeError:n,afterComplete:o}):t.rollbackTransaction({beforeError:n,afterComplete:o});throw(0,ei.newError)("No connection available")})}).catch(function(e){return new $o.FailedObserver({error:e,onError:n})});return new ti.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function ii(e,t,r,n,o,i){return void 0===n&&(n=Qo.EMPTY_CONNECTION_HOLDER),new ti.default(Promise.resolve(e),t,r,new Qo.ReadOnlyConnectionHolder(null!=n?n:Qo.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}j.default=ri;T={};function ui(e){e=e.run;this._run=e}Object.defineProperty(T,"__esModule",{value:!0}),ui.fromTransaction=function(e){return new ui({run:e.run.bind(e)})},ui.prototype.run=function(e,t){return this._run(e,t)},T.default=ui;var ai,si,ci,w={},g=r&&r.__extends||(ai=function(e,t){return(ai=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])})(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}ai(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),li=r&&r.__assign||function(){return(li=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ln=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},O=(Object.defineProperty(w,"__esModule",{value:!0}),ln(j)),P=(ci=O.default,g(fi,ci),fi.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},fi.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},fi.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},fi.prototype._getOrCreateBeginPromise=function(){var r=this;return null==this._beginPromise&&(this._beginPromise=new Promise(function(e,t){r._resolve=e,r._reject=t,null!=r._beginError&&t(r._beginError),null!=r._beginMetadata&&e(r._toTransaction())})),this._beginPromise},fi.prototype._toTransaction=function(){return li(li({},this),{run:ci.prototype.run.bind(this),commit:ci.prototype.commit.bind(this),rollback:ci.prototype.rollback.bind(this),close:ci.prototype.close.bind(this),isOpen:ci.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},fi.prototype._begin=function(e,t){return ci.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this),onDB:this._onDbCallback})},fi.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},fi.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},fi);function fi(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,f=e.apiTelemetryConfig,e=e.onDbCallback,t=ci.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:l,apiTelemetryConfig:f})||this;return t[si]="TransactionPromise",t._onDbCallback=e,t}si=Symbol.toStringTag,w.default=P;var ln={},O={},pi=(Object.defineProperty(O,"__esModule",{value:!0}),O.cacheKey=function(e,t){return null==t?void 0!==e?"basic"!==e.scheme?"kerberos"!==e.scheme?"bearer"!==e.scheme?"none"!==e.scheme?(0,pi.stringify)(e,{sortedElements:!0}):"none":"bearer:"+e.credentials:"kerberos:"+e.credentials:"basic:"+(null!=(e=e.principal)?e:""):"DEFAULT":"basic:"+t},F);var di=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},hi=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},bi=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},yi=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_i=(Object.defineProperty(ln,"__esModule",{value:!0}),Gt),vi=c,mi=y,gi=t,Oi=g(Hn),wi=_,Ei=m,Pi=b,Ti=sr,Si=g(w),ji=g(T),Ci=O;function Ii(e){var t=e.mode,r=e.connectionProvider,n=e.bookmarks,o=e.database,i=e.config,u=e.reactive,a=e.fetchSize,s=e.impersonatedUser,c=e.bookmarkManager,l=e.notificationFilter,f=e.auth,p=e.log,e=e.homeDatabaseCallback,t=(this._mode=t,this._database=o,this._reactive=u,this._fetchSize=a,this._homeDatabaseCallback=e,this._auth=f,this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new wi.ConnectionHolder({mode:mi.ACCESS_MODE_READ,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved.bind(this),getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:p}),this._writeConnectionHolder=new wi.ConnectionHolder({mode:mi.ACCESS_MODE_WRITE,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved.bind(this),getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:p}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:Pi.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Ei.TransactionExecutor(e)}(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=l,this._log=p,this._databaseGuess=null==i?void 0:i.cachedHomeDatabase,this._isRoutingSession=null!=(u=null==i?void 0:i.routingDriver)&&u}Ii.prototype.run=function(e,t,r){var o=this,e=(0,vi.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Ti.TxConfig(r,this._log):Ti.TxConfig.empty(),t=this._run(i,u,function(n){return di(o,void 0,void 0,function(){var t,r=this;return hi(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,apiTelemetryConfig:{api:mi.TELEMETRY_APIS.AUTO_COMMIT_TRANSACTION},impersonatedUser:this._impersonatedUser,afterComplete:function(e){return r._onCompleteCallback(e,t)},reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,onDb:this._onDatabaseNameResolved.bind(this)})]}})})});return this._results.push(t),t},Ii.prototype._run=function(e,t,r){var r=this._acquireAndConsumeConnection(r),n=r.connectionHolder,r=r.resultPromise.catch(function(e){return Promise.resolve(new _i.FailedObserver({error:e}))}),o={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new Oi.default(r,e,t,n,o)},Ii.prototype._acquireConnection=function(e){var r=this,e=this._acquireAndConsumeConnection(e),n=e.connectionHolder;return e.resultPromise.then(function(t){return di(r,void 0,void 0,function(){return hi(this,function(e){switch(e.label){case 0:return[4,n.releaseConnection()];case 1:return e.sent(),[2,t]}})})})},Ii.prototype._acquireAndConsumeConnection=function(t){var e=this._connectionHolderWithMode(this._mode),r=this._open?!this._hasTx&&e.initializeConnection(this._databaseGuess)?e.getConnection().then(function(e){return t(e)}):Promise.reject((0,gi.newError)("Queries cannot be run directly on a session with an open transaction; either run from within the transaction or use a different session.")):Promise.reject((0,gi.newError)("Cannot run query in a closed session."));return{connectionHolder:e,resultPromise:r}},Ii.prototype.beginTransaction=function(e){var t=Ti.TxConfig.empty();return null!=e&&(t=new Ti.TxConfig(e,this._log)),this._beginTransaction(this._mode,t,{api:mi.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},Ii.prototype._beginTransaction=function(e,t,r){var n=this;if(!this._open)throw(0,gi.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,gi.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");e=Ii._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(this._databaseGuess),this._hasTx=!0,e=new Si.default({connectionHolder:e,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmarks:function(e,t,r){return n._updateBookmarks(e,t,r)},onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,apiTelemetryConfig:r,onDbCallback:this._onDatabaseNameResolved.bind(this)});return e._begin(function(){return n._bookmarks()},t),e},Ii.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,gi.newError)("You cannot run more transactions on a closed session.")},Ii.prototype._transactionClosed=function(){this._hasTx=!1},Ii.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},Ii.prototype._bookmarks=function(){return di(this,void 0,void 0,function(){var t;return hi(this,function(e){switch(e.label){case 0:return[4,null==(t=this._bookmarkManager)?void 0:t.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Pi.Bookmarks(yi(yi([],bi(t),!1),bi(this._configuredBookmarks),!1))]}})})},Ii.prototype.executeRead=function(e,t){t=new Ti.TxConfig(t,this._log);return this._executeInTransaction(mi.ACCESS_MODE_READ,t,e)},Ii.prototype.executeWrite=function(e,t){t=new Ti.TxConfig(t,this._log);return this._executeInTransaction(mi.ACCESS_MODE_WRITE,t,e)},Ii.prototype._executeInTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e,ji.default.fromTransaction)},Ii.prototype._onDatabaseNameResolved=function(e){var t;this._isRoutingSession&&(this._databaseGuess=e,this._databaseNameResolved||(this._database=t=null!=e?e:"",this._readConnectionHolder.setDatabase(t),this._writeConnectionHolder.setDatabase(t),this._databaseNameResolved=!0,null!=this._homeDatabaseCallback&&this._homeDatabaseCallback((0,Ci.cacheKey)(this._auth,this._impersonatedUser),e)))},Ii.prototype._getConnectionAcquistionBookmarks=function(){return di(this,void 0,void 0,function(){var t;return hi(this,function(e){switch(e.label){case 0:return[4,null==(t=this._bookmarkManager)?void 0:t.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Pi.Bookmarks(yi(yi([],bi(this._configuredBookmarks),!1),bi(t),!1))]}})})},Ii.prototype._updateBookmarks=function(e,t,r){var n;null==e||e.isEmpty()||(null!=(n=this._bookmarkManager)&&n.updateBookmarks(null!=(n=null==t?void 0:t.values())?n:[],null!=(t=null==e?void 0:e.values())?t:[]).catch(function(){}),this._lastBookmarks=e,this._configuredBookmarks=Pi.Bookmarks.empty())},Ii.prototype.close=function(){return di(this,void 0,void 0,function(){return hi(this,function(e){switch(e.label){case 0:return this._open?(this._open=!1,this._results.forEach(function(e){return e._cancel()}),this._transactionExecutor.close(),[4,this._readConnectionHolder.close(this._hasTx)]):[3,3];case 1:return e.sent(),[4,this._writeConnectionHolder.close(this._hasTx)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},Ii.prototype[Symbol.asyncDispose]=function(){return this.close()},Ii.prototype._connectionHolderWithMode=function(e){if(e===mi.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===mi.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,gi.newError)("Unknown access mode: "+e)},Ii.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new Pi.Bookmarks(e.bookmark),t,e.db)},Ii.prototype._calculateWatermaks=function(){return this._fetchSize===mi.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},Ii.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},Ii._validateSessionMode=function(e){e=null!=e?e:mi.ACCESS_MODE_WRITE;if(e!==mi.ACCESS_MODE_READ&&e!==mi.ACCESS_MODE_WRITE)throw(0,gi.newError)("Illegal session mode "+e);return e},ln.default=Ii;var P={},Gt={},Ri=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ai=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ki=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Mi=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ni=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},_=(Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new Di(t,e.bookmarksSupplier,e.bookmarksConsumer)},xi.prototype.updateBookmarks=function(e,t){return Ri(this,void 0,void 0,function(){return Ai(this,function(e){throw new Error("Not implemented")})})},xi.prototype.getBookmarks=function(){return Ri(this,void 0,void 0,function(){return Ai(this,function(e){throw new Error("Not implemented")})})},xi);function xi(){throw new Error("Not implemented")}Gt.default=_;Li.prototype.updateBookmarks=function(f,p){return Ri(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return Ai(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=ki(f),n=r.next();!n.done;n=r.next())u=n.value,t.delete(u)}catch(e){a={error:e}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}}try{for(o=ki(p),i=o.next();!i.done;i=o.next())u=i.value,t.add(u)}catch(e){c={error:e}}finally{try{i&&!i.done&&(l=o.return)&&l.call(o)}finally{if(c)throw c.error}}return"function"!=typeof this._bookmarksConsumer?[3,2]:[4,this._bookmarksConsumer(Ni([],Mi(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Li.prototype.getBookmarks=function(){return Ri(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return Ai(this,function(e){switch(e.label){case 0:return t=new Set(this._bookmarks),"function"!=typeof this._bookmarksSupplier?[3,2]:[4,this._bookmarksSupplier()];case 1:a=null!=(a=e.sent())?a:[];try{for(r=ki(a),n=r.next();!n.done;n=r.next())o=n.value,t.add(o)}catch(e){i={error:e}}finally{try{n&&!n.done&&(u=r.return)&&u.call(r)}finally{if(i)throw i.error}}e.label=2;case 2:return[2,Ni([],Mi(t),!1)]}})})};var Di=Li;function Li(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var m={},Ui=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Fi=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},sr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Bi=(Object.defineProperty(m,"__esModule",{value:!0}),sr(G)),Vi=t;function qi(){}qi.prototype.eagerResultTransformer=function(){return Wi},qi.prototype.eager=function(){return Wi},qi.prototype.mappedResultTransformer=function(e){return zi(e)},qi.prototype.mapped=function(e){return zi(e)},qi.prototype.first=function(){return Hi},qi.prototype.summary=function(){return Gi},qi.prototype.hydrated=function(r,n){var e=this;return function(t){return Ui(e,void 0,void 0,function(){return Fi(this,function(e){switch(e.label){case 0:return[4,t.as(r,n).then()];case 1:return[2,e.sent()]}})})}};g=new qi;function Wi(o){return Ui(this,void 0,void 0,function(){var t,r,n;return Fi(this,function(e){switch(e.label){case 0:return[4,o];case 1:return r=e.sent(),t=r.summary,r=r.records,[4,o.keys()];case 2:return n=e.sent(),[2,new Bi.default(n,r,t)]}})})}function zi(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,Vi.newError)("Requires a map or/and a collect functions.");return function(o){return Ui(e,void 0,void 0,function(){return Fi(this,function(e){switch(e.label){case 0:return[4,new Promise(function(t,r){var n={records:[],keys:[]};o.subscribe({onKeys:function(e){n.keys=e},onNext:function(e){var t;null!=i.map?void 0!==(t=i.map(e))&&n.records.push(t):n.records.push(e)},onCompleted:function(e){null!=i.collect?t(i.collect(n.records,e,n.keys)):(e={records:n.records,summary:e,keys:n.keys},t(e))},onError:function(e){r(e)}})})];case 1:return[2,e.sent()]}})})}}function Hi(o){return Ui(this,void 0,void 0,function(){var t,r,n;return Fi(this,function(e){switch(e.label){case 0:return[4,(t=o[Symbol.asyncIterator]()).next()];case 1:n=e.sent(),r=n.value,n=n.done,e.label=2;case 2:return e.trys.push([2,,3,6]),!0===n?[2,void 0]:[2,r];case 3:return null==t.return?[3,5]:[4,t.return()];case 4:e.sent(),e.label=5;case 5:return[7];case 6:return[2]}})})}function Gi(t){return Ui(this,void 0,void 0,function(){return Fi(this,function(e){switch(e.label){case 0:return[4,t.summary()];case 1:return[2,e.sent()]}})})}Object.freeze(g),m.default=g;var _={},Yi=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ki=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Zi=(Object.defineProperty(_,"__esModule",{value:!0}),y);function Qi(e){this._createSession=e}Qi.prototype.execute=function(o,i,u){return Yi(this,void 0,void 0,function(){var t,r,n=this;return Ki(this,function(e){switch(e.label){case 0:t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser,auth:o.auth}),r=function(e,t,r){"function"==typeof(null==e?void 0:e.addEventListener)&&e.addEventListener(t,r);return{uninstall:function(){"function"==typeof(null==e?void 0:e.removeEventListener)&&e.removeEventListener(t,r)}}}(o.signal,"abort",function(){return Yi(n,void 0,void 0,function(){return Ki(this,function(e){switch(e.label){case 0:return[4,t.close()];case 1:return[2,e.sent()]}})})}),t._configureTransactionExecutor(!0,Zi.TELEMETRY_APIS.EXECUTE_QUERY),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READ"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return Yi(n,void 0,void 0,function(){var t;return Ki(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})},o.transactionConfig)];case 2:return[2,e.sent()];case 3:return r.uninstall(),[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},_.default=Qi;sr={};function Xi(e){this.maxSize=e,this.pruneCount=Math.max(Math.round(.01*e*Math.log(e)),1),this.map=new Map}Object.defineProperty(sr,"__esModule",{value:!0}),Xi.prototype.set=function(e,t){this.map.set(e,{database:t,lastUsed:Date.now()}),this._pruneCache()},Xi.prototype.get=function(e){e=this.map.get(e);if(void 0!==e)return e.lastUsed=Date.now(),e.database},Xi.prototype.delete=function(e){this.map.delete(e)},Xi.prototype._pruneCache=function(){if(this.map.size>this.maxSize)for(var e=Array.from(this.map.entries()).sort(function(e,t){return e[1].lastUsed-t[1].lastUsed}),t=0;t<this.pruneCount;t++)this.map.delete(e[t][0])},sr.default=Xi;function Ji(){this.routing=mu.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0,this.transactionConfig=void 0,this.auth=void 0,this.signal=void 0}var $i=r&&r.__assign||function(){return($i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},eu=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},tu=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ru=(Object.defineProperty(P,"__esModule",{value:!0}),P.QueryConfig=P.SessionConfig=P.routing=P.WRITE=P.READ=P.Driver=void 0,b),nu=g(E),ou=y,iu=v,uu=g(ln),au=c,su=Gt,cu=g(m),lu=g(_),fu=t,pu=g(sr),du=O,hu=36e5,bu=1e3,yu=ou.ACCESS_MODE_READ,_u=(P.READ=yu,ou.ACCESS_MODE_WRITE),vu=(P.WRITE=_u,0),mu=(P.SessionConfig=function(){this.defaultAccessMode=_u,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.auth=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0},{WRITE:"WRITE",READ:"READ"}),b=(P.routing=mu,Object.freeze(mu),P.QueryConfig=Ji,Object.defineProperty(gu.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),gu.prototype.executeQuery=function(e,t){return eu(this,arguments,void 0,function(t,r,n){var o,i,u;return void 0===n&&(n={}),tu(this,function(e){switch(e.label){case 0:if(o=null===n.bookmarkManager?void 0:null!=(o=n.bookmarkManager)?o:this.executeQueryBookmarkManager,i=null!=(i=n.resultTransformer)?i:cu.default.eager(),(u=null!=(u=n.routing)?u:mu.WRITE)!==mu.READ&&u!==mu.WRITE)throw(0,fu.newError)('Illegal query routing config: "'.concat(u,'"'));return[4,this._queryExecutor.execute({resultTransformer:i,bookmarkManager:o,routing:u,database:n.database,impersonatedUser:n.impersonatedUser,transactionConfig:n.transactionConfig,auth:n.auth,signal:n.signal},t,r)];case 1:return[2,e.sent()]}})})},gu.prototype.verifyConnectivity=function(e){var e=(void 0===e?{}:e).database,r=void 0===e?"":e,n=this._getOrCreateConnectionProvider();return new Promise(function(e,t){n.verifyConnectivityAndGetServerInfo({database:r,accessMode:yu}).then(function(){return e()}).catch(function(e){return t(e)})})},gu.prototype.verifyAuthentication=function(){return eu(this,arguments,void 0,function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return tu(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:yu})];case 1:return[2,e.sent()]}})})},gu.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:yu})},gu.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},gu.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},gu.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},gu.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},gu.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},gu.prototype.isEncrypted=function(){return this._isEncrypted()},gu.prototype._supportsRouting=function(){return this._meta.routing},gu.prototype._isEncrypted=function(){return this._config.encrypted===au.ENCRYPTION_ON||!0===this._config.encrypted},gu.prototype._getTrust=function(){return this._config.trust},gu.prototype.session=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.bookmarks,n=e.database,o=e.impersonatedUser,i=e.fetchSize,u=e.bookmarkManager,a=e.notificationFilter,e=e.auth;return this._newSession({defaultAccessMode:void 0===t?_u:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:wu(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,auth:e})},gu.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},gu.prototype[Symbol.asyncDispose]=function(){return this.close()},gu.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},gu.prototype._homeDatabaseCallback=function(e,t){this.homeDatabaseCache.set(e,t)},gu.prototype._newSession=function(e){var t=e.defaultAccessMode,r=e.bookmarkOrBookmarks,n=e.database,o=e.reactive,i=e.impersonatedUser,u=e.fetchSize,a=e.bookmarkManager,s=e.notificationFilter,e=e.auth,t=uu.default._validateSessionMode(t),c=this._getOrCreateConnectionProvider(),l=this.homeDatabaseCache.get((0,du.cacheKey)(e,i)),f=this._homeDatabaseCallback.bind(this),r=null!=r?new ru.Bookmarks(r):ru.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:c,bookmarks:r,config:$i({cachedHomeDatabase:l,routingDriver:this._supportsRouting()},this._config),reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:s,auth:e,log:this._log,homeDatabaseCallback:f})},gu.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new nu.default(e.resolver)))),this._connectionProvider},gu);function gu(e,t,r,n,o){void 0===n&&(n=function(e){return new uu.default(e)}),void 0===o&&(o=function(e){return new lu.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=Ou(i.maxConnectionLifetime,hu),i.maxConnectionPoolSize=Ou(i.maxConnectionPoolSize,ou.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=Ou(i.connectionAcquisitionTimeout,ou.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=wu(i.fetchSize,bu),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?ou.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i),i.connectionLivenessCheckTimeout=function(e){if(null==e)return;e=parseInt(e,10);if(e<0||Number.isNaN(e))throw new Error("The connectionLivenessCheckTimeout can only be a positive value or 0 for always. However connectionLivenessCheckTimeout = ".concat(e));return e}(i.connectionLivenessCheckTimeout);var i=iu.Logger.create(t);!function(e,t){var r=e.resolver;if(null!=r&&"function"!=typeof r)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof r));e.connectionAcquisitionTimeout<e.connectionTimeout&&t.warn('Configuration for "connectionAcquisitionTimeout" should be greater than or equal to "connectionTimeout". Otherwise, the connection acquisition timeout will take precedence for over the connection timeout in scenarios where a new connection is created while it is acquired');if(null==(null==(r=e.notificationFilter)?void 0:r.disabledCategories)||null==(null==(t=e.notificationFilter)?void 0:t.disabledClassifications))return;throw new Error('The notificationFilter can\'t have both "disabledCategories" and "disabledClassifications" configured at the same time.')}(t,i),this._id=vu++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,su.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this.homeDatabaseCache=new pu.default(1e4),this._afterConstruction()}function Ou(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function wu(e,t){e=parseInt(e,10);if(0<e||e===ou.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(ou.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}P.Driver=b,P.default=b;var E={},Eu=(Object.defineProperty(E,"__esModule",{value:!0}),t),Pu=F;function Tu(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}E.default={basic:function(e,t,r){return null!=r?{scheme:"basic",principal:e,credentials:t,realm:r}:{scheme:"basic",principal:e,credentials:t}},kerberos:function(e){return{scheme:"kerberos",principal:"",credentials:e}},bearer:function(e){return{scheme:"bearer",credentials:e}},none:function(){return{scheme:"none"}},custom:function(e,t,r,n,o){n={scheme:n,principal:e};if(Tu(t)&&(n.credentials=t),Tu(r)&&(n.realm=r),Tu(o)){try{(0,Pu.stringify)(o)}catch(e){throw(0,Eu.newError)("Circular references in custom auth token parameters",void 0,e)}n.parameters=o}return n}};var y={},Su=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},ju=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},v=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cu=(Object.defineProperty(y,"__esModule",{value:!0}),y.authTokenManagers=y.AuthTokenAndExpiration=void 0,y.staticAuthTokenManager=function(e){e=e.authToken;return new Du(e)},v(E)),Iu=h;function Ru(){}function Au(){}Ru.prototype.getToken=function(){throw new Error("Not Implemented")},Ru.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},y.default=Ru,y.AuthTokenAndExpiration=function(){this.token=Cu.default.none(),this.expiration=void 0},Au.prototype.bearer=function(e){e=e.tokenProvider;if("function"!=typeof e)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof e));return new Nu(e,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},Au.prototype.basic=function(e){var t=this,r=e.tokenProvider;if("function"!=typeof r)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof r));return new Nu(function(){return Su(t,void 0,void 0,function(){var t;return ju(this,function(e){switch(e.label){case 0:return t={},[4,r()];case 1:return[2,(t.token=e.sent(),t)]}})})},["Neo.ClientError.Security.Unauthorized"])};c=new Au;y.authTokenManagers=c,Object.freeze(c);Mu.prototype.subscribe=function(e){this._subscribers.push(e)},Mu.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},Mu.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var ku=Mu;function Mu(e){this._subscribers=e=void 0===e?[]:e}xu.prototype.getToken=function(){return Su(this,void 0,void 0,function(){var t;return ju(this,function(e){switch(e.label){case 0:return void 0===this._currentAuthData||void 0!==this._currentAuthData.expiration&&this._currentAuthData.expiration<new Date?[4,this._refreshAuthToken()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2,null==(t=this._currentAuthData)?void 0:t.token]}})})},xu.prototype.handleSecurityException=function(e,t){return!!this._handledSecurityCodes.includes(t)&&(Iu.util.equals(e,null==(t=this._currentAuthData)?void 0:t.token)&&this._scheduleRefreshAuthToken(),!0)},xu.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new ku,Promise.resolve(this._tokenProvider()).then(function(e){var t;r._currentAuthData=e,null!=(t=r._refreshObservable)&&t.onCompleted(e)}).catch(function(e){var t;null!=(t=r._refreshObservable)&&t.onError(e)}).finally(function(){r._refreshObservable=void 0})),void 0!==e&&this._refreshObservable.subscribe(e)},xu.prototype._refreshAuthToken=function(){return Su(this,void 0,void 0,function(){var r=this;return ju(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e,t){r._scheduleRefreshAuthToken({onCompleted:e,onError:t})})];case 1:return[2,e.sent()]}})})};var Nu=xu;function xu(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}Lu.prototype.getToken=function(){return this._authToken},Lu.prototype.handleSecurityException=function(e,t){return!1};var Du=Lu;function Lu(e){this._authToken=e}function Uu(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0}var Fu,Bu,_={},g=r&&r.__extends||(Fu=function(e,t){return(Fu=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])})(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}Fu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),sr=(Object.defineProperty(_,"__esModule",{value:!0}),_.InternalConfig=_.Config=void 0,_.Config=Uu,g(Vu,Bu=Uu),Vu);function Vu(){return null!==Bu&&Bu.apply(this,arguments)||this}_.InternalConfig=sr;var qu,Wu,O={},b=r&&r.__extends||(qu=function(e,t){return(qu=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])})(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}qu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),zu=r&&r.__assign||function(){return(zu=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Hu=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Gu=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),v=r&&r.__importStar||(Wu=function(e){return(Wu=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Wu(e),n=0;n<r.length;n++)"default"!==r[n]&&Hu(t,e,r[n]);return Gu(t,e),t}),Yu=(Object.defineProperty(O,"__esModule",{value:!0}),O.clientCertificateProviders=O.RotatingClientCertificateProvider=O.ClientCertificateProvider=void 0,O.resolveCertificateProvider=function(e){if(null==e)return;if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;{var t;if(Ju(e))return t=zu({},e),{getClientCertificate:function(){return t},hasUpdate:function(){return!1}}}throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(Yu.stringify(e)))},v(F)),c=(O.default=function(){this.certfile="",this.keyfile="",this.password=void 0},Ku.prototype.hasUpdate=function(){throw new Error("Not Implemented")},Ku.prototype.getClientCertificate=function(){throw new Error("Not Implemented")},Ku);function Ku(){}O.ClientCertificateProvider=c;b(Qu,Zu=c),Qu.prototype.updateCertificate=function(e){throw new Error("Not implemented")};var Zu,g=Qu;function Qu(){return null!==Zu&&Zu.apply(this,arguments)||this}function Xu(){}O.RotatingClientCertificateProvider=g,Xu.prototype.rotating=function(e){e=e.initialCertificate;if(null==e||!Ju(e))throw new TypeError("initialCertificate should be ClientCertificate, but got ".concat(Yu.stringify(e)));e=zu({},e);return new ra(e)};sr=new Xu;function Ju(e){return null!=e&&"object"==typeof e&&"certfile"in e&&($u(r=e.certfile)||ea(r,$u))&&"keyfile"in e&&(t(r=e.keyfile)||ea(r,t))&&ta("password",e);function t(e){return"string"==typeof e||null!=e&&"object"==typeof e&&"path"in e&&"string"==typeof e.path&&ta("password",e)}var r}function $u(e){return"string"==typeof e}function ea(e,t,r){return void 0===r&&(r=!1),Array.isArray(e)&&(r||0<e.length)&&e.filter(t).length===e.length}function ta(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}O.clientCertificateProviders=sr,Object.freeze(sr);na.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},na.prototype.getClientCertificate=function(){return this._certificate},na.prototype.updateCertificate=function(e){if(!Ju(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(Yu.stringify(e)));this._certificate=zu({},e),this._updated=!0};var ra=na;function na(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}var v={},oa=(Object.defineProperty(v,"__esModule",{value:!0}),v.vector=function(t){try{return new aa(t)}catch(e){throw(0,oa.newError)("Invalid argument type passed to vector constructor function: should be signed integer or float TypedArray, got: ".concat(null!=(t=null==(t=null==t?void 0:t.constructor)?void 0:t.name)?t:"undefined or type without constructor name"))}},v.isVector=function(e){return null!=e&&!0===e[ia]},t),ia="__isVector__",ua={INT8:"INT8",INT16:"INT16",INT32:"INT32",INT64:"INT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"},aa=(Object.freeze(ua),sa.prototype.asTypedArray=function(){return this._typedArray},sa.prototype.getType=function(){return this._type},sa.prototype.toString=function(){return"vector([".concat(this._typedArray.join(", "),"], ").concat(this._typedArray.length,", ").concat(function(e){switch(e){case"INT8":return"INTEGER8 NOT NULL";case"INT16":return"INTEGER16 NOT NULL";case"INT32":return"INTEGER32 NOT NULL";case"INT64":return"INTEGER NOT NULL";case"FLOAT32":return"FLOAT32 NOT NULL";case"FLOAT64":return"FLOAT NOT NULL";default:throw(0,oa.newError)("Cannot stringify vector with unsupported type. Got type: ".concat(e))}}(this._type),")")},sa);function sa(e){var t;if(e instanceof Int8Array)this._type=ua.INT8;else if(e instanceof Int16Array)this._type=ua.INT16;else if(e instanceof Int32Array)this._type=ua.INT32;else if(e instanceof BigInt64Array)this._type=ua.INT64;else if(e instanceof Float32Array)this._type=ua.FLOAT32;else{if(!(e instanceof Float64Array))throw(0,oa.newError)("Invalid argument type passed to Vector constructor: should be signed integer or float TypedArray, got: ".concat(null!=(t=null==(t=null==e?void 0:e.constructor)?void 0:t.name)?t:"undefined or type without constructor name"));this._type=ua.FLOAT64}this._typedArray=e}v.default=aa,Object.defineProperty(aa.prototype,ia,{value:!0,enumerable:!1,configurable:!1,writable:!1});var b={},ca=r&&r.__assign||function(){return(ca=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},c=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},la=(Object.defineProperty(b,"__esModule",{value:!0}),b.rule=void 0,l),fa=p,pa=gt,da=u,ha=c(v);function ba(e,t){if(null!=t){if(!0===t.stringify)return e.toString();if(!0===t.toStandardDate)return e.toStandardDate()}return e}b.rule=Object.freeze({asBoolean:function(e){return ca({validate:function(e,t){if("boolean"!=typeof e)throw new TypeError("".concat(t," should be a boolean but received ").concat(typeof e))}},e)},asString:function(e){return ca({validate:function(e,t){if("string"!=typeof e)throw new TypeError("".concat(t," should be a string but received ").concat(typeof e))}},e)},asNumber:function(r){return ca({validate:function(e,t){if("object"==typeof e&&void 0!==e.low&&void 0!==e.high&&2===Object.keys(e).length)throw new TypeError("Number returned as Object. To use asNumber mapping, set disableLosslessIntegers or useBigInt in driver config object");if("number"!=typeof e&&(!0!==(null==r?void 0:r.acceptBigInt)||"bigint"!=typeof e))throw new TypeError("".concat(t," should be a number but received ").concat(typeof e))},convert:function(e){return"bigint"==typeof e?Number(e):e}},r)},asBigInt:function(r){return ca({validate:function(e,t){if("bigint"!=typeof e&&(!0!==(null==r?void 0:r.acceptNumber)||"number"!=typeof e))throw new TypeError("".concat(t," should be a bigint but received ").concat(typeof e))},convert:function(e){return"number"==typeof e?BigInt(e):e}},r)},asNode:function(e){return ca({validate:function(e,t){if(!(0,fa.isNode)(e))throw new TypeError("".concat(t," should be a Node but received ").concat(typeof e))}},e)},asRelationship:function(e){return ca({validate:function(e,t){if(!(0,fa.isRelationship)(e))throw new TypeError("".concat(t," should be a Relationship but received ").concat(typeof e))}},e)},asUnboundRelationship:function(e){return ca({validate:function(e,t){if(!(0,fa.isUnboundRelationship)(e))throw new TypeError("".concat(t," should be a UnboundRelationship but received ").concat(typeof e))}},e)},asPath:function(e){return ca({validate:function(e,t){if(!(0,fa.isPath)(e))throw new TypeError("".concat(t," should be a Path but received ").concat(typeof e))}},e)},asPoint:function(e){return ca({validate:function(e,t){if(!(0,pa.isPoint)(e))throw new TypeError("".concat(t," should be a Point but received ").concat(typeof e))}},e)},asDuration:function(t){return ca({validate:function(e,t){if(!(0,da.isDuration)(e))throw new TypeError("".concat(t," should be a Duration but received ").concat(typeof e))},convert:function(e){return!0===(null==t?void 0:t.stringify)?e.toString():e}},t)},asLocalTime:function(t){return ca({validate:function(e,t){if(!(0,da.isLocalTime)(e))throw new TypeError("".concat(t," should be a LocalTime but received ").concat(typeof e))},convert:function(e){return!0===(null==t?void 0:t.stringify)?e.toString():e}},t)},asTime:function(t){return ca({validate:function(e,t){if(!(0,da.isTime)(e))throw new TypeError("".concat(t," should be a Time but received ").concat(typeof e))},convert:function(e){return!0===(null==t?void 0:t.stringify)?e.toString():e}},t)},asDate:function(t){return ca({validate:function(e,t){if(!(0,da.isDate)(e))throw new TypeError("".concat(t," should be a Date but received ").concat(typeof e))},convert:function(e){return ba(e,t)}},t)},asLocalDateTime:function(t){return ca({validate:function(e,t){if(!(0,da.isLocalDateTime)(e))throw new TypeError("".concat(t," should be a LocalDateTime but received ").concat(typeof e))},convert:function(e){return ba(e,t)}},t)},asDateTime:function(t){return ca({validate:function(e,t){if(!(0,da.isDateTime)(e))throw new TypeError("".concat(t," should be a DateTime but received ").concat(typeof e))},convert:function(e){return ba(e,t)}},t)},asList:function(n){return ca({validate:function(e,t){if(!Array.isArray(e))throw new TypeError("".concat(t," should be a list but received ").concat(typeof e))},convert:function(e,r){return null!=(null==n?void 0:n.apply)?e.map(function(e,t){return(0,la.valueAs)(e,"".concat(r,"[").concat(t,"]"),n.apply)}):e}},n)},asVector:function(t){return ca({validate:function(e,t){if(!(e instanceof ha.default))throw new TypeError("".concat(t," should be a vector but received ").concat(typeof e))},convert:function(e){return!0===(null==t?void 0:t.asTypedList)?e._typedArray:e}},t)}});var g={},ya=r&&r.__assign||function(){return(ya=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_a=(Object.defineProperty(g,"__esModule",{value:!0}),l),va=b;g.default={booleanProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asBoolean(r)}},stringProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asString(r)}},numberProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asNumber(r)}},bigIntProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asBigInt(r)}},nodeProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asNode(r)}},relationshipProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asRelationship(r)}},pathProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asPath(r)}},pointProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asPoint(r)}},durationProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asDuration(r)}},listProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asList(ya({apply:ya({},t.metadata[t.name])},r))}},vectorProperty:function(r){return function(e,t){t.metadata[t.name]=va.rule.asVector(r)}},optionalProperty:function(){return function(e,t){t.metadata[t.name]=ya({optional:!0},t.metadata[t.name])}},mapPropertyFromName:function(r){return function(e,t){t.metadata[t.name]=ya({from:r},t.metadata[t.name])}},convertPropertyToType:function(r){return function(e,t){t.metadata[t.name]=ya({convert:function(e){return e.as(r)}},t.metadata[t.name])}},mappedClass:function(){return function(e,t){_a.rulesRegistry[t.name]=t.metadata}}};var ma,ga,Oa,wa,Ea,Pa,Ta,Sa,ja,Ca,Ia,Ra,Aa,ka,Ma,Na,xa,Da,La,Ua,Fa,Ba,sr={},Va=(Object.defineProperty(sr,"__esModule",{value:!0}),sr.isUnsupportedType=function(e){return null!=e&&!0===e[Va]},"__isUnsupportedType__"),c=(qa.prototype.toString=function(){return"UnsupportedType<".concat(this.name,">")},qa);function qa(e,t,r,n){this.name=e,this.minimumProtocolVersion="".concat(t,".").concat(r),this.message=n}sr.default=c,Object.defineProperty(c.prototype,Va,{value:!0,enumerable:!1,configurable:!1,writable:!1}),c=e,ga=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Oa=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),C=r&&r.__importStar||(ma=function(e){return(ma=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=ma(e),n=0;n<r.length;n++)"default"!==r[n]&&ga(t,e,r[n]);return Oa(t,e),t}),rc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(c,"__esModule",{value:!0}),c.Result=c.Stats=c.QueryStatistics=c.ProfiledPlan=c.Plan=c.GqlStatusObject=c.Notification=c.ServerInfo=c.queryType=c.ResultSummary=c.Record=c.isPathSegment=c.PathSegment=c.isPath=c.Path=c.isUnboundRelationship=c.UnboundRelationship=c.isRelationship=c.Relationship=c.isNode=c.Node=c.Time=c.LocalTime=c.LocalDateTime=c.isTime=c.isLocalTime=c.isLocalDateTime=c.isDuration=c.isDateTime=c.isDate=c.Duration=c.DateTime=c.Date=c.Point=c.isPoint=c.internal=c.toString=c.toNumber=c.inSafeRange=c.isInt=c.int=c.Integer=c.error=c.isRetriableError=c.isRetryableError=c.GQLError=c.newGQLError=c.Neo4jError=c.newError=c.authTokenManagers=void 0,c.isUnsupportedType=c.UnsupportedType=c.StandardCase=c.RecordObjectMapping=c.mappingDecorators=c.rule=c.ProtocolVersion=c.vector=c.Vector=c.isVector=c.resolveCertificateProvider=c.clientCertificateProviders=c.notificationFilterMinimumSeverityLevel=c.notificationFilterDisabledClassification=c.notificationFilterDisabledCategory=c.notificationSeverityLevel=c.notificationClassification=c.notificationCategory=c.resultTransformers=c.routing=c.staticAuthTokenManager=c.bookmarkManager=c.auth=c.json=c.driver=c.types=c.Driver=c.Session=c.TransactionPromise=c.ManagedTransaction=c.Transaction=c.Connection=c.Releasable=c.ConnectionProvider=c.EagerResult=void 0,wa=t,Object.defineProperty(c,"newError",{enumerable:!0,get:function(){return wa.newError}}),Object.defineProperty(c,"Neo4jError",{enumerable:!0,get:function(){return wa.Neo4jError}}),Object.defineProperty(c,"newGQLError",{enumerable:!0,get:function(){return wa.newGQLError}}),Object.defineProperty(c,"GQLError",{enumerable:!0,get:function(){return wa.GQLError}}),Object.defineProperty(c,"isRetryableError",{enumerable:!0,get:function(){return wa.isRetryableError}}),Object.defineProperty(c,"isRetriableError",{enumerable:!0,get:function(){return wa.isRetriableError}}),Ea=C(i),c.Integer=Ea.default,Object.defineProperty(c,"int",{enumerable:!0,get:function(){return Ea.int}}),Object.defineProperty(c,"isInt",{enumerable:!0,get:function(){return Ea.isInt}}),Object.defineProperty(c,"inSafeRange",{enumerable:!0,get:function(){return Ea.inSafeRange}}),Object.defineProperty(c,"toNumber",{enumerable:!0,get:function(){return Ea.toNumber}}),Object.defineProperty(c,"toString",{enumerable:!0,get:function(){return Ea.toString}}),Pa=u,Object.defineProperty(c,"Date",{enumerable:!0,get:function(){return Pa.Date}}),Object.defineProperty(c,"DateTime",{enumerable:!0,get:function(){return Pa.DateTime}}),Object.defineProperty(c,"Duration",{enumerable:!0,get:function(){return Pa.Duration}}),Object.defineProperty(c,"isDate",{enumerable:!0,get:function(){return Pa.isDate}}),Object.defineProperty(c,"isDateTime",{enumerable:!0,get:function(){return Pa.isDateTime}}),Object.defineProperty(c,"isDuration",{enumerable:!0,get:function(){return Pa.isDuration}}),Object.defineProperty(c,"isLocalDateTime",{enumerable:!0,get:function(){return Pa.isLocalDateTime}}),Object.defineProperty(c,"isLocalTime",{enumerable:!0,get:function(){return Pa.isLocalTime}}),Object.defineProperty(c,"isTime",{enumerable:!0,get:function(){return Pa.isTime}}),Object.defineProperty(c,"LocalDateTime",{enumerable:!0,get:function(){return Pa.LocalDateTime}}),Object.defineProperty(c,"LocalTime",{enumerable:!0,get:function(){return Pa.LocalTime}}),Object.defineProperty(c,"Time",{enumerable:!0,get:function(){return Pa.Time}}),Ta=p,Object.defineProperty(c,"Node",{enumerable:!0,get:function(){return Ta.Node}}),Object.defineProperty(c,"isNode",{enumerable:!0,get:function(){return Ta.isNode}}),Object.defineProperty(c,"Relationship",{enumerable:!0,get:function(){return Ta.Relationship}}),Object.defineProperty(c,"isRelationship",{enumerable:!0,get:function(){return Ta.isRelationship}}),Object.defineProperty(c,"UnboundRelationship",{enumerable:!0,get:function(){return Ta.UnboundRelationship}}),Object.defineProperty(c,"isUnboundRelationship",{enumerable:!0,get:function(){return Ta.isUnboundRelationship}}),Object.defineProperty(c,"Path",{enumerable:!0,get:function(){return Ta.Path}}),Object.defineProperty(c,"isPath",{enumerable:!0,get:function(){return Ta.isPath}}),Object.defineProperty(c,"PathSegment",{enumerable:!0,get:function(){return Ta.PathSegment}}),Object.defineProperty(c,"isPathSegment",{enumerable:!0,get:function(){return Ta.isPathSegment}}),t=rc(jt),c.Record=t.default,Sa=gt,Object.defineProperty(c,"isPoint",{enumerable:!0,get:function(){return Sa.isPoint}}),Object.defineProperty(c,"Point",{enumerable:!0,get:function(){return Sa.Point}}),ja=C(Wt),c.ResultSummary=ja.default,Object.defineProperty(c,"queryType",{enumerable:!0,get:function(){return ja.queryType}}),Object.defineProperty(c,"ServerInfo",{enumerable:!0,get:function(){return ja.ServerInfo}}),Object.defineProperty(c,"Plan",{enumerable:!0,get:function(){return ja.Plan}}),Object.defineProperty(c,"ProfiledPlan",{enumerable:!0,get:function(){return ja.ProfiledPlan}}),Object.defineProperty(c,"QueryStatistics",{enumerable:!0,get:function(){return ja.QueryStatistics}}),Object.defineProperty(c,"Stats",{enumerable:!0,get:function(){return ja.Stats}}),Ca=C(zn),c.GqlStatusObject=Ca.default,Object.defineProperty(c,"Notification",{enumerable:!0,get:function(){return Ca.Notification}}),Object.defineProperty(c,"notificationCategory",{enumerable:!0,get:function(){return Ca.notificationCategory}}),Object.defineProperty(c,"notificationClassification",{enumerable:!0,get:function(){return Ca.notificationClassification}}),Object.defineProperty(c,"notificationSeverityLevel",{enumerable:!0,get:function(){return Ca.notificationSeverityLevel}}),Ia=S,Object.defineProperty(c,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return Ia.notificationFilterDisabledCategory}}),Object.defineProperty(c,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return Ia.notificationFilterDisabledClassification}}),Object.defineProperty(c,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return Ia.notificationFilterMinimumSeverityLevel}}),i=rc(Hn),c.Result=i.default,u=rc(G),c.EagerResult=u.default,Ra=C(o),c.ConnectionProvider=Ra.default,Object.defineProperty(c,"Releasable",{enumerable:!0,get:function(){return Ra.Releasable}}),p=rc(n),c.Connection=p.default,jt=rc(j),c.Transaction=jt.default,gt=rc(T),c.ManagedTransaction=gt.default,Wt=rc(w),c.TransactionPromise=Wt.default,zn=rc(ln),c.Session=zn.default,S=C(P),Hn=S,c.Driver=S.default,c.driver=Hn,G=rc(E),c.auth=G.default,Aa=Gt,Object.defineProperty(c,"bookmarkManager",{enumerable:!0,get:function(){return Aa.bookmarkManager}}),ka=y,Object.defineProperty(c,"authTokenManagers",{enumerable:!0,get:function(){return ka.authTokenManagers}}),Object.defineProperty(c,"staticAuthTokenManager",{enumerable:!0,get:function(){return ka.staticAuthTokenManager}}),Ma=P,Object.defineProperty(c,"routing",{enumerable:!0,get:function(){return Ma.routing}}),o=C(_),c.types=o,n=C(F),c.json=n,j=rc(m),c.resultTransformers=j.default,Na=O,Object.defineProperty(c,"clientCertificateProviders",{enumerable:!0,get:function(){return Na.clientCertificateProviders}}),Object.defineProperty(c,"resolveCertificateProvider",{enumerable:!0,get:function(){return Na.resolveCertificateProvider}}),T=C(h),c.internal=T,xa=or,Object.defineProperty(c,"ProtocolVersion",{enumerable:!0,get:function(){return xa.ProtocolVersion}}),Da=C(v),c.Vector=Da.default,Object.defineProperty(c,"vector",{enumerable:!0,get:function(){return Da.vector}}),Object.defineProperty(c,"isVector",{enumerable:!0,get:function(){return Da.isVector}}),La=dt,Object.defineProperty(c,"StandardCase",{enumerable:!0,get:function(){return La.StandardCase}}),Ua=l,Object.defineProperty(c,"RecordObjectMapping",{enumerable:!0,get:function(){return Ua.RecordObjectMapping}}),Fa=b,Object.defineProperty(c,"rule",{enumerable:!0,get:function(){return Fa.rule}}),rc=rc(g),c.mappingDecorators=rc.default,Ba=C(sr),c.UnsupportedType=Ba.default,Object.defineProperty(c,"isUnsupportedType",{enumerable:!0,get:function(){return Ba.isUnsupportedType}}),C={SERVICE_UNAVAILABLE:wa.SERVICE_UNAVAILABLE,SESSION_EXPIRED:wa.SESSION_EXPIRED,PROTOCOL_ERROR:wa.PROTOCOL_ERROR},c.error=C,C={authTokenManagers:ka.authTokenManagers,newError:wa.newError,Neo4jError:wa.Neo4jError,newGQLError:wa.newGQLError,GQLError:wa.GQLError,isRetryableError:wa.isRetryableError,isRetriableError:wa.isRetriableError,error:C,Integer:Ea.default,int:Ea.int,isInt:Ea.isInt,inSafeRange:Ea.inSafeRange,toNumber:Ea.toNumber,toString:Ea.toString,internal:T,isPoint:Sa.isPoint,Point:Sa.Point,Date:Pa.Date,DateTime:Pa.DateTime,Duration:Pa.Duration,isDate:Pa.isDate,isDateTime:Pa.isDateTime,isDuration:Pa.isDuration,isLocalDateTime:Pa.isLocalDateTime,isLocalTime:Pa.isLocalTime,isTime:Pa.isTime,LocalDateTime:Pa.LocalDateTime,LocalTime:Pa.LocalTime,Time:Pa.Time,Node:Ta.Node,isNode:Ta.isNode,Relationship:Ta.Relationship,isRelationship:Ta.isRelationship,UnboundRelationship:Ta.UnboundRelationship,isUnboundRelationship:Ta.isUnboundRelationship,Path:Ta.Path,isPath:Ta.isPath,PathSegment:Ta.PathSegment,isPathSegment:Ta.isPathSegment,Record:t.default,ResultSummary:ja.default,queryType:ja.queryType,ServerInfo:ja.ServerInfo,Notification:Ca.Notification,GqlStatusObject:Ca.default,Plan:ja.Plan,ProfiledPlan:ja.ProfiledPlan,QueryStatistics:ja.QueryStatistics,Stats:ja.Stats,Result:i.default,EagerResult:u.default,Transaction:jt.default,ManagedTransaction:gt.default,TransactionPromise:Wt.default,Session:zn.default,Driver:S.default,Connection:p.default,Releasable:Ra.Releasable,types:o,driver:Hn,json:n,auth:G.default,bookmarkManager:Aa.bookmarkManager,routing:Ma.routing,resultTransformers:j.default,notificationCategory:Ca.notificationCategory,notificationClassification:Ca.notificationClassification,notificationSeverityLevel:Ca.notificationSeverityLevel,notificationFilterDisabledCategory:Ia.notificationFilterDisabledCategory,notificationFilterDisabledClassification:Ia.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:Ia.notificationFilterMinimumSeverityLevel,clientCertificateProviders:Na.clientCertificateProviders,resolveCertificateProvider:Na.resolveCertificateProvider,ProtocolVersion:xa.ProtocolVersion,rule:Fa.rule,mappingDecorators:rc.default,RecordObjectMapping:Ua.RecordObjectMapping,StandardCase:La.StandardCase,UnsupportedType:Ba.default,isUnsupportedType:Ba.isUnsupportedType,isVector:Da.isVector,vector:Da.vector},c.default=C;w={},ln={},E={},Gt={},y={};Object.defineProperty(y,"__esModule",{value:!0}),y.isFunction=void 0,y.isFunction=function(e){return"function"==typeof e};P={},_={},F={};Object.defineProperty(F,"__esModule",{value:!0}),F.createErrorClass=void 0,F.createErrorClass=function(e){return(e=e(function(e){Error.call(e),e.stack=(new Error).stack})).prototype=Object.create(Error.prototype),e.prototype.constructor=e},Object.defineProperty(_,"__esModule",{value:!0}),_.UnsubscriptionError=void 0;m=F,_.UnsubscriptionError=m.createErrorClass(function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}),O={};Object.defineProperty(O,"__esModule",{value:!0}),O.arrRemove=void 0,O.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var Wa=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},za=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ha=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Ga=(Object.defineProperty(P,"__esModule",{value:!0}),P.isSubscription=P.EMPTY_SUBSCRIPTION=P.Subscription=void 0,y),Ya=_,Ka=O,Za=(Qa.prototype.unsubscribe=function(){var t,e,r;if(!this.closed){this.closed=!0;var n=this._parentage;if(n)if(this._parentage=null,Array.isArray(n))try{for(var o=Wa(n),i=o.next();!i.done;i=o.next())i.value.remove(this)}catch(e){a={error:e}}finally{try{i&&!i.done&&(u=o.return)&&u.call(o)}finally{if(a)throw a.error}}else n.remove(this);var u=this.initialTeardown;if(Ga.isFunction(u))try{u()}catch(e){r=e instanceof Ya.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=Wa(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{Xa(l)}catch(e){r=null!=r?r:[],e instanceof Ya.UnsubscriptionError?r=Ha(Ha([],za(r)),za(e.errors)):r.push(e)}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}}if(r)throw new Ya.UnsubscriptionError(r)}},Qa.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Xa(e);else{if(e instanceof Qa){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},Qa.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},Qa.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},Qa.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Ka.arrRemove(t,e)},Qa.prototype.remove=function(e){var t=this._finalizers;t&&Ka.arrRemove(t,e),e instanceof Qa&&e._removeParent(this)},Qa.EMPTY=((h=new Qa).closed=!0,h),Qa);function Qa(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function Xa(e){Ga.isFunction(e)?e():e.unsubscribe()}P.Subscription=Za,P.EMPTY_SUBSCRIPTION=Za.EMPTY,P.isSubscription=function(e){return e instanceof Za||e&&"closed"in e&&Ga.isFunction(e.remove)&&Ga.isFunction(e.add)&&Ga.isFunction(e.unsubscribe)};var Ja,$a,es,or={},v=(Object.defineProperty(or,"__esModule",{value:!0}),or.config=void 0,or.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),dt={},ts=(Ja=dt,$a=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},es=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.timeoutProvider=void 0,Ja.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Ja.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,es([e,t],$a(r))):setTimeout.apply(void 0,es([e,t],$a(r)))},clearTimeout:function(e){var t=Ja.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(v,"__esModule",{value:!0}),v.reportUnhandledError=void 0,or),rs=dt;v.reportUnhandledError=function(t){rs.timeoutProvider.setTimeout(function(){var e=ts.config.onUnhandledError;if(!e)throw t;e(t)})};l={};Object.defineProperty(l,"__esModule",{value:!0}),l.noop=void 0,l.noop=function(){};b={};function ns(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(b,"__esModule",{value:!0}),b.createNotification=b.nextNotification=b.errorNotification=b.COMPLETE_NOTIFICATION=void 0,b.COMPLETE_NOTIFICATION=ns("C",void 0,void 0),b.errorNotification=function(e){return ns("E",void 0,e)},b.nextNotification=function(e){return ns("N",e,void 0)},b.createNotification=ns;var os,is,us,as,ss,cs,ls,fs,ps,ds,hs,bs,ys,_s,g={},vs=(Object.defineProperty(g,"__esModule",{value:!0}),g.captureError=g.errorContext=void 0,or),ms=null;function gs(e){var t=us.call(this)||this;return t.isStopped=!1,e?(t.destination=e,ss.isSubscription(e)&&e.add(t)):t.destination=os.EMPTY_OBSERVER,t}function Os(e,t){return hs.call(e,t)}function ws(e){this.partialObserver=e}function Es(e,t,r){var n=ys.call(this)||this;return r=as.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&cs.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&Os(e.next,t),error:e.error&&Os(e.error,t),complete:e.complete&&Os(e.complete,t)}):e,n.destination=new bs(r),n}function Ps(e){cs.config.useDeprecatedSynchronousErrorHandling?ds.captureError(e):ls.reportUnhandledError(e)}function Ts(e,t){var r=cs.config.onStoppedNotification;r&&ps.timeoutProvider.setTimeout(function(){return r(e,t)})}g.errorContext=function(e){if(vs.config.useDeprecatedSynchronousErrorHandling){var t=!ms;if(t&&(ms={errorThrown:!1,error:null}),e(),t){var t=ms,r=t.errorThrown,t=t.error;if(ms=null,r)throw t}}else e()},g.captureError=function(e){vs.config.useDeprecatedSynchronousErrorHandling&&ms&&(ms.errorThrown=!0,ms.error=e)},os=Gt,sr=r&&r.__extends||(is=function(e,t){return(is=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])})(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}is(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(os,"__esModule",{value:!0}),os.EMPTY_OBSERVER=os.SafeSubscriber=os.Subscriber=void 0,as=y,cs=or,ls=v,T=l,fs=b,ps=dt,ds=g,us=(ss=P).Subscription,sr(gs,us),gs.create=function(e,t,r){return new _s(e,t,r)},gs.prototype.next=function(e){this.isStopped?Ts(fs.nextNotification(e),this):this._next(e)},gs.prototype.error=function(e){this.isStopped?Ts(fs.errorNotification(e),this):(this.isStopped=!0,this._error(e))},gs.prototype.complete=function(){this.isStopped?Ts(fs.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},gs.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,us.prototype.unsubscribe.call(this),this.destination=null)},gs.prototype._next=function(e){this.destination.next(e)},gs.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},gs.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t=gs,os.Subscriber=t,hs=Function.prototype.bind,ws.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Ps(e)}},ws.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Ps(e)}else Ps(e)},ws.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Ps(e)}},bs=ws,sr(Es,ys=t),_s=Es,os.SafeSubscriber=_s,os.EMPTY_OBSERVER={closed:!0,next:T.noop,error:function(e){throw e},complete:T.noop};i={},Object.defineProperty(i,"__esModule",{value:!0}),i.observable=void 0,i.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",u={},jt={};Object.defineProperty(jt,"__esModule",{value:!0}),jt.identity=void 0,jt.identity=function(e){return e},Object.defineProperty(u,"__esModule",{value:!0}),u.pipeFromArray=u.pipe=void 0;var Ss=jt;function js(t){return 0===t.length?Ss.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}u.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return js(e)},u.pipeFromArray=js,Object.defineProperty(E,"__esModule",{value:!0}),E.Observable=void 0;var Cs=Gt,Is=P,gt=i,Rs=u,As=or,ks=y,Ms=g;function Ns(e){e&&(this._subscribe=e)}function xs(e){return null!=(e=null!=e?e:As.config.Promise)?e:Promise}Ns.prototype.lift=function(e){var t=new Ns;return t.source=this,t.operator=e,t},Ns.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof Cs.Subscriber||function(e){return e&&ks.isFunction(e.next)&&ks.isFunction(e.error)&&ks.isFunction(e.complete)}(n)&&Is.isSubscription(n)?e:new Cs.SafeSubscriber(e,t,r);return Ms.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},Ns.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},Ns.prototype.forEach=function(n,e){var o=this;return new(e=xs(e))(function(e,t){var r=new Cs.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},Ns.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},Ns.prototype[gt.observable]=function(){return this},Ns.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Rs.pipeFromArray(e)(this)},Ns.prototype.toPromise=function(e){var n=this;return new(e=xs(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},Ns.create=function(e){return new Ns(e)},E.Observable=Ns;var Wt={},zn={},S={},Ds=(Object.defineProperty(S,"__esModule",{value:!0}),S.operate=S.hasLift=void 0,y);function Ls(e){return Ds.isFunction(null==e?void 0:e.lift)}S.hasLift=Ls,S.operate=function(t){return function(e){if(Ls(e))return e.lift(function(e){try{return t(e,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}};var Us,p={},o=r&&r.__extends||(Us=function(e,t){return(Us=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])})(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}Us(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Hn=(Object.defineProperty(p,"__esModule",{value:!0}),p.OperatorSubscriber=p.createOperatorSubscriber=void 0,Gt);p.createOperatorSubscriber=function(e,t,r,n,o){return new Bs(e,t,r,n,o)};o(Vs,Fs=Hn.Subscriber),Vs.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,Fs.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var Fs,Bs=Vs;function Vs(t,r,e,n,o,i){var u=Fs.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:Fs.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:Fs.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:Fs.prototype._complete,u}p.OperatorSubscriber=Bs,Object.defineProperty(zn,"__esModule",{value:!0}),zn.refCount=void 0;var qs=S,Ws=p;zn.refCount=function(){return qs.operate(function(r,n){var o=null,e=(r._refCount++,Ws.createOperatorSubscriber(n,void 0,void 0,void 0,function(){var e,t;!r||r._refCount<=0||0<--r._refCount?o=null:(e=r._connection,t=o,o=null,!e||t&&e!==t||e.unsubscribe(),n.unsubscribe())}));r.subscribe(e),e.closed||(o=r.connect())})};var zs,n=r&&r.__extends||(zs=function(e,t){return(zs=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])})(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}zs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.ConnectableObservable=void 0;var Hs,Gs=P,Ys=zn,Ks=p,Zs=S,G=(Hs=E.Observable,n(Qs,Hs),Qs.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},Qs.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},Qs.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},Qs.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new Gs.Subscription,t=this.getSubject(),e.add(this.source.subscribe(Ks.createOperatorSubscriber(t,void 0,function(){r._teardown(),t.complete()},function(e){r._teardown(),t.error(e)},function(){return r._teardown()}))),e.closed&&(this._connection=null,e=Gs.Subscription.EMPTY)),e},Qs.prototype.refCount=function(){return Ys.refCount()(this)},Qs);function Qs(e,t){var r=Hs.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,Zs.hasLift(e)&&(r.lift=e.lift),r}Wt.ConnectableObservable=G;var Xs,Js,$s,ec,tc,j={},rc={},c=(Xs=rc,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.performanceTimestampProvider=void 0,Xs.performanceTimestampProvider={now:function(){return(Xs.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),nc=(Js=c,$s=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ec=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Js,"__esModule",{value:!0}),Js.animationFrameProvider=void 0,tc=P,Js.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=Js.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new tc.Subscription(function(){return null==r?void 0:r(o)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Js.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,ec([],$s(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Js.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,ec([],$s(e)))},delegate:void 0},Object.defineProperty(j,"__esModule",{value:!0}),j.animationFrames=void 0,E),oc=rc,ic=c;function uc(a){return new nc.Observable(function(r){var n=a||oc.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=ic.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&ic.animationFrameProvider.cancelAnimationFrame(i)}})}j.animationFrames=function(e){return e?uc(e):cc};var ac,sc,cc=uc(),C={},m={},h=(Object.defineProperty(m,"__esModule",{value:!0}),m.ObjectUnsubscribedError=void 0,F),b=(m.ObjectUnsubscribedError=h.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(ac=function(e,t){return(ac=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])})(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}ac(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),lc=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fc=(Object.defineProperty(C,"__esModule",{value:!0}),C.AnonymousSubject=C.Subject=void 0,E),pc=P,dc=m,hc=O,bc=g,dt=(sc=fc.Observable,b(yc,sc),yc.prototype.lift=function(e){var t=new vc(this,this);return t.operator=e,t},yc.prototype._throwIfClosed=function(){if(this.closed)throw new dc.ObjectUnsubscribedError},yc.prototype.next=function(o){var i=this;bc.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=lc(i.currentObservers),n=r.next();!n.done;n=r.next())n.value.next(o)}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}}})},yc.prototype.error=function(t){var r=this;bc.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=t;for(var e=r.observers;e.length;)e.shift().error(t)}})},yc.prototype.complete=function(){var t=this;bc.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},yc.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(yc.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),yc.prototype._trySubscribe=function(e){return this._throwIfClosed(),sc.prototype._trySubscribe.call(this,e)},yc.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},yc.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?pc.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new pc.Subscription(function(){t.currentObservers=null,hc.arrRemove(o,e)}))},yc.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},yc.prototype.asObservable=function(){var e=new fc.Observable;return e.source=this,e},yc.create=function(e,t){return new vc(e,t)},yc);function yc(){var e=sc.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}C.Subject=dt;b(mc,_c=dt),mc.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},mc.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},mc.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},mc.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:pc.EMPTY_SUBSCRIPTION};var _c,vc=mc;function mc(e,t){var r=_c.call(this)||this;return r.destination=e,r.source=t,r}C.AnonymousSubject=vc;var gc,sr={},t=r&&r.__extends||(gc=function(e,t){return(gc=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])})(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}gc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(sr,"__esModule",{value:!0}),sr.BehaviorSubject=void 0;Oc=C.Subject,t(wc,Oc),Object.defineProperty(wc.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),wc.prototype._subscribe=function(e){var t=Oc.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},wc.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},wc.prototype.next=function(e){Oc.prototype.next.call(this,this._value=e)};var Oc,T=wc;function wc(e){var t=Oc.call(this)||this;return t._value=e,t}sr.BehaviorSubject=T;var Ec,Pc,gt={},o={},Hn=(Ec=o,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.dateTimestampProvider=void 0,Ec.dateTimestampProvider={now:function(){return(Ec.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(Pc=function(e,t){return(Pc=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])})(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}Pc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(gt,"__esModule",{value:!0}),gt.ReplaySubject=void 0;var Tc,Sc=o,n=(Tc=C.Subject,Hn(jc,Tc),jc.prototype.next=function(e){var t=this.isStopped,r=this._buffer,n=this._infiniteTimeWindow,o=this._timestampProvider,i=this._windowTime;t||(r.push(e),n||r.push(o.now()+i)),this._trimBuffer(),Tc.prototype.next.call(this,e)},jc.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},jc.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,o=(n?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!n){for(var i=t.now(),u=0,a=1;a<r.length&&r[a]<=i;a+=2)u=a;u&&r.splice(0,u+1)}},jc);function jc(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=Sc.dateTimestampProvider);var n=Tc.call(this)||this;return n._bufferSize=e,n._windowTime=t,n._timestampProvider=r,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=t===1/0,n._bufferSize=Math.max(1,e),n._windowTime=Math.max(1,t),n}gt.ReplaySubject=n;var Cc,G={},rc=r&&r.__extends||(Cc=function(e,t){return(Cc=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])})(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}Cc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncSubject=void 0;Ic=C.Subject,rc(Rc,Ic),Rc.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this._hasValue,n=this._value,o=this.thrownError,i=this.isStopped,u=this._isComplete;t?e.error(o):(i||u)&&(r&&e.next(n),e.complete())},Rc.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},Rc.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&Ic.prototype.next.call(this,t),Ic.prototype.complete.call(this))};var Ic,h=Rc;function Rc(){var e=null!==Ic&&Ic.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}G.AsyncSubject=h;var Ac,g={},b={},dt={},t={},T=r&&r.__extends||(Ac=function(e,t){return(Ac=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])})(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}Ac(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;kc=P.Subscription,T(Mc,kc),Mc.prototype.schedule=function(e,t){return this};var kc,Hn=Mc;function Mc(e,t){return kc.call(this)||this}t.Action=Hn;var Nc,xc,Dc,Lc,n={},rc=(Nc=n,xc=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Dc=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.intervalProvider=void 0,Nc.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Nc.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,Dc([e,t],xc(r))):setInterval.apply(void 0,Dc([e,t],xc(r)))},clearInterval:function(e){var t=Nc.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(Lc=function(e,t){return(Lc=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])})(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}Lc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(dt,"__esModule",{value:!0}),dt.AsyncAction=void 0;var Uc,Fc=n,Bc=O,h=(Uc=t.Action,rc(Vc,Uc),Vc.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var e=this.id,r=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(r,e,t)),this.pending=!0,this.delay=t,this.id=null!=(e=this.id)?e:this.requestAsyncId(r,this.id,t),this},Vc.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Fc.intervalProvider.setInterval(e.flush.bind(e,this),r)},Vc.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&Fc.intervalProvider.clearInterval(t)},Vc.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;e=this._execute(e,t);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},Vc.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},Vc.prototype.unsubscribe=function(){var e,t,r;this.closed||(e=this.id,r=(t=this.scheduler).actions,this.work=this.state=this.scheduler=null,this.pending=!1,Bc.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,Uc.prototype.unsubscribe.call(this))},Vc);function Vc(e,t){var r=Uc.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}dt.AsyncAction=h;var qc,Wc,zc,Hc,Gc,Yc,T={},Hn={},Kc=(Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.TestTools=Hn.Immediate=void 0,1),Zc={};function Qc(e){return e in Zc&&(delete Zc[e],!0)}Hn.Immediate={setImmediate:function(e){var t=Kc++;return Zc[t]=!0,(qc=qc||Promise.resolve()).then(function(){return Qc(t)&&e()}),t},clearImmediate:function(e){Qc(e)}},Hn.TestTools={pending:function(){return Object.keys(Zc).length}},Wc=T,zc=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Hc=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.immediateProvider=void 0,Gc=Hn.Immediate.setImmediate,Yc=Hn.Immediate.clearImmediate,Wc.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Wc.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||Gc).apply(void 0,Hc([],zc(e)))},clearImmediate:function(e){var t=Wc.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||Yc)(e)},delegate:void 0};var Xc,n=r&&r.__extends||(Xc=function(e,t){return(Xc=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])})(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}Xc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(b,"__esModule",{value:!0}),b.AsapAction=void 0;var Jc,$c=T,t=(Jc=dt.AsyncAction,n(el,Jc),el.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Jc.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=$c.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},el.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Jc.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&($c.immediateProvider.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))},el);function el(e,t){var r=Jc.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}b.AsapAction=t;rc={},h={},Hn={},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.Scheduler=void 0,T=o;function tl(e,t){void 0===t&&(t=tl.now),this.schedulerActionCtor=e,this.now=t}tl.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},tl.now=T.dateTimestampProvider.now,Hn.Scheduler=tl;var rl,nl,n=r&&r.__extends||(rl=function(e,t){return(rl=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])})(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}rl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ol=(Object.defineProperty(h,"__esModule",{value:!0}),h.AsyncScheduler=void 0,Hn),t=(nl=ol.Scheduler,n(il,nl),il.prototype.flush=function(e){var t,r=this.actions;if(this._active)r.push(e);else{this._active=!0;do{if(t=e.execute(e.state,e.delay))break}while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}}},il);function il(e,t){void 0===t&&(t=ol.Scheduler.now);e=nl.call(this,e,t)||this;return e.actions=[],e._active=!1,e}h.AsyncScheduler=t;var ul,T=r&&r.__extends||(ul=function(e,t){return(ul=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])})(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}ul(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(rc,"__esModule",{value:!0}),rc.AsapScheduler=void 0;al=h.AsyncScheduler,T(sl,al),sl.prototype.flush=function(e){this._active=!0;var t,r=this._scheduled,n=(this._scheduled=void 0,this.actions);e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,t){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw t}};var al,n=sl;function sl(){return null!==al&&al.apply(this,arguments)||this}rc.AsapScheduler=n,t=g,Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0,t.asapScheduler=new rc.AsapScheduler(b.AsapAction),t.asap=t.asapScheduler;var cl,T={},rc=(n=T,Object.defineProperty(n,"__esModule",{value:!0}),n.async=n.asyncScheduler=void 0,n.asyncScheduler=new h.AsyncScheduler(dt.AsyncAction),n.async=n.asyncScheduler,{}),b={},t=r&&r.__extends||(cl=function(e,t){return(cl=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])})(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}cl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(b,"__esModule",{value:!0}),b.QueueAction=void 0;ll=dt.AsyncAction,t(fl,ll),fl.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?ll.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},fl.prototype.execute=function(e,t){return 0<t||this.closed?ll.prototype.execute.call(this,e,t):this._execute(e,t)},fl.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?ll.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var ll,n=fl;function fl(e,t){var r=ll.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}b.QueueAction=n;var pl,t={},n=r&&r.__extends||(pl=function(e,t){return(pl=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])})(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}pl(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;dl=h.AsyncScheduler,n(hl,dl);var dl,n=hl;function hl(){return null!==dl&&dl.apply(this,arguments)||this}t.QueueScheduler=n,n=rc,Object.defineProperty(n,"__esModule",{value:!0}),n.queue=n.queueScheduler=void 0,n.queueScheduler=new t.QueueScheduler(b.QueueAction),n.queue=n.queueScheduler;var bl,t={},b={},n=r&&r.__extends||(bl=function(e,t){return(bl=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])})(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}bl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(b,"__esModule",{value:!0}),b.AnimationFrameAction=void 0;var yl,_l=c,c=(yl=dt.AsyncAction,n(vl,yl),vl.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?yl.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=_l.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},vl.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return yl.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&t===e._scheduled&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(_l.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},vl);function vl(e,t){var r=yl.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}b.AnimationFrameAction=c;var ml,n={},c=r&&r.__extends||(ml=function(e,t){return(ml=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])})(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}ml(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(n,"__esModule",{value:!0}),n.AnimationFrameScheduler=void 0;gl=h.AsyncScheduler,c(Ol,gl),Ol.prototype.flush=function(e){this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var t,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}};var gl,c=Ol;function Ol(){return null!==gl&&gl.apply(this,arguments)||this}n.AnimationFrameScheduler=c,c=t,Object.defineProperty(c,"__esModule",{value:!0}),c.animationFrame=c.animationFrameScheduler=void 0,c.animationFrameScheduler=new n.AnimationFrameScheduler(b.AnimationFrameAction),c.animationFrame=c.animationFrameScheduler;var wl,El,n={},b=r&&r.__extends||(wl=function(e,t){return(wl=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])})(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}wl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=(Object.defineProperty(n,"__esModule",{value:!0}),n.VirtualAction=n.VirtualTimeScheduler=void 0,dt),Pl=P,dt=(El=h.AsyncScheduler,b(Tl,El),Tl.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}},Tl.frameTimeFactor=10,Tl);function Tl(e,t){void 0===t&&(t=1/0);var r=El.call(this,e=void 0===e?jl:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}n.VirtualTimeScheduler=dt;Sl=c.AsyncAction,b(Cl,Sl),Cl.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return Sl.prototype.schedule.call(this,e,t);this.active=!1;var r=new Cl(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return Pl.Subscription.EMPTY},Cl.prototype.requestAsyncId=function(e,t,r){this.delay=e.frame+(r=void 0===r?0:r);r=e.actions;return r.push(this),r.sort(Cl.sortActions),1},Cl.prototype.recycleAsyncId=function(e,t,r){},Cl.prototype._execute=function(e,t){if(!0===this.active)return Sl.prototype._execute.call(this,e,t)},Cl.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};var Sl,jl=Cl;function Cl(e,t,r){void 0===r&&(r=e.index+=1);var n=Sl.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}n.VirtualAction=jl;var Il,Rl,h={},dt={},c=(Il=dt,Object.defineProperty(Il,"__esModule",{value:!0}),Il.empty=Il.EMPTY=void 0,Rl=E,Il.EMPTY=new Rl.Observable(function(e){return e.complete()}),Il.empty=function(e){return e?(t=e,new Rl.Observable(function(e){return t.schedule(function(){return e.complete()})})):Il.EMPTY;var t},{}),b={},Al={},kl=(Object.defineProperty(Al,"__esModule",{value:!0}),Al.isScheduler=void 0,y);Al.isScheduler=function(e){return e&&kl.isFunction(e.schedule)},Object.defineProperty(b,"__esModule",{value:!0}),b.popNumber=b.popScheduler=b.popResultSelector=void 0;var Ml=y,Nl=Al;function xl(e){return e[e.length-1]}b.popResultSelector=function(e){return Ml.isFunction(xl(e))?e.pop():void 0},b.popScheduler=function(e){return Nl.isScheduler(xl(e))?e.pop():void 0},b.popNumber=function(e,t){return"number"==typeof xl(e)?e.pop():t};var Dl={},Ll={},Ul={},I={},Fl={},Bl=(Object.defineProperty(Fl,"__esModule",{value:!0}),Fl.isArrayLike=void 0,Fl.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),Vl=(Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.isPromise=void 0,y);Bl.isPromise=function(e){return Vl.isFunction(null==e?void 0:e.then)};var ql={},Wl=(Object.defineProperty(ql,"__esModule",{value:!0}),ql.isInteropObservable=void 0,i),zl=y;ql.isInteropObservable=function(e){return zl.isFunction(e[Wl.observable])};var Hl={},Gl=(Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.isAsyncIterable=void 0,y);Hl.isAsyncIterable=function(e){return Symbol.asyncIterator&&Gl.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Yl={};Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.createInvalidObservableTypeError=void 0,Yl.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.")};var Kl={},Zl={};function Ql(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.iterator=Zl.getSymbolIterator=void 0,Zl.getSymbolIterator=Ql,Zl.iterator=Ql(),Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.isIterable=void 0;var Xl=Zl,Jl=y;Kl.isIterable=function(e){return Jl.isFunction(null==e?void 0:e[Xl.iterator])};var $l={},ef=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},tf=r&&r.__await||function(e){return this instanceof tf?(this.v=e,this):new tf(e)},rf=r&&r.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=r.apply(e,t||[]),i=[],u={};return n("next"),n("throw"),n("return"),u[Symbol.asyncIterator]=function(){return this},u;function n(n){o[n]&&(u[n]=function(r){return new Promise(function(e,t){1<i.push([n,r,e,t])||a(n,r)})})}function a(e,t){try{(r=o[e](t)).value instanceof tf?Promise.resolve(r.value.v).then(s,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}},nf=(Object.defineProperty($l,"__esModule",{value:!0}),$l.isReadableStreamLike=$l.readableStreamLikeToAsyncGenerator=void 0,y);$l.readableStreamLikeToAsyncGenerator=function(o){return rf(this,arguments,function(){var t,r,n;return ef(this,function(e){switch(e.label){case 0:t=o.getReader(),e.label=1;case 1:e.trys.push([1,,9,10]),e.label=2;case 2:return[4,tf(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,tf(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,tf(n)];case 6:return[4,e.sent()];case 7:return e.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})},$l.isReadableStreamLike=function(e){return nf.isFunction(null==e?void 0:e.getReader)};var of=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},uf=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},af=r&&r.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=u[Symbol.asyncIterator];return t?t.call(u):(u="function"==typeof sf?sf(u):u[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(i){e[i]=u[i]&&function(o){return new Promise(function(e,t){var r,n;o=u[i](o),r=e,e=t,n=o.done,t=o.value,Promise.resolve(t).then(function(e){r({value:e,done:n})},e)})}}},sf=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},cf=(Object.defineProperty(I,"__esModule",{value:!0}),I.fromReadableStreamLike=I.fromAsyncIterable=I.fromIterable=I.fromPromise=I.fromArrayLike=I.fromInteropObservable=I.innerFrom=void 0,Fl),lf=Bl,ff=E,pf=ql,df=Hl,hf=Yl,bf=Kl,yf=$l,_f=y,vf=v,mf=i;function gf(r){return new ff.Observable(function(e){var t=r[mf.observable]();if(_f.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Of(r){return new ff.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function wf(e){return new ff.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,vf.reportUnhandledError)})}function Ef(u){return new ff.Observable(function(e){var t,r;try{for(var n=sf(u),o=n.next();!o.done;o=n.next()){var i=o.value;if(e.next(i),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}function Pf(e){return new ff.Observable(function(t){!function(r,n){var o,i,u,a;return of(this,void 0,void 0,function(){var t;return uf(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=af(r),e.label=1;case 1:return[4,o.next()];case 2:if((i=e.sent()).done)return[3,4];if(t=i.value,n.next(t),n.closed)return[2];e.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return t=e.sent(),u={error:t},[3,11];case 6:return(e.trys.push([6,,9,10]),i&&!i.done&&(a=o.return))?[4,a.call(o)]:[3,8];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}})})}(e,t).catch(function(e){return t.error(e)})})}function Tf(e){return Pf(yf.readableStreamLikeToAsyncGenerator(e))}I.innerFrom=function(e){if(e instanceof ff.Observable)return e;if(null!=e){if(pf.isInteropObservable(e))return gf(e);if(cf.isArrayLike(e))return Of(e);if(lf.isPromise(e))return wf(e);if(df.isAsyncIterable(e))return Pf(e);if(bf.isIterable(e))return Ef(e);if(yf.isReadableStreamLike(e))return Tf(e)}throw hf.createInvalidObservableTypeError(e)},I.fromInteropObservable=gf,I.fromArrayLike=Of,I.fromPromise=wf,I.fromIterable=Ef,I.fromAsyncIterable=Pf,I.fromReadableStreamLike=Tf;var v={},Sf={};Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.executeSchedule=void 0,Sf.executeSchedule=function(e,t,r,n,o){if(void 0===n&&(n=0),void 0===o&&(o=!1),t=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n),e.add(t),!o)return t},Object.defineProperty(v,"__esModule",{value:!0}),v.observeOn=void 0;var jf=Sf,Cf=S,If=p;v.observeOn=function(r,n){return void 0===n&&(n=0),Cf.operate(function(e,t){e.subscribe(If.createOperatorSubscriber(t,function(e){return jf.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return jf.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return jf.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var Rf={},Af=(Object.defineProperty(Rf,"__esModule",{value:!0}),Rf.subscribeOn=void 0,S);Rf.subscribeOn=function(r,n){return void 0===n&&(n=0),Af.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.scheduleObservable=void 0;var kf=I,Mf=v,Nf=Rf;Ul.scheduleObservable=function(e,t){return kf.innerFrom(e).pipe(Nf.subscribeOn(t),Mf.observeOn(t))};var xf={},Df=(Object.defineProperty(xf,"__esModule",{value:!0}),xf.schedulePromise=void 0,I),Lf=v,Uf=Rf;xf.schedulePromise=function(e,t){return Df.innerFrom(e).pipe(Uf.subscribeOn(t),Lf.observeOn(t))};var Ff={},Bf=(Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.scheduleArray=void 0,E);Ff.scheduleArray=function(r,n){return new Bf.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var Vf={},qf=(Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.scheduleIterable=void 0,E),Wf=Zl,zf=y,Hf=Sf;Vf.scheduleIterable=function(e,t){return new qf.Observable(function(n){var o;return Hf.executeSchedule(n,t,function(){o=e[Wf.iterator](),Hf.executeSchedule(n,t,function(){var e,t,r;try{t=(e=o.next()).value,r=e.done}catch(e){return void n.error(e)}r?n.complete():n.next(t)},0,!0)}),function(){return zf.isFunction(null==o?void 0:o.return)&&o.return()}})};var Zl={},Gf=(Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.scheduleAsyncIterable=void 0,E),Yf=Sf;Zl.scheduleAsyncIterable=function(r,n){if(r)return new Gf.Observable(function(t){Yf.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();Yf.executeSchedule(t,n,function(){e.next().then(function(e){e.done?t.complete():t.next(e.value)})},0,!0)})});throw new Error("Iterable cannot be null")};var Kf={},Zf=(Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.scheduleReadableStreamLike=void 0,Zl),Qf=$l;Kf.scheduleReadableStreamLike=function(e,t){return Zf.scheduleAsyncIterable(Qf.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(Ll,"__esModule",{value:!0}),Ll.scheduled=void 0;var Xf=Ul,Jf=xf,$f=Ff,ep=Vf,tp=Zl,rp=ql,np=Bl,op=Fl,ip=Kl,up=Hl,ap=Yl,sp=$l,cp=Kf;Ll.scheduled=function(e,t){if(null!=e){if(rp.isInteropObservable(e))return Xf.scheduleObservable(e,t);if(op.isArrayLike(e))return $f.scheduleArray(e,t);if(np.isPromise(e))return Jf.schedulePromise(e,t);if(up.isAsyncIterable(e))return tp.scheduleAsyncIterable(e,t);if(ip.isIterable(e))return ep.scheduleIterable(e,t);if(sp.isReadableStreamLike(e))return cp.scheduleReadableStreamLike(e,t)}throw ap.createInvalidObservableTypeError(e)},Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.from=void 0;var lp=Ll,fp=I;Dl.from=function(e,t){return t?lp.scheduled(e,t):fp.innerFrom(e)},Object.defineProperty(c,"__esModule",{value:!0}),c.of=void 0;var pp=b,dp=Dl;c.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pp.popScheduler(e);return dp.from(e,r)};var hp,bp,yp,_p,Ul={},vp=(Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.throwError=void 0,E),mp=y;function gp(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function Op(e,t){var r,n=e.kind,o=e.value,e=e.error;if("string"!=typeof n)throw new TypeError('Invalid notification, missing "kind"');"N"===n?null!=(r=t.next)&&r.call(t,o):"E"===n?null!=(r=t.error)&&r.call(t,e):null!=(o=t.complete)&&o.call(t)}Ul.throwError=function(e,t){function r(e){return e.error(n())}var n=mp.isFunction(e)?e:function(){return e};return new vp.Observable(t?function(e){return t.schedule(r,0,e)}:r)},xf=h,Object.defineProperty(xf,"__esModule",{value:!0}),xf.observeNotification=xf.Notification=xf.NotificationKind=void 0,hp=dt,bp=c,yp=Ul,_p=y,(Ff=xf.NotificationKind||(xf.NotificationKind={})).NEXT="N",Ff.ERROR="E",Ff.COMPLETE="C",gp.prototype.observe=function(e){return Op(this,e)},gp.prototype.do=function(e,t,r){var n=this.kind,o=this.value,i=this.error;return"N"===n?null==e?void 0:e(o):"E"===n?null==t?void 0:t(i):null==r?void 0:r()},gp.prototype.accept=function(e,t,r){var n;return _p.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},gp.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?bp.of(t):"E"===e?yp.throwError(function(){return r}):"C"===e?hp.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},gp.createNext=function(e){return new gp("N",e)},gp.createError=function(e){return new gp("E",void 0,e)},gp.createComplete=function(){return gp.completeNotification},gp.completeNotification=new gp("C"),Ff=gp,xf.Notification=Ff,xf.observeNotification=Op;var Zl={},wp=(Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.isObservable=void 0,E),Ep=y;Zl.isObservable=function(e){return!!e&&(e instanceof wp.Observable||Ep.isFunction(e.lift)&&Ep.isFunction(e.subscribe))};var ql={},Bl={},Kl=(Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.EmptyError=void 0,F),Pp=(Bl.EmptyError=Kl.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(ql,"__esModule",{value:!0}),ql.lastValueFrom=void 0,Bl);ql.lastValueFrom=function(o,i){var u="object"==typeof i;return new Promise(function(e,t){var r,n=!1;o.subscribe({next:function(e){r=e,n=!0},error:t,complete:function(){n?e(r):u?e(i.defaultValue):t(new Pp.EmptyError)}})})};var Hl={},Tp=(Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.firstValueFrom=void 0,Bl),Sp=Gt;Hl.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new Sp.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new Tp.EmptyError)}});n.subscribe(r)})};var jp,Cp,Ip,Rp,Ap,kp,Mp,Yl={},$l=(Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.ArgumentOutOfRangeError=void 0,F),Kf=(Yl.ArgumentOutOfRangeError=$l.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),Ff=(Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.NotFoundError=void 0,F),xf=(Kf.NotFoundError=Ff.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),Kl=(Object.defineProperty(xf,"__esModule",{value:!0}),xf.SequenceError=void 0,F),$l=(xf.SequenceError=Kl.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),Ff={};function Np(e){throw new jp.TimeoutError(e)}Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.isValidDate=void 0,Ff.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},jp=$l,Object.defineProperty(jp,"__esModule",{value:!0}),jp.timeout=jp.TimeoutError=void 0,Cp=T,Ip=Ff,Rp=S,Ap=I,kp=p,Mp=Sf,jp.TimeoutError=F.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),jp.timeout=function(e,t){var a=(e=Ip.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?Np:r,l=void 0===(r=e.scheduler)?null!=t?t:Cp.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return Rp.operate(function(e,t){function r(e){n=Mp.executeSchedule(t,l,function(){try{u.unsubscribe(),Ap.innerFrom(c({meta:f,lastValue:o,seen:i})).subscribe(t)}catch(e){t.error(e)}},e)}var n,o=null,i=0,u=e.subscribe(kp.createOperatorSubscriber(t,function(e){null!=n&&n.unsubscribe(),i++,t.next(o=e),0<s&&r(s)},void 0,void 0,function(){null!=n&&n.closed||null!=n&&n.unsubscribe(),o=null}));i||r(null!=a?"number"==typeof a?a:+a-l.now():s)})};var Kl={},F={},xp={},Dp={},Lp=(Object.defineProperty(Dp,"__esModule",{value:!0}),Dp.map=void 0,S),Up=p;Dp.map=function(n,o){return Lp.operate(function(e,t){var r=0;e.subscribe(Up.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var Fp=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Bp=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Vp=(Object.defineProperty(xp,"__esModule",{value:!0}),xp.mapOneOrManyArgs=void 0,Dp),qp=Array.isArray;xp.mapOneOrManyArgs=function(r){return Vp.map(function(e){return t=r,qp(e=e)?t.apply(void 0,Bp([],Fp(e))):t(e);var t})};var Wp=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},zp=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Hp=(Object.defineProperty(F,"__esModule",{value:!0}),F.bindCallbackInternals=void 0,Al),Gp=E,Yp=Rf,Kp=xp,Zp=v,Qp=G;F.bindCallbackInternals=function r(a,s,n,o){if(n){if(!Hp.isScheduler(n))return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s,o).apply(this,e).pipe(Kp.mapOneOrManyArgs(n))};o=n}return o?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s).apply(this,e).pipe(Yp.subscribeOn(o),Zp.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new Qp.AsyncSubject,u=!0;return new Gp.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,zp(zp([],Wp(r)),[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(a){var r=e.shift();if(null!=r)return void i.error(r)}i.next(1<e.length?e:e[0]),o=!0,n&&i.complete()}])),o&&i.complete(),n=!0),e})}},Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.bindCallback=void 0;var Xp=F;Kl.bindCallback=function(e,t,r){return Xp.bindCallbackInternals(!1,e,t,r)};var Jp={},$p=(Object.defineProperty(Jp,"__esModule",{value:!0}),Jp.bindNodeCallback=void 0,F);Jp.bindNodeCallback=function(e,t,r){return $p.bindCallbackInternals(!0,e,t,r)};var F={},ed={},td=(Object.defineProperty(ed,"__esModule",{value:!0}),ed.argsArgArrayOrObject=void 0,Array.isArray),rd=Object.getPrototypeOf,nd=Object.prototype,od=Object.keys;ed.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(td(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&rd(r)===nd)return{args:(r=od(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var id={};Object.defineProperty(id,"__esModule",{value:!0}),id.createObject=void 0,id.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(F,"__esModule",{value:!0}),F.combineLatestInit=F.combineLatest=void 0;var ud=E,ad=ed,sd=Dl,cd=jt,ld=xp,fd=b,pd=id,dd=p,hd=Sf;function bd(a,s,c){return void 0===c&&(c=cd.identity),function(u){yd(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){yd(s,function(){var e=sd.from(a[r],s),t=!1;e.subscribe(dd.createOperatorSubscriber(u,function(e){n[r]=e,t||(t=!0,i--),i||u.next(c(n.slice()))},function(){--o||u.complete()}))},u)}(t)},u)}}function yd(e,t,r){e?hd.executeSchedule(r,e,t):t()}F.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=fd.popScheduler(e),n=fd.popResultSelector(e),o=ad.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?sd.from([],r):(o=new ud.Observable(bd(i,r,u?function(e){return pd.createObject(u,e)}:cd.identity)),n?o.pipe(ld.mapOneOrManyArgs(n)):o)},F.combineLatestInit=bd;var _d={},vd={},md={},gd={},Od={},wd=(Object.defineProperty(Od,"__esModule",{value:!0}),Od.mergeInternals=void 0,I),Ed=Sf,Pd=p;Od.mergeInternals=function(e,r,n,o,i,u,a,t){var s=[],c=0,l=0,f=function(){s.length||c||r.complete()},p=function(e){return c<o?d(e):s.push(e)},d=function(e){u&&r.next(e),c++;var t=!1;wd.innerFrom(n(e,l++)).subscribe(Pd.createOperatorSubscriber(r,function(e){null!=i&&i(e),u?p(e):r.next(e)},function(){t=!0},void 0,function(){if(t)try{c--;for(;s.length&&c<o;)!function(){var e=s.shift();a?Ed.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(Pd.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(gd,"__esModule",{value:!0}),gd.mergeMap=void 0;var Td=Dp,Sd=I,jd=S,Cd=Od,Id=y;gd.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),Id.isFunction(i)?e(function(r,n){return Td.map(function(e,t){return i(r,e,n,t)})(Sd.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),jd.operate(function(e,t){return Cd.mergeInternals(e,t,o,r)}))},Object.defineProperty(md,"__esModule",{value:!0}),md.mergeAll=void 0;var Rd=gd,Ad=jt;md.mergeAll=function(e){return Rd.mergeMap(Ad.identity,e=void 0===e?1/0:e)},Object.defineProperty(vd,"__esModule",{value:!0}),vd.concatAll=void 0;var kd=md;vd.concatAll=function(){return kd.mergeAll(1)},Object.defineProperty(_d,"__esModule",{value:!0}),_d.concat=void 0;var Md=vd,Nd=b,xd=Dl;_d.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Md.concatAll()(xd.from(e,Nd.popScheduler(e)))};var Dd={},Ld={},Ud=(Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.defer=void 0,E),Fd=I;Ld.defer=function(t){return new Ud.Observable(function(e){Fd.innerFrom(t()).subscribe(e)})},Object.defineProperty(Dd,"__esModule",{value:!0}),Dd.connectable=void 0;var Bd=C,Vd=E,qd=Ld,Wd={connector:function(){return new Bd.Subject},resetOnDisconnect:!0};Dd.connectable=function(e,t){var r=null,n=(t=void 0===t?Wd:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new Vd.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=qd.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var zd={},Hd=(Object.defineProperty(zd,"__esModule",{value:!0}),zd.forkJoin=void 0,E),Gd=ed,Yd=I,Kd=b,Zd=p,Qd=xp,Xd=id;zd.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Kd.popResultSelector(e),u=(n=Gd.argsArgArrayOrObject(e)).args,a=n.keys,n=new Hd.Observable(function(e){var t=u.length;if(t)for(var n=new Array(t),o=t,i=t,r=0;r<t;r++)!function(t){var r=!1;Yd.innerFrom(u[t]).subscribe(Zd.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?Xd.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(Qd.mapOneOrManyArgs(r)):n};var ed={},Jd=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},$d=(Object.defineProperty(ed,"__esModule",{value:!0}),ed.fromEvent=void 0,I),eh=E,th=gd,rh=Fl,nh=y,oh=xp,ih=["addListener","removeListener"],uh=["addEventListener","removeEventListener"],ah=["on","off"];function sh(r,n){return function(t){return function(e){return r[t](n,e)}}}ed.fromEvent=function t(r,n,o,e){if(nh.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(oh.mapOneOrManyArgs(e));var e=Jd((e=r,nh.isFunction(e.addEventListener)&&nh.isFunction(e.removeEventListener)?uh.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,nh.isFunction(e.addListener)&&nh.isFunction(e.removeListener)?ih.map(sh(r,n)):(e=r,nh.isFunction(e.on)&&nh.isFunction(e.off)?ah.map(sh(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&rh.isArrayLike(r))return th.mergeMap(function(e){return t(e,n,o)})($d.innerFrom(r));if(i)return new eh.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1<e.length?e:e[0])}return i(e),function(){return u(e)}});throw new TypeError("Invalid event target")};var id={},ch=(Object.defineProperty(id,"__esModule",{value:!0}),id.fromEventPattern=void 0,E),lh=y,fh=xp;id.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(fh.mapOneOrManyArgs(t)):new ch.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1===e.length?e[0]:e)}var t=n(e);return lh.isFunction(o)?function(){return o(e,t)}:void 0})};var Fl={},ph=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},dh=(Object.defineProperty(Fl,"__esModule",{value:!0}),Fl.generate=void 0,jt),hh=Al,bh=Ld,yh=Vf;Fl.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return ph(this,function(e){switch(e.label){case 0:t=a,e.label=1;case 1:return r&&!r(t)?[3,4]:[4,u(t)];case 2:e.sent(),e.label=3;case 3:return t=n(t),[3,1];case 4:return[2]}})}return 1===arguments.length?(a=e.initialState,r=e.condition,n=e.iterate,i=e.resultSelector,u=void 0===i?dh.identity:i,o=e.scheduler):(a=e,!t||hh.isScheduler(t)?(u=dh.identity,o=t):u=t),bh.defer(o?function(){return yh.scheduleIterable(s(),o)}:s)};var Vf={},_h=(Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.iif=void 0,Ld);Vf.iif=function(e,t,r){return _h.defer(function(){return e()?t:r})};var vh={},mh={},gh=(Object.defineProperty(mh,"__esModule",{value:!0}),mh.timer=void 0,E),Oh=T,wh=Al,Eh=Ff;mh.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=Oh.async);var i=-1;return null!=e&&(wh.isScheduler(e)?o=e:i=e),new gh.Observable(function(e){var t=Eh.isValidDate(n)?+n-o.now():n,r=0;return o.schedule(function(){e.closed||(e.next(r++),0<=i?this.schedule(void 0,i):e.complete())},t=t<0?0:t)})},Object.defineProperty(vh,"__esModule",{value:!0}),vh.interval=void 0;var Ph=T,Th=mh;vh.interval=function(e,t){return Th.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?Ph.asyncScheduler:t)};var Al={},Sh=(Object.defineProperty(Al,"__esModule",{value:!0}),Al.merge=void 0,md),jh=I,Ch=dt,Ih=b,Rh=Dl;Al.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ih.popScheduler(e),n=Ih.popNumber(e,1/0),o=e;return o.length?1===o.length?jh.innerFrom(o[0]):Sh.mergeAll(n)(Rh.from(o,r)):Ch.EMPTY};var Ah,kh={},Mh=(Ah=kh,Object.defineProperty(Ah,"__esModule",{value:!0}),Ah.never=Ah.NEVER=void 0,Ah.NEVER=new E.Observable(l.noop),Ah.never=function(){return Ah.NEVER},{}),Nh={},xh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.argsOrArgArray=void 0,Array.isArray);Nh.argsOrArgArray=function(e){return 1===e.length&&xh(e[0])?e[0]:e},Object.defineProperty(Mh,"__esModule",{value:!0}),Mh.onErrorResumeNext=void 0;var Dh=E,Lh=Nh,Uh=p,Fh=l,Bh=I;Mh.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Lh.argsOrArgArray(e);return new Dh.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=Bh.innerFrom(i[n++])}catch(e){return void o()}var t=new Uh.OperatorSubscriber(r,void 0,Fh.noop,Fh.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var Vh={},qh=(Object.defineProperty(Vh,"__esModule",{value:!0}),Vh.pairs=void 0,Dl);Vh.pairs=function(e,t){return qh.from(Object.entries(e),t)};var Wh={},zh={};Object.defineProperty(zh,"__esModule",{value:!0}),zh.not=void 0,zh.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var Hh={},Gh=(Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.filter=void 0,S),Yh=p;Hh.filter=function(n,o){return Gh.operate(function(e,t){var r=0;e.subscribe(Yh.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(Wh,"__esModule",{value:!0}),Wh.partition=void 0;var Kh=zh,Zh=Hh,Qh=I;Wh.partition=function(e,t,r){return[Zh.filter(t,r)(Qh.innerFrom(e)),Zh.filter(Kh.not(t,r))(Qh.innerFrom(e))]};var Xh={},Jh=(Object.defineProperty(Xh,"__esModule",{value:!0}),Xh.raceInit=Xh.race=void 0,E),$h=I,eb=Nh,tb=p;function rb(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push($h.innerFrom(t[r]).subscribe(tb.createOperatorSubscriber(n,function(e){if(o){for(var t=0;t<o.length;t++)t!==r&&o[t].unsubscribe();o=null}n.next(e)})))}(e)}}Xh.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=eb.argsOrArgArray(e)).length?$h.innerFrom(e[0]):new Jh.Observable(rb(e))},Xh.raceInit=rb;var nb={},ob=(Object.defineProperty(nb,"__esModule",{value:!0}),nb.range=void 0,E),ib=dt;nb.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return ib.EMPTY;var o=e+r;return new ob.Observable(n?function(e){var t=r;return n.schedule(function(){t<o?(e.next(t++),this.schedule()):e.complete()})}:function(e){for(var t=r;t<o&&!e.closed;)e.next(t++);e.complete()})};var ub={},ab=(Object.defineProperty(ub,"__esModule",{value:!0}),ub.using=void 0,E),sb=I,cb=dt;ub.using=function(n,o){return new ab.Observable(function(e){var t=n(),r=o(t);return(r?sb.innerFrom(r):cb.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var lb={},fb=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},pb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},db=(Object.defineProperty(lb,"__esModule",{value:!0}),lb.zip=void 0,E),hb=I,bb=Nh,yb=dt,_b=p,vb=b;lb.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=vb.popResultSelector(e),u=bb.argsOrArgArray(e);return u.length?new db.Observable(function(r){for(var n=u.map(function(){return[]}),o=u.map(function(){return!1}),e=(r.add(function(){n=o=null}),0);!r.closed&&e<u.length;e++)!function(t){hb.innerFrom(u[t]).subscribe(_b.createOperatorSubscriber(r,function(e){n[t].push(e),n.every(function(e){return e.length})&&(e=n.map(function(e){return e.shift()}),r.next(i?i.apply(void 0,pb([],fb(e))):e),n.some(function(e,t){return!e.length&&o[t]})&&r.complete())},function(){o[t]=!0,n[t].length||r.complete()}))}(e);return function(){n=o=null}}):yb.EMPTY};var mb={},gb=(Object.defineProperty(mb,"__esModule",{value:!0}),{}),Ob=(Object.defineProperty(gb,"__esModule",{value:!0}),gb.audit=void 0,S),wb=I,Eb=p;gb.audit=function(s){return Ob.operate(function(e,t){function r(){var e;null!=u&&u.unsubscribe(),u=null,o&&(o=!1,e=i,i=null,t.next(e)),a&&t.complete()}function n(){u=null,a&&t.complete()}var o=!1,i=null,u=null,a=!1;e.subscribe(Eb.createOperatorSubscriber(t,function(e){o=!0,i=e,u||wb.innerFrom(s(e)).subscribe(u=Eb.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var Pb={},Tb=(Object.defineProperty(Pb,"__esModule",{value:!0}),Pb.auditTime=void 0,T),Sb=gb,jb=mh;Pb.auditTime=function(e,t){return void 0===t&&(t=Tb.asyncScheduler),Sb.audit(function(){return jb.timer(e,t)})};var Cb={},Ib=(Object.defineProperty(Cb,"__esModule",{value:!0}),Cb.buffer=void 0,S),Rb=l,Ab=p,kb=I;Cb.buffer=function(n){return Ib.operate(function(e,t){var r=[];return e.subscribe(Ab.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),kb.innerFrom(n).subscribe(Ab.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},Rb.noop)),function(){r=null}})};var Mb={},Nb=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xb=(Object.defineProperty(Mb,"__esModule",{value:!0}),Mb.bufferCount=void 0,S),Db=p,Lb=O;Mb.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,xb.operate(function(e,f){var p=[],d=0;e.subscribe(Db.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=Nb(p),a=u.next();!a.done;a=u.next())(l=a.value).push(e),h<=l.length&&(i=null!=i?i:[]).push(l)}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}if(i)try{for(var s=Nb(i),c=s.next();!c.done;c=s.next()){var l=c.value;Lb.arrRemove(p,l),f.next(l)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},function(){var t,e;try{for(var r=Nb(p),n=r.next();!n.done;n=r.next()){var o=n.value;f.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}f.complete()},void 0,function(){p=null}))})};var Ub={},Fb=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Bb=(Object.defineProperty(Ub,"__esModule",{value:!0}),Ub.bufferTime=void 0,P),Vb=S,qb=p,Wb=O,zb=T,Hb=b,Gb=Sf;Ub.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=Hb.popScheduler(t))?e:zb.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return Vb.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),Wb.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new Bb.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),Gb.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?Gb.executeSchedule(r,u,o,a,!0):n=!0,o(),qb.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=Fb(n),i=o.next();!i.done;i=o.next()){var u=i.value,a=u.buffer;a.push(e),l<=a.length&&c(u)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;null!=s&&s.length;)r.next(s.shift().buffer);null!=t&&t.unsubscribe(),r.complete(),r.unsubscribe()},void 0,function(){return s=null}));e.subscribe(t)})};var Yb={},Kb=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Zb=(Object.defineProperty(Yb,"__esModule",{value:!0}),Yb.bufferToggle=void 0,P),Qb=S,Xb=I,Jb=p,$b=l,ey=O;Yb.bufferToggle=function(t,o){return Qb.operate(function(e,n){var i=[];Xb.innerFrom(t).subscribe(Jb.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new Zb.Subscription);r.add(Xb.innerFrom(o(e)).subscribe(Jb.createOperatorSubscriber(n,function(){ey.arrRemove(i,t),n.next(t),r.unsubscribe()},$b.noop)))},$b.noop)),e.subscribe(Jb.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=Kb(i),o=n.next();!o.done;o=n.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},function(){for(;0<i.length;)n.next(i.shift());n.complete()}))})};var ty={},ry=(Object.defineProperty(ty,"__esModule",{value:!0}),ty.bufferWhen=void 0,S),ny=l,oy=p,iy=I;ty.bufferWhen=function(i){return ry.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),iy.innerFrom(i()).subscribe(n=oy.createOperatorSubscriber(t,o,ny.noop))};o(),e.subscribe(oy.createOperatorSubscriber(t,function(e){return null==r?void 0:r.push(e)},function(){r&&t.next(r),t.complete()},void 0,function(){return r=n=null}))})};var uy={},ay=(Object.defineProperty(uy,"__esModule",{value:!0}),uy.catchError=void 0,I),sy=p,cy=S;uy.catchError=function u(a){return cy.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(sy.createOperatorSubscriber(r,void 0,void 0,function(e){n=ay.innerFrom(a(e,u(a)(t))),o?(o.unsubscribe(),o=null,n.subscribe(r)):i=!0}));i&&(o.unsubscribe(),o=null,n.subscribe(r))})};var ly={},fy={},R={},py={},dy={},hy={},by=(Object.defineProperty(hy,"__esModule",{value:!0}),hy.scanInternals=void 0,p);hy.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(by.createOperatorSubscriber(r,function(e){var t=i++;o=n?u(o,e,t):(n=!0,e),s&&r.next(o)},c&&function(){n&&r.next(o),r.complete()}))}},Object.defineProperty(dy,"__esModule",{value:!0}),dy.reduce=void 0;var yy=hy,_y=S;dy.reduce=function(e,t){return _y.operate(yy.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(py,"__esModule",{value:!0}),py.toArray=void 0;function vy(e,t){return e.push(t),e}var my=dy,gy=S;py.toArray=function(){return gy.operate(function(e,t){my.reduce(vy,[])(e).subscribe(t)})},Object.defineProperty(R,"__esModule",{value:!0}),R.joinAllInternals=void 0;var Oy=jt,wy=xp,Ey=u,Py=gd,Ty=py;R.joinAllInternals=function(t,e){return Ey.pipe(Ty.toArray(),Py.mergeMap(function(e){return t(e)}),e?wy.mapOneOrManyArgs(e):Oy.identity)},Object.defineProperty(fy,"__esModule",{value:!0}),fy.combineLatestAll=void 0;var Sy=F,jy=R;fy.combineLatestAll=function(e){return jy.joinAllInternals(Sy.combineLatest,e)},Object.defineProperty(ly,"__esModule",{value:!0}),ly.combineAll=void 0;ly.combineAll=fy.combineLatestAll;var Cy={},Iy={},Ry=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ay=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},ky=(Object.defineProperty(Iy,"__esModule",{value:!0}),Iy.combineLatest=void 0,F),My=S,Ny=Nh,xy=xp,Dy=u,Ly=b;function Uy(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Ly.popResultSelector(r);return t?Dy.pipe(Uy.apply(void 0,Ay([],Ry(r))),xy.mapOneOrManyArgs(t)):My.operate(function(e,t){ky.combineLatestInit(Ay([e],Ry(Ny.argsOrArgArray(r))))(t)})}Iy.combineLatest=Uy;var Fy=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},By=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Vy=(Object.defineProperty(Cy,"__esModule",{value:!0}),Cy.combineLatestWith=void 0,Iy);Cy.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vy.combineLatest.apply(void 0,By([],Fy(e)))};var xp={},qy=(Object.defineProperty(xp,"__esModule",{value:!0}),xp.concatMap=void 0,gd),Wy=y;xp.concatMap=function(e,t){return Wy.isFunction(t)?qy.mergeMap(e,t,1):qy.mergeMap(e,1)};var zy={},Hy=(Object.defineProperty(zy,"__esModule",{value:!0}),zy.concatMapTo=void 0,xp),Gy=y;zy.concatMapTo=function(e,t){return Gy.isFunction(t)?Hy.concatMap(function(){return e},t):Hy.concatMap(function(){return e})};var Yy={},Ky={},Zy=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Qy=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Xy=(Object.defineProperty(Ky,"__esModule",{value:!0}),Ky.concat=void 0,S),Jy=vd,$y=b,e_=Dl;Ky.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=$y.popScheduler(r);return Xy.operate(function(e,t){Jy.concatAll()(e_.from(Qy([e],Zy(r)),n)).subscribe(t)})};var t_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},n_=(Object.defineProperty(Yy,"__esModule",{value:!0}),Yy.concatWith=void 0,Ky);Yy.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n_.concat.apply(void 0,r_([],t_(e)))};var o_={},i_={},u_=(Object.defineProperty(i_,"__esModule",{value:!0}),i_.fromSubscribable=void 0,E);i_.fromSubscribable=function(t){return new u_.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(o_,"__esModule",{value:!0}),o_.connect=void 0;var a_=C,s_=I,c_=S,l_=i_,f_={connector:function(){return new a_.Subject}};o_.connect=function(n,e){var o=(e=void 0===e?f_:e).connector;return c_.operate(function(e,t){var r=o();s_.innerFrom(n(l_.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var i_={},p_=(Object.defineProperty(i_,"__esModule",{value:!0}),i_.count=void 0,dy);i_.count=function(n){return p_.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var d_={},h_=(Object.defineProperty(d_,"__esModule",{value:!0}),d_.debounce=void 0,S),b_=l,y_=p,__=I;d_.debounce=function(u){return h_.operate(function(e,t){function r(){var e;null!=i&&i.unsubscribe(),i=null,n&&(n=!1,e=o,o=null,t.next(e))}var n=!1,o=null,i=null;e.subscribe(y_.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=y_.createOperatorSubscriber(t,r,b_.noop),__.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var v_={},m_=(Object.defineProperty(v_,"__esModule",{value:!0}),v_.debounceTime=void 0,T),g_=S,O_=p;v_.debounceTime=function(a,s){return void 0===s&&(s=m_.asyncScheduler),g_.operate(function(e,r){var n=null,t=null,o=null,i=function(){var e;n&&(n.unsubscribe(),e=t,t=n=null,r.next(e))};function u(){var e=o+a,t=s.now();if(t<e)return n=this.schedule(void 0,e-t),void r.add(n);i()}e.subscribe(O_.createOperatorSubscriber(r,function(e){t=e,o=s.now(),n||(n=s.schedule(u,a),r.add(n))},function(){i(),r.complete()},void 0,function(){t=n=null}))})};var w_={},E_=(Object.defineProperty(w_,"__esModule",{value:!0}),w_.defaultIfEmpty=void 0,S),P_=p;w_.defaultIfEmpty=function(n){return E_.operate(function(e,t){var r=!1;e.subscribe(P_.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var A={},T_={},S_={},j_=(Object.defineProperty(S_,"__esModule",{value:!0}),S_.take=void 0,dt),C_=S,I_=p;S_.take=function(n){return n<=0?function(){return j_.EMPTY}:C_.operate(function(e,t){var r=0;e.subscribe(I_.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var R_={},A_=(Object.defineProperty(R_,"__esModule",{value:!0}),R_.ignoreElements=void 0,S),k_=p,M_=l;R_.ignoreElements=function(){return A_.operate(function(e,t){e.subscribe(k_.createOperatorSubscriber(t,M_.noop))})};var N_={},x_=(Object.defineProperty(N_,"__esModule",{value:!0}),N_.mapTo=void 0,Dp);N_.mapTo=function(e){return x_.map(function(){return e})},Object.defineProperty(T_,"__esModule",{value:!0}),T_.delayWhen=void 0;var D_=_d,L_=S_,U_=R_,F_=N_,B_=gd,V_=I;T_.delayWhen=function t(r,n){return n?function(e){return D_.concat(n.pipe(L_.take(1),U_.ignoreElements()),e.pipe(t(r)))}:B_.mergeMap(function(e,t){return V_.innerFrom(r(e,t)).pipe(L_.take(1),F_.mapTo(e))})},Object.defineProperty(A,"__esModule",{value:!0}),A.delay=void 0;var q_=T,W_=T_,z_=mh;A.delay=function(e,t){var r=z_.timer(e,t=void 0===t?q_.asyncScheduler:t);return W_.delayWhen(function(){return r})};var H_={},G_=(Object.defineProperty(H_,"__esModule",{value:!0}),H_.dematerialize=void 0,h),Y_=S,K_=p;H_.dematerialize=function(){return Y_.operate(function(e,t){e.subscribe(K_.createOperatorSubscriber(t,function(e){return G_.observeNotification(e,t)}))})};var Z_={},Q_=(Object.defineProperty(Z_,"__esModule",{value:!0}),Z_.distinct=void 0,S),X_=p,J_=l,$_=I;Z_.distinct=function(o,t){return Q_.operate(function(e,r){var n=new Set;e.subscribe(X_.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&$_.innerFrom(t).subscribe(X_.createOperatorSubscriber(r,function(){return n.clear()},J_.noop))})};var ev={},tv=(Object.defineProperty(ev,"__esModule",{value:!0}),ev.distinctUntilChanged=void 0,jt),rv=S,nv=p;function ov(e,t){return e===t}ev.distinctUntilChanged=function(i,u){return void 0===u&&(u=tv.identity),i=null!=i?i:ov,rv.operate(function(e,r){var n,o=!0;e.subscribe(nv.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var iv={},uv=(Object.defineProperty(iv,"__esModule",{value:!0}),iv.distinctUntilKeyChanged=void 0,ev);iv.distinctUntilKeyChanged=function(r,n){return uv.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var av={},sv={},cv=(Object.defineProperty(sv,"__esModule",{value:!0}),sv.throwIfEmpty=void 0,Bl),lv=S,fv=p;function pv(){return new cv.EmptyError}sv.throwIfEmpty=function(n){return void 0===n&&(n=pv),lv.operate(function(e,t){var r=!1;e.subscribe(fv.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(av,"__esModule",{value:!0}),av.elementAt=void 0;var dv=Yl,hv=Hh,bv=sv,yv=w_,_v=S_;av.elementAt=function(r,t){if(r<0)throw new dv.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(hv.filter(function(e,t){return t===r}),_v.take(1),n?yv.defaultIfEmpty(t):bv.throwIfEmpty(function(){return new dv.ArgumentOutOfRangeError}))}};var vv={},mv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},gv=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Ov=(Object.defineProperty(vv,"__esModule",{value:!0}),vv.endWith=void 0,_d),wv=c;vv.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Ov.concat(e,wv.of.apply(void 0,gv([],mv(t))))}};var Ev={},Pv=(Object.defineProperty(Ev,"__esModule",{value:!0}),Ev.every=void 0,S),Tv=p;Ev.every=function(o,i){return Pv.operate(function(t,r){var n=0;t.subscribe(Tv.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var Sv={},jv={},Cv={},Iv=(Object.defineProperty(Cv,"__esModule",{value:!0}),Cv.exhaustMap=void 0,Dp),Rv=I,Av=S,kv=p;Cv.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return Rv.innerFrom(i(r,n)).pipe(Iv.map(function(e,t){return o(r,e,n,t)}))}))}:Av.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(kv.createOperatorSubscriber(t,function(e){n||(n=kv.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),Rv.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(jv,"__esModule",{value:!0}),jv.exhaustAll=void 0;var Mv=Cv,Nv=jt;jv.exhaustAll=function(){return Mv.exhaustMap(Nv.identity)},Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.exhaust=void 0;Sv.exhaust=jv.exhaustAll;var xv={},Dv=(Object.defineProperty(xv,"__esModule",{value:!0}),xv.expand=void 0,S),Lv=Od;xv.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,Dv.operate(function(e,t){return Lv.mergeInternals(e,t,r,n,void 0,!0,o)})};var Uv={},Fv=(Object.defineProperty(Uv,"__esModule",{value:!0}),Uv.finalize=void 0,S);Uv.finalize=function(r){return Fv.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var Bv={},Vv=(Object.defineProperty(Bv,"__esModule",{value:!0}),Bv.createFind=Bv.find=void 0,S),qv=p;function Wv(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(qv.createOperatorSubscriber(n,function(e){var t=o++;i.call(u,e,t,r)&&(n.next(a?t:e),n.complete())},function(){n.next(a?-1:void 0),n.complete()}))}}Bv.find=function(e,t){return Vv.operate(Wv(e,t,"value"))},Bv.createFind=Wv;var zv={},Hv=(Object.defineProperty(zv,"__esModule",{value:!0}),zv.findIndex=void 0,S),Gv=Bv;zv.findIndex=function(e,t){return Hv.operate(Gv.createFind(e,t,"index"))};var Yv={},Kv=(Object.defineProperty(Yv,"__esModule",{value:!0}),Yv.first=void 0,Bl),Zv=Hh,Qv=S_,Xv=w_,Jv=sv,$v=jt;Yv.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?Zv.filter(function(e,t){return n(e,t,r)}):$v.identity,Qv.take(1),t?Xv.defaultIfEmpty(e):Jv.throwIfEmpty(function(){return new Kv.EmptyError}))}};var em={},tm=(Object.defineProperty(em,"__esModule",{value:!0}),em.groupBy=void 0,E),rm=I,nm=C,om=S,im=p;em.groupBy=function(b,t,y,_){return om.operate(function(e,s){function c(t){return r(function(e){return e.error(t)})}t&&"function"!=typeof t?(y=t.duration,l=t.element,_=t.connector):l=t;var l,f=new Map,r=function(e){f.forEach(e),e(s)},p=0,d=!1,h=new im.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new nm.Subject),i=n,u=o,(a=new tm.Observable(function(e){p++;var t=u.subscribe(e);return function(){t.unsubscribe(),0==--p&&d&&h.unsubscribe()}})).key=i,t=a,s.next(t),y&&(r=im.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(rm.innerFrom(y(t)).subscribe(r)))),o.next(l?l(e):e)}catch(e){c(e)}var i,u,a},function(){return r(function(e){return e.complete()})},c,function(){return f.clear()},function(){return d=!0,0===p});e.subscribe(h)})};var um={},am=(Object.defineProperty(um,"__esModule",{value:!0}),um.isEmpty=void 0,S),sm=p;um.isEmpty=function(){return am.operate(function(e,t){e.subscribe(sm.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var cm={},lm={},fm=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},pm=(Object.defineProperty(lm,"__esModule",{value:!0}),lm.takeLast=void 0,dt),dm=S,hm=p;lm.takeLast=function(t){return t<=0?function(){return pm.EMPTY}:dm.operate(function(e,i){var u=[];e.subscribe(hm.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=fm(u),n=r.next();!n.done;n=r.next()){var o=n.value;i.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}i.complete()},void 0,function(){u=null}))})},Object.defineProperty(cm,"__esModule",{value:!0}),cm.last=void 0;var bm=Bl,ym=Hh,_m=lm,vm=sv,mm=w_,gm=jt;cm.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?ym.filter(function(e,t){return n(e,t,r)}):gm.identity,_m.takeLast(1),t?mm.defaultIfEmpty(e):vm.throwIfEmpty(function(){return new bm.EmptyError}))}};var Om={},wm=(Object.defineProperty(Om,"__esModule",{value:!0}),Om.materialize=void 0,h),Em=S,Pm=p;Om.materialize=function(){return Em.operate(function(e,t){e.subscribe(Pm.createOperatorSubscriber(t,function(e){t.next(wm.Notification.createNext(e))},function(){t.next(wm.Notification.createComplete()),t.complete()},function(e){t.next(wm.Notification.createError(e)),t.complete()}))})};var Tm={},Sm=(Object.defineProperty(Tm,"__esModule",{value:!0}),Tm.max=void 0,dy),jm=y;Tm.max=function(r){return Sm.reduce(jm.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var Cm={},Im=(Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.flatMap=void 0,gd),Im=(Cm.flatMap=Im.mergeMap,{}),Rm=(Object.defineProperty(Im,"__esModule",{value:!0}),Im.mergeMapTo=void 0,gd),Am=y;Im.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),Am.isFunction(t)?Rm.mergeMap(function(){return e},t,r):Rm.mergeMap(function(){return e},r="number"==typeof t?t:r)};var km={},Mm=(Object.defineProperty(km,"__esModule",{value:!0}),km.mergeScan=void 0,S),Nm=Od;km.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),Mm.operate(function(e,t){var r=o;return Nm.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var Od={},xm={},Dm=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Lm=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Um=(Object.defineProperty(xm,"__esModule",{value:!0}),xm.merge=void 0,S),Fm=md,Bm=b,Vm=Dl;xm.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Bm.popScheduler(r),o=Bm.popNumber(r,1/0);return Um.operate(function(e,t){Fm.mergeAll(o)(Vm.from(Lm([e],Dm(r)),n)).subscribe(t)})};var qm=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Wm=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},zm=(Object.defineProperty(Od,"__esModule",{value:!0}),Od.mergeWith=void 0,xm);Od.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return zm.merge.apply(void 0,Wm([],qm(e)))};var Hm={},Gm=(Object.defineProperty(Hm,"__esModule",{value:!0}),Hm.min=void 0,dy),Ym=y;Hm.min=function(r){return Gm.reduce(Ym.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var Km={},Zm=(Object.defineProperty(Km,"__esModule",{value:!0}),Km.multicast=void 0,Wt),Qm=y,Xm=o_;Km.multicast=function(e,t){var r=Qm.isFunction(e)?e:function(){return e};return Qm.isFunction(t)?Xm.connect(t,{connector:r}):function(e){return new Zm.ConnectableObservable(e,r)}};var Jm={},$m=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},e0=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},t0=(Object.defineProperty(Jm,"__esModule",{value:!0}),Jm.onErrorResumeNext=Jm.onErrorResumeNextWith=void 0,Nh),r0=Mh;function n0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=t0.argsOrArgArray(e);return function(e){return r0.onErrorResumeNext.apply(void 0,e0([e],$m(r)))}}Jm.onErrorResumeNextWith=n0,Jm.onErrorResumeNext=n0;var o0={},i0=(Object.defineProperty(o0,"__esModule",{value:!0}),o0.pairwise=void 0,S),u0=p;o0.pairwise=function(){return i0.operate(function(e,r){var n,o=!1;e.subscribe(u0.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var a0={},s0=(Object.defineProperty(a0,"__esModule",{value:!0}),a0.pluck=void 0,Dp);a0.pluck=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];var i=o.length;if(0===i)throw new Error("list of properties cannot be empty.");return s0.map(function(e){for(var t=e,r=0;r<i;r++){var n=null==t?void 0:t[o[r]];if(void 0===n)return;t=n}return t})};var c0={},l0=(Object.defineProperty(c0,"__esModule",{value:!0}),c0.publish=void 0,C),f0=Km,p0=o_;c0.publish=function(t){return t?function(e){return p0.connect(t)(e)}:function(e){return f0.multicast(new l0.Subject)(e)}};var d0={},h0=(Object.defineProperty(d0,"__esModule",{value:!0}),d0.publishBehavior=void 0,sr),b0=Wt;d0.publishBehavior=function(r){return function(e){var t=new h0.BehaviorSubject(r);return new b0.ConnectableObservable(e,function(){return t})}};var y0={},_0=(Object.defineProperty(y0,"__esModule",{value:!0}),y0.publishLast=void 0,G),v0=Wt;y0.publishLast=function(){return function(e){var t=new _0.AsyncSubject;return new v0.ConnectableObservable(e,function(){return t})}};var m0={},g0=(Object.defineProperty(m0,"__esModule",{value:!0}),m0.publishReplay=void 0,gt),O0=Km,w0=y;m0.publishReplay=function(t,r,e,n){e&&!w0.isFunction(e)&&(n=e);var o=w0.isFunction(e)?e:void 0;return function(e){return O0.multicast(new g0.ReplaySubject(t,r,n),o)(e)}};var E0={},P0=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},T0=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},S0=(Object.defineProperty(E0,"__esModule",{value:!0}),E0.raceWith=void 0,Xh),j0=S,C0=jt;E0.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?j0.operate(function(e,t){S0.raceInit(T0([e],P0(r)))(t)}):C0.identity};var I0={},R0=(Object.defineProperty(I0,"__esModule",{value:!0}),I0.repeat=void 0,dt),A0=S,k0=p,M0=I,N0=mh;I0.repeat=function(e){var t,a,s=1/0;return null!=e&&("object"==typeof e?(t=e.count,s=void 0===t?1/0:t,a=e.delay):s=e),s<=0?function(){return R0.EMPTY}:A0.operate(function(t,r){function n(){var e=!1;o=t.subscribe(k0.createOperatorSubscriber(r,void 0,function(){++i<s?o?u():e=!0:r.complete()})),e&&u()}var o,i=0,u=function(){var e,t;null!=o&&o.unsubscribe(),(o=null)!=a?(e="number"==typeof a?N0.timer(a):M0.innerFrom(a(i)),t=k0.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var x0={},D0=(Object.defineProperty(x0,"__esModule",{value:!0}),x0.repeatWhen=void 0,I),L0=C,U0=S,F0=p;x0.repeatWhen=function(l){return U0.operate(function(e,t){var r,n,o=!1,i=!1,u=!1,a=function(){return u&&i&&(t.complete(),!0)},s=function(){return n||(n=new L0.Subject,D0.innerFrom(l(n)).subscribe(F0.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(F0.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var B0={},V0=(Object.defineProperty(B0,"__esModule",{value:!0}),B0.retry=void 0,S),q0=p,W0=jt,z0=mh,H0=I;B0.retry=function(e){var t=(e=(e=void 0===e?1/0:e)&&"object"==typeof e?e:{count:e}).count,c=void 0===t?1/0:t,l=e.delay,r=void 0!==(t=e.resetOnSuccess)&&t;return c<=0?W0.identity:V0.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(q0.createOperatorSubscriber(i,function(e){r&&(a=0),i.next(e)},void 0,function(e){var t,r,n;a++<c?(t=function(){u?(u.unsubscribe(),u=null,s()):o=!0},null!=l?(r="number"==typeof l?z0.timer(l):H0.innerFrom(l(e,a)),n=q0.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var G0={},Y0=(Object.defineProperty(G0,"__esModule",{value:!0}),G0.retryWhen=void 0,I),K0=C,Z0=S,Q0=p;G0.retryWhen=function(u){return Z0.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(Q0.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new K0.Subject,Y0.innerFrom(u(n)).subscribe(Q0.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var X0={},J0=(Object.defineProperty(X0,"__esModule",{value:!0}),X0.sample=void 0,I),$0=S,eg=l,tg=p;X0.sample=function(o){return $0.operate(function(e,t){var r=!1,n=null;e.subscribe(tg.createOperatorSubscriber(t,function(e){r=!0,n=e})),J0.innerFrom(o).subscribe(tg.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},eg.noop))})};var rg={},ng=(Object.defineProperty(rg,"__esModule",{value:!0}),rg.sampleTime=void 0,T),og=X0,ig=vh;rg.sampleTime=function(e,t){return og.sample(ig.interval(e,t=void 0===t?ng.asyncScheduler:t))};var ug={},ag=(Object.defineProperty(ug,"__esModule",{value:!0}),ug.scan=void 0,S),sg=hy;ug.scan=function(e,t){return ag.operate(sg.scanInternals(e,t,2<=arguments.length,!0))};var hy={},cg=(Object.defineProperty(hy,"__esModule",{value:!0}),hy.sequenceEqual=void 0,S),lg=p,fg=I;function pg(){return{buffer:[],complete:!1}}hy.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),cg.operate(function(e,t){function r(n,o){var r=lg.createOperatorSubscriber(t,function(e){var t=o.buffer,r=o.complete;0===t.length?r?i(!1):n.buffer.push(e):a(e,t.shift())||i(!1)},function(){n.complete=!0;var e=o.complete,t=o.buffer;e&&i(0===t.length),null!=r&&r.unsubscribe()});return r}var n=pg(),o=pg(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),fg.innerFrom(u).subscribe(r(o,n))})};var dg={},hg=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},bg=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},yg=(Object.defineProperty(dg,"__esModule",{value:!0}),dg.share=void 0,I),_g=C,vg=Gt,mg=S;function gg(e,t){for(var r,n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!0===t)e();else if(!1!==t)return r=new vg.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),yg.innerFrom(t.apply(void 0,bg([],hg(n)))).subscribe(r)}dg.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new _g.Subject}:t,d=void 0===(t=e.resetOnError)||t,h=void 0===(t=e.resetOnComplete)||t,b=void 0===(t=e.resetOnRefCountZero)||t;return function(e){function n(){var e=o;f(),null!=e&&e.unsubscribe()}var o,i,u,a=0,s=!1,c=!1,l=function(){null!=i&&i.unsubscribe(),i=void 0},f=function(){l(),o=u=void 0,s=c=!1};return mg.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=gg(n,b))}),r.subscribe(t),!o&&0<a&&(o=new vg.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=gg(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=gg(f,h),r.complete()}}),yg.innerFrom(e).subscribe(o))})(e)}};var Og={},wg=(Object.defineProperty(Og,"__esModule",{value:!0}),Og.shareReplay=void 0,gt),Eg=dg;Og.shareReplay=function(e,t,r){var n,o,i=!1;return e&&"object"==typeof e?(n=e.bufferSize,o=void 0===n?1/0:n,n=e.windowTime,t=void 0===n?1/0:n,i=void 0!==(n=e.refCount)&&n,r=e.scheduler):o=null!=e?e:1/0,Eg.share({connector:function(){return new wg.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var Pg={},Tg=(Object.defineProperty(Pg,"__esModule",{value:!0}),Pg.single=void 0,Bl),Sg=xf,jg=Kf,Cg=S,Ig=p;Pg.single=function(a){return Cg.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(Ig.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new Sg.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new jg.NotFoundError("No matching values"):new Tg.EmptyError)}))})};var Rg={},Ag=(Object.defineProperty(Rg,"__esModule",{value:!0}),Rg.skip=void 0,Hh);Rg.skip=function(r){return Ag.filter(function(e,t){return r<=t})};var kg={},Mg=(Object.defineProperty(kg,"__esModule",{value:!0}),kg.skipLast=void 0,jt),Ng=S,xg=p;kg.skipLast=function(u){return u<=0?Mg.identity:Ng.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(xg.createOperatorSubscriber(n,function(e){var t,r=i++;r<u?o[r]=e:(t=o[r=r%u],o[r]=e,n.next(t))})),function(){o=null}})};var Dg={},Lg=(Object.defineProperty(Dg,"__esModule",{value:!0}),Dg.skipUntil=void 0,S),Ug=p,Fg=I,Bg=l;Dg.skipUntil=function(o){return Lg.operate(function(e,t){var r=!1,n=Ug.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},Bg.noop);Fg.innerFrom(o).subscribe(n),e.subscribe(Ug.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var Vg={},qg=(Object.defineProperty(Vg,"__esModule",{value:!0}),Vg.skipWhile=void 0,S),Wg=p;Vg.skipWhile=function(o){return qg.operate(function(e,t){var r=!1,n=0;e.subscribe(Wg.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var zg={},Hg=(Object.defineProperty(zg,"__esModule",{value:!0}),zg.startWith=void 0,_d),Gg=b,Yg=S;zg.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Gg.popScheduler(r);return Yg.operate(function(e,t){(n?Hg.concat(r,e,n):Hg.concat(r,e)).subscribe(t)})};var Kg={},Zg={},Qg=(Object.defineProperty(Zg,"__esModule",{value:!0}),Zg.switchMap=void 0,I),Xg=S,Jg=p;Zg.switchMap=function(s,c){return Xg.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(Jg.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;Qg.innerFrom(s(t,n)).subscribe(u=Jg.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(Kg,"__esModule",{value:!0}),Kg.switchAll=void 0;var $g=Zg,eO=jt;Kg.switchAll=function(){return $g.switchMap(eO.identity)};var tO={},rO=(Object.defineProperty(tO,"__esModule",{value:!0}),tO.switchMapTo=void 0,Zg),nO=y;tO.switchMapTo=function(e,t){return nO.isFunction(t)?rO.switchMap(function(){return e},t):rO.switchMap(function(){return e})};var oO={},iO=(Object.defineProperty(oO,"__esModule",{value:!0}),oO.switchScan=void 0,Zg),uO=S;oO.switchScan=function(n,o){return uO.operate(function(e,t){var r=o;return iO.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var aO={},sO=(Object.defineProperty(aO,"__esModule",{value:!0}),aO.takeUntil=void 0,S),cO=p,lO=I,fO=l;aO.takeUntil=function(r){return sO.operate(function(e,t){lO.innerFrom(r).subscribe(cO.createOperatorSubscriber(t,function(){return t.complete()},fO.noop)),t.closed||e.subscribe(t)})};var pO={},dO=(Object.defineProperty(pO,"__esModule",{value:!0}),pO.takeWhile=void 0,S),hO=p;pO.takeWhile=function(o,i){return void 0===i&&(i=!1),dO.operate(function(e,r){var n=0;e.subscribe(hO.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var bO={},yO=(Object.defineProperty(bO,"__esModule",{value:!0}),bO.tap=void 0,y),_O=S,vO=p,mO=jt;bO.tap=function(e,t,r){var o=yO.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?_O.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(vO.createOperatorSubscriber(r,function(e){var t;null!=(t=o.next)&&t.call(o,e),r.next(e)},function(){var e;n=!1,null!=(e=o.complete)&&e.call(o),r.complete()},function(e){var t;n=!1,null!=(t=o.error)&&t.call(o,e),r.error(e)},function(){var e;n&&null!=(e=o.unsubscribe)&&e.call(o),null!=(e=o.finalize)&&e.call(o)}))}):mO.identity};var y={},gO=(Object.defineProperty(y,"__esModule",{value:!0}),y.throttle=void 0,S),OO=p,wO=I;y.throttle=function(h,b){return gO.operate(function(e,t){function r(){var e;a&&(a=!1,e=s,s=null,t.next(e),l||d(e))}var n=null!=b?b:{},o=n.leading,i=void 0===o||o,o=n.trailing,u=void 0!==o&&o,a=!1,s=null,c=null,l=!1,f=function(){null!=c&&c.unsubscribe(),c=null,u&&(r(),l&&t.complete())},p=function(){c=null,l&&t.complete()},d=function(e){return c=wO.innerFrom(h(e)).subscribe(OO.createOperatorSubscriber(t,f,p))};e.subscribe(OO.createOperatorSubscriber(t,function(e){a=!0,s=e,c&&!c.closed||(i?r():d(e))},function(){l=!0,u&&a&&c&&!c.closed||t.complete()}))})};var EO={},PO=(Object.defineProperty(EO,"__esModule",{value:!0}),EO.throttleTime=void 0,T),TO=y,SO=mh;EO.throttleTime=function(e,t,r){var n=SO.timer(e,t=void 0===t?PO.asyncScheduler:t);return TO.throttle(function(){return n},r)};var jO={},CO=(Object.defineProperty(jO,"__esModule",{value:!0}),jO.TimeInterval=jO.timeInterval=void 0,T),IO=S,RO=p;jO.timeInterval=function(i){return void 0===i&&(i=CO.asyncScheduler),IO.operate(function(e,n){var o=i.now();e.subscribe(RO.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new AO(e,r))}))})};var AO=function(e,t){this.value=e,this.interval=t},kO=(jO.TimeInterval=AO,{}),MO=(Object.defineProperty(kO,"__esModule",{value:!0}),kO.timeoutWith=void 0,T),NO=Ff,xO=$l;kO.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:MO.async,NO.isValidDate(e)?n=e:"number"==typeof e&&(o=e),!t)throw new TypeError("No observable provided to switch to");if(e=function(){return t},null==n&&null==o)throw new TypeError("No timeout provided.");return xO.timeout({first:n,each:o,scheduler:r,with:e})};var Ff={},DO=(Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.timestamp=void 0,o),LO=Dp;Ff.timestamp=function(t){return void 0===t&&(t=DO.dateTimestampProvider),LO.map(function(e){return{value:e,timestamp:t.now()}})};var o={},UO=(Object.defineProperty(o,"__esModule",{value:!0}),o.window=void 0,C),FO=S,BO=p,VO=l,qO=I;o.window=function(o){return FO.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new UO.Subject;t.next(n.asObservable());return e.subscribe(BO.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),qO.innerFrom(o).subscribe(BO.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new UO.Subject)},VO.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var WO={},zO=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},HO=(Object.defineProperty(WO,"__esModule",{value:!0}),WO.windowCount=void 0,C),GO=S,YO=p;WO.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return GO.operate(function(e,i){var u=[new HO.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(YO.createOperatorSubscriber(i,function(e){try{for(var t=zO(u),r=t.next();!r.done;r=t.next())r.value.next(e)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=t.return)&&o.call(t)}finally{if(n)throw n.error}}var n,o=a-s+1;0<=o&&o%c==0&&u.shift().complete(),++a%c==0&&(n=new HO.Subject,u.push(n),i.next(n.asObservable()))},function(){for(;0<u.length;)u.shift().complete();i.complete()},function(e){for(;0<u.length;)u.shift().error(e);i.error(e)},function(){u=null}))})};var KO={},ZO=(Object.defineProperty(KO,"__esModule",{value:!0}),KO.windowTime=void 0,C),QO=T,XO=P,JO=S,$O=p,ew=O,tw=b,rw=Sf;KO.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=tw.popScheduler(t))?e:QO.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return JO.operate(function(e,n){function r(t){s(function(e){e=e.window;return t(e)}),t(n),n.unsubscribe()}var o=[],i=!1,u=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),ew.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new XO.Subscription,n.add(e),t=new ZO.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),rw.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?rw.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe($O.createOperatorSubscriber(n,function(t){s(function(e){e.window.next(t),p<=++e.seen&&u(e)})},function(){return r(function(e){return e.complete()})},function(t){return r(function(e){return e.error(t)})})),function(){o=null}})};var Sf={},nw=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ow=(Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.windowToggle=void 0,C),iw=P,uw=S,aw=I,sw=p,cw=l,lw=O;Sf.windowToggle=function(t,a){return uw.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];aw.innerFrom(t).subscribe(sw.createOperatorSubscriber(o,function(e){var t,r=new ow.Subject,n=(u.push(r),new iw.Subscription);try{t=aw.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(sw.createOperatorSubscriber(o,function(){lw.arrRemove(u,r),r.complete(),n.unsubscribe()},cw.noop,i)))},cw.noop)),e.subscribe(sw.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=nw(n),i=o.next();!i.done;i=o.next())i.value.next(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;0<u.length;)u.shift().complete();o.complete()},i,function(){for(;0<u.length;)u.shift().unsubscribe()}))})};var O={},fw=(Object.defineProperty(O,"__esModule",{value:!0}),O.windowWhen=void 0,C),pw=S,dw=p,hw=I;O.windowWhen=function(u){return pw.operate(function(e,t){var r,n,o=function(e){r.error(e),t.error(e)},i=function(){var e;null!=n&&n.unsubscribe(),null!=r&&r.complete(),r=new fw.Subject,t.next(r.asObservable());try{e=hw.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=dw.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(dw.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var bw={},yw=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},_w=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},vw=(Object.defineProperty(bw,"__esModule",{value:!0}),bw.withLatestFrom=void 0,S),mw=p,gw=I,Ow=jt,ww=l,Ew=b;bw.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=Ew.popResultSelector(a);return vw.operate(function(e,r){for(var t=a.length,n=new Array(t),o=a.map(function(){return!1}),i=!1,u=0;u<t;u++)!function(t){gw.innerFrom(a[t]).subscribe(mw.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(Ow.identity))&&(o=null))},ww.noop))}(u);e.subscribe(mw.createOperatorSubscriber(r,function(e){i&&(e=_w([e],yw(n)),r.next(s?s.apply(void 0,_w([],yw(e))):e))}))})};var p={},Pw=(Object.defineProperty(p,"__esModule",{value:!0}),p.zipAll=void 0,lb),Tw=R;p.zipAll=function(e){return Tw.joinAllInternals(Pw.zip,e)};var I={},b={},Sw=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},jw=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Cw=(Object.defineProperty(b,"__esModule",{value:!0}),b.zip=void 0,lb),Iw=S;b.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Iw.operate(function(e,t){Cw.zip.apply(void 0,jw([e],Sw(r))).subscribe(t)})};var Rw,Aw,kw,Mw,Nw,xw,Dw,Lw,Uw,Fw,Bw,Vw,qw,Ww,zw,Hw,Gw,Yw,Kw,Zw,Qw,Xw,Jw,$w,eE,tE,rE,nE,oE,iE,uE,aE,sE,cE,lE,fE,pE,dE,hE,bE,yE,_E,vE,mE,gE,OE,wE,EE,PE,TE,SE,jE,CE,IE,RE,AE,kE,ME,NE,xE,DE,LE,UE,FE,BE,VE,qE,WE,zE,HE,GE,YE,KE,ZE,QE,XE,JE,$E,eP,tP,rP,nP,oP,iP,uP,aP,sP,cP,lP,fP,pP,dP,hP,bP,yP,_P,vP,mP,gP,OP,wP,EP,PP,TP,SP,jP,CP,IP,RP,AP,kP,MP,NP,xP,DP,LP,UP,FP,BP,VP,qP,WP,zP,HP,GP,YP,KP,ZP,QP,XP,JP,$P,eT,tT,rT,nT,oT,iT,uT,aT,sT,cT,lT,fT,pT,dT,hT,bT,yT,_T,vT,mT,gT,OT,wT,ET,PT,TT,ST,jT,CT,IT,RT,AT,kT,MT,NT,xT,DT=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},LT=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},UT=(Object.defineProperty(I,"__esModule",{value:!0}),I.zipWith=void 0,b);I.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return UT.zip.apply(void 0,LT([],DT(e)))},R=ln,Rw=r&&r.__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){e[n=void 0===n?r:n]=t[r]}),S=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Rw(t,e,r)},Object.defineProperty(R,"__esModule",{value:!0}),R.interval=R.iif=R.generate=R.fromEventPattern=R.fromEvent=R.from=R.forkJoin=R.empty=R.defer=R.connectable=R.concat=R.combineLatest=R.bindNodeCallback=R.bindCallback=R.UnsubscriptionError=R.TimeoutError=R.SequenceError=R.ObjectUnsubscribedError=R.NotFoundError=R.EmptyError=R.ArgumentOutOfRangeError=R.firstValueFrom=R.lastValueFrom=R.isObservable=R.identity=R.noop=R.pipe=R.NotificationKind=R.Notification=R.Subscriber=R.Subscription=R.Scheduler=R.VirtualAction=R.VirtualTimeScheduler=R.animationFrameScheduler=R.animationFrame=R.queueScheduler=R.queue=R.asyncScheduler=R.async=R.asapScheduler=R.asap=R.AsyncSubject=R.ReplaySubject=R.BehaviorSubject=R.Subject=R.animationFrames=R.observable=R.ConnectableObservable=R.Observable=void 0,R.filter=R.expand=R.exhaustMap=R.exhaustAll=R.exhaust=R.every=R.endWith=R.elementAt=R.distinctUntilKeyChanged=R.distinctUntilChanged=R.distinct=R.dematerialize=R.delayWhen=R.delay=R.defaultIfEmpty=R.debounceTime=R.debounce=R.count=R.connect=R.concatWith=R.concatMapTo=R.concatMap=R.concatAll=R.combineLatestWith=R.combineLatestAll=R.combineAll=R.catchError=R.bufferWhen=R.bufferToggle=R.bufferTime=R.bufferCount=R.buffer=R.auditTime=R.audit=R.config=R.NEVER=R.EMPTY=R.scheduled=R.zip=R.using=R.timer=R.throwError=R.range=R.race=R.partition=R.pairs=R.onErrorResumeNext=R.of=R.never=R.merge=void 0,R.switchMap=R.switchAll=R.subscribeOn=R.startWith=R.skipWhile=R.skipUntil=R.skipLast=R.skip=R.single=R.shareReplay=R.share=R.sequenceEqual=R.scan=R.sampleTime=R.sample=R.refCount=R.retryWhen=R.retry=R.repeatWhen=R.repeat=R.reduce=R.raceWith=R.publishReplay=R.publishLast=R.publishBehavior=R.publish=R.pluck=R.pairwise=R.onErrorResumeNextWith=R.observeOn=R.multicast=R.min=R.mergeWith=R.mergeScan=R.mergeMapTo=R.mergeMap=R.flatMap=R.mergeAll=R.max=R.materialize=R.mapTo=R.map=R.last=R.isEmpty=R.ignoreElements=R.groupBy=R.first=R.findIndex=R.find=R.finalize=void 0,R.zipWith=R.zipAll=R.withLatestFrom=R.windowWhen=R.windowToggle=R.windowTime=R.windowCount=R.window=R.toArray=R.timestamp=R.timeoutWith=R.timeout=R.timeInterval=R.throwIfEmpty=R.throttleTime=R.throttle=R.tap=R.takeWhile=R.takeUntil=R.takeLast=R.take=R.switchScan=R.switchMapTo=void 0,Aw=E,Object.defineProperty(R,"Observable",{enumerable:!0,get:function(){return Aw.Observable}}),kw=Wt,Object.defineProperty(R,"ConnectableObservable",{enumerable:!0,get:function(){return kw.ConnectableObservable}}),Mw=i,Object.defineProperty(R,"observable",{enumerable:!0,get:function(){return Mw.observable}}),Nw=j,Object.defineProperty(R,"animationFrames",{enumerable:!0,get:function(){return Nw.animationFrames}}),xw=C,Object.defineProperty(R,"Subject",{enumerable:!0,get:function(){return xw.Subject}}),Dw=sr,Object.defineProperty(R,"BehaviorSubject",{enumerable:!0,get:function(){return Dw.BehaviorSubject}}),Lw=gt,Object.defineProperty(R,"ReplaySubject",{enumerable:!0,get:function(){return Lw.ReplaySubject}}),Uw=G,Object.defineProperty(R,"AsyncSubject",{enumerable:!0,get:function(){return Uw.AsyncSubject}}),Fw=g,Object.defineProperty(R,"asap",{enumerable:!0,get:function(){return Fw.asap}}),Object.defineProperty(R,"asapScheduler",{enumerable:!0,get:function(){return Fw.asapScheduler}}),Bw=T,Object.defineProperty(R,"async",{enumerable:!0,get:function(){return Bw.async}}),Object.defineProperty(R,"asyncScheduler",{enumerable:!0,get:function(){return Bw.asyncScheduler}}),Vw=rc,Object.defineProperty(R,"queue",{enumerable:!0,get:function(){return Vw.queue}}),Object.defineProperty(R,"queueScheduler",{enumerable:!0,get:function(){return Vw.queueScheduler}}),qw=t,Object.defineProperty(R,"animationFrame",{enumerable:!0,get:function(){return qw.animationFrame}}),Object.defineProperty(R,"animationFrameScheduler",{enumerable:!0,get:function(){return qw.animationFrameScheduler}}),Ww=n,Object.defineProperty(R,"VirtualTimeScheduler",{enumerable:!0,get:function(){return Ww.VirtualTimeScheduler}}),Object.defineProperty(R,"VirtualAction",{enumerable:!0,get:function(){return Ww.VirtualAction}}),zw=Hn,Object.defineProperty(R,"Scheduler",{enumerable:!0,get:function(){return zw.Scheduler}}),Hw=P,Object.defineProperty(R,"Subscription",{enumerable:!0,get:function(){return Hw.Subscription}}),Gw=Gt,Object.defineProperty(R,"Subscriber",{enumerable:!0,get:function(){return Gw.Subscriber}}),Yw=h,Object.defineProperty(R,"Notification",{enumerable:!0,get:function(){return Yw.Notification}}),Object.defineProperty(R,"NotificationKind",{enumerable:!0,get:function(){return Yw.NotificationKind}}),Kw=u,Object.defineProperty(R,"pipe",{enumerable:!0,get:function(){return Kw.pipe}}),Zw=l,Object.defineProperty(R,"noop",{enumerable:!0,get:function(){return Zw.noop}}),Qw=jt,Object.defineProperty(R,"identity",{enumerable:!0,get:function(){return Qw.identity}}),Xw=Zl,Object.defineProperty(R,"isObservable",{enumerable:!0,get:function(){return Xw.isObservable}}),Jw=ql,Object.defineProperty(R,"lastValueFrom",{enumerable:!0,get:function(){return Jw.lastValueFrom}}),$w=Hl,Object.defineProperty(R,"firstValueFrom",{enumerable:!0,get:function(){return $w.firstValueFrom}}),eE=Yl,Object.defineProperty(R,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return eE.ArgumentOutOfRangeError}}),tE=Bl,Object.defineProperty(R,"EmptyError",{enumerable:!0,get:function(){return tE.EmptyError}}),rE=Kf,Object.defineProperty(R,"NotFoundError",{enumerable:!0,get:function(){return rE.NotFoundError}}),nE=m,Object.defineProperty(R,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return nE.ObjectUnsubscribedError}}),oE=xf,Object.defineProperty(R,"SequenceError",{enumerable:!0,get:function(){return oE.SequenceError}}),iE=$l,Object.defineProperty(R,"TimeoutError",{enumerable:!0,get:function(){return iE.TimeoutError}}),uE=_,Object.defineProperty(R,"UnsubscriptionError",{enumerable:!0,get:function(){return uE.UnsubscriptionError}}),aE=Kl,Object.defineProperty(R,"bindCallback",{enumerable:!0,get:function(){return aE.bindCallback}}),sE=Jp,Object.defineProperty(R,"bindNodeCallback",{enumerable:!0,get:function(){return sE.bindNodeCallback}}),cE=F,Object.defineProperty(R,"combineLatest",{enumerable:!0,get:function(){return cE.combineLatest}}),lE=_d,Object.defineProperty(R,"concat",{enumerable:!0,get:function(){return lE.concat}}),fE=Dd,Object.defineProperty(R,"connectable",{enumerable:!0,get:function(){return fE.connectable}}),pE=Ld,Object.defineProperty(R,"defer",{enumerable:!0,get:function(){return pE.defer}}),dE=dt,Object.defineProperty(R,"empty",{enumerable:!0,get:function(){return dE.empty}}),hE=zd,Object.defineProperty(R,"forkJoin",{enumerable:!0,get:function(){return hE.forkJoin}}),bE=Dl,Object.defineProperty(R,"from",{enumerable:!0,get:function(){return bE.from}}),yE=ed,Object.defineProperty(R,"fromEvent",{enumerable:!0,get:function(){return yE.fromEvent}}),_E=id,Object.defineProperty(R,"fromEventPattern",{enumerable:!0,get:function(){return _E.fromEventPattern}}),vE=Fl,Object.defineProperty(R,"generate",{enumerable:!0,get:function(){return vE.generate}}),mE=Vf,Object.defineProperty(R,"iif",{enumerable:!0,get:function(){return mE.iif}}),gE=vh,Object.defineProperty(R,"interval",{enumerable:!0,get:function(){return gE.interval}}),OE=Al,Object.defineProperty(R,"merge",{enumerable:!0,get:function(){return OE.merge}}),wE=kh,Object.defineProperty(R,"never",{enumerable:!0,get:function(){return wE.never}}),EE=c,Object.defineProperty(R,"of",{enumerable:!0,get:function(){return EE.of}}),PE=Mh,Object.defineProperty(R,"onErrorResumeNext",{enumerable:!0,get:function(){return PE.onErrorResumeNext}}),TE=Vh,Object.defineProperty(R,"pairs",{enumerable:!0,get:function(){return TE.pairs}}),SE=Wh,Object.defineProperty(R,"partition",{enumerable:!0,get:function(){return SE.partition}}),jE=Xh,Object.defineProperty(R,"race",{enumerable:!0,get:function(){return jE.race}}),CE=nb,Object.defineProperty(R,"range",{enumerable:!0,get:function(){return CE.range}}),IE=Ul,Object.defineProperty(R,"throwError",{enumerable:!0,get:function(){return IE.throwError}}),RE=mh,Object.defineProperty(R,"timer",{enumerable:!0,get:function(){return RE.timer}}),AE=ub,Object.defineProperty(R,"using",{enumerable:!0,get:function(){return AE.using}}),kE=lb,Object.defineProperty(R,"zip",{enumerable:!0,get:function(){return kE.zip}}),ME=Ll,Object.defineProperty(R,"scheduled",{enumerable:!0,get:function(){return ME.scheduled}}),NE=dt,Object.defineProperty(R,"EMPTY",{enumerable:!0,get:function(){return NE.EMPTY}}),xE=kh,Object.defineProperty(R,"NEVER",{enumerable:!0,get:function(){return xE.NEVER}}),S(mb,R),DE=or,Object.defineProperty(R,"config",{enumerable:!0,get:function(){return DE.config}}),LE=gb,Object.defineProperty(R,"audit",{enumerable:!0,get:function(){return LE.audit}}),UE=Pb,Object.defineProperty(R,"auditTime",{enumerable:!0,get:function(){return UE.auditTime}}),FE=Cb,Object.defineProperty(R,"buffer",{enumerable:!0,get:function(){return FE.buffer}}),BE=Mb,Object.defineProperty(R,"bufferCount",{enumerable:!0,get:function(){return BE.bufferCount}}),VE=Ub,Object.defineProperty(R,"bufferTime",{enumerable:!0,get:function(){return VE.bufferTime}}),qE=Yb,Object.defineProperty(R,"bufferToggle",{enumerable:!0,get:function(){return qE.bufferToggle}}),WE=ty,Object.defineProperty(R,"bufferWhen",{enumerable:!0,get:function(){return WE.bufferWhen}}),zE=uy,Object.defineProperty(R,"catchError",{enumerable:!0,get:function(){return zE.catchError}}),HE=ly,Object.defineProperty(R,"combineAll",{enumerable:!0,get:function(){return HE.combineAll}}),GE=fy,Object.defineProperty(R,"combineLatestAll",{enumerable:!0,get:function(){return GE.combineLatestAll}}),YE=Cy,Object.defineProperty(R,"combineLatestWith",{enumerable:!0,get:function(){return YE.combineLatestWith}}),KE=vd,Object.defineProperty(R,"concatAll",{enumerable:!0,get:function(){return KE.concatAll}}),ZE=xp,Object.defineProperty(R,"concatMap",{enumerable:!0,get:function(){return ZE.concatMap}}),QE=zy,Object.defineProperty(R,"concatMapTo",{enumerable:!0,get:function(){return QE.concatMapTo}}),XE=Yy,Object.defineProperty(R,"concatWith",{enumerable:!0,get:function(){return XE.concatWith}}),JE=o_,Object.defineProperty(R,"connect",{enumerable:!0,get:function(){return JE.connect}}),$E=i_,Object.defineProperty(R,"count",{enumerable:!0,get:function(){return $E.count}}),eP=d_,Object.defineProperty(R,"debounce",{enumerable:!0,get:function(){return eP.debounce}}),tP=v_,Object.defineProperty(R,"debounceTime",{enumerable:!0,get:function(){return tP.debounceTime}}),rP=w_,Object.defineProperty(R,"defaultIfEmpty",{enumerable:!0,get:function(){return rP.defaultIfEmpty}}),nP=A,Object.defineProperty(R,"delay",{enumerable:!0,get:function(){return nP.delay}}),oP=T_,Object.defineProperty(R,"delayWhen",{enumerable:!0,get:function(){return oP.delayWhen}}),iP=H_,Object.defineProperty(R,"dematerialize",{enumerable:!0,get:function(){return iP.dematerialize}}),uP=Z_,Object.defineProperty(R,"distinct",{enumerable:!0,get:function(){return uP.distinct}}),aP=ev,Object.defineProperty(R,"distinctUntilChanged",{enumerable:!0,get:function(){return aP.distinctUntilChanged}}),sP=iv,Object.defineProperty(R,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return sP.distinctUntilKeyChanged}}),cP=av,Object.defineProperty(R,"elementAt",{enumerable:!0,get:function(){return cP.elementAt}}),lP=vv,Object.defineProperty(R,"endWith",{enumerable:!0,get:function(){return lP.endWith}}),fP=Ev,Object.defineProperty(R,"every",{enumerable:!0,get:function(){return fP.every}}),pP=Sv,Object.defineProperty(R,"exhaust",{enumerable:!0,get:function(){return pP.exhaust}}),dP=jv,Object.defineProperty(R,"exhaustAll",{enumerable:!0,get:function(){return dP.exhaustAll}}),hP=Cv,Object.defineProperty(R,"exhaustMap",{enumerable:!0,get:function(){return hP.exhaustMap}}),bP=xv,Object.defineProperty(R,"expand",{enumerable:!0,get:function(){return bP.expand}}),yP=Hh,Object.defineProperty(R,"filter",{enumerable:!0,get:function(){return yP.filter}}),_P=Uv,Object.defineProperty(R,"finalize",{enumerable:!0,get:function(){return _P.finalize}}),vP=Bv,Object.defineProperty(R,"find",{enumerable:!0,get:function(){return vP.find}}),mP=zv,Object.defineProperty(R,"findIndex",{enumerable:!0,get:function(){return mP.findIndex}}),gP=Yv,Object.defineProperty(R,"first",{enumerable:!0,get:function(){return gP.first}}),OP=em,Object.defineProperty(R,"groupBy",{enumerable:!0,get:function(){return OP.groupBy}}),wP=R_,Object.defineProperty(R,"ignoreElements",{enumerable:!0,get:function(){return wP.ignoreElements}}),EP=um,Object.defineProperty(R,"isEmpty",{enumerable:!0,get:function(){return EP.isEmpty}}),PP=cm,Object.defineProperty(R,"last",{enumerable:!0,get:function(){return PP.last}}),TP=Dp,Object.defineProperty(R,"map",{enumerable:!0,get:function(){return TP.map}}),SP=N_,Object.defineProperty(R,"mapTo",{enumerable:!0,get:function(){return SP.mapTo}}),jP=Om,Object.defineProperty(R,"materialize",{enumerable:!0,get:function(){return jP.materialize}}),CP=Tm,Object.defineProperty(R,"max",{enumerable:!0,get:function(){return CP.max}}),IP=md,Object.defineProperty(R,"mergeAll",{enumerable:!0,get:function(){return IP.mergeAll}}),RP=Cm,Object.defineProperty(R,"flatMap",{enumerable:!0,get:function(){return RP.flatMap}}),AP=gd,Object.defineProperty(R,"mergeMap",{enumerable:!0,get:function(){return AP.mergeMap}}),kP=Im,Object.defineProperty(R,"mergeMapTo",{enumerable:!0,get:function(){return kP.mergeMapTo}}),MP=km,Object.defineProperty(R,"mergeScan",{enumerable:!0,get:function(){return MP.mergeScan}}),NP=Od,Object.defineProperty(R,"mergeWith",{enumerable:!0,get:function(){return NP.mergeWith}}),xP=Hm,Object.defineProperty(R,"min",{enumerable:!0,get:function(){return xP.min}}),DP=Km,Object.defineProperty(R,"multicast",{enumerable:!0,get:function(){return DP.multicast}}),LP=v,Object.defineProperty(R,"observeOn",{enumerable:!0,get:function(){return LP.observeOn}}),UP=Jm,Object.defineProperty(R,"onErrorResumeNextWith",{enumerable:!0,get:function(){return UP.onErrorResumeNextWith}}),FP=o0,Object.defineProperty(R,"pairwise",{enumerable:!0,get:function(){return FP.pairwise}}),BP=a0,Object.defineProperty(R,"pluck",{enumerable:!0,get:function(){return BP.pluck}}),VP=c0,Object.defineProperty(R,"publish",{enumerable:!0,get:function(){return VP.publish}}),qP=d0,Object.defineProperty(R,"publishBehavior",{enumerable:!0,get:function(){return qP.publishBehavior}}),WP=y0,Object.defineProperty(R,"publishLast",{enumerable:!0,get:function(){return WP.publishLast}}),zP=m0,Object.defineProperty(R,"publishReplay",{enumerable:!0,get:function(){return zP.publishReplay}}),HP=E0,Object.defineProperty(R,"raceWith",{enumerable:!0,get:function(){return HP.raceWith}}),GP=dy,Object.defineProperty(R,"reduce",{enumerable:!0,get:function(){return GP.reduce}}),YP=I0,Object.defineProperty(R,"repeat",{enumerable:!0,get:function(){return YP.repeat}}),KP=x0,Object.defineProperty(R,"repeatWhen",{enumerable:!0,get:function(){return KP.repeatWhen}}),ZP=B0,Object.defineProperty(R,"retry",{enumerable:!0,get:function(){return ZP.retry}}),QP=G0,Object.defineProperty(R,"retryWhen",{enumerable:!0,get:function(){return QP.retryWhen}}),XP=zn,Object.defineProperty(R,"refCount",{enumerable:!0,get:function(){return XP.refCount}}),JP=X0,Object.defineProperty(R,"sample",{enumerable:!0,get:function(){return JP.sample}}),$P=rg,Object.defineProperty(R,"sampleTime",{enumerable:!0,get:function(){return $P.sampleTime}}),eT=ug,Object.defineProperty(R,"scan",{enumerable:!0,get:function(){return eT.scan}}),tT=hy,Object.defineProperty(R,"sequenceEqual",{enumerable:!0,get:function(){return tT.sequenceEqual}}),rT=dg,Object.defineProperty(R,"share",{enumerable:!0,get:function(){return rT.share}}),nT=Og,Object.defineProperty(R,"shareReplay",{enumerable:!0,get:function(){return nT.shareReplay}}),oT=Pg,Object.defineProperty(R,"single",{enumerable:!0,get:function(){return oT.single}}),iT=Rg,Object.defineProperty(R,"skip",{enumerable:!0,get:function(){return iT.skip}}),uT=kg,Object.defineProperty(R,"skipLast",{enumerable:!0,get:function(){return uT.skipLast}}),aT=Dg,Object.defineProperty(R,"skipUntil",{enumerable:!0,get:function(){return aT.skipUntil}}),sT=Vg,Object.defineProperty(R,"skipWhile",{enumerable:!0,get:function(){return sT.skipWhile}}),cT=zg,Object.defineProperty(R,"startWith",{enumerable:!0,get:function(){return cT.startWith}}),lT=Rf,Object.defineProperty(R,"subscribeOn",{enumerable:!0,get:function(){return lT.subscribeOn}}),fT=Kg,Object.defineProperty(R,"switchAll",{enumerable:!0,get:function(){return fT.switchAll}}),pT=Zg,Object.defineProperty(R,"switchMap",{enumerable:!0,get:function(){return pT.switchMap}}),dT=tO,Object.defineProperty(R,"switchMapTo",{enumerable:!0,get:function(){return dT.switchMapTo}}),hT=oO,Object.defineProperty(R,"switchScan",{enumerable:!0,get:function(){return hT.switchScan}}),bT=S_,Object.defineProperty(R,"take",{enumerable:!0,get:function(){return bT.take}}),yT=lm,Object.defineProperty(R,"takeLast",{enumerable:!0,get:function(){return yT.takeLast}}),_T=aO,Object.defineProperty(R,"takeUntil",{enumerable:!0,get:function(){return _T.takeUntil}}),vT=pO,Object.defineProperty(R,"takeWhile",{enumerable:!0,get:function(){return vT.takeWhile}}),mT=bO,Object.defineProperty(R,"tap",{enumerable:!0,get:function(){return mT.tap}}),gT=y,Object.defineProperty(R,"throttle",{enumerable:!0,get:function(){return gT.throttle}}),OT=EO,Object.defineProperty(R,"throttleTime",{enumerable:!0,get:function(){return OT.throttleTime}}),wT=sv,Object.defineProperty(R,"throwIfEmpty",{enumerable:!0,get:function(){return wT.throwIfEmpty}}),ET=jO,Object.defineProperty(R,"timeInterval",{enumerable:!0,get:function(){return ET.timeInterval}}),PT=$l,Object.defineProperty(R,"timeout",{enumerable:!0,get:function(){return PT.timeout}}),TT=kO,Object.defineProperty(R,"timeoutWith",{enumerable:!0,get:function(){return TT.timeoutWith}}),ST=Ff,Object.defineProperty(R,"timestamp",{enumerable:!0,get:function(){return ST.timestamp}}),jT=py,Object.defineProperty(R,"toArray",{enumerable:!0,get:function(){return jT.toArray}}),CT=o,Object.defineProperty(R,"window",{enumerable:!0,get:function(){return CT.window}}),IT=WO,Object.defineProperty(R,"windowCount",{enumerable:!0,get:function(){return IT.windowCount}}),RT=KO,Object.defineProperty(R,"windowTime",{enumerable:!0,get:function(){return RT.windowTime}}),AT=Sf,Object.defineProperty(R,"windowToggle",{enumerable:!0,get:function(){return AT.windowToggle}}),kT=O,Object.defineProperty(R,"windowWhen",{enumerable:!0,get:function(){return kT.windowWhen}}),MT=bw,Object.defineProperty(R,"withLatestFrom",{enumerable:!0,get:function(){return MT.withLatestFrom}}),NT=p,Object.defineProperty(R,"zipAll",{enumerable:!0,get:function(){return NT.zipAll}}),xT=I,Object.defineProperty(R,"zipWith",{enumerable:!0,get:function(){return xT.zipWith}});var E={},Wt={},FT=(Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.partition=void 0,zh),BT=Hh;Wt.partition=function(t,r){return function(e){return[BT.filter(t,r)(e),BT.filter(FT.not(t,r))(e)]}};var VT,qT,WT,zT,HT,GT,YT,KT,ZT,QT,XT,JT,$T,eS,tS,rS,nS,oS,iS,uS,aS,sS,cS,lS,fS,pS,dS,hS,bS,yS,_S,vS,mS,gS,OS,wS,ES,PS,TS,SS,jS,CS,IS,RS,AS,kS,MS,NS,xS,DS,LS,US,FS,BS,VS,qS,WS,zS,HS,GS,YS,KS,ZS,QS,XS,JS,$S,e1,t1,r1,n1,o1,i1,u1,a1,s1,c1,l1,f1,p1,d1,h1,b1,y1,_1,v1,m1,g1,O1,w1,E1,P1,T1,S1,j1,C1,I1,R1,A1,k1,M1,N1,x1,D1,L1,U1,F1,B1,V1,q1,W1,z1,H1,i={},G1=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Y1=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},K1=(Object.defineProperty(i,"__esModule",{value:!0}),i.race=void 0,Nh),Z1=E0;i.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Z1.raceWith.apply(void 0,Y1([],G1(K1.argsOrArgArray(e))))},j=E,Object.defineProperty(j,"__esModule",{value:!0}),j.mergeAll=j.merge=j.max=j.materialize=j.mapTo=j.map=j.last=j.isEmpty=j.ignoreElements=j.groupBy=j.first=j.findIndex=j.find=j.finalize=j.filter=j.expand=j.exhaustMap=j.exhaustAll=j.exhaust=j.every=j.endWith=j.elementAt=j.distinctUntilKeyChanged=j.distinctUntilChanged=j.distinct=j.dematerialize=j.delayWhen=j.delay=j.defaultIfEmpty=j.debounceTime=j.debounce=j.count=j.connect=j.concatWith=j.concatMapTo=j.concatMap=j.concatAll=j.concat=j.combineLatestWith=j.combineLatest=j.combineLatestAll=j.combineAll=j.catchError=j.bufferWhen=j.bufferToggle=j.bufferTime=j.bufferCount=j.buffer=j.auditTime=j.audit=void 0,j.timeInterval=j.throwIfEmpty=j.throttleTime=j.throttle=j.tap=j.takeWhile=j.takeUntil=j.takeLast=j.take=j.switchScan=j.switchMapTo=j.switchMap=j.switchAll=j.subscribeOn=j.startWith=j.skipWhile=j.skipUntil=j.skipLast=j.skip=j.single=j.shareReplay=j.share=j.sequenceEqual=j.scan=j.sampleTime=j.sample=j.refCount=j.retryWhen=j.retry=j.repeatWhen=j.repeat=j.reduce=j.raceWith=j.race=j.publishReplay=j.publishLast=j.publishBehavior=j.publish=j.pluck=j.partition=j.pairwise=j.onErrorResumeNext=j.observeOn=j.multicast=j.min=j.mergeWith=j.mergeScan=j.mergeMapTo=j.mergeMap=j.flatMap=void 0,j.zipWith=j.zipAll=j.zip=j.withLatestFrom=j.windowWhen=j.windowToggle=j.windowTime=j.windowCount=j.window=j.toArray=j.timestamp=j.timeoutWith=j.timeout=void 0,VT=gb,Object.defineProperty(j,"audit",{enumerable:!0,get:function(){return VT.audit}}),qT=Pb,Object.defineProperty(j,"auditTime",{enumerable:!0,get:function(){return qT.auditTime}}),WT=Cb,Object.defineProperty(j,"buffer",{enumerable:!0,get:function(){return WT.buffer}}),zT=Mb,Object.defineProperty(j,"bufferCount",{enumerable:!0,get:function(){return zT.bufferCount}}),HT=Ub,Object.defineProperty(j,"bufferTime",{enumerable:!0,get:function(){return HT.bufferTime}}),GT=Yb,Object.defineProperty(j,"bufferToggle",{enumerable:!0,get:function(){return GT.bufferToggle}}),YT=ty,Object.defineProperty(j,"bufferWhen",{enumerable:!0,get:function(){return YT.bufferWhen}}),KT=uy,Object.defineProperty(j,"catchError",{enumerable:!0,get:function(){return KT.catchError}}),ZT=ly,Object.defineProperty(j,"combineAll",{enumerable:!0,get:function(){return ZT.combineAll}}),QT=fy,Object.defineProperty(j,"combineLatestAll",{enumerable:!0,get:function(){return QT.combineLatestAll}}),XT=Iy,Object.defineProperty(j,"combineLatest",{enumerable:!0,get:function(){return XT.combineLatest}}),JT=Cy,Object.defineProperty(j,"combineLatestWith",{enumerable:!0,get:function(){return JT.combineLatestWith}}),$T=Ky,Object.defineProperty(j,"concat",{enumerable:!0,get:function(){return $T.concat}}),eS=vd,Object.defineProperty(j,"concatAll",{enumerable:!0,get:function(){return eS.concatAll}}),tS=xp,Object.defineProperty(j,"concatMap",{enumerable:!0,get:function(){return tS.concatMap}}),rS=zy,Object.defineProperty(j,"concatMapTo",{enumerable:!0,get:function(){return rS.concatMapTo}}),nS=Yy,Object.defineProperty(j,"concatWith",{enumerable:!0,get:function(){return nS.concatWith}}),oS=o_,Object.defineProperty(j,"connect",{enumerable:!0,get:function(){return oS.connect}}),iS=i_,Object.defineProperty(j,"count",{enumerable:!0,get:function(){return iS.count}}),uS=d_,Object.defineProperty(j,"debounce",{enumerable:!0,get:function(){return uS.debounce}}),aS=v_,Object.defineProperty(j,"debounceTime",{enumerable:!0,get:function(){return aS.debounceTime}}),sS=w_,Object.defineProperty(j,"defaultIfEmpty",{enumerable:!0,get:function(){return sS.defaultIfEmpty}}),cS=A,Object.defineProperty(j,"delay",{enumerable:!0,get:function(){return cS.delay}}),lS=T_,Object.defineProperty(j,"delayWhen",{enumerable:!0,get:function(){return lS.delayWhen}}),fS=H_,Object.defineProperty(j,"dematerialize",{enumerable:!0,get:function(){return fS.dematerialize}}),pS=Z_,Object.defineProperty(j,"distinct",{enumerable:!0,get:function(){return pS.distinct}}),dS=ev,Object.defineProperty(j,"distinctUntilChanged",{enumerable:!0,get:function(){return dS.distinctUntilChanged}}),hS=iv,Object.defineProperty(j,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return hS.distinctUntilKeyChanged}}),bS=av,Object.defineProperty(j,"elementAt",{enumerable:!0,get:function(){return bS.elementAt}}),yS=vv,Object.defineProperty(j,"endWith",{enumerable:!0,get:function(){return yS.endWith}}),_S=Ev,Object.defineProperty(j,"every",{enumerable:!0,get:function(){return _S.every}}),vS=Sv,Object.defineProperty(j,"exhaust",{enumerable:!0,get:function(){return vS.exhaust}}),mS=jv,Object.defineProperty(j,"exhaustAll",{enumerable:!0,get:function(){return mS.exhaustAll}}),gS=Cv,Object.defineProperty(j,"exhaustMap",{enumerable:!0,get:function(){return gS.exhaustMap}}),OS=xv,Object.defineProperty(j,"expand",{enumerable:!0,get:function(){return OS.expand}}),wS=Hh,Object.defineProperty(j,"filter",{enumerable:!0,get:function(){return wS.filter}}),ES=Uv,Object.defineProperty(j,"finalize",{enumerable:!0,get:function(){return ES.finalize}}),PS=Bv,Object.defineProperty(j,"find",{enumerable:!0,get:function(){return PS.find}}),TS=zv,Object.defineProperty(j,"findIndex",{enumerable:!0,get:function(){return TS.findIndex}}),SS=Yv,Object.defineProperty(j,"first",{enumerable:!0,get:function(){return SS.first}}),jS=em,Object.defineProperty(j,"groupBy",{enumerable:!0,get:function(){return jS.groupBy}}),CS=R_,Object.defineProperty(j,"ignoreElements",{enumerable:!0,get:function(){return CS.ignoreElements}}),IS=um,Object.defineProperty(j,"isEmpty",{enumerable:!0,get:function(){return IS.isEmpty}}),RS=cm,Object.defineProperty(j,"last",{enumerable:!0,get:function(){return RS.last}}),AS=Dp,Object.defineProperty(j,"map",{enumerable:!0,get:function(){return AS.map}}),kS=N_,Object.defineProperty(j,"mapTo",{enumerable:!0,get:function(){return kS.mapTo}}),MS=Om,Object.defineProperty(j,"materialize",{enumerable:!0,get:function(){return MS.materialize}}),NS=Tm,Object.defineProperty(j,"max",{enumerable:!0,get:function(){return NS.max}}),xS=xm,Object.defineProperty(j,"merge",{enumerable:!0,get:function(){return xS.merge}}),DS=md,Object.defineProperty(j,"mergeAll",{enumerable:!0,get:function(){return DS.mergeAll}}),LS=Cm,Object.defineProperty(j,"flatMap",{enumerable:!0,get:function(){return LS.flatMap}}),US=gd,Object.defineProperty(j,"mergeMap",{enumerable:!0,get:function(){return US.mergeMap}}),FS=Im,Object.defineProperty(j,"mergeMapTo",{enumerable:!0,get:function(){return FS.mergeMapTo}}),BS=km,Object.defineProperty(j,"mergeScan",{enumerable:!0,get:function(){return BS.mergeScan}}),VS=Od,Object.defineProperty(j,"mergeWith",{enumerable:!0,get:function(){return VS.mergeWith}}),qS=Hm,Object.defineProperty(j,"min",{enumerable:!0,get:function(){return qS.min}}),WS=Km,Object.defineProperty(j,"multicast",{enumerable:!0,get:function(){return WS.multicast}}),zS=v,Object.defineProperty(j,"observeOn",{enumerable:!0,get:function(){return zS.observeOn}}),HS=Jm,Object.defineProperty(j,"onErrorResumeNext",{enumerable:!0,get:function(){return HS.onErrorResumeNext}}),GS=o0,Object.defineProperty(j,"pairwise",{enumerable:!0,get:function(){return GS.pairwise}}),YS=Wt,Object.defineProperty(j,"partition",{enumerable:!0,get:function(){return YS.partition}}),KS=a0,Object.defineProperty(j,"pluck",{enumerable:!0,get:function(){return KS.pluck}}),ZS=c0,Object.defineProperty(j,"publish",{enumerable:!0,get:function(){return ZS.publish}}),QS=d0,Object.defineProperty(j,"publishBehavior",{enumerable:!0,get:function(){return QS.publishBehavior}}),XS=y0,Object.defineProperty(j,"publishLast",{enumerable:!0,get:function(){return XS.publishLast}}),JS=m0,Object.defineProperty(j,"publishReplay",{enumerable:!0,get:function(){return JS.publishReplay}}),$S=i,Object.defineProperty(j,"race",{enumerable:!0,get:function(){return $S.race}}),e1=E0,Object.defineProperty(j,"raceWith",{enumerable:!0,get:function(){return e1.raceWith}}),t1=dy,Object.defineProperty(j,"reduce",{enumerable:!0,get:function(){return t1.reduce}}),r1=I0,Object.defineProperty(j,"repeat",{enumerable:!0,get:function(){return r1.repeat}}),n1=x0,Object.defineProperty(j,"repeatWhen",{enumerable:!0,get:function(){return n1.repeatWhen}}),o1=B0,Object.defineProperty(j,"retry",{enumerable:!0,get:function(){return o1.retry}}),i1=G0,Object.defineProperty(j,"retryWhen",{enumerable:!0,get:function(){return i1.retryWhen}}),u1=zn,Object.defineProperty(j,"refCount",{enumerable:!0,get:function(){return u1.refCount}}),a1=X0,Object.defineProperty(j,"sample",{enumerable:!0,get:function(){return a1.sample}}),s1=rg,Object.defineProperty(j,"sampleTime",{enumerable:!0,get:function(){return s1.sampleTime}}),c1=ug,Object.defineProperty(j,"scan",{enumerable:!0,get:function(){return c1.scan}}),l1=hy,Object.defineProperty(j,"sequenceEqual",{enumerable:!0,get:function(){return l1.sequenceEqual}}),f1=dg,Object.defineProperty(j,"share",{enumerable:!0,get:function(){return f1.share}}),p1=Og,Object.defineProperty(j,"shareReplay",{enumerable:!0,get:function(){return p1.shareReplay}}),d1=Pg,Object.defineProperty(j,"single",{enumerable:!0,get:function(){return d1.single}}),h1=Rg,Object.defineProperty(j,"skip",{enumerable:!0,get:function(){return h1.skip}}),b1=kg,Object.defineProperty(j,"skipLast",{enumerable:!0,get:function(){return b1.skipLast}}),y1=Dg,Object.defineProperty(j,"skipUntil",{enumerable:!0,get:function(){return y1.skipUntil}}),_1=Vg,Object.defineProperty(j,"skipWhile",{enumerable:!0,get:function(){return _1.skipWhile}}),v1=zg,Object.defineProperty(j,"startWith",{enumerable:!0,get:function(){return v1.startWith}}),m1=Rf,Object.defineProperty(j,"subscribeOn",{enumerable:!0,get:function(){return m1.subscribeOn}}),g1=Kg,Object.defineProperty(j,"switchAll",{enumerable:!0,get:function(){return g1.switchAll}}),O1=Zg,Object.defineProperty(j,"switchMap",{enumerable:!0,get:function(){return O1.switchMap}}),w1=tO,Object.defineProperty(j,"switchMapTo",{enumerable:!0,get:function(){return w1.switchMapTo}}),E1=oO,Object.defineProperty(j,"switchScan",{enumerable:!0,get:function(){return E1.switchScan}}),P1=S_,Object.defineProperty(j,"take",{enumerable:!0,get:function(){return P1.take}}),T1=lm,Object.defineProperty(j,"takeLast",{enumerable:!0,get:function(){return T1.takeLast}}),S1=aO,Object.defineProperty(j,"takeUntil",{enumerable:!0,get:function(){return S1.takeUntil}}),j1=pO,Object.defineProperty(j,"takeWhile",{enumerable:!0,get:function(){return j1.takeWhile}}),C1=bO,Object.defineProperty(j,"tap",{enumerable:!0,get:function(){return C1.tap}}),I1=y,Object.defineProperty(j,"throttle",{enumerable:!0,get:function(){return I1.throttle}}),R1=EO,Object.defineProperty(j,"throttleTime",{enumerable:!0,get:function(){return R1.throttleTime}}),A1=sv,Object.defineProperty(j,"throwIfEmpty",{enumerable:!0,get:function(){return A1.throwIfEmpty}}),k1=jO,Object.defineProperty(j,"timeInterval",{enumerable:!0,get:function(){return k1.timeInterval}}),M1=$l,Object.defineProperty(j,"timeout",{enumerable:!0,get:function(){return M1.timeout}}),N1=kO,Object.defineProperty(j,"timeoutWith",{enumerable:!0,get:function(){return N1.timeoutWith}}),x1=Ff,Object.defineProperty(j,"timestamp",{enumerable:!0,get:function(){return x1.timestamp}}),D1=py,Object.defineProperty(j,"toArray",{enumerable:!0,get:function(){return D1.toArray}}),L1=o,Object.defineProperty(j,"window",{enumerable:!0,get:function(){return L1.window}}),U1=WO,Object.defineProperty(j,"windowCount",{enumerable:!0,get:function(){return U1.windowCount}}),F1=KO,Object.defineProperty(j,"windowTime",{enumerable:!0,get:function(){return F1.windowTime}}),B1=Sf,Object.defineProperty(j,"windowToggle",{enumerable:!0,get:function(){return B1.windowToggle}}),V1=O,Object.defineProperty(j,"windowWhen",{enumerable:!0,get:function(){return V1.windowWhen}}),q1=bw,Object.defineProperty(j,"withLatestFrom",{enumerable:!0,get:function(){return q1.withLatestFrom}}),W1=b,Object.defineProperty(j,"zip",{enumerable:!0,get:function(){return W1.zip}}),z1=p,Object.defineProperty(j,"zipAll",{enumerable:!0,get:function(){return z1.zipAll}}),H1=I,Object.defineProperty(j,"zipWith",{enumerable:!0,get:function(){return H1.zipWith}});var C={},Q1=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},X1=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},J1=(Object.defineProperty(C,"__esModule",{value:!0}),e),$1=ln,ej=E,tj=0,rj=1,nj=2;function oj(e,t){e=e.pipe((0,ej.publishReplay)(1),(0,ej.refCount)());this._result=e,this._keys=e.pipe((0,ej.mergeMap)(function(e){return(0,$1.from)(e.keys())}),(0,ej.publishReplay)(1),(0,ej.refCount)()),this._records=void 0,this._controls=new ij,this._summary=new $1.ReplaySubject,this._state=t||tj}oj.prototype.keys=function(){return this._keys},oj.prototype.records=function(){var r=this,e=this._result.pipe((0,ej.mergeMap)(function(t){return new $1.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},oj.prototype.consume=function(){var r=this;return this._result.pipe((0,ej.mergeMap)(function(t){return new $1.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},oj.prototype.pause=function(){this._controls.pause()},oj.prototype.resume=function(){return this._controls.resume()},oj.prototype.push=function(){return this._controls.push()},oj.prototype._startStreaming=function(e){var e=void 0===e?{}:e,t=e.result,r=e.recordsObserver,r=void 0===r?null:r,e=e.summaryObserver,e=void 0===e?null:e,n=[];return e&&n.push(this._summary.subscribe(e)),this._state<rj?(this._state=rj,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,J1.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},oj.prototype._toObservable=function(){var n=this;return new $1.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new oj((t=e,new $1.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},oj.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new ij);var a=new $1.Subject,s=function(n){return Q1(e,void 0,void 0,function(){var t,r;return X1(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),u.pushing=!0,[4,n];case 1:return t=e.sent(),r=t.done,t=t.value,r?(a.complete(),i.complete()):(a.next(t),u.paused||s(o.next()).catch(function(){})),[3,4];case 2:return r=e.sent(),a.error(r),i.error(r),[3,4];case 3:return u.pushing=!1,[7];case 4:return[2]}})})};function t(t){return Q1(this,void 0,void 0,function(){return X1(this,function(e){switch(e.label){case 0:return[4,s(o.next(t))];case 1:return e.sent(),[2]}})})}return(u.pusher=t)(),a}(n[Symbol.asyncIterator](),{complete:function(){return Q1(t,void 0,void 0,function(){var t,r;return X1(this,function(e){switch(e.label){case 0:return this._state=nj,r=(t=this._summary).next,[4,n.summary()];case 1:return r.apply(t,[e.sent()]),this._summary.complete(),[2]}})})},error:function(e){t._state=nj,t._summary.error(e)}},this._controls),this._records)},C.default=oj;uj.prototype.pause=function(){this._paused=!0},Object.defineProperty(uj.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(uj.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),uj.prototype.resume=function(){return Q1(this,void 0,void 0,function(){var t;return X1(this,function(e){switch(e.label){case 0:return t=this._paused,this._paused=!1,!t||this._pushing?[3,2]:[4,this._push()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},uj.prototype.push=function(){return Q1(this,void 0,void 0,function(){return X1(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(uj.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var ij=uj;function uj(e){void 0===e&&(e=function(){return Q1(t,void 0,void 0,function(){return X1(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var sr={},gt=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},aj=(Object.defineProperty(sr,"__esModule",{value:!0}),ln),sj=gt(C);function cj(e){this._txc=e}gt(e),cj.prototype.run=function(e,r){var n=this;return new sj.default(new aj.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},cj.prototype.commit=function(){var e=this;return new aj.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},cj.prototype.rollback=function(){var e=this;return new aj.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},cj.prototype.isOpen=function(){return this._txc.isOpen()},cj.prototype.close=function(){var e=this;return new aj.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},sr.default=cj;G={},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function lj(e){e=e.run;this._run=e}Object.defineProperty(G,"__esModule",{value:!0}),g(C),g(sr),lj.fromTransaction=function(e){return new lj({run:e.run.bind(e)})},lj.prototype.run=function(e,t){return this._run(e,t)},G.default=lj;var T={},fj=(Object.defineProperty(T,"__esModule",{value:!0}),e),pj=ln,dj=E,hj=(fj.internal.logger.Logger,fj.error.SERVICE_UNAVAILABLE);function bj(e){var e=void 0===e?{}:e,t=e.maxRetryTimeout,r=e.initialDelay,r=void 0===r?1e3:r,n=e.delayMultiplier,n=void 0===n?2:n,o=e.delayJitter,o=void 0===o?.2:o,e=e.logger,e=void 0===e?null:e;this._maxRetryTimeout=yj(void 0===t?3e4:t,3e4),this._initialDelay=yj(r,1e3),this._delayMultiplier=yj(n,2),this._delayJitter=yj(o,.2),this._logger=e}function yj(e,t){return e||0===e?e:t}bj.prototype.retry=function(e){var a=this;return e.pipe((0,dj.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,dj.mergeMap)(function(e){if(!(0,fj.isRetryableError)(e))return(0,pj.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,fj.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),hj)).seenErrors=n,(0,pj.throwError)(function(){return t});var r=a._computeNextDelay(u);return u*=a._delayMultiplier,i++,a._logger&&a._logger.warn("Transaction failed and will be retried in ".concat(r)),(0,pj.of)(1).pipe((0,dj.delay)(r))}))}))},bj.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},T.default=bj;var rc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_j=(Object.defineProperty(w,"__esModule",{value:!0}),ln),vj=E,mj=rc(C),t=e,gj=rc(sr),Oj=rc(G),wj=rc(T),n=t.internal.constants,Ej=n.ACCESS_MODE_READ,Pj=n.ACCESS_MODE_WRITE,Tj=n.TELEMETRY_APIS,Sj=t.internal.txConfig.TxConfig;function jj(e){var e=void 0===e?{}:e,t=e.session,r=e.config,e=e.log;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new wj.default({maxRetryTimeout:e})}(r),this._log=e}jj.prototype.run=function(e,r,n){var o=this;return new mj.default(new _j.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},jj.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:Tj.UNMANAGED_TRANSACTION})},jj.prototype.executeRead=function(e,t){return this._executeInTransaction(Ej,e,t)},jj.prototype.executeWrite=function(e,t){return this._executeInTransaction(Pj,e,t)},jj.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new Oj.default({run:e.run.bind(e)})})},jj.prototype.close=function(){var e=this;return new _j.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},jj.prototype[Symbol.asyncDispose]=function(){return this.close()},jj.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},jj.prototype._beginTransaction=function(e,t,r){var n=this,o=Sj.empty();return t&&(o=new Sj(t,this._log)),new _j.Observable(function(t){try{n._session._beginTransaction(e,o,r).then(function(e){t.next(new gj.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},jj.prototype._runTransaction=function(e,r,t,n){var o=this,i=(void 0===n&&(n=function(e){return e}),Sj.empty()),u=(t&&(i=new Sj(t)),{apiTelemetryConfig:{api:Tj.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}});return this._retryLogic.retry((0,_j.of)(1).pipe((0,vj.mergeMap)(function(){return o._beginTransaction(e,i,u.apiTelemetryConfig)}),(0,vj.mergeMap)(function(t){return(0,_j.defer)(function(){try{return r(n(t))}catch(e){return(0,_j.throwError)(function(){return e})}}).pipe((0,vj.catchError)(function(e){return t.rollback().pipe((0,vj.concatWith)((0,_j.throwError)(function(){return e})))}),(0,vj.concatWith)(t.commit()))})))},w.default=jj;var Cj,Ij,Hn=r&&r.__extends||(Cj=function(e,t){return(Cj=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])})(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}Cj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Gt=(Object.defineProperty(U,"__esModule",{value:!0}),U.WRITE=U.READ=U.Driver=void 0,e),Rj=P(w),Aj=Gt.internal.constants.FETCH_ALL,h=Gt.driver.READ,kj=Gt.driver.WRITE,u=(U.READ=h,U.WRITE=kj,Hn(Mj,Ij=Gt.Driver),Mj.prototype.rxSession=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.bookmarks,n=e.database,o=e.fetchSize,i=e.impersonatedUser,u=e.bookmarkManager,a=e.notificationFilter,e=e.auth;return new Rj.default({session:this._newSession({defaultAccessMode:void 0===t?kj:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,impersonatedUser:i,auth:e,reactive:!1,fetchSize:function(e,t){e=parseInt(e,10);{if(0<e||e===Aj)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(Aj," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,log:this._log}),config:this._config,log:this._log})},Mj);function Mj(){return null!==Ij&&Ij.apply(this,arguments)||this}U.Driver=u,U.default=u;l={},Object.defineProperty(l,"__esModule",{value:!0}),l.default="6.0.0",jt={},Zl={},ql={};function Nj(){}Object.defineProperty(ql,"__esModule",{value:!0}),Nj.prototype.selectReader=function(e){throw new Error("Abstract function")},Nj.prototype.selectWriter=function(e){throw new Error("Abstract function")},ql.default=Nj;Hl={},Yl={};function xj(e){this._offset=e||0}Object.defineProperty(Yl,"__esModule",{value:!0}),xj.prototype.next=function(e){if(0===e)return-1;var t=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),t%e},Yl.default=xj;var Dj,Lj,Bl=r&&r.__extends||(Dj=function(e,t){return(Dj=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])})(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}Dj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Kf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Uj=(Object.defineProperty(Hl,"__esModule",{value:!0}),Kf(Yl)),m=Kf(ql),xf=(Lj=m.default,Bl(Fj,Lj),Fj.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},Fj.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},Fj.prototype._select=function(e,t){var r=e.length;if(0===r)return null;var n=t.next(r),o=n,i=null,u=Number.MAX_SAFE_INTEGER;do{var a=e[o],s=this._connectionPool.activeResourceCount(a)}while(s<u&&(i=a,u=s),o===r-1?o=0:o++,o!==n);return i},Fj);function Fj(e){var t=Lj.call(this)||this;return t._readersIndex=new Uj.default,t._writersIndex=new Uj.default,t._connectionPool=e,t}Hl.default=xf;_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.LeastConnectedLoadBalancingStrategy=Zl.LoadBalancingStrategy=void 0,Kl=_(ql),Zl.LoadBalancingStrategy=Kl.default,Jp=_(Hl),Zl.LeastConnectedLoadBalancingStrategy=Jp.default,Zl.default=Jp.default,F={},_d={},Dd={},Ld={},zd={},Dl={},ed={},id={byteLength:function(e){var e=Gj(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};id.toByteArray=function(e){var t,r,n=Gj(e),o=n[0],n=n[1],i=new qj(function(e,t){return 3*(e+t)/4-t}(o,n)),u=0,a=0<n?o-4:o;for(r=0;r<a;r+=4)t=Vj[e.charCodeAt(r)]<<18|Vj[e.charCodeAt(r+1)]<<12|Vj[e.charCodeAt(r+2)]<<6|Vj[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=Vj[e.charCodeAt(r)]<<2|Vj[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=Vj[e.charCodeAt(r)]<<10|Vj[e.charCodeAt(r+1)]<<4|Vj[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},id.fromByteArray=function(e){for(var t,r=e.length,n=r%3,o=[],i=0,u=r-n;i<u;i+=16383)o.push(function(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(function(e){return Bj[e>>18&63]+Bj[e>>12&63]+Bj[e>>6&63]+Bj[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(Bj[t>>2]+Bj[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(Bj[t>>10]+Bj[t>>4&63]+Bj[t<<2&63]+"="));return o.join("")};for(var Bj=[],Vj=[],qj="undefined"!=typeof Uint8Array?Uint8Array:Array,Wj="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zj=0,Hj=Wj.length;zj<Hj;++zj)Bj[zj]=Wj[zj],Vj[Wj.charCodeAt(zj)]=zj;function Gj(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");e=e.indexOf("="),t=(e=-1===e?t:e)===t?0:4-e%4;return[e,t]}Vj["-".charCodeAt(0)]=62,Vj["_".charCodeAt(0)]=63;Fl={read:function(e,t,r,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,c=s>>1,l=-7,f=r?o-1:0,p=r?-1:1,o=e[t+f];for(f+=p,i=o&(1<<-l)-1,o>>=-l,l+=a;0<l;i=256*i+e[t+f],f+=p,l-=8);for(u=i&(1<<-l)-1,i>>=-l,l+=n;0<l;u=256*u+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===s)return u?NaN:1/0*(o?-1:1);u+=Math.pow(2,n),i-=c}return(o?-1:1)*u*Math.pow(2,i-n)},write:function(e,t,r,n,o,i){var u,a,s=8*i-o-1,c=(1<<s)-1,l=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-u))<1&&(u--,n*=2),2<=(t+=1<=u+l?f/n:f*Math.pow(2,1-l))*n&&(u++,n/=2),c<=u+l?(a=0,u=c):1<=u+l?(a=(t*n-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));8<=o;e[r+p]=255&a,p+=d,a/=256,o-=8);for(u=u<<o|a,s+=o;0<s;e[r+p]=255&u,p+=d,u/=256,s-=8);e[r+p-d]|=128*i}};{var Yj=ed;const WL=id,zL=Fl,HL=(Vf="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,Yj.Buffer=k,Yj.SlowBuffer=function(e){+e!=e&&(e=0);return k.alloc(+e)},Yj.INSPECT_MAX_BYTES=50,2147483647);function Kj(e){if(e>HL)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,k.prototype),e}function k(e,t,r){if("number"!=typeof e)return Zj(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return Xj(e)}function Zj(t,r,e){if("string"==typeof t){var n=t;var o=r;"string"==typeof o&&""!==o||(o="utf8");if(!k.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var i=0|tC(n,o);let e=Kj(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return PC(o=t,Uint8Array)?$j((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):Jj(o);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(PC(t,ArrayBuffer)||t&&PC(t.buffer,ArrayBuffer))return $j(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(PC(t,SharedArrayBuffer)||t&&PC(t.buffer,SharedArrayBuffer)))return $j(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return k.from(n,r,e);var u=function(e){{var t,r;if(k.isBuffer(e))return t=0|eC(e.length),0===(r=Kj(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||TC(e.length)?Kj(0):Jj(e);if("Buffer"===e.type&&Array.isArray(e.data))return Jj(e.data)}(t);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return k.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function Qj(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 Xj(e){return Qj(e),Kj(e<0?0:0|eC(e))}function Jj(t){var r=t.length<0?0:0|eC(t.length);const n=Kj(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function $j(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');let 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,k.prototype),n}function eC(e){if(e>=HL)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+HL.toString(16)+" bytes");return 0|e}function tC(e,t){if(k.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||PC(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return OC(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return wC(e).length;default:if(o)return n?-1:OC(e).length;t=(""+t).toLowerCase(),o=!0}}function rC(e,r,n){let t=!1;if((r=void 0===r||r<0?0:r)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(r>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":{var o=this;var i=r;var u=n;var a=o.length;(!i||i<0)&&(i=0);(!u||u<0||a<u)&&(u=a);let t="";for(let e=i;e<u;++e)t+=ZL[o[e]];return t;return}case"utf8":case"utf-8":return sC(this,r,n);case"ascii":{var s=this;a=r;var c=n;let t="";c=Math.min(s.length,c);for(let e=a;e<c;++e)t+=String.fromCharCode(127&s[e]);return t;return}case"latin1":case"binary":{var l=this;i=r;var f=n;let t="";f=Math.min(l.length,f);for(let e=i;e<f;++e)t+=String.fromCharCode(l[e]);return t;return}case"base64":return d=this,b=n,0===(h=r)&&b===d.length?WL.fromByteArray(d):WL.fromByteArray(d.slice(h,b));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":{d=this;h=r;b=n;var p=d.slice(h,b);let t="";for(let e=0;e<p.length-1;e+=2)t+=String.fromCharCode(p[e]+256*p[e+1]);return t;return}default:if(t)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),t=!0}var d,h,b}function nC(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function oC(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=(r=TC(r=+r)?o?0:e.length-1:r)<0?e.length+r:r)>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=k.from(t,n)),k.isBuffer(t))return 0===t.length?-1:iC(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):iC(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function iC(r,n,t,e,o){let i=1,u=r.length,a=n.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(r.length<2||n.length<2)return-1;i=2,u/=2,a/=2,t/=2}function s(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}let c;if(o){let e=-1;for(c=t;c<u;c++)if(s(r,c)===s(n,-1===e?0:c-e)){if(-1===e&&(e=c),c-e+1===a)return e*i}else-1!==e&&(c-=c-e),e=-1}else for(t+a>u&&(t=u-a),c=t;0<=c;c--){let t=!0;for(let e=0;e<a;e++)if(s(r,c+e)!==s(n,e)){t=!1;break}if(t)return c}return-1}function uC(e,t,r,n){return EC(function(t){const r=[];for(let e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(t),e,r,n)}function aC(e,t,r,n){return EC(function(t,r){var n,o;const i=[];for(let e=0;e<t.length&&!((r-=2)<0);++e)o=t.charCodeAt(e),n=o>>8,o=o%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function sC(u,e,t){t=Math.min(u.length,t);const r=[];let a=e;for(;a<t;){var s=u[a];let o=null,i=239<s?4:223<s?3:191<s?2:1;if(a+i<=t){let e,t,r,n;switch(i){case 1:s<128&&(o=s);break;case 2:128==(192&(e=u[a+1]))&&127<(n=(31&s)<<6|63&e)&&(o=n);break;case 3:e=u[a+1],t=u[a+2],128==(192&e)&&128==(192&t)&&2047<(n=(15&s)<<12|(63&e)<<6|63&t)&&(n<55296||57343<n)&&(o=n);break;case 4:e=u[a+1],t=u[a+2],r=u[a+3],128==(192&e)&&128==(192&t)&&128==(192&r)&&65535<(n=(15&s)<<18|(63&e)<<12|(63&t)<<6|63&r)&&n<1114112&&(o=n)}}null===o?(o=65533,i=1):65535<o&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}{var n=r,o=n.length;if(o<=GL)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=GL));return e}}Yj.kMaxLength=HL,(k.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1);var e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(e){return!1}}())||"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(k.prototype,"parent",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}}),Object.defineProperty(k.prototype,"offset",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}}),k.poolSize=8192,k.from=Zj,Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(e,t,r){return t=t,r=r,Qj(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?Kj(e).fill(t,r):Kj(e).fill(t):Kj(e)},k.allocUnsafe=Xj,k.allocUnsafeSlow=Xj,k.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==k.prototype},k.compare=function(r,n){if(PC(r,Uint8Array)&&(r=k.from(r,r.offset,r.byteLength)),PC(n,Uint8Array)&&(n=k.from(n,n.offset,n.byteLength)),!k.isBuffer(r)||!k.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;let o=r.length,i=n.length;for(let e=0,t=Math.min(o,i);e<t;++e)if(r[e]!==n[e]){o=r[e],i=n[e];break}return o<i?-1:i<o?1:0},k.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}},k.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return k.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=k.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(PC(e,Uint8Array))o+e.length>n.length?(e=k.isBuffer(e)?e:k.from(e)).copy(n,o):Uint8Array.prototype.set.call(n,e,o);else{if(!k.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},k.byteLength=tC,k.prototype._isBuffer=!0,k.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)nC(this,e,e+1);return this},k.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)nC(this,e,e+3),nC(this,e+1,e+2);return this},k.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)nC(this,e,e+7),nC(this,e+1,e+6),nC(this,e+2,e+5),nC(this,e+3,e+4);return this},k.prototype.toLocaleString=k.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?sC(this,0,e):rC.apply(this,arguments)},k.prototype.equals=function(e){if(k.isBuffer(e))return this===e||0===k.compare(this,e);throw new TypeError("Argument must be a Buffer")},k.prototype.inspect=function(){let e="";var t=Yj.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},Vf&&(k.prototype[Vf]=k.prototype.inspect),k.prototype.compare=function(e,t,r,n,o){if(PC(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),!k.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=t)return 0;if(o<=n)return-1;if(r<=t)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),u=(r>>>=0)-(t>>>=0);var a=Math.min(i,u),s=this.slice(n,o),c=e.slice(t,r);for(let e=0;e<a;++e)if(s[e]!==c[e]){i=s[e],u=c[e];break}return i<u?-1:u<i?1:0},k.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},k.prototype.indexOf=function(e,t,r){return oC(this,e,t,r,!0)},k.prototype.lastIndexOf=function(e,t,r){return oC(this,e,t,r,!1)},k.prototype.write=function(t,r,n,e){if(void 0===r)e="utf8",n=this.length,r=0;else if(void 0===n&&"string"==typeof r)e=r,n=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(n)?(n>>>=0,void 0===e&&(e="utf8")):(e=n,n=void 0)}var o,i,u,a=this.length-r;if((void 0===n||a<n)&&(n=a),0<t.length&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");e=e||"utf8";let s=!1;for(;;)switch(e){case"hex":{var c=this;var l=t;var f=r;var p=n;f=Number(f)||0;var d=c.length-f;(!p||d<(p=Number(p)))&&(p=d),(d=l.length)/2<p&&(p=d/2);let e;for(e=0;e<p;++e){var h=parseInt(l.substr(2*e,2),16);if(TC(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,EC(OC(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return uC(this,t,r,n);case"base64":return i=this,u=r,o=n,EC(wC(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return aC(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),s=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const GL=4096;function cC(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function lC(e,t,r,n,o,i){if(!k.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<t||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function fC(e,t,r,n,o){vC(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r++]=n,e[r++]=n>>=8,e[r++]=n>>=8,e[r++]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,e[r++]=o>>=8,e[r++]=o>>=8,e[r++]=o>>=8,r}function pC(e,t,r,n,o){vC(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r+7]=n,e[r+6]=n>>=8,e[r+5]=n>>=8,e[r+4]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,e[r+2]=o>>=8,e[r+1]=o>>=8,e[r]=o>>=8,r+8}function dC(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function hC(e,t,r,n,o){return t=+t,r>>>=0,o||dC(e,0,r,4),zL.write(e,t,r,n,23,4),r+4}function bC(e,t,r,n,o){return t=+t,r>>>=0,o||dC(e,0,r,8),zL.write(e,t,r,n,52,8),r+8}k.prototype.slice=function(e,t){var r=this.length,r=((e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e),this.subarray(e,t));return Object.setPrototypeOf(r,k.prototype),r},k.prototype.readUintLE=k.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||cC(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},k.prototype.readUintBE=k.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||cC(e,t,this.length);let n=this[e+--t],o=1;for(;0<t&&(o*=256);)n+=this[e+--t]*o;return n},k.prototype.readUint8=k.prototype.readUInt8=function(e,t){return e>>>=0,t||cC(e,1,this.length),this[e]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(e,t){return e>>>=0,t||cC(e,2,this.length),this[e]|this[e+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(e,t){return e>>>=0,t||cC(e,2,this.length),this[e]<<8|this[e+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(e,t){return e>>>=0,t||cC(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},k.prototype.readUint32BE=k.prototype.readUInt32BE=function(e,t){return e>>>=0,t||cC(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},k.prototype.readBigUInt64LE=SC(function(e){mC(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||gC(e,this.length-8),t+256*this[++e]+65536*this[++e]+this[++e]*2**24),e=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(t)+(BigInt(e)<<BigInt(32))}),k.prototype.readBigUInt64BE=SC(function(e){mC(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||gC(e,this.length-8),t*2**24+65536*this[++e]+256*this[++e]+this[++e]),e=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(t)<<BigInt(32))+BigInt(e)}),k.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||cC(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},k.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||cC(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;0<n&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},k.prototype.readInt8=function(e,t){return e>>>=0,t||cC(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},k.prototype.readInt16LE=function(e,t){e>>>=0,t||cC(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},k.prototype.readInt16BE=function(e,t){e>>>=0,t||cC(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},k.prototype.readInt32LE=function(e,t){return e>>>=0,t||cC(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},k.prototype.readInt32BE=function(e,t){return e>>>=0,t||cC(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},k.prototype.readBigInt64LE=SC(function(e){mC(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||gC(e,this.length-8),this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24));return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),k.prototype.readBigInt64BE=SC(function(e){mC(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||gC(e,this.length-8),(t<<24)+65536*this[++e]+256*this[++e]+this[++e]);return(BigInt(t)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),k.prototype.readFloatLE=function(e,t){return e>>>=0,t||cC(e,4,this.length),zL.read(this,e,!0,23,4)},k.prototype.readFloatBE=function(e,t){return e>>>=0,t||cC(e,4,this.length),zL.read(this,e,!1,23,4)},k.prototype.readDoubleLE=function(e,t){return e>>>=0,t||cC(e,8,this.length),zL.read(this,e,!0,52,8)},k.prototype.readDoubleBE=function(e,t){return e>>>=0,t||cC(e,8,this.length),zL.read(this,e,!1,52,8)},k.prototype.writeUintLE=k.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||lC(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},k.prototype.writeUintBE=k.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||lC(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;0<=--o&&(i*=256);)this[t+o]=e/i&255;return t+r},k.prototype.writeUint8=k.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||lC(this,e,t,1,255,0),this[t]=255&e,t+1},k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||lC(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||lC(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||lC(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},k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||lC(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},k.prototype.writeBigUInt64LE=SC(function(e,t=0){return fC(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=SC(function(e,t=0){return pC(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||lC(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=0,i=1,u=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===u&&0!==this[t+o-1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},k.prototype.writeIntBE=function(e,t,r,n){e=+e,t>>>=0,n||lC(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=r-1,i=1,u=0;for(this[t+o]=255&e;0<=--o&&(i*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},k.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||lC(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},k.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||lC(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},k.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||lC(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},k.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||lC(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},k.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||lC(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},k.prototype.writeBigInt64LE=SC(function(e,t=0){return fC(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=SC(function(e,t=0){return pC(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeFloatLE=function(e,t,r){return hC(this,e,t,!0,r)},k.prototype.writeFloatBE=function(e,t,r){return hC(this,e,t,!1,r)},k.prototype.writeDoubleLE=function(e,t,r){return bC(this,e,t,!0,r)},k.prototype.writeDoubleBE=function(e,t,r){return bC(this,e,t,!1,r)},k.prototype.copy=function(e,t,r,n){if(!k.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),(n=0<n&&n<r?r:n)===r)return 0;if(0===e.length||0===this.length)return 0;if((t=t||0)<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);var o=(n=e.length-t<n-r?e.length-t+r: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),o},k.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&&!k.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var o;1===e.length&&(o=e.charCodeAt(0),("utf8"===n&&o<128||"latin1"===n)&&(e=o))}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;t>>>=0,r=void 0===r?this.length:r>>>0;let i;if("number"==typeof(e=e||0))for(i=t;i<r;++i)this[i]=e;else{var u=k.isBuffer(e)?e:k.from(e,n),a=u.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=u[i%a]}return this};const YL={};function yC(e,t,r){YL[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=this.name+` [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return this.name+` [${e}]: `+this.message}}}function _C(e){let t="",r=e.length;for(var n="-"===e[0]?1:0;r>=4+n;r-=3)t="_"+e.slice(r-3,r)+t;return""+e.slice(0,r)+t}function vC(t,r,n,e,o,i){if(n<t||t<r){var u="bigint"==typeof r?"n":"";let e;throw e=3<i?0===r||r===BigInt(0)?`>= 0${u} and < 2${u} ** `+8*(i+1)+u:`>= -(2${u} ** ${8*(i+1)-1}${u}) and < 2 ** `+(8*(i+1)-1)+u:`>= ${r}${u} and <= `+n+u,new YL.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,mC(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||gC(u,r.length-(n+1))}function mC(e,t){if("number"!=typeof e)throw new YL.ERR_INVALID_ARG_TYPE(t,"number",e)}function gC(e,t,r){if(Math.floor(e)!==e)throw mC(e,r),new YL.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new YL.ERR_BUFFER_OUT_OF_BOUNDS;throw new YL.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}yC("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),yC("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),yC("ERR_OUT_OF_RANGE",function(e,t,r){e=`The value of "${e}" is out of range.`;let n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=_C(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=_C(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const KL=/[^+/0-9A-Za-z-_]/g;function OC(t,r){r=r||1/0;let n;var o=t.length;let i=null;const u=[];for(let e=0;e<o;++e){if(55295<(n=t.charCodeAt(e))&&n<57344){if(!i){if(56319<n){-1<(r-=3)&&u.push(239,191,189);continue}if(e+1===o){-1<(r-=3)&&u.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(r-=3)&&u.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(r-=3)&&u.push(239,191,189);if(i=null,n<128){if(--r<0)break;u.push(n)}else if(n<2048){if((r-=2)<0)break;u.push(n>>6|192,63&n|128)}else if(n<65536){if((r-=3)<0)break;u.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;u.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return u}function wC(e){return WL.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(KL,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function EC(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function PC(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function TC(e){return e!=e}const ZL=function(){var r="0123456789abcdef";const n=new Array(256);for(let t=0;t<16;++t){var o=16*t;for(let e=0;e<16;++e)n[o+e]=r[t]+r[e]}return n}();function SC(e){return"undefined"==typeof BigInt?jC:e}function jC(){throw new Error("BigInt not supported")}}var CC,vh={},Al={},c=r&&r.__extends||(CC=function(e,t){return(CC=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])})(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}CC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Mh=(Object.defineProperty(Al,"__esModule",{value:!0}),M.prototype.getUInt8=function(e){throw new Error("Not implemented")},M.prototype.getInt8=function(e){throw new Error("Not implemented")},M.prototype.getFloat64=function(e){throw new Error("Not implemented")},M.prototype.getVarInt=function(e){throw new Error("Not implemented")},M.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},M.prototype.putInt8=function(e,t){throw new Error("Not implemented")},M.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},M.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},M.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},M.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},M.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},M.prototype.getInt64=function(e){return this.getInt8(e)<<56|this.getUInt8(e+1)<<48|this.getUInt8(e+2)<<40|this.getUInt8(e+3)<<32|this.getUInt8(e+4)<<24|this.getUInt8(e+5)<<16|this.getUInt8(e+6)<<8|this.getUInt8(e+7)},M.prototype.getSlice=function(e,t){return new RC(e,t,this)},M.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},M.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},M.prototype.putInt32=function(e,t){this.putInt8(e,t>>24),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},M.prototype.putUInt32=function(e,t){this.putUInt8(e,t>>24&255),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},M.prototype.putInt64=function(e,t){this.putInt8(e,t>>48),this.putUInt8(e+1,t>>42&255),this.putUInt8(e+2,t>>36&255),this.putUInt8(e+3,t>>30&255),this.putUInt8(e+4,t>>24&255),this.putUInt8(e+5,t>>16&255),this.putUInt8(e+6,t>>8&255),this.putUInt8(e+7,255&t)},M.prototype.putVarInt=function(e,t){for(var r=0;1<t;){var n=t%128;128<=t&&(n+=128),t/=128,this.putUInt8(e+r,n),r+=1}return r},M.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},M.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},M.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},M.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},M.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},M.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},M.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},M.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},M.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},M.prototype.readVarInt=function(){var e=this.getVarInt(this.position);return this._updatePos(e.length),e.value},M.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},M.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},M.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},M.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},M.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},M.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},M.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},M.prototype.writeVarInt=function(e){e=this.putVarInt(this.position,e);this._updatePos(e)},M.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},M.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},M.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},M.prototype.remaining=function(){return this.length-this.position},M.prototype.hasRemaining=function(){return 0<this.remaining()},M.prototype.reset=function(){this.position=0},M.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},M.prototype.toHex=function(){for(var e="",t=0;t<this.length;t++){var r=this.getUInt8(t).toString(16);e+=r=1===r.length?"0"+r:r,t!==this.length-1&&(e+=" ")}return e},M);function M(e){this.position=0,this.length=e}Al.default=Mh;c(AC,IC=Mh),AC.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},AC.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},AC.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},AC.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},AC.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},AC.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var IC,RC=AC;function AC(e,t,r){t=IC.call(this,t)||this;return t._start=e,t._inner=r,t}var kC,MC,Vh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Wh=(Object.defineProperty(vh,"__esModule",{value:!0}),vh.BaseBuffer=void 0,Vh(Al)),Xh=(vh.BaseBuffer=Wh.default,vh.default=Wh.default,r&&r.__extends||(kC=function(e,t){return(kC=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])})(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}kC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),nb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},NC=(Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.alloc=function(e){return new xC(e)},nb(ed)),Ul=nb(vh),xC=(MC=Ul.default,Xh(DC,MC),DC.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},DC.prototype.getInt8=function(e){return this._buffer.readInt8(e)},DC.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},DC.prototype.getVarInt=function(e){for(var t=0,r=this._buffer.readInt8(e+t),n=r%128;1<=r/128;)n+=(r=this._buffer.readInt8(e+(t+=1)))%128;return{length:t+1,value:n}},DC.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},DC.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},DC.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},DC.prototype.putBytes=function(e,t){var r;t instanceof DC?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):MC.prototype.putBytes.call(this,e,t)},DC.prototype.getSlice=function(e,t){return new DC(this._buffer.slice(e,e+t))},DC);function DC(e){var t=this,e=(e=e)instanceof NC.default.Buffer?e:"number"==typeof e&&"function"==typeof NC.default.Buffer.alloc?NC.default.Buffer.alloc(e):new NC.default.Buffer(e);return(t=MC.call(this,e.length)||this)._buffer=e,t}Dl.default=xC;var mh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},LC=(Object.defineProperty(zd,"__esModule",{value:!0}),mh(Dl)),UC=e,ub=UC.internal.util,FC=ub.ENCRYPTION_OFF,BC=ub.ENCRYPTION_ON;function VC(e,t,r){void 0===t&&(t=qC),void 0===r&&(r=function(e){return new WebSocket(e)});var n,o=this,t=(this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===BC}(e),n=function(e){return!1===e.encrypted||e.encrypted===FC}(e),e=e.trust,t=function(e){e="function"==typeof e?e():"";return e&&0<=e.toLowerCase().indexOf("https")}(t);if(function(e,t,r){null!==r&&(e&&!r?console.warn("Neo4j driver is configured to use secure WebSocket on a HTTP web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to not use encryption."):t&&r&&console.warn("Neo4j driver is configured to use insecure WebSocket on a HTTPS web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to use encryption."))}(r,n,t),n)return{scheme:"ws",error:null};if(t)return{scheme:"wss",error:null};if(r)return e&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==e?{scheme:null,error:(0,UC.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+e+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+FC+'"` in the driver configuration.')}:{scheme:"wss",error:null};return{scheme:"ws",error:null}}(e,t)),i=t.scheme,t=t.error;t?this._error=t:(this._ws=function(t,r,n){var o=t+"://"+r.asHostPort();try{return n(o)}catch(e){if(function(e,t){return"SyntaxError"===e.name&&function(e){return"["===e.charAt(0)&&-1!==e.indexOf("]")}(t.asHostPort())}(e,r))return o=function(e,t){var r=t.host().replace(/:/g,"-").replace("%","s")+".ipv6-literal.net";return"".concat(e,"://").concat(r,":").concat(t.port())}(t,r),n(o);throw e}}(i,e.address,r),this._ws.binaryType="arraybuffer",(n=this)._ws.onclose=function(e){e&&!e.wasClean&&n._handleConnectionError(),n._open=!1},this._ws.onopen=function(){n._clearConnectionTimeout();var e=n._pending;n._pending=null;for(var t=0;t<e.length;t++)n.write(e[t])},this._ws.onmessage=function(e){o._resetTimeout(),n.onmessage&&(e=new LC.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function qC(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}VC.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,UC.newError)("Failed to establish connection in ".concat(this._config.connectionTimeout,"ms"),this._config.connectionErrorCode),void(this.onerror&&this.onerror(this._error));this._open&&!this._timedout&&(this._error=(0,UC.newError)("WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket `readyState` is: "+this._ws.readyState,this._config.connectionErrorCode),this.onerror&&this.onerror(this._error))},VC.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof LC.default))throw(0,UC.newError)("Don't know how to send buffer: "+e);try{this._ws.send(e._buffer)}catch(e){if(1===this._ws.readyState)throw(0,UC.newError)("unexpected failure to write.",void 0,e);this._handleConnectionError()}}},VC.prototype.close=function(){var r=this;return null===this._closingPromise&&(this._closingPromise=new Promise(function(e,t){r._clearConnectionTimeout(),r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._ws.onclose=function(){e()},r._ws.close()):e()})),this._closingPromise},VC.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},VC.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},VC.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},VC.prototype._resetTimeout=function(){var e=this;this._receiveTimeoutStarted&&(null!==this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=setTimeout(function(){e._receiveTimeoutId=null,e._timedout=!0,e.stopReceiveTimeout(),e._error=(0,UC.newError)("Connection lost. Server didn't respond in ".concat(e._receiveTimeout,"ms"),e._config.connectionErrorCode),e.close(),e.onerror&&e.onerror(e._error)},this._receiveTimeout))},VC.prototype._setupConnectionTimeout=function(){var e,t=this,r=this._config.connectionTimeout;return r?(e=this._ws,setTimeout(function(){1!==e.readyState&&(t._connectionTimeoutFired=!0,e.close())},r)):null},VC.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},zd.default=VC;var WC,lb={},Ll=r&&r.__extends||(WC=function(e,t){return(WC=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])})(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}WC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(lb,"__esModule",{value:!0});var zC,dt=e.internal.resolver.BaseHostNameResolver,kh=(Ll(HC,zC=dt),HC.prototype.resolve=function(e){return this._resolveToItself(e)},HC);function HC(){return null!==zC&&zC.apply(this,arguments)||this}lb.default=kh;var GC,S={},YC=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},KC=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},mb=(Object.defineProperty(S,"__esModule",{value:!0}),S.default={load:function(t){return YC(this,void 0,void 0,function(){return KC(this,function(e){return[2,t]})})}},r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}}),or=(Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.ClientCertificatesLoader=Ld.HostNameResolver=Ld.Channel=void 0,mb(zd)),R=mb(lb),zh=mb(S),Nh=(Ld.Channel=or.default,Ld.HostNameResolver=R.default,Ld.ClientCertificatesLoader=zh.default,{}),gb={},Pb=r&&r.__extends||(GC=function(e,t){return(GC=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])})(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}GC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(gb,"__esModule",{value:!0});var ZC,QC=Dl,Cb=(ZC=vh.BaseBuffer,Pb(XC,ZC),XC.prototype.getUInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getUInt8(e);e-=r.length}},XC.prototype.getInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getInt8(e);e-=r.length}},XC.prototype.getFloat64=function(e){for(var t=(0,QC.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},XC);function XC(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=ZC.call(this,r)||this)._buffers=e,t}gb.default=Cb;var JC,$C,Mb=r&&r.__extends||(JC=function(e,t){return(JC=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])})(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}JC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ub=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Yb=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.Dechunker=Nh.Chunker=void 0,Ub(Al)),eI=Dl,tI=Ub(gb),ty=($C=Yb.default,Mb(rI,$C),rI.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},rI.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},rI.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},rI.prototype.putBytes=function(e,t){for(;0<t.remaining();)this._ensure(1),this._buffer.remaining()>t.remaining()?this._buffer.writeBytes(t):this._buffer.writeBytes(t.readSlice(this._buffer.remaining()));return this},rI.prototype.flush=function(){var e;return 0<this._buffer.position&&(this._closeChunkIfOpen(),e=this._buffer,this._buffer=null,this._ch.write(e.getSlice(0,e.position)),this._buffer=(0,eI.alloc)(this._bufferSize),this._chunkOpen=!1),this},rI.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},rI.prototype._ensure=function(e){e=this._chunkOpen?e:e+2;this._buffer.remaining()<e&&this.flush(),this._chunkOpen||(this._currentChunkStart=this._buffer.position,this._buffer.position=this._buffer.position+2,this._chunkOpen=!0)},rI.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},rI);function rI(e,t){var r=$C.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,eI.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function nI(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}Nh.Chunker=ty,nI.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},nI.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},nI.prototype.IN_CHUNK=function(e){return this._chunkSize<=e.remaining()?(this._currentMessage.push(e.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=e.remaining(),this._currentMessage.push(e.readSlice(e.remaining())),this.IN_CHUNK)},nI.prototype.CLOSED=function(e){},nI.prototype._onHeader=function(e){if(0!==e)return this._chunkSize=e,this.IN_CHUNK;var t=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:t=this._currentMessage[0];break;default:t=new tI.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},nI.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},Nh.Dechunker=nI;var uy={},oI=(Object.defineProperty(uy,"__esModule",{value:!0}),e),ly=oI.internal.util,fy=ly.ENCRYPTION_OFF,Iy=ly.ENCRYPTION_ON,iI=oI.error.SERVICE_UNAVAILABLE,uI=[null,void 0,!0,!1,Iy,fy],aI=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];uy.default=function(e,t,r,n){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==uI.indexOf(e))return e;throw(0,oI.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(uI))}(t),this.trust=function(e){e=e.trust;if(-1!==aI.indexOf(e))return e;throw(0,oI.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(aI))}(t),this.trustedCertificates=t.trustedCertificates||[],this.connectionErrorCode=r||iI,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=n};var sI,cI,Cy={},Ky={},vd={exports:{}};function lI(e,t){for(var r in e)t[r]=e[r]}function fI(e,t,r){return cI(e,t,r)}zy=(xp=vd).exports,(cI=(sI=ed).Buffer).from&&cI.alloc&&cI.allocUnsafe&&cI.allocUnsafeSlow?xp.exports=sI:(lI(sI,zy),zy.Buffer=fI),fI.prototype=Object.create(cI.prototype),lI(cI,fI),fI.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return cI(e,t,r)},fI.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=cI(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},fI.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return cI(e)},fI.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return sI.SlowBuffer(e)};var pI=vd.exports.Buffer,dI=pI.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function hI(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||pI.isEncoding!==dI&&dI(e))return t||e;throw new Error("Unknown encoding: "+e)}function bI(e){var t;switch(this.encoding=hI(e),this.encoding){case"utf16le":this.text=vI,this.end=mI,t=4;break;case"utf8":this.fillLast=_I,t=4;break;case"base64":this.text=gI,this.end=OI,t=3;break;default:return this.write=wI,void(this.end=EI)}this.lastNeed=0,this.lastTotal=0,this.lastChar=pI.allocUnsafe(t)}function yI(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function _I(e){var t,r=this.lastTotal-this.lastNeed,n=(t=this,128!=(192&(n=e)[0])?(t.lastNeed=0,"�"):1<t.lastNeed&&1<n.length?128!=(192&n[1])?(t.lastNeed=1,"�"):2<t.lastNeed&&2<n.length&&128!=(192&n[2])?(t.lastNeed=2,"�"):void 0:void 0);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,r,0,e.length),void(this.lastNeed-=e.length))}function vI(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);t=e.toString("utf16le",t);if(t){var r=t.charCodeAt(t.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}function mI(e){var t,e=e&&e.length?this.write(e):"";return this.lastNeed?(t=this.lastTotal-this.lastNeed,e+this.lastChar.toString("utf16le",0,t)):e}function gI(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function OI(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function wI(e){return e.toString(this.encoding)}function EI(e){return e&&e.length?this.write(e):""}(Ky.StringDecoder=bI).prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},bI.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},bI.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=yI(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=yI(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=yI(t[n])))return 0<o&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;r=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},bI.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var PI,TI,SI,jI,CI,Yy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},II=(Object.defineProperty(Cy,"__esModule",{value:!0}),Yy(Dl)),RI=e,AI=Yy(ed),kI=new Ky.StringDecoder("utf8");Cy.default={encode:function(e){return new II.default((e=e,"function"==typeof AI.default.Buffer.from?AI.default.Buffer.from(e,"utf8"):new AI.default.Buffer(e,"utf8")))},decode:function(e,t){if(Object.prototype.hasOwnProperty.call(e,"_buffer"))return n=t,a=(r=e).position,n=a+n,r.position=Math.min(n,r.length),r._buffer.toString("utf8",a,n);var o,i,u,r,n,a;if(Object.prototype.hasOwnProperty.call(e,"_buffers"))return o=function(e){return kI.write(e._buffer)},r=function(){return kI.end()},i=t,u=(a=e).position,a._updatePos(Math.min(t,a.length-u)),a._buffers.reduce(function(e,t){var r,n;return i<=0?e:u>=t.length?(u-=t.length,""):(t._updatePos(u-t.position),r=Math.min(t.length-u,i),n=t.readSlice(r),t._updatePos(r),i=Math.max(i-n.length,0),u=0,e+o(n))},"")+r();throw(0,RI.newError)("Don't know how to decode strings from '".concat(e,"'"))}},o_=Dd,PI=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),i_=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||PI(t,e,r)},TI=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(o_,"__esModule",{value:!0}),o_.utf8=o_.alloc=o_.ChannelConfig=void 0,i_(Ld,o_),i_(Nh,o_),SI=uy,Object.defineProperty(o_,"ChannelConfig",{enumerable:!0,get:function(){return TI(SI).default}}),jI=Dl,Object.defineProperty(o_,"alloc",{enumerable:!0,get:function(){return jI.alloc}}),CI=Cy,Object.defineProperty(o_,"utf8",{enumerable:!0,get:function(){return TI(CI).default}}),Object.defineProperty(_d,"__esModule",{value:!0}),_d.default=function(f,e){return function(t,o){var i=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(i),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e,t){e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()];if(72!==e[0]||84!==e[1]||84!==e[2]||80!==e[3])return new NI.ProtocolVersion(e[3],e[2]);throw t.error("Handshake failed since server responded with HTTP."),(0,NI.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)")}(t,o);r({protocolVersion:e,capabilites:0,buffer:t,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(function(e){if(4<e.length)throw(0,NI.newError)("It should not have more than 4 versions of the protocol");var o=(0,MI.alloc)(20);return o.writeInt32(1616949271),e.forEach(function(e){var t,r,n;e instanceof Array?(r=(n=e[0]).major,n=n.minor,t=e[1].minor,o.writeInt32(n-t<<16|n<<8|r)):(r=e.major,n=e.minor,o.writeInt32(n<<8|r))}),o.reset(),o}([LI(255,1),[LI(5,8),LI(5,0)],[LI(4,4),LI(4,2)],LI(3,0)]))})}(f,e).then(function(e){if(e.protocolVersion.isEqualTo(new NI.ProtocolVersion(255,1))){for(var n=f,o=e.buffer,t=o.readVarInt(),r=[],i=0;i<t;i++){var u=[o.readUInt8(),o.readUInt8(),o.readUInt8(),o.readUInt8()];r=r.concat(function(e){for(var t=[],r=e[3],n=e[2],o=0;o<=e[1];o++)t.push({major:r,minor:n-o});return t}(u))}o.readVarInt();var a=DI,s=0,c=0;for(r.sort(function(e,t){return Number(e.major)!==Number(t.major)?Number(t.major)-Number(e.major):Number(t.minor)-Number(e.minor)}),i=0;i<r.length;i++){var l=r[i];if(xI.includes(l.major+"."+l.minor)){s=l.major,c=l.minor;break}}return new Promise(function(e,t){try{var r=(0,MI.alloc)(5);r.writeInt32(c<<8|s),r.writeVarInt(a),n.write(r),e({protocolVersion:new NI.ProtocolVersion(s,c),capabilites:a,consumeRemainingBuffer:function(e){o.hasRemaining()&&e(o.readSlice(o.remaining()))}})}catch(e){t(e)}})}return e})};var MI=Dd,NI=e,xI=["6.0","5.8","5.7","5.6","5.4","5.3","5.2","5.1","5.0","4.4","4.3","4.2","3.0"],DI=0;function LI(e,t){return{major:e,minor:t}}var UI,d_={},v_={},w_={},A={},T_={},H_=r&&r.__extends||(UI=function(e,t){return(UI=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])})(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}UI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Z_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ev=(Object.defineProperty(T_,"__esModule",{value:!0}),Z_(e),FI.ofRecord=function(e){return null===e?FI.ofNull():new YI(e)},FI.ofMessageResponse=function(e){return null===e?FI.ofNull():new VI(e)},FI.ofNull=function(){return new zI},Object.defineProperty(FI.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(FI.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(FI.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(FI.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),FI);function FI(){}T_.default=ev;H_(qI,BI=ev),Object.defineProperty(qI.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(qI.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(qI.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(qI.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var BI,VI=qI;function qI(e){var t=BI.call(this)||this;return t._response=e,t}H_(HI,WI=ev),Object.defineProperty(HI.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var WI,zI=HI;function HI(){return null!==WI&&WI.apply(this,arguments)||this}H_(KI,GI=ev),Object.defineProperty(KI.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(KI.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(KI.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(KI.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var GI,YI=KI;function KI(e){var t=GI.call(this)||this;return t._record=e,t}var iv={},av={},ZI=(Object.defineProperty(av,"__esModule",{value:!0}),av.identity=function(e){return e},av.reuseOngoingRequest=function(o,i){void 0===i&&(i=null);var u=new Map;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ZI.json.stringify(e);if(u.has(r))return u.get(r);var n=o.apply(i,e);return u.set(r,n),n.finally(function(){u.delete(r)})}},e);var vv={},QI=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(vv,"__esModule",{value:!0}),vv.equals=function(e,t){var r,n;if(e===t)return!0;if(null===e||null===t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;try{for(var u=QI(o),a=u.next();!a.done;a=u.next()){var s=a.value;if(e[s]!==t[s])return!1}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!0};var XI,JI,$I=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),eR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ev=r&&r.__importStar||(XI=function(e){return(XI=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=XI(e),n=0;n<r.length;n++)"default"!==r[n]&&$I(t,e,r[n]);return eR(t,e),t}),Sv=(Object.defineProperty(iv,"__esModule",{value:!0}),iv.object=iv.functional=void 0,iv.functional=Ev(av),iv.object=Ev(vv),r&&r.__extends||(JI=function(e,t){return(JI=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])})(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}JI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),jv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},tR=(Object.defineProperty(A,"__esModule",{value:!0}),A.TelemetryObserver=A.ProcedureRouteObserver=A.RouteObserver=A.CompletedObserver=A.FailedObserver=A.ResetObserver=A.LogoffObserver=A.LoginObserver=A.ResultStreamObserver=A.StreamObserver=void 0,e),rR=jv(T_),nR=iv,oR=tR.internal.constants.FETCH_ALL,iR=tR.error.PROTOCOL_ERROR,Cv=(uR.prototype.onNext=function(e){},uR.prototype.onError=function(e){},uR.prototype.onCompleted=function(e){},uR);function uR(){}A.StreamObserver=Cv;Sv(sR,aR=Cv),sR.prototype.pause=function(){this._paused=!0},sR.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},sR.prototype.onNext=function(e){this._haveRecordStreamed=!0;var t=new tR.Record(this._fieldKeys,e,this._fieldLookup);this._observers.some(function(e){return e.onNext})?this._observers.forEach(function(e){e.onNext&&e.onNext(t)}):(this._queuedRecords.push(t),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},sR.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},sR.prototype.onError=function(e){this._state.onError(this,e)},sR.prototype.cancel=function(){this._discard=!0},sR.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(TR.STREAMING)},sR.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(TR.SUCCEEDED)},sR.prototype.subscribe=function(e){if(this._head&&e.onKeys&&e.onKeys(this._head),0<this._queuedRecords.length&&e.onNext)for(var t=0;t<this._queuedRecords.length;t++)e.onNext(this._queuedRecords[t]),this._queuedRecords.length-t-1<=this._lowRecordWatermark&&(this._autoPull=!0,this._state===TR.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===TR.READY&&this._handleStreaming()},sR.prototype._handleHasMore=function(e){this._setState(TR.READY),this._handleStreaming(),delete e.has_more},sR.prototype._handlePullSuccess=function(e){var t,r=this,n=this._enrichMetadata(Object.assign(this._server?{server:this._server}:{},this._meta,{stream_summary:{have_records_streamed:this._haveRecordStreamed,pulled:this._pulled,has_keys:0<this._fieldKeys.length}},e));[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(TR.SUCCEEDED),e=null,t=function(){r._tail=n,r._observers.some(function(e){return e.onCompleted})&&r._observers.forEach(function(e){e.onCompleted&&e.onCompleted(n)}),r._afterComplete&&r._afterComplete(n)},(e=this._beforeComplete?this._beforeComplete(n):e)?Promise.resolve(e).then(t):t()):this.onError((0,tR.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),iR))},sR.prototype._handleRunSuccess=function(e,t){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&0<e.fields.length){this._fieldKeys=e.fields;for(var n=0;n<e.fields.length;n++)this._fieldLookup[e.fields[n]]=n}null!==e.db&&void 0!==this._onDb&&this._onDb(e.db),null!=e.fields&&delete e.fields,null!==e.qid&&void 0!==e.qid&&(this._queryId=e.qid,delete e.qid),this._storeMetadataForCompletion(e);var o=null,i=(this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys)),function(){r._head=r._fieldKeys,r._observers.some(function(e){return e.onKeys})&&r._observers.forEach(function(e){e.onKeys&&e.onKeys(r._fieldKeys)}),r._afterKeys&&r._afterKeys(r._fieldKeys),t()});o?Promise.resolve(o).then(i):i()}},sR.prototype._handleError=function(t){function e(){r._observers.some(function(e){return e.onError})&&r._observers.forEach(function(e){e.onError&&e.onError(t)}),r._afterError&&r._afterError(t)}var r=this,n=(this._setState(TR.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},sR.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},sR.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):(this._pulled=!0,this._moreFunction(this._queryId,this._fetchSize,this)),this._setState(TR.STREAMING)},sR.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},sR.prototype._setState=function(e){this._state=e},sR.prototype._setupAutoPull=function(){this._autoPull=!0};var aR,xv=sR;function sR(e){var e=void 0===e?{}:e,t=e.reactive,t=void 0!==t&&t,r=e.moreFunction,n=e.discardFunction,o=e.fetchSize,o=void 0===o?oR:o,i=e.beforeError,u=e.afterError,a=e.beforeKeys,s=e.afterKeys,c=e.beforeComplete,l=e.afterComplete,f=e.server,p=e.highRecordWatermark,p=void 0===p?Number.MAX_VALUE:p,d=e.lowRecordWatermark,d=void 0===d?Number.MAX_VALUE:d,h=e.enrichMetadata,e=e.onDb,b=aR.call(this)||this;return b._fieldKeys=null,b._fieldLookup=null,b._head=null,b._queuedRecords=[],b._tail=null,b._error=null,b._observers=[],b._meta={},b._server=f,b._beforeError=i,b._afterError=u,b._beforeKeys=a,b._afterKeys=s,b._beforeComplete=c,b._afterComplete=l,b._enrichMetadata=h||nR.functional.identity,b._queryId=null,b._moreFunction=r,b._discardFunction=n,b._discard=!1,b._fetchSize=o,b._lowRecordWatermark=d,b._highRecordWatermark=p,b._setState(t?TR.READY:TR.READY_STREAMING),b._setupAutoPull(),b._paused=!1,b._pulled=!t,b._haveRecordStreamed=!1,b._onDb=e,b}A.ResultStreamObserver=xv;Sv(lR,cR=Cv),lR.prototype.onNext=function(e){this.onError((0,tR.newError)("Received RECORD when initializing "+tR.json.stringify(e)))},lR.prototype.onError=function(e){this._onError&&this._onError(e)},lR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var cR,Hh=lR;function lR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=cR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.LoginObserver=Hh;Sv(pR,fR=Cv),pR.prototype.onNext=function(e){this.onError((0,tR.newError)("Received RECORD when logging off "+tR.json.stringify(e)))},pR.prototype.onError=function(e){this._onError&&this._onError(e)},pR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var fR,Uv=pR;function pR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=fR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.LogoffObserver=Uv;Sv(hR,dR=Cv),hR.prototype.onNext=function(e){this.onError((0,tR.newError)("Received RECORD when resetting: received record is: "+tR.json.stringify(e),iR))},hR.prototype.onError=function(e){e.code===iR&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},hR.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var dR,Bv=hR;function hR(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=dR.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}A.ResetObserver=Bv;Sv(yR,bR=xv),yR.prototype.onNext=function(e){this.onError((0,tR.newError)("Received RECORD when sending telemetry "+tR.json.stringify(e),iR))},yR.prototype.onError=function(e){this._onError&&this._onError(e)},yR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var bR,zv=yR;function yR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=bR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.TelemetryObserver=zv;Sv(vR,_R=xv);var _R,Yv=vR;function vR(e){var t=e.error,e=e.onError,e=_R.call(this,{beforeError:e})||this;return e.onError(t),e}A.FailedObserver=Yv;Sv(gR,mR=xv);var mR,em=gR;function gR(){var e=mR.call(this)||this;return mR.prototype.markCompleted.call(e),e}A.CompletedObserver=em;Sv(wR,OR=Cv),wR.prototype.onNext=function(e){this._records.push(e)},wR.prototype.onError=function(e){e.code===iR&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},wR.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,tR.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+tR.json.stringify(this._records),iR)):this._onCompleted&&this._onCompleted(rR.default.ofRecord(this._records[0]))};var OR,R_=wR;function wR(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=OR.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}A.ProcedureRouteObserver=R_;Sv(PR,ER=Cv),PR.prototype.onNext=function(e){this.onError((0,tR.newError)("Received RECORD when resetting: received record is: "+tR.json.stringify(e),iR))},PR.prototype.onError=function(e){e.code===iR&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},PR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(rR.default.ofMessageResponse(e))};var ER,um=PR;function PR(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=ER.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}A.RouteObserver=um;var TR={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(TR.STREAMING)})},onError:function(e,t){e._handleError(t)},name:function(){return"READY_STREAMING"},pull:function(){}},READY:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){return e._handleStreaming()})},onError:function(e,t){e._handleError(t)},name:function(){return"READY"},pull:function(e){return e._more()}},STREAMING:{onSuccess:function(e,t){t.has_more?e._handleHasMore(t):e._handlePullSuccess(t)},onError:function(e,t){e._handleError(t)},name:function(){return"STREAMING"},pull:function(){}},FAILED:{onError:function(e){},name:function(){return"FAILED"},pull:function(){}},SUCCEEDED:{name:function(){return"SUCCEEDED"},pull:function(){}}},SR=(Object.defineProperty(w_,"__esModule",{value:!0}),w_.assertDatabaseIsEmpty=function(e,t,r){void 0===t&&(t=function(){});if(e)throw e=(0,SR.newError)("Driver is connected to the database that does not support multiple databases. Please upgrade to neo4j 4.0.0 or later in order to use this functionality"),t(e.message),r.onError(e),e},w_.assertTxConfigIsEmpty=function(e,t,r){void 0===t&&(t=function(){});if(e&&!e.isEmpty())throw e=(0,SR.newError)("Driver is connected to the database that does not support transaction configuration. Please upgrade to neo4j 3.5.0 or later in order to use this functionality"),t(e.message),r.onError(e),e},w_.assertImpersonatedUserIsEmpty=function(e,t,r){void 0===t&&(t=function(){});if(e)throw e=(0,SR.newError)("Driver is connected to the database that does not support user impersonation. Please upgrade to neo4j 4.4.0 or later in order to use this functionality. "+"Trying to impersonate ".concat(e,".")),t(e.message),r.onError(e),e},w_.assertNotificationFilterIsEmpty=function(e,t,r){void 0===t&&(t=function(){});if(void 0!==e)throw e=(0,SR.newError)("Driver is connected to a database that does not support user notification filters. Please upgrade to Neo4j 5.7.0 or later in order to use this functionality. "+"Trying to set notifications to ".concat(SR.json.stringify(e),".")),t(e.message),r.onError(e),e},e);var cm={},Dp={},N_={},jR=(Object.defineProperty(N_,"__esModule",{value:!0}),N_.Structure=void 0,N_.verifyStructSize=function(e,t,r){if(t!==r)throw(0,jR.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),CR)},e),CR=jR.error.PROTOCOL_ERROR,Om=(Object.defineProperty(IR.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),IR.prototype.toString=function(){for(var e="",t=0;t<this.fields.length;t++)0<t&&(e+=", "),e+=this.fields[t];return"Structure("+this.signature+", ["+e+"])"},IR);function IR(e,t){this.signature=e,this.fields=t}N_.Structure=Om,N_.default=Om,Object.defineProperty(Dp,"__esModule",{value:!0}),Dp.Unpacker=Dp.Packer=void 0;var RR=Dd,AR=iv,kR=N_,MR=e,NR=MR.error.PROTOCOL_ERROR;function xR(e){this._ch=e,this._byteArraysSupported=!0}function DR(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}xR.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=AR.functional.identity);try{o=i(o)}catch(e){return function(){throw e}}if(null===o)return function(){return u._ch.writeUInt8(192)};if(!0===o)return function(){return u._ch.writeUInt8(195)};if(!1===o)return function(){return u._ch.writeUInt8(194)};if("number"==typeof o)return function(){return u.packFloat(o)};if("string"==typeof o)return function(){return u.packString(o)};if("bigint"==typeof o)return function(){return u.packInteger((0,MR.int)(o))};if((0,MR.isInt)(o))return function(){return u.packInteger(o)};if(o instanceof Int8Array)return function(){return u.packBytes(o)};if(o instanceof Array)return function(){u.packListHeader(o.length);for(var e=0;e<o.length;e++)u.packable(void 0===o[e]?null:o[e],i)()};if(null!=(e=o)&&"function"==typeof e[Symbol.iterator])return this.packableIterable(o,i);if(o instanceof kR.Structure){for(var t=[],r=0;r<o.fields.length;r++)t[r]=this.packable(o.fields[r],i);return function(){return u.packStruct(o.signature,t)}}return"object"==typeof o?function(){for(var e=Object.keys(o),t=0,r=0;r<e.length;r++)void 0!==o[e[r]]&&t++;u.packMapHeader(t);for(r=0;r<e.length;r++){var n=e[r];void 0!==o[n]&&(u.packString(n),u.packable(o[n],i)())}}:this._nonPackableValue("Unable to pack the given value: ".concat(o))},xR.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,MR.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},xR.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},xR.prototype.packInteger=function(e){var t=e.high,r=e.low;e.greaterThanOrEqual(-16)&&e.lessThan(128)?this._ch.writeInt8(r):e.greaterThanOrEqual(-128)&&e.lessThan(-16)?(this._ch.writeUInt8(200),this._ch.writeInt8(r)):e.greaterThanOrEqual(-32768)&&e.lessThan(32768)?(this._ch.writeUInt8(201),this._ch.writeInt16(r)):(e.greaterThanOrEqual(-2147483648)&&e.lessThan(2147483648)?this._ch.writeUInt8(202):(this._ch.writeUInt8(203),this._ch.writeInt32(t)),this._ch.writeInt32(r))},xR.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},xR.prototype.packString=function(e){var e=RR.utf8.encode(e),t=e.length;if(t<16)this._ch.writeUInt8(128|t),this._ch.writeBytes(e);else if(t<256)this._ch.writeUInt8(208),this._ch.writeUInt8(t),this._ch.writeBytes(e);else if(t<65536)this._ch.writeUInt8(209),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256),this._ch.writeBytes(e);else{if(!(t<4294967296))throw(0,MR.newError)("UTF-8 strings of size "+t+" are not supported");this._ch.writeUInt8(210),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256),this._ch.writeBytes(e)}},xR.prototype.packListHeader=function(e){if(e<16)this._ch.writeUInt8(144|e);else if(e<256)this._ch.writeUInt8(212),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(213),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,MR.newError)("Lists of size "+e+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},xR.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,MR.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(e.length);for(var t=0;t<e.length;t++)this._ch.writeInt8(e[t])},xR.prototype.packBytesHeader=function(e){if(e<256)this._ch.writeUInt8(204),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(205),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,MR.newError)("Byte arrays of size "+e+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},xR.prototype.packMapHeader=function(e){if(e<16)this._ch.writeUInt8(160|e);else if(e<256)this._ch.writeUInt8(216),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,MR.newError)("Maps of size "+e+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},xR.prototype.packStructHeader=function(e,t){if(e<16)this._ch.writeUInt8(176|e),this._ch.writeUInt8(t);else if(e<256)this._ch.writeUInt8(220),this._ch.writeUInt8(e),this._ch.writeUInt8(t);else{if(!(e<65536))throw(0,MR.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},xR.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},xR.prototype._nonPackableValue=function(e){return function(){throw(0,MR.newError)(e,NR)}},Dp.Packer=xR,DR.prototype.unpack=function(e,t){void 0===t&&(t=AR.functional.identity);var r=e.readUInt8(),n=240&r,o=15&r;if(192===r)return null;var i=this._unpackBoolean(r);if(null!==i)return i;i=this._unpackNumberOrInteger(r,e);if(null!==i){if((0,MR.isInt)(i)){if(this._useBigInt)return i.toBigInt();if(this._disableLosslessIntegers)return i.toNumberOrInfinity()}return i}i=this._unpackString(r,n,o,e);if(null!==i)return i;i=this._unpackList(r,n,o,e,t);if(null!==i)return i;i=this._unpackByteArray(r,e);if(null!==i)return i;i=this._unpackMap(r,n,o,e,t);if(null!==i)return i;i=this._unpackStruct(r,n,o,e,t);if(null!==i)return i;throw(0,MR.newError)("Unknown packed value with marker "+r.toString(16))},DR.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,MR.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},DR.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},DR.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},DR.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,MR.int)(e):240<=e&&e<256?(0,MR.int)(e-256):200===e?(0,MR.int)(t.readInt8()):201===e?(0,MR.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,MR.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new MR.Integer(e,r)):null},DR.prototype._unpackString=function(e,t,r,n){return 128===t?RR.utf8.decode(n,r):208===e?RR.utf8.decode(n,n.readUInt8()):209===e?RR.utf8.decode(n,n.readUInt16()):210===e?RR.utf8.decode(n,n.readUInt32()):null},DR.prototype._unpackList=function(e,t,r,n,o){return 144===t?this._unpackListWithSize(r,n,o):212===e?this._unpackListWithSize(n.readUInt8(),n,o):213===e?this._unpackListWithSize(n.readUInt16(),n,o):214===e?this._unpackListWithSize(n.readUInt32(),n,o):null},DR.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},DR.prototype._unpackByteArray=function(e,t){return 204===e?this._unpackByteArrayWithSize(t.readUInt8(),t):205===e?this._unpackByteArrayWithSize(t.readUInt16(),t):206===e?this._unpackByteArrayWithSize(t.readUInt32(),t):null},DR.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},DR.prototype._unpackMap=function(e,t,r,n,o){return 160===t?this._unpackMapWithSize(r,n,o):216===e?this._unpackMapWithSize(n.readUInt8(),n,o):217===e?this._unpackMapWithSize(n.readUInt16(),n,o):218===e?this._unpackMapWithSize(n.readUInt32(),n,o):null},DR.prototype._unpackMapWithSize=function(e,t,r){for(var n={},o=0;o<e;o++)n[this.unpack(t,r)]=this.unpack(t,r);return n},DR.prototype._unpackStruct=function(e,t,r,n,o){return 176===t?this._unpackStructWithSize(r,n,o):220===e?this._unpackStructWithSize(n.readUInt8(),n,o):221===e?this._unpackStructWithSize(n.readUInt16(),n,o):null},DR.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new kR.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},Dp.Unpacker=DR;var LR,UR,FR,Tm={},xm=r&&r.__extends||(LR=function(e,t){return(LR=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])})(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}LR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),BR=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),VR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),md=r&&r.__importStar||(UR=function(e){return(UR=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=UR(e),n=0;n<r.length;n++)"default"!==r[n]&&BR(t,e,r[n]);return VR(t,e),t}),Cm=(Object.defineProperty(Tm,"__esModule",{value:!0}),Tm.Unpacker=Tm.Packer=void 0,md(Dp)),gd=(FR=Cm.Packer,xm(qR,FR),qR.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},qR);function qR(){return null!==FR&&FR.apply(this,arguments)||this}Tm.Packer=gd;WR=Cm.Unpacker,xm(zR,WR);var WR,Im=zR;function zR(e,t){return WR.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}Tm.Unpacker=Im;var HR,GR=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),YR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),km=r&&r.__importStar||(HR=function(e){return(HR=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=HR(e),n=0;n<r.length;n++)"default"!==r[n]&&GR(t,e,r[n]);return YR(t,e),t}),Od=(Object.defineProperty(cm,"__esModule",{value:!0}),cm.structure=cm.v2=cm.v1=void 0,km(Dp)),Hm=(cm.v1=Od,km(Tm)),Km=(cm.v2=Hm,km(N_)),v=(cm.structure=Km,cm.default=Hm,{}),KR=(Object.defineProperty(v,"__esModule",{value:!0}),v.SIGNATURES=void 0,e),Jm=KR.internal.constants,ZR=Jm.ACCESS_MODE_READ,QR=Jm.FETCH_ALL,XR=KR.internal.util.assertString,o0=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,TELEMETRY:84,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),Wt=(v.SIGNATURES=o0,N.init=function(e,t){return new N(1,[e,t],function(){return"INIT ".concat(e," {...}")})},N.run=function(e,t){return new N(16,[e,t],function(){return"RUN ".concat(e," ").concat(KR.json.stringify(t))})},N.pullAll=function(){return rA},N.reset=function(){return nA},N.hello=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);t=Object.assign({user_agent:e},t);return r&&(t.routing=r),n&&(t.patch_bolt=n),new N(1,[t],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},N.hello5x1=function(e,t){var r={user_agent:e};return(t=void 0===t?null:t)&&(r.routing=t),new N(1,[r],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},N.hello5x2=function(e,t,r){void 0===r&&(r=null);var n={user_agent:e};return eA(n,t=void 0===t?null:t),r&&(n.routing=r),new N(1,[n],function(){return"HELLO ".concat(KR.json.stringify(n))})},N.hello5x3=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),eA(o,r),n&&(o.routing=n),new N(1,[o],function(){return"HELLO ".concat(KR.json.stringify(o))})},N.hello5x5=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),tA(o,r),n&&(o.routing=n),new N(1,[o],function(){return"HELLO ".concat(KR.json.stringify(o))})},N.logon=function(e){return new N(106,[e],function(){return"LOGON { ... }"})},N.logoff=function(){return new N(107,[],function(){return"LOGOFF"})},N.begin=function(e){var e=void 0===e?{}:e,t=JR(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new N(17,[t],function(){return"BEGIN ".concat(KR.json.stringify(t))})},N.begin5x5=function(e){var e=void 0===e?{}:e,t=JR(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter,{appendNotificationFilter:tA});return new N(17,[t],function(){return"BEGIN ".concat(KR.json.stringify(t))})},N.commit=function(){return oA},N.rollback=function(){return iA},N.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=JR(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new N(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(KR.json.stringify(t)," ").concat(KR.json.stringify(n))})},N.runWithMetadata5x5=function(e,t,r){var r=void 0===r?{}:r,n=JR(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter,{appendNotificationFilter:tA});return new N(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(KR.json.stringify(t)," ").concat(KR.json.stringify(n))})},N.goodbye=function(){return uA},N.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=$R(null==t?-1:t,(void 0===e?QR:e)||QR);return new N(63,[r],function(){return"PULL ".concat(KR.json.stringify(r))})},N.discard=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=$R(null==t?-1:t,(void 0===e?QR:e)||QR);return new N(47,[r],function(){return"DISCARD ".concat(KR.json.stringify(r))})},N.telemetry=function(e){var e=e.api,t=(0,KR.int)(e);return new N(84,[t],function(){return"TELEMETRY ".concat(t.toString())})},N.route=function(e,t,r){return new N(102,[e=void 0===e?{}:e,t=void 0===t?[]:t,r=void 0===r?null:r],function(){return"ROUTE ".concat(KR.json.stringify(e)," ").concat(KR.json.stringify(t)," ").concat(r)})},N.routeV4x4=function(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]);var n={};return(r=void 0===r?{}:r).databaseName&&(n.db=r.databaseName),r.impersonatedUser&&(n.imp_user=r.impersonatedUser),new N(102,[e,t,n],function(){return"ROUTE ".concat(KR.json.stringify(e)," ").concat(KR.json.stringify(t)," ").concat(KR.json.stringify(n))})},N);function N(e,t,r){this.signature=e,this.fields=t,this.toString=r}function JR(e,t,r,n,o,i,u){void 0===u&&(u={});var a={};return e.isEmpty()||(a.bookmarks=e.values()),null!==t.timeout&&(a.tx_timeout=t.timeout),t.metadata&&(a.tx_metadata=t.metadata),r&&(a.db=XR(r,"database")),o&&(a.imp_user=XR(o,"impersonatedUser")),n===ZR&&(a.mode="r"),(null!=(e=u.appendNotificationFilter)?e:eA)(a,i),a}function $R(e,t){t={n:(0,KR.int)(t)};return-1!==e&&(t.qid=(0,KR.int)(e)),t}function eA(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_categories=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_categories=t.disabledClassifications))}function tA(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_classifications=t.disabledCategories),t.disabledClassifications&&(e.notifications_disabled_classifications=t.disabledClassifications))}var rA=new(v.default=Wt)(63,[],function(){return"PULL_ALL"}),nA=new Wt(15,[],function(){return"RESET"}),oA=new Wt(18,[],function(){return"COMMIT"}),iA=new Wt(19,[],function(){return"ROLLBACK"}),uA=new Wt(2,[],function(){return"GOODBYE"}),a0={},c0={},aA=(Object.defineProperty(c0,"__esModule",{value:!0}),c0.TypeTransformer=void 0,cm),sA=e.internal.objectUtil;function cA(e){this._transformers=e,this._transformersPerSignature=new Map(e.map(function(e){return[e.signature,e]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}function lA(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;this.signature=t,this.isTypeInstance=e,this.fromStructure=r,this.toStructure=n,Object.freeze(this)}cA.prototype.fromStructure=function(e){try{return e instanceof aA.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return sA.createBrokenObject(e)}},cA.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},c0.default=cA,lA.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new lA({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},c0.TypeTransformer=lA;var fA=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},pA=(Object.defineProperty(a0,"__esModule",{value:!0}),e),dA=cm,hA=c0,bA=pA.error.PROTOCOL_ERROR;a0.default={createNodeTransformer:function(){return new hA.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof pA.Node},toStructure:function(e){throw(0,pA.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),bA)},fromStructure:function(e){dA.structure.verifyStructSize("Node",3,e.size);var e=fA(e.fields,3),t=e[0],r=e[1],e=e[2];return new pA.Node(t,r,e)}})},createRelationshipTransformer:function(){return new hA.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof pA.Relationship},toStructure:function(e){throw(0,pA.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),bA)},fromStructure:function(e){dA.structure.verifyStructSize("Relationship",5,e.size);var e=fA(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new pA.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new hA.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof pA.UnboundRelationship},toStructure:function(e){throw(0,pA.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),bA)},fromStructure:function(e){dA.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=fA(e.fields,3),t=e[0],r=e[1],e=e[2];return new pA.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new hA.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof pA.Path},toStructure:function(e){throw(0,pA.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),bA)},fromStructure:function(e){dA.structure.verifyStructSize("Path",3,e.size);for(var e=fA(e.fields,3),t=e[0],r=e[1],n=e[2],o=[],i=t[0],u=0;u<n.length;u+=2){var a=t[n[u+1]],s=(0,pA.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof pA.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof pA.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new pA.PathSegment(i,c,a)),i=a}return new pA.Path(t[0],t[t.length-1],o)}})},createVectorTransformer:function(){return new hA.TypeTransformer({signature:86,isTypeInstance:function(e){return e instanceof pA.Vector},toStructure:function(e){throw(0,pA.newError)("Sending vector types require server and driver to be communicating with Bolt protocol 6.0 or later. Please update your database version.")},fromStructure:function(e){throw(0,pA.newError)("Server tried to send Vector object, but server and driver are communicating on a version of the Bolt protocol that does not support vectors.")}})}};var yA,_A=r&&r.__assign||function(){return(_A=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},vA=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),mA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),d0=r&&r.__importStar||(yA=function(e){return(yA=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=yA(e),n=0;n<r.length;n++)"default"!==r[n]&&vA(t,e,r[n]);return mA(t,e),t}),y0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gA=(Object.defineProperty(v_,"__esModule",{value:!0}),w_),OA=cm,wA=d0(v),EA=A,PA=e,TA=y0(a0),SA=y0(c0),jA=PA.internal.bookmarks.Bookmarks,m0=PA.internal.constants,CA=m0.ACCESS_MODE_WRITE,IA=m0.BOLT_PROTOCOL_V1,RA=(PA.internal.logger.Logger,PA.internal.txConfig.TxConfig),AA=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),i=(Object.defineProperty(kA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new SA.default(Object.values(TA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(kA.prototype,"version",{get:function(){return IA},enumerable:!1,configurable:!0}),Object.defineProperty(kA.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(kA.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(kA.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),kA.prototype.packer=function(){return this._packer},kA.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},kA.prototype.unpacker=function(){return this._unpacker},kA.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},kA.prototype.transformMetadata=function(e){return e},kA.prototype.enrichErrorMetadata=function(e){return _A(_A({},e),{diagnostic_record:null!==e.diagnostic_record?_A(_A({},AA),e.diagnostic_record):null})},kA.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new EA.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,gA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(wA.default.init(r,n),e,!0),e},kA.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=(e.flush,new EA.LogoffObserver({onCompleted:t,onError:r})),t=(0,PA.newError)("Driver is connected to a database that does not support logoff. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(t.message),e.onError(t),t},kA.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=(e.flush,new EA.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,PA.newError)("Driver is connected to a database that does not support logon. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(i.message),e.onError(i),i},kA.prototype.prepareToClose=function(){},kA.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete;return this.run("BEGIN",t?t.asBeginTransactionParameters():{},{bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e,flush:!1})},kA.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("COMMIT",{},{bookmarks:jA.empty(),txConfig:RA.empty(),mode:CA,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},kA.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("ROLLBACK",{},{bookmarks:jA.empty(),txConfig:RA.empty(),mode:CA,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},kA.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=(r.bookmarks,r.txConfig),o=r.database,i=(r.mode,r.impersonatedUser),u=r.notificationFilter,a=r.beforeKeys,s=r.afterKeys,c=r.beforeError,l=r.afterError,f=r.beforeComplete,p=r.afterComplete,d=r.flush,d=void 0===d||d,h=r.highRecordWatermark,h=void 0===h?Number.MAX_VALUE:h,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,a=new EA.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,gA.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,gA.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,gA.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,gA.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(wA.default.run(e,t),a,!1),this.write(wA.default.pullAll(),a,d),a},Object.defineProperty(kA.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),kA.prototype.reset=function(e){var e=void 0===e?{}:e,t=e.onError,e=e.onComplete,t=new EA.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(wA.default.reset(),t,!0),t},kA.prototype.telemetry=function(e,t){e.api;e=void 0===t?{}:t,e.onError,t=e.onCompleted,e=new EA.CompletedObserver;return t&&t(),e},kA.prototype._createPacker=function(e){return new OA.v1.Packer(e)},kA.prototype._createUnpacker=function(e,t){return new OA.v1.Unpacker(e,t)},kA.prototype.write=function(e,t,r){this._lastMessageSignature=e.signature;var n=new OA.structure.Structure(e.signature,e.fields);this.packable(n)(),this.queueObserverIfProtocolIsNotBroken(t)&&(this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._chunker.messageBoundary(),r&&this._chunker.flush())},kA.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===wA.SIGNATURES.HELLO||this._lastMessageSignature===wA.SIGNATURES.LOGON},kA.prototype.isLastMessageReset=function(){return this._lastMessageSignature===wA.SIGNATURES.RESET},kA.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},kA.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},kA.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},kA.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},kA.prototype.isBroken=function(){return!!this._fatalError},kA.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},kA.prototype.resetFailure=function(){this._responseHandler._resetFailure()},kA.prototype._onLoginCompleted=function(e,t,r){this._initialized=!0,this._authToken=t,e&&(t=e.server,this._server.version||(this._server.version=t)),r&&r(e)},kA.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},kA);function kA(e,t,r,n,o,i){var r=void 0===r?{}:r,u=r.disableLosslessIntegers,r=r.useBigInt;void 0===n&&(n=function(){return null}),this._server=e||{},this._chunker=t,this._packer=this._createPacker(t),this._unpacker=this._createUnpacker(u,r),this._responseHandler=n(this),this._log=o,this._onProtocolError=i,this._fatalError=null,this._lastMessageSignature=null,this._config={disableLosslessIntegers:u,useBigInt:r}}v_.default=i;var E0={},dy={},I0={},MA=(Object.defineProperty(I0,"__esModule",{value:!0}),I0.epochDayToDate=qA,I0.nanoOfDayToLocalTime=WA,I0.epochSecondAndNanoToLocalDateTime=function(e,t){var r=BA(e,FA),e=VA(e,FA).multiply(UA).add(t),t=qA(r),r=WA(e);return new MA.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)},e),x0=MA.internal.temporalUtil,NA=x0.DAYS_0000_TO_1970,xA=x0.DAYS_PER_400_YEAR_CYCLE,DA=x0.NANOS_PER_HOUR,LA=x0.NANOS_PER_MINUTE,UA=x0.NANOS_PER_SECOND,FA=x0.SECONDS_PER_DAY,BA=x0.floorDiv,VA=x0.floorMod;function qA(e){var e=(e=(0,MA.int)(e)).add(NA).subtract(60),t=(0,MA.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(xA).subtract(1)).multiply(400),e=e.add(r.multiply(-xA))),e.multiply(400).add(591).div(xA)),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400))),e=(n.lessThan(0)&&(r=r.subtract(1),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400)))),r=r.add(t),n),t=e.multiply(5).add(2).div(153),n=t.add(2).modulo(12).add(1),e=e.subtract(t.multiply(306).add(5).div(10)).add(1),r=r.add(t.div(10));return new MA.Date(r,n,e)}function WA(e){var t=(e=(0,MA.int)(e)).div(DA),r=(e=e.subtract(t.multiply(DA))).div(LA),n=(e=e.subtract(r.multiply(LA))).div(UA),e=e.subtract(n.multiply(UA));return new MA.LocalTime(t,r,n,e)}var zA=r&&r.__assign||function(){return(zA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},HA=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},B0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},GA=(Object.defineProperty(dy,"__esModule",{value:!0}),e),YA=cm,KA=c0,ZA=I0,G0=B0(a0),zn=GA.internal.temporalUtil,QA=zn.dateToEpochDay,XA=zn.localDateTimeToEpochSecond,JA=zn.localTimeToNanoOfDay;function $A(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,GA.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}dy.default=zA(zA({},G0.default),{createPoint2DTransformer:function(){return new KA.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,GA.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new YA.structure.Structure(88,[(0,GA.int)(e.srid),e.x,e.y])},fromStructure:function(e){YA.structure.verifyStructSize("Point2D",3,e.size);var e=HA(e.fields,3),t=e[0],r=e[1],e=e[2];return new GA.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new KA.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,GA.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new YA.structure.Structure(89,[(0,GA.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){YA.structure.verifyStructSize("Point3D",4,e.size);var e=HA(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new GA.Point(t,r,n,e)}})},createDurationTransformer:function(){return new KA.TypeTransformer({signature:69,isTypeInstance:GA.isDuration,toStructure:function(e){var t=(0,GA.int)(e.months),r=(0,GA.int)(e.days),n=(0,GA.int)(e.seconds),e=(0,GA.int)(e.nanoseconds);return new YA.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){YA.structure.verifyStructSize("Duration",4,e.size);var e=HA(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new GA.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new KA.TypeTransformer({signature:116,isTypeInstance:GA.isLocalTime,toStructure:function(e){e=JA(e.hour,e.minute,e.second,e.nanosecond);return new YA.structure.Structure(116,[e])},fromStructure:function(e){YA.structure.verifyStructSize("LocalTime",1,e.size);e=HA(e.fields,1)[0];return $A((0,ZA.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new KA.TypeTransformer({signature:84,isTypeInstance:GA.isTime,toStructure:function(e){var t=JA(e.hour,e.minute,e.second,e.nanosecond),e=(0,GA.int)(e.timeZoneOffsetSeconds);return new YA.structure.Structure(84,[t,e])},fromStructure:function(e){YA.structure.verifyStructSize("Time",2,e.size);var e=HA(e.fields,2),t=e[0],e=e[1],t=(0,ZA.nanoOfDayToLocalTime)(t);return $A(new GA.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new KA.TypeTransformer({signature:68,isTypeInstance:GA.isDate,toStructure:function(e){e=QA(e.year,e.month,e.day);return new YA.structure.Structure(68,[e])},fromStructure:function(e){YA.structure.verifyStructSize("Date",1,e.size);e=HA(e.fields,1)[0];return $A((0,ZA.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new KA.TypeTransformer({signature:100,isTypeInstance:GA.isLocalDateTime,toStructure:function(e){var t=XA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,GA.int)(e.nanosecond);return new YA.structure.Structure(100,[t,e])},fromStructure:function(e){YA.structure.verifyStructSize("LocalDateTime",2,e.size);var e=HA(e.fields,2),t=e[0],e=e[1];return $A((0,ZA.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new KA.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,GA.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=XA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,GA.int)(e.nanosecond),e=e.timeZoneId;return new YA.structure.Structure(102,[t,r,e])},fromStructure:function(e){YA.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=HA(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,ZA.epochSecondAndNanoToLocalDateTime)(t,r);return $A(new GA.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,null,e),n,o)}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new KA.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,GA.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=XA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,GA.int)(e.nanosecond),e=(0,GA.int)(e.timeZoneOffsetSeconds);return new YA.structure.Structure(70,[t,r,e])},fromStructure:function(e){YA.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=HA(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,ZA.epochSecondAndNanoToLocalDateTime)(t,r);return $A(new GA.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var ek,tk,X0=r&&r.__extends||(ek=function(e,t){return(ek=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])})(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}ek(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),rg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ug=(Object.defineProperty(E0,"__esModule",{value:!0}),rg(v_)),rk=rg(cm),hy=e,nk=rg(dy),ok=rg(c0),ik=hy.internal.constants.BOLT_PROTOCOL_V2,dg=(tk=ug.default,X0(uk,tk),uk.prototype._createPacker=function(e){return new rk.default.Packer(e)},uk.prototype._createUnpacker=function(e,t){return new rk.default.Unpacker(e,t)},Object.defineProperty(uk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new ok.default(Object.values(nk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(uk.prototype,"version",{get:function(){return ik},enumerable:!1,configurable:!0}),uk);function uk(){return null!==tk&&tk.apply(this,arguments)||this}E0.default=dg;var ak,sk,Og={},Pg={},ck=r&&r.__assign||function(){return(ck=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Rg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kg=(Object.defineProperty(Pg,"__esModule",{value:!0}),Rg(dy)),Dg=(Pg.default=ck({},kg.default),r&&r.__extends||(ak=function(e,t){return(ak=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])})(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}ak(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),lk=r&&r.__assign||function(){return(lk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Vg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zg=(Object.defineProperty(Og,"__esModule",{value:!0}),Vg(E0)),fk=Vg(v),pk=w_,dk=A,hk=Vg(Pg),bk=Vg(c0),yk=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),_k=e.internal.txConfig.TxConfig,vk="context",mk="CALL dbms.cluster.routing.getRoutingTable($".concat(vk,")"),gk=new dk.StreamObserver,Rf=(sk=zg.default,Dg(Ok,sk),Object.defineProperty(Ok.prototype,"version",{get:function(){return yk},enumerable:!1,configurable:!0}),Object.defineProperty(Ok.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new bk.default(Object.values(hk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Ok.prototype.transformMetadata=function(e){return"t_first"in e&&(e.result_available_after=e.t_first,delete e.t_first),"t_last"in e&&(e.result_consumed_after=e.t_last,delete e.t_last),e},Ok.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new dk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,pk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(fk.default.hello(r,n),e,!0),e},Ok.prototype.prepareToClose=function(){this.write(fk.default.goodbye(),gk,!0)},Ok.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new dk.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,pk.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,pk.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,pk.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(fk.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},Ok.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new dk.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(fk.default.commit(),t,!0),t},Ok.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new dk.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(fk.default.rollback(),t,!0),t},Ok.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.highRecordWatermark,y=void 0===y?Number.MAX_VALUE:y,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new dk.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,pk.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,pk.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,pk.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(fk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(fk.default.pullAll(),c,b),c},Ok.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,r=this.run(mk,((t={})[vk]=void 0===r?{}:r,t),lk(lk({},n),{txConfig:_k.empty()}));return new dk.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},Ok);function Ok(){return null!==sk&&sk.apply(this,arguments)||this}Og.default=Rf;var wk,Ek,Kg={},Zg={},Pk=r&&r.__assign||function(){return(Pk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},tO=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},oO=(Object.defineProperty(Zg,"__esModule",{value:!0}),tO(Pg)),S_=(Zg.default=Pk({},oO.default),r&&r.__extends||(wk=function(e,t){return(wk=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])})(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}wk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Tk=r&&r.__assign||function(){return(Tk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},lm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},aO=(Object.defineProperty(Kg,"__esModule",{value:!0}),lm(Og)),Sk=lm(v),jk=w_,Ck=A,Ik=lm(Zg),Rk=lm(c0),pO=(e.internal.bookmarks.Bookmarks,e.internal.constants),Ak=pO.BOLT_PROTOCOL_V4_0,kk=pO.FETCH_ALL,Mk=e.internal.txConfig.TxConfig,Nk="context",xk="database",Dk="CALL dbms.routing.getRoutingTable($".concat(Nk,", $").concat(xk,")"),bO=(Ek=aO.default,S_(Lk,Ek),Object.defineProperty(Lk.prototype,"version",{get:function(){return Ak},enumerable:!1,configurable:!0}),Object.defineProperty(Lk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Rk.default(Object.values(Ik.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Lk.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new Ck.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,jk.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,jk.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(Sk.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},Lk.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?kk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new Ck.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,jk.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,jk.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(Sk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(Sk.default.pull({n:_}),c,b),c},Lk.prototype._requestMore=function(e,t,r){this.write(Sk.default.pull({stmtId:e,n:t}),r,!0)},Lk.prototype._requestDiscard=function(e,t){this.write(Sk.default.discard({stmtId:e}),t,!0)},Lk.prototype._noOp=function(){},Lk.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.databaseName,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,r=this.run(Dk,((t={})[Nk]=void 0===r?{}:r,t[xk]=n,t),Tk(Tk({},o),{txConfig:Mk.empty()}));return new Ck.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},Lk);function Lk(){return null!==Ek&&Ek.apply(this,arguments)||this}Kg.default=bO;var Uk,Fk,y={},EO={},Bk=r&&r.__assign||function(){return(Bk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},sv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},jO=(Object.defineProperty(EO,"__esModule",{value:!0}),sv(Zg)),$l=(EO.default=Bk({},jO.default),r&&r.__extends||(Uk=function(e,t){return(Uk=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])})(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}Uk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),kO=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ff=(Object.defineProperty(y,"__esModule",{value:!0}),kO(Kg)),Vk=kO(v),qk=A,py=e,Wk=w_,zk=kO(EO),Hk=kO(c0),Gk=py.internal.constants.BOLT_PROTOCOL_V4_1,o=(Fk=Ff.default,$l(Yk,Fk),Object.defineProperty(Yk.prototype,"version",{get:function(){return Gk},enumerable:!1,configurable:!0}),Object.defineProperty(Yk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Hk.default(Object.values(zk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Yk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new qk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,Wk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(Vk.default.hello(r,n,this._serversideRouting),e,!0),e},Yk);function Yk(e,t,r,n,o,i,u){e=Fk.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}y.default=o;var Kk,Zk,WO={},KO={},Qk=r&&r.__assign||function(){return(Qk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Sf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},O=(Object.defineProperty(KO,"__esModule",{value:!0}),Sf(EO)),bw=(KO.default=Qk({},O.default),r&&r.__extends||(Kk=function(e,t){return(Kk=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])})(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}Kk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},p=(Object.defineProperty(WO,"__esModule",{value:!0}),b(y)),I=e,Xk=b(KO),Jk=b(c0),$k=I.internal.constants.BOLT_PROTOCOL_V4_2,j=(Zk=p.default,bw(eM,Zk),Object.defineProperty(eM.prototype,"version",{get:function(){return $k},enumerable:!1,configurable:!0}),Object.defineProperty(eM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Jk.default(Object.values(Xk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),eM);function eM(){return null!==Zk&&Zk.apply(this,arguments)||this}WO.default=j;var gt={},g={},tM=r&&r.__assign||function(){return(tM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ln=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},E=(Object.defineProperty(g,"__esModule",{value:!0}),ln(KO)),rc=(g.default=tM({},E.default),{}),T={},rM=r&&r.__assign||function(){return(rM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},n=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},t=(Object.defineProperty(T,"__esModule",{value:!0}),n(g)),nM=(T.default=rM({},t.default),r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}),P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},oM=(Object.defineProperty(rc,"__esModule",{value:!0}),cm),iM=e,uM=P(T),aM=I0,sM=av,cM=iM.internal.temporalUtil.localDateTimeToEpochSecond;var lM=new Map;function fM(e,t,r){e=e,lM.has(e)||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),lM.set(e,n));var n=lM.get(e),e=(0,iM.int)(t).multiply(1e3).add((0,iM.int)(r).div(1e6)).toNumber(),r=n.formatToParts(e).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:sM.identity:"hour"===t.type?e.hour=(0,iM.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,iM.int)(t.value)),e},{}),e=(r.year=r.adjustEra(r.year),cM(r.year,r.month,r.day,r.hour,r.minute,r.second,r.nanosecond));return r.timeZoneOffsetSeconds=e.subtract(t),r.hour=r.hour.modulo(24),r}function pM(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,iM.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}rc.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return uM.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){oM.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=nM(e.fields,3),t=e[0],r=e[1],e=e[2],t=fM(e,t,r);return pM(new iM.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,iM.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=cM(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=null!=e.timeZoneOffsetSeconds?e.timeZoneOffsetSeconds:(r=e.timeZoneId,i=t,o=e.nanosecond,n=fM(r,i,o),n=cM(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=fM(r,i,o),cM(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i)),n=(null==e.timeZoneOffsetSeconds&&u.warn('DateTime objects without "timeZoneOffsetSeconds" property are prune to bugs related to ambiguous times. For instance, 2022-10-30T2:30:00[Europe/Berlin] could be GMT+1 or GMT+2.'),t.subtract(r)),o=(0,iM.int)(e.nanosecond),i=e.timeZoneId;return new oM.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return uM.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=cM(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,iM.int)(e.nanosecond),e=(0,iM.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new oM.structure.Structure(73,[t,r,e])},fromStructure:function(e){oM.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=nM(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,iM.int)(t).add(e),t=(0,aM.epochSecondAndNanoToLocalDateTime)(t,r);return pM(new iM.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var dM,hM,h=r&&r.__extends||(dM=function(e,t){return(dM=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])})(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}dM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),bM=r&&r.__assign||function(){return(bM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Hn=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Gt=(Object.defineProperty(gt,"__esModule",{value:!0}),Hn(WO)),yM=Hn(v),_M=A,vM=w_,mM=Hn(g),gM=Hn(rc),OM=Hn(c0),wM=e.internal.bookmarks.Bookmarks,EM=e.internal.constants.BOLT_PROTOCOL_V4_3,u=(hM=Gt.default,h(PM,hM),Object.defineProperty(PM.prototype,"version",{get:function(){return EM},enumerable:!1,configurable:!0}),Object.defineProperty(PM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new OM.default(Object.values(mM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),PM.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,o=new _M.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||wM.empty();return this.write(yM.default.route(t,e.values(),r),o,!0),o},PM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new _M.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return void 0!==e.patch_bolt&&t._applyPatches(e.patch_bolt),t._onLoginCompleted(e,n,u)}});return(0,vM.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(yM.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},PM.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},PM.prototype._applyUtcPatch=function(){var t=this;this._transformer=new OM.default(Object.values(bM(bM({},mM.default),gM.default)).map(function(e){return e(t._config,t._log)}))},PM);function PM(){return null!==hM&&hM.apply(this,arguments)||this}gt.default=u;var TM,SM,Yl={},Kf=r&&r.__extends||(TM=function(e,t){return(TM=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])})(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}TM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),jM=r&&r.__assign||function(){return(jM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Bl=(Object.defineProperty(Yl,"__esModule",{value:!0}),m(gt)),xf=e,CM=m(v),IM=A,RM=w_,AM=m(T),kM=m(rc),MM=m(c0),ql=xf.internal.constants,NM=ql.BOLT_PROTOCOL_V4_4,xM=ql.FETCH_ALL,DM=xf.internal.bookmarks.Bookmarks,Kl=(SM=Bl.default,Kf(LM,SM),Object.defineProperty(LM.prototype,"version",{get:function(){return NM},enumerable:!1,configurable:!0}),Object.defineProperty(LM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new MM.default(Object.values(AM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),LM.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.impersonatedUser,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,i=new IM.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||DM.empty();return this.write(CM.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},LM.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?xM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new IM.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,RM.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(CM.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(CM.default.pull({n:_}),c,b),c},LM.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new IM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,RM.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(CM.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},LM.prototype._applyUtcPatch=function(){var t=this;this._transformer=new MM.default(Object.values(jM(jM({},AM.default),kM.default)).map(function(e){return e(t._config,t._log)}))},LM);function LM(){return null!==SM&&SM.apply(this,arguments)||this}Yl.default=Kl;var _={},Hl={},UM=r&&r.__assign||function(){return(UM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},FM=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Jp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},BM=(Object.defineProperty(Hl,"__esModule",{value:!0}),cm),VM=e,qM=Jp(T),id=Jp(rc);Hl.default=UM(UM(UM({},qM.default),id.default),{createNodeTransformer:function(e){return qM.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){BM.structure.verifyStructSize("Node",4,e.size);var e=FM(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new VM.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return qM.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){BM.structure.verifyStructSize("Relationship",8,e.size);var e=FM(e.fields,8),t=e[0],r=e[1],n=e[2],o=e[3],i=e[4],u=e[5],a=e[6],e=e[7];return new VM.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return qM.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){BM.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=FM(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new VM.UnboundRelationship(t,r,n,e)}})}});var WM,zM,Fl=r&&r.__extends||(WM=function(e,t){return(WM=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])})(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}WM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Vf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},c=(Object.defineProperty(_,"__esModule",{value:!0}),Vf(Yl)),HM=w_,GM=Vf(Hl),YM=Vf(c0),KM=Vf(v),ZM=A,QM=e.internal.constants.BOLT_PROTOCOL_V5_0,Mh=(zM=c.default,Fl(XM,zM),Object.defineProperty(XM.prototype,"version",{get:function(){return QM},enumerable:!1,configurable:!0}),Object.defineProperty(XM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new YM.default(Object.values(GM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),XM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new ZM.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,HM.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(KM.default.hello(r,n,this._serversideRouting),e,!0),e},XM);function XM(){return null!==zM&&zM.apply(this,arguments)||this}_.default=Mh;var JM,$M,Vh={},Wh={},eN=r&&r.__assign||function(){return(eN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},nb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ul=(Object.defineProperty(Wh,"__esModule",{value:!0}),nb(Hl)),Xh=(Wh.default=eN({},Ul.default),r&&r.__extends||(JM=function(e,t){return(JM=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])})(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}JM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),tN=r&&r.__assign||function(){return(tN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},mh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ub=(Object.defineProperty(Vh,"__esModule",{value:!0}),mh(_)),rN=w_,nN=mh(Wh),oN=mh(c0),iN=mh(v),uN=A,aN=e.internal.constants.BOLT_PROTOCOL_V5_1,Ll=($M=ub.default,Xh(sN,$M),Object.defineProperty(sN.prototype,"version",{get:function(){return aN},enumerable:!1,configurable:!0}),Object.defineProperty(sN.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new oN.default(Object.values(nN.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(sN.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),sN.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new uN.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,rN.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(iN.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(tN(tN({},e),a.metadata))},onError:i,flush:!0})},sN.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=e.flush,i=new uN.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(iN.default.logon(r),i,e),i},sN.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new uN.LogoffObserver({onCompleted:t,onError:r});return this.write(iN.default.logoff(),t,e),t},sN);function sN(){return null!==$M&&$M.apply(this,arguments)||this}Vh.default=Ll;var cN,lN,dt={},kh={},fN=r&&r.__assign||function(){return(fN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},zd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lb=(Object.defineProperty(kh,"__esModule",{value:!0}),zd(Wh)),mb=(kh.default=fN({},lb.default),r&&r.__extends||(cN=function(e,t){return(cN=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])})(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}cN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),pN=r&&r.__assign||function(){return(pN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},or=(Object.defineProperty(dt,"__esModule",{value:!0}),S(Vh)),dN=S(kh),hN=S(c0),bN=S(v),yN=A,R=e.internal.constants,_N=R.BOLT_PROTOCOL_V5_2,vN=R.FETCH_ALL,zh=(lN=or.default,mb(mN,lN),Object.defineProperty(mN.prototype,"version",{get:function(){return _N},enumerable:!1,configurable:!0}),Object.defineProperty(mN.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new hN.default(Object.values(dN.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(mN.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),mN.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new yN.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write(bN.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(pN(pN({},e),a.metadata))},onError:i,flush:!0})},mN.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new yN.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(bN.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},mN.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?vN:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new yN.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=y;return this.write(bN.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(bN.default.pull({n:_}),c,b),c},mN);function mN(){return null!==lN&&lN.apply(this,arguments)||this}dt.default=zh;var gN,ON,Pb={},Cb={},wN=r&&r.__assign||function(){return(wN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Al=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ub=(Object.defineProperty(Cb,"__esModule",{value:!0}),Al(kh)),gb=(Cb.default=wN({},Ub.default),r&&r.__extends||(gN=function(e,t){return(gN=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])})(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}gN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),EN=r&&r.__assign||function(){return(EN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Yb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Mb=(Object.defineProperty(Pb,"__esModule",{value:!0}),Yb(dt)),PN=Yb(Cb),TN=Yb(c0),SN=Yb(v),jN=A,CN=e.internal.constants.BOLT_PROTOCOL_V5_3,ty=(ON=Mb.default,gb(IN,ON),Object.defineProperty(IN.prototype,"version",{get:function(){return CN},enumerable:!1,configurable:!0}),Object.defineProperty(IN.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new TN.default(Object.values(PN.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),IN.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new jN.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(SN.default.hello5x3(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(EN(EN({},e),s.metadata))},onError:u,flush:!0})},IN);function IN(){return null!==ON&&ON.apply(this,arguments)||this}Pb.default=ty;var RN,AN,ly={},Iy={},kN=r&&r.__assign||function(){return(kN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},xp=(Object.defineProperty(Iy,"__esModule",{value:!0}),fy(Cb)),zy=(Iy.default=kN({},xp.default),r&&r.__extends||(RN=function(e,t){return(RN=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])})(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}RN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),vd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Yy=(Object.defineProperty(ly,"__esModule",{value:!0}),vd(Pb)),MN=vd(Iy),NN=vd(v),xN=A,DN=vd(c0),LN=e.internal.constants.BOLT_PROTOCOL_V5_4,ed=(AN=Yy.default,zy(UN,AN),Object.defineProperty(UN.prototype,"version",{get:function(){return LN},enumerable:!1,configurable:!0}),Object.defineProperty(UN.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new DN.default(Object.values(MN.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),UN.prototype.telemetry=function(e,t){var e=e.api,t=void 0===t?{}:t,r=t.onError,t=t.onCompleted,t=new xN.TelemetryObserver({onCompleted:t,onError:r});return this.write(NN.default.telemetry({api:e}),t,!1),t},UN);function UN(){return null!==AN&&AN.apply(this,arguments)||this}ly.default=ed;var FN,BN,Ky={},Ld={},VN=r&&r.__assign||function(){return(VN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nh=(Object.defineProperty(Ld,"__esModule",{value:!0}),i_(Iy)),uy=(Ld.default=VN({},Nh.default),r&&r.__extends||(FN=function(e,t){return(FN=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])})(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}FN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),qN=r&&r.__assign||function(){return(qN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Dl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cy=(Object.defineProperty(Ky,"__esModule",{value:!0}),Dl(ly)),WN=Dl(Ld),zN=Dl(c0),HN=Dl(v),GN=A,o_=e.internal.constants,YN=o_.BOLT_PROTOCOL_V5_5,KN=o_.FETCH_ALL,ZN=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),Z_=(BN=Cy.default,uy(QN,BN),Object.defineProperty(QN.prototype,"version",{get:function(){return YN},enumerable:!1,configurable:!0}),Object.defineProperty(QN.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new zN.default(Object.values(WN.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),QN.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new GN.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(HN.default.hello5x5(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(qN(qN({},e),s.metadata))},onError:u,flush:!0})},QN.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new GN.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(HN.default.begin5x5({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},QN.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?KN:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new GN.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r,enrichMetadata:this._enrichMetadata}),l=y;return this.write(HN.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(HN.default.pull({n:_}),c,b),c},QN.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return qN(qN({},e),{description:null!=e.neo4j_code?e.status_description:e.description,diagnostic_record:null!==e.diagnostic_record?qN(qN({},ZN),e.diagnostic_record):null})})),e},QN);function QN(){return null!==BN&&BN.apply(this,arguments)||this}Ky.default=Z_;var XN,JN,H_={},ev={},$N=r&&r.__assign||function(){return($N=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ev=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},vv=(Object.defineProperty(ev,"__esModule",{value:!0}),Ev(Ld)),jv=(ev.default=$N({},vv.default),r&&r.__extends||(XN=function(e,t){return(XN=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])})(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}XN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),e2=r&&r.__assign||function(){return(e2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Hh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Uv=(Object.defineProperty(H_,"__esModule",{value:!0}),Hh(Ky)),t2=Hh(ev),r2=Hh(c0),n2=e.internal.constants.BOLT_PROTOCOL_V5_6,o2=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),Bv=(JN=Uv.default,jv(i2,JN),Object.defineProperty(i2.prototype,"version",{get:function(){return n2},enumerable:!1,configurable:!0}),Object.defineProperty(i2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new r2.default(Object.values(t2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),i2.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return e2(e2({},e),{diagnostic_record:null!==e.diagnostic_record?e2(e2({},o2),e.diagnostic_record):null})})),e},i2);function i2(){return null!==JN&&JN.apply(this,arguments)||this}H_.default=Bv;var u2,a2,zv={},Yv={},s2=r&&r.__assign||function(){return(s2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},xv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},em=(Object.defineProperty(Yv,"__esModule",{value:!0}),xv(ev)),R_=(Yv.default=s2({},em.default),r&&r.__extends||(u2=function(e,t){return(u2=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])})(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}u2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),c2=r&&r.__assign||function(){return(c2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Sv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cv=(Object.defineProperty(zv,"__esModule",{value:!0}),Sv(H_)),l2=Sv(Yv),f2=Sv(c0),p2=e.internal.constants.BOLT_PROTOCOL_V5_7,d2=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),um=(a2=Cv.default,R_(h2,a2),Object.defineProperty(h2.prototype,"version",{get:function(){return p2},enumerable:!1,configurable:!0}),Object.defineProperty(h2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new f2.default(Object.values(l2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),h2.prototype.enrichErrorMetadata=function(e){return c2(c2({},e),{cause:null!==e.cause&&void 0!==e.cause?this.enrichErrorMetadata(e.cause):null,code:e.neo4j_code,diagnostic_record:null!==e.diagnostic_record?c2(c2({},d2),e.diagnostic_record):null})},h2);function h2(){return null!==a2&&a2.apply(this,arguments)||this}zv.default=um;var b2,y2,Om={},md={},_2=r&&r.__assign||function(){return(_2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},gd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cm=(Object.defineProperty(md,"__esModule",{value:!0}),gd(Yv)),xm=(md.default=_2({},Cm.default),r&&r.__extends||(b2=function(e,t){return(b2=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])})(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}b2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Im=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Dp=(Object.defineProperty(Om,"__esModule",{value:!0}),Im(zv)),v2=Im(md),m2=Im(c0),g2=Im(v),O2=A,Od=e.internal.constants,w2=Od.BOLT_PROTOCOL_V5_8,E2=Od.FETCH_ALL,Tm=(y2=Dp.default,xm(P2,y2),Object.defineProperty(P2.prototype,"version",{get:function(){return w2},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new m2.default(Object.values(v2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),P2.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?E2:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,m=r.lowRecordWatermark,m=void 0===m?Number.MAX_VALUE:m,r=r.onDb,c=new O2.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:m,enrichMetadata:this._enrichMetadata,onDb:r}),l=y;return this.write(g2.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(g2.default.pull({n:_}),c,b),c},P2);function P2(){return null!==y2&&y2.apply(this,arguments)||this}Om.default=Tm;var km={},N_={},T2=r&&r.__assign||function(){return(T2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Km=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Hm=(Object.defineProperty(N_,"__esModule",{value:!0}),Km(md)),S2=c0,j2=cm,C2=e,I2=198,R2=193,A2=200,k2=201,M2=202,N2=203,x2={INT8:A2,INT16:k2,INT32:M2,INT64:N2,FLOAT32:I2,FLOAT64:R2};function D2(e,t){(r=new DataView(new ArrayBuffer(2))).setInt16(0,1e3,!0);var r,n=1e3===new Int16Array(r.buffer)[0];if(n){var o=new DataView(new ArrayBuffer(t.byteLength)),i=new DataView(t),u=void 0,a=void 0,s=void 0;switch(e){case A2:s=1,u=o.setInt8.bind(o),a=i.getInt8.bind(i);break;case k2:s=2,u=o.setInt16.bind(o),a=i.getInt16.bind(i);break;case M2:s=4,u=o.setInt32.bind(o),a=i.getInt32.bind(i);break;case N2:s=8,u=o.setBigInt64.bind(o),a=i.getBigInt64.bind(i);break;case I2:s=4,u=o.setInt32.bind(o),a=i.getInt32.bind(i);break;case R2:s=8,u=o.setBigInt64.bind(o),a=i.getBigInt64.bind(i);break;default:throw(0,C2.newError)("Vector is of unsupported type ".concat(e))}for(var c=0;c<t.byteLength;c+=s)u(c,a(c,n));return o.buffer}return t}N_.default=T2(T2({},Hm.default),{createVectorTransformer:function(){return new S2.TypeTransformer({signature:86,isTypeInstance:function(e){return(0,C2.isVector)(e)},toStructure:function(e){var t=x2[e.getType()];if(void 0===t)throw(0,C2.newError)("Vector object has unknown type: ".concat(e.getType()));e=D2(t,e.asTypedArray().buffer);return new j2.structure.Structure(86,[Int8Array.from([t]),new Int8Array(e)])},fromStructure:function(e){var t=Uint8Array.from(e.fields[0])[0],r=D2(t,e.fields[1].buffer);switch(t){case A2:return new C2.Vector(new Int8Array(r));case k2:return new C2.Vector(new Int16Array(r));case M2:return new C2.Vector(new Int32Array(r));case N2:return new C2.Vector(new BigInt64Array(r));case I2:return new C2.Vector(new Float32Array(r));case R2:return new C2.Vector(new Float64Array(r));default:throw(0,C2.newError)("Received Vector structure with unsupported type marker: ".concat(t))}}})},createUnsupportedTypeTransformer:function(){return new S2.TypeTransformer({signature:63,isTypeInstance:function(e){return(0,C2.isUnsupportedType)(e)},toStructure:function(e){throw(0,C2.newError)("UnsupportedType object can not be transmitted")},fromStructure:function(e){return new C2.UnsupportedType(e.fields[0],e.fields[1],e.fields[2],e.fields[3].message)}})}});var L2,U2,Jm=r&&r.__extends||(L2=function(e,t){return(L2=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])})(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}L2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Wt=(Object.defineProperty(km,"__esModule",{value:!0}),o0(Om)),F2=o0(N_),B2=o0(c0),V2=e.internal.constants.BOLT_PROTOCOL_V6_0,d0=(U2=Wt.default,Jm(q2,U2),Object.defineProperty(q2.prototype,"version",{get:function(){return V2},enumerable:!1,configurable:!0}),Object.defineProperty(q2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new B2.default(Object.values(F2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),q2);function q2(){return null!==U2&&U2.apply(this,arguments)||this}km.default=d0;var y0={},W2=(Object.defineProperty(y0,"__esModule",{value:!0}),e);function z2(){}function H2(e){return e}var G2={onNext:z2,onCompleted:z2,onError:z2};function Y2(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.enrichErrorMetadata,n=e.log,e=e.observer;this._pendingObservers=[],this._log=n,this._transformMetadata=t||H2,this._enrichErrorMetadata=r||H2,this._observer=Object.assign({onObserversCountChange:z2,onError:z2,onFailure:z2,onErrorApplyTransformation:H2},e)}Object.defineProperty(Y2.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),Y2.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(W2.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(W2.json.stringify(e)));try{var r=this._transformMetadata(t);this._currentObserver.onCompleted(r)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat(W2.json.stringify(e)));try{this._currentFailure=this._handleErrorPayload(this._enrichErrorMetadata(t)),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED ".concat(W2.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,W2.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,W2.newError)("Unknown Bolt protocol message: "+e))}},Y2.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(Y2.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),Y2.prototype._queueObserver=function(e){return(e=e||G2).onCompleted=e.onCompleted||z2,e.onError=e.onError||z2,e.onNext=e.onNext||z2,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},Y2.prototype._notifyErrorToObservers=function(e){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(e);0<this._pendingObservers.length;){var t=this._pendingObservers.shift();t&&t.onError&&t.onError(e)}},Y2.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},Y2.prototype._resetFailure=function(){this._currentFailure=null},Y2.prototype._handleErrorPayload=function(e){var t=function(e){{if("Neo.TransientError.Transaction.Terminated"===e)return"Neo.ClientError.Transaction.Terminated";if("Neo.TransientError.Transaction.LockClientStopped"===e)return"Neo.ClientError.Transaction.LockClientStopped"}return e}(e.code),r=null!=e.cause?this._handleErrorCause(e.cause):void 0,t=(0,W2.newError)(e.message,t,r,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},Y2.prototype._handleErrorCause=function(e){var t=null!=e.cause?this._handleErrorCause(e.cause):void 0,t=(0,W2.newGQLError)(e.message,t,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},y0.default=Y2;var K2,m0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Z2=(Object.defineProperty(d_,"__esModule",{value:!0}),d_.default=function(e){var e=void 0===e?{}:e,t=e.version,r=e.chunker,n=e.dechunker,o=e.channel,i=e.disableLosslessIntegers,u=e.useBigInt,a=e.serversideRouting,s=e.server,c=e.log,l=e.observer;return function(e,t,r,n,o,i,u,a){if(!(e instanceof Z2.ProtocolVersion)||null==e)throw(0,Z2.newError)("Unknown Bolt protocol version: "+e);switch(!0){case e.isEqualTo({major:1,minor:0}):return new Q2.default(t,r,n,i,a,u);case e.isEqualTo({major:2,minor:0}):return new X2.default(t,r,n,i,a,u);case e.isEqualTo({major:3,minor:0}):return new J2.default(t,r,n,i,a,u);case e.isEqualTo({major:4,minor:0}):return new $2.default(t,r,n,i,a,u);case e.isEqualTo({major:4,minor:1}):return new ex.default(t,r,n,i,a,u,o);case e.isEqualTo({major:4,minor:2}):return new tx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:4,minor:3}):return new rx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:4,minor:4}):return new nx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:0}):return new ox.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:1}):return new ix.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:2}):return new ux.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:3}):return new ax.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:4}):return new sx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:5}):return new cx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:6}):return new lx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:7}):return new fx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:8}):return new px.default(t,r,n,i,a,u,o);case e.isEqualTo({major:6,minor:0}):return new dx.default(t,r,n,i,a,u,o);default:throw(0,Z2.newError)("Unknown Bolt protocol version: "+e)}}(t,s,r,{disableLosslessIntegers:i,useBigInt:u},a,function(t){var r=new hx.default({transformMetadata:t.transformMetadata.bind(t),enrichErrorMetadata:t.enrichErrorMetadata.bind(t),log:c,observer:l});return o.onerror=l.onError.bind(l),o.onmessage=function(e){return n.write(e)},n.onmessage=function(e){try{r.handleResponse(t.unpack(e))}catch(e){return l.onError(e)}},r},l.onProtocolError.bind(l),c)},e),Q2=m0(v_),X2=m0(E0),J2=m0(Og),$2=m0(Kg),ex=m0(y),tx=m0(WO),rx=m0(gt),nx=m0(Yl),ox=m0(_),ix=m0(Vh),ux=m0(dt),ax=m0(Pb),sx=m0(ly),cx=m0(Ky),lx=m0(H_),fx=m0(zv),px=m0(Om),dx=m0(km),hx=m0(y0);i=F,K2=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),x0=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||K2(t,e,r)},B0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(i,"__esModule",{value:!0}),i.RawRoutingTable=i.BoltProtocol=void 0,a0=B0(_d),zn=B0(d_),G0=B0(gt),B0=B0(T_),x0(A,i),i.BoltProtocol=G0.default,i.RawRoutingTable=B0.default,i.default={handshake:a0.default,create:zn.default};var bx,rg={},hy={},ug=r&&r.__extends||(bx=function(e,t){return(bx=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])})(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}bx(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(hy,"__esModule",{value:!0});ug(_x,yx=e.ConnectionProvider),_x.prototype.acquireConnection=function(e){e=void 0===e?{}:e,e.accessMode,e.database,e.bookmarks,e=this._connection;return this._connection=null,Promise.resolve(e)};var yx,X0=_x;function _x(e){var t=yx.call(this)||this;return t._connection=e,t}hy.default=X0;var vx,dg={},Rg={},dy={},kg=r&&r.__extends||(vx=function(e,t){return(vx=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])})(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}vx(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(dy,"__esModule",{value:!0});kg(gx,mx=e.Connection),Object.defineProperty(gx.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(gx.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(gx.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(gx.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(gx.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(gx.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),gx.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(gx.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(gx.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(gx.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),gx.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},gx.prototype.write=function(e,t,r){throw new Error("not implemented")},gx.prototype.close=function(){throw new Error("not implemented")},gx.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e};var mx,Vg=gx;function gx(e){var t=mx.call(this)||this;return t._errorHandler=e,t}dy.default=Vg;var Ox,zg={},Dg=r&&r.__extends||(Ox=function(e,t){return(Ox=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])})(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}Ox(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),wx=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ex=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Rf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Px=(Object.defineProperty(zg,"__esModule",{value:!0}),zg.createChannelConnection=function(i,u,a,s,e,c,l,t){void 0===c&&(c=null);void 0===t&&(t=function(e){return new Px.Channel(e)});var e=new Px.ChannelConfig(i,u,a.errorCode(),e),f=t(e);return Sx.default.handshake(f,s).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new Px.Chunker(f),o=new Px.Dechunker,t=new Ax(f,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return Sx.default.create({version:r,channel:f,chunker:n,dechunker:o,disableLosslessIntegers:u.disableLosslessIntegers,useBigInt:u.useBigInt,serversideRouting:c,server:t.server,log:t.logger,observer:{onObserversCountChange:t._handleOngoingRequestsNumberChange.bind(t),onError:t._handleFatalError.bind(t),onFailure:t._resetOnFailure.bind(t),onProtocolError:t._handleProtocolError.bind(t),onErrorApplyTransformation:function(e){return t.handleAndTransformError(e,t._address)}}})},u.telemetryDisabled,l);return e(function(e){return o.write(e)}),t}).catch(function(e){return f.close().then(function(){throw e})})},Dd),Tx=e,tO=Rf(dy),Sx=Rf(F),jx=Tx.error.PROTOCOL_ERROR,Cx=Tx.internal.logger.Logger,Ix=0;Rx=tO.default,Dg(kx,Rx),kx.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},kx.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},kx.prototype._sendTelemetryIfEnabled=function(e){this._telemetryDisabledConnection||this._telemetryDisabledDriverConfig||null==e||null==e.apiTelemetryConfig||this._protocol.telemetry({api:e.apiTelemetryConfig.api},{onCompleted:e.apiTelemetryConfig.onTelemetrySuccess,onError:e.beforeError})},kx.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},kx.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},kx.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(kx.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(kx.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(kx.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(kx.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(kx.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(kx.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),kx.prototype.connect=function(t,n,o,i){return wx(this,void 0,void 0,function(){var r=this;return Ex(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,Tx.newError)("Connection does not support re-auth");return this._authToken=o,this._protocol.initialized?[3,2]:[4,this._initialize(t,n,o)];case 1:return[2,e.sent()];case 2:return i?[4,new Promise(function(e,t){r._protocol.logoff({onError:t}),r._protocol.logon({authToken:o,onError:t,onComplete:function(){return e(r)},flush:!0})})]:[3,4];case 3:return[2,e.sent()];case 4:return this._protocol.logoff(),this._protocol.logon({authToken:o,flush:!0}),[2,this]}})})},kx.prototype._initialize=function(e,n,o){var i=this,u=this;return new Promise(function(r,t){i._protocol.initialize({userAgent:e,boltAgent:n,authToken:o,notificationFilter:i._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,i.version&&!t||(i.version=t),t=e.connection_id,i.databaseId||(i.databaseId=t),e.hints&&(null!=(t=e.hints["connection.recv_timeout_seconds"])&&(t=(0,Tx.toNumber)(t),Number.isInteger(t)&&0<t?i._ch.setupReceiveTimeout(1e3*t):i._log.info("Server located at ".concat(i._address," supplied an invalid connection receive timeout value (").concat(t,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")),!0===e.hints["telemetry.enabled"]&&(i._telemetryDisabledConnection=!1),i.SSREnabledHint=e.hints["ssr.enabled"]),i._ssrCallback(null!=(t=i.SSREnabledHint)&&t,"OPEN")),r(u)}})})},kx.prototype.protocol=function(){return this._protocol},Object.defineProperty(kx.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(kx.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(kx.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(kx.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),kx.prototype._handleFatalError=function(e){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||e,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(Tx.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},kx.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},kx.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},kx.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},kx.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},kx.prototype.resetAndFlush=function(){var r=this;return new Promise(function(e,t){r._reset({onError:function(e){r._isBroken?t(e):(e=r._handleProtocolError("Received FAILURE as a response for RESET: ".concat(e)),t(e))},onComplete:function(){e()}})})},kx.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},kx.prototype._reset=function(t){var e,r=this;this._reseting?this._protocol.isLastMessageReset()?this._resetObservers.push(t):this._protocol.reset({onError:function(e){t.onError(e)},onComplete:function(){t.onComplete()}}):(this._resetObservers.push(t),this._reseting=!0,e=function(e){r._reseting=!1;var t=r._resetObservers;r._resetObservers=[],t.forEach(e)},this._protocol.reset({onError:function(t){e(function(e){return e.onError(t)})},onComplete:function(){e(function(e){return e.onComplete()})}}))},kx.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},kx.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},kx.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},kx.prototype.close=function(){return wx(this,void 0,void 0,function(){var t;return Ex(this,function(e){switch(e.label){case 0:return this._ssrCallback(null!=(t=this.SSREnabledHint)&&t,"CLOSE"),this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return e.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},kx.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},kx.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,Tx.newError)(e,jx);return this._handleFatalError(e),e};var Rx,Ax=kx;function kx(e,t,r,n,o,i,u,a,s,c,l){void 0===o&&(o=!1),void 0===i&&(i=null),void 0===l&&(l=function(e){});var f,p,t=Rx.call(this,t)||this;return t._authToken=null,t._idle=!1,t._reseting=!1,t._resetObservers=[],t._id=Ix++,t._address=r,t._server={address:r.asHostPort()},t._creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(f=t,new Cx((p=n)._level,function(e,t){return p._loggerFunction(e,"".concat(f," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._telemetryDisabledDriverConfig=!0===c,t._telemetryDisabledConnection=!0,t._ssrCallback=l,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}zg.default=Ax;var Mx,Nx,Pg={},oO=r&&r.__extends||(Mx=function(e,t){return(Mx=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])})(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}Mx(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),lm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},pO=(Object.defineProperty(Pg,"__esModule",{value:!0}),lm(dy)),aO=(Nx=pO.default,oO(xx,Nx),xx.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},xx.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},xx.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},xx.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},xx.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(xx.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(xx.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(xx.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(xx.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(xx.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(xx.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(xx.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(xx.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(xx.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),xx.prototype.isOpen=function(){return this._delegate.isOpen()},xx.prototype.protocol=function(){return this._delegate.protocol()},xx.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},xx.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},xx.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},xx.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},xx.prototype.close=function(){return this._delegate.close()},xx.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},xx);function xx(e,t){var r=Nx.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}Pg.default=aO;S_={};Object.defineProperty(S_,"__esModule",{value:!0});var Dx,Lx,Ux,Fx,Bx=e.error.SERVICE_UNAVAILABLE,Vx=e.error.SESSION_EXPIRED;function qx(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||Wx,this._handleWriteFailure=r||Wx,this._handleSecurityError=n||Wx}function Wx(e){return e}qx.create=function(e){return new qx(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleSecurityError)},qx.prototype.errorCode=function(){return this._errorCode},qx.prototype.handleAndTransformError=function(e,t,r){return null!=(n=e)&&null!=n.code&&n.code.startsWith("Neo.ClientError.Security.")?this._handleSecurityError(e,t,r):function(e){if(e)return e.code===Vx||e.code===Bx||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return}(e)?this._handleUnavailability(e,t,r):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return}(e)?this._handleWriteFailure(e,t,r):e;var n},S_.default=qx,bO=Rg,Lx=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Ux=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sv=r&&r.__importStar||(Dx=function(e){return(Dx=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Dx(e),n=0;n<r.length;n++)"default"!==r[n]&&Lx(t,e,r[n]);return Ux(t,e),t}),Zg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(bO,"__esModule",{value:!0}),bO.createChannelConnection=bO.ConnectionErrorHandler=bO.DelegateConnection=bO.ChannelConnection=bO.Connection=void 0,jO=Zg(dy),bO.Connection=jO.default,Fx=sv(zg),bO.ChannelConnection=Fx.default,Object.defineProperty(bO,"createChannelConnection",{enumerable:!0,get:function(){return Fx.createChannelConnection}}),sv=Zg(Pg),bO.DelegateConnection=sv.default,sv=Zg(S_),bO.ConnectionErrorHandler=sv.default,bO.default=jO.default;var kO={},zx=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Hx=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Gx=(Object.defineProperty(kO,"__esModule",{value:!0}),e),Yx=iv;function Kx(e){var t=e.authTokenManager,r=e.userAgent,e=e.boltAgent;this._authTokenManager=t||(0,Gx.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=e}Kx.prototype.authenticate=function(e){return zx(this,arguments,void 0,function(e){var t,r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return Hx(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!Yx.object.equals(r.authToken,n)&&!0!==o||!0===u),null==r.authToken||t?[4,r.connect(this._userAgent,this._boltAgent,n,i||!1)]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,r];case 3:return[4,this._authTokenManager.getToken()];case 4:return t=e.sent(),Yx.object.equals(t,r.authToken)?[3,6]:[4,r.connect(this._userAgent,this._boltAgent,t,!1)];case 5:return[2,e.sent()];case 6:return[2,r]}})})},Kx.prototype.handleError=function(e){var t=e.connection,e=e.code;return!(!t||!e.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,e)},kO.default=Kx;var py={},Zx=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Qx=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};function Xx(e){e=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=e}Object.defineProperty(py,"__esModule",{value:!0}),Xx.prototype.check=function(r){return Zx(this,void 0,void 0,function(){var t;return Qx(this,function(e){switch(e.label){case 0:return this._isCheckDisabled||this._isNewlyCreatedConnection(r)?[2,!0]:(t=Date.now()-r.idleTimestamp,0===this._connectionLivenessCheckTimeout||t>this._connectionLivenessCheckTimeout?[4,r.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,!0]}})})},Object.defineProperty(Xx.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),Xx.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},py.default=Xx;var Ff={},Jx=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},$x=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},eD=(Object.defineProperty(Ff,"__esModule",{value:!0}),Dd);function tD(e){var t=e.clientCertificateProvider,e=e.loader;this._clientCertificateProvider=t,this._loader=e||eD.ClientCertificatesLoader,this._clientCertificate=null}tD.prototype.getClientCertificate=function(){return Jx(this,void 0,void 0,function(){var t,r,n=this;return $x(this,function(e){switch(e.label){case 0:return(t=null!=this._clientCertificateProvider)?(r=null==this._clientCertificate)?[3,2]:[4,this._clientCertificateProvider.hasUpdate()]:[3,3];case 1:r=e.sent(),e.label=2;case 2:t=r,e.label=3;case 3:return t&&(this._clientCertificate=Promise.resolve(this._clientCertificateProvider.getClientCertificate()).then(this._loader.load).then(function(e){return n._clientCertificate=e,n._clientCertificate}).catch(function(e){throw n._clientCertificate=null,e})),[2,this._clientCertificate]}})})},Ff.default=tD;var rD,nD,$l=r&&r.__extends||(rD=function(e,t){return(rD=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])})(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}rD(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),oD=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},iD=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},uD=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},aD=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},o=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sD=(Object.defineProperty(dg,"__esModule",{value:!0}),Rg),cD=e,lD=o(kO),fD=iv,pD=o(py),dD=o(Ff),hD=cD.error.SERVICE_UNAVAILABLE,bD=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],Sf=cD.internal.pool,yD=Sf.Pool,_D=Sf.PoolConfig,EO=(nD=cD.ConnectionProvider,$l(vD,nD),vD.prototype._createConnectionErrorHandler=function(){return new sD.ConnectionErrorHandler(hD)},vD.prototype._getClientCertificate=function(){return oD(this,void 0,void 0,function(){return iD(this,function(e){return[2,this._config.clientCertificate.getClientCertificate()]})})},vD.prototype._createConnection=function(e,r,n){var o=this,i=e.auth;return this._createChannelConnection(r).then(function(t){return t.release=function(){return t.idleTimestamp=Date.now(),n(r,t)},o._openConnections[t.id]=t,o._authenticationProvider.authenticate({connection:t,auth:i}).catch(function(e){throw o._destroyConnection(t),e})})},vD.prototype._validateConnectionOnAcquire=function(e,t){return oD(this,arguments,void 0,function(e,t){var r,n=e.auth,o=e.skipReAuth;return iD(this,function(e){switch(e.label){case 0:if(!this._validateConnection(t))return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(t)];case 2:return e.sent(),[3,4];case 3:return r=e.sent(),this._log.debug("The connection ".concat(t.id," is not alive because of an error ").concat(r.code," '").concat(r.message,"'")),[2,!1];case 4:return e.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:t,auth:n,skipReAuth:o})];case 5:return e.sent(),[2,!0];case 6:return r=e.sent(),this._log.debug("The connection ".concat(t.id," is not valid because of an error ").concat(r.code," '").concat(r.message,"'")),[2,!1];case 7:return[2]}})})},vD.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},vD.prototype._validateConnection=function(e){return!!e.isOpen()&&!(this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},vD.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},vD.prototype._verifyConnectivityAndGetServerVersion=function(e){return oD(this,arguments,void 0,function(e){var t,r,n=e.address;return iD(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new cD.ServerInfo(t.server,t.protocol().version),e.label=2;case 2:return e.trys.push([2,,5,7]),t.protocol().isLastMessageLogon()?[3,4]:[4,t.resetAndFlush()];case 3:e.sent(),e.label=4;case 4:return[3,7];case 5:return[4,t.release()];case 6:return e.sent(),[7];case 7:return[2,r]}})})},vD.prototype._verifyAuthentication=function(e){return oD(this,arguments,void 0,function(e){var t,r,n,o,i,u=e.getAddress,a=e.auth;return iD(this,function(e){switch(e.label){case 0:t=[],e.label=1;case 1:return e.trys.push([1,8,9,11]),[4,u()];case 2:return r=e.sent(),[4,this._connectionPool.acquire({auth:a,skipReAuth:!0},r)];case 3:if(n=e.sent(),t.push(n),o=!n.protocol().isLastMessageLogon(),n.supportsReAuth)return o&&n.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:n,auth:a,waitReAuth:!0,forceReAuth:!0})]:[3,5];throw(0,cD.newError)("Driver is connected to a database that does not support user switch.");case 4:return e.sent(),[3,7];case 5:return!o||n.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:a},r,{requireNew:!0})];case 6:(i=e.sent())._sticky=!0,t.push(i),e.label=7;case 7:return[2,!0];case 8:if(i=e.sent(),bD.includes(i.code))return[2,!1];throw i;case 9:return[4,Promise.all(t.map(function(e){return e.release()}))];case 10:return e.sent(),[7];case 11:return[2]}})})},vD.prototype._verifyStickyConnection=function(e){return oD(this,arguments,void 0,function(e){var t,r,n=e.auth,o=e.connection;return e.address,iD(this,function(e){switch(e.label){case 0:return(t=fD.object.equals(n,o.authToken),r=!t,o._sticky=t&&!o.supportsReAuth,r||o._sticky)?[4,o.release()]:[3,2];case 1:throw e.sent(),(0,cD.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},vD.prototype.close=function(){return oD(this,void 0,void 0,function(){return iD(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.close()];case 1:return e.sent(),[4,Promise.all(Object.values(this._openConnections).map(function(e){return e.close()}))];case 2:return e.sent(),[2]}})})},vD._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},vD._removeIdleObserverOnConnection=function(e){e._unsetIdle()},vD.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0,e.retryable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),e},vD);function vD(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,e=void 0===e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(yD.bind.apply(yD,aD([void 0],uD(e),!1)))}:e,s=(void 0===t&&(t=null),nD.call(this)||this);return s._id=r,s._config=n,s._log=o,s._clientCertificateHolder=new dD.default({clientCertificateProvider:s._config.clientCertificate}),s._authenticationProvider=new lD.default({authTokenManager:a,userAgent:i,boltAgent:u}),s._livenessCheckProvider=new pD.default({connectionLivenessCheckTimeout:n.connectionLivenessCheckTimeout}),s._userAgent=i,s._boltAgent=u,s._createChannelConnection=t||function(n){return oD(s,void 0,void 0,function(){var t,r;return iD(this,function(e){switch(e.label){case 0:return t=sD.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent()]))]}})})},s._connectionPool=e({create:s._createConnection.bind(s),destroy:s._destroyConnection.bind(s),validateOnAcquire:s._validateConnectionOnAcquire.bind(s),validateOnRelease:s._validateConnectionOnRelease.bind(s),installIdleObserver:vD._installIdleObserverOnConnection.bind(s),removeIdleObserver:vD._removeIdleObserverOnConnection.bind(s),config:_D.fromDriverConfig(n),log:s._log}),s._openConnections={},s}dg.default=EO;var mD,gD,O={},b=r&&r.__extends||(mD=function(e,t){return(mD=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])})(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}mD(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),OD=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},wD=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},I=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},p=(Object.defineProperty(O,"__esModule",{value:!0}),I(dg)),ED=Rg,bw=e.internal.constants,PD=bw.BOLT_PROTOCOL_V3,TD=bw.BOLT_PROTOCOL_V4_0,SD=bw.BOLT_PROTOCOL_V4_4,jD=bw.BOLT_PROTOCOL_V5_1,CD=e.error.SERVICE_UNAVAILABLE,j=(gD=p.default,b(ID,gD),ID.prototype.acquireConnection=function(){return OD(this,arguments,void 0,function(e){var t,r,n=this,e=void 0===e?{}:e,o=(e.accessMode,e.database),i=(e.bookmarks,e.auth),u=e.forceReAuth;return wD(this,function(e){switch(e.label){case 0:return t=ED.ConnectionErrorHandler.create({errorCode:CD,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r,o)}}),[4,this._connectionPool.acquire({auth:i,forceReAuth:u},this._address)];case 1:return(r=e.sent(),i)?[4,this._verifyStickyConnection({auth:i,connection:r,address:this._address})]:[3,3];case 2:return e.sent(),[2,r];case 3:return[2,new ED.DelegateConnection(r,t)]}})})},ID.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),gD.prototype._handleSecurityError.call(this,e,t,r)},ID.prototype._hasProtocolVersion=function(n){return OD(this,void 0,void 0,function(){var t,r;return wD(this,function(e){switch(e.label){case 0:return[4,this._createChannelConnection(this._address)];case 1:return t=e.sent(),r=t.protocol()?t.protocol().version:null,[4,t.close()];case 2:return e.sent(),r?[2,n(r)]:[2,!1]}})})},ID.prototype.supportsMultiDb=function(){return OD(this,void 0,void 0,function(){return wD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(TD)})];case 1:return[2,e.sent()]}})})},ID.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},ID.prototype.supportsTransactionConfig=function(){return OD(this,void 0,void 0,function(){return wD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(PD)})];case 1:return[2,e.sent()]}})})},ID.prototype.supportsUserImpersonation=function(){return OD(this,void 0,void 0,function(){return wD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(SD)})];case 1:return[2,e.sent()]}})})},ID.prototype.supportsSessionAuth=function(){return OD(this,void 0,void 0,function(){return wD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(jD)})];case 1:return[2,e.sent()]}})})},ID.prototype.verifyAuthentication=function(e){return OD(this,arguments,void 0,function(e){var t=this,r=e.auth;return wD(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},ID.prototype.verifyConnectivityAndGetServerInfo=function(){return OD(this,void 0,void 0,function(){return wD(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},ID);function ID(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,t=gD.call(this,{id:t,config:r,log:n,userAgent:i,boltAgent:u,authTokenManager:a,newPool:e})||this;return t._address=o,t}O.default=j;var ln={},KO={},E={},n={},RD=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},AD=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},kD=(Object.defineProperty(n,"__esModule",{value:!0}),n.createValidRoutingTable=BD,e),t=kD.internal.constants,MD=t.ACCESS_MODE_WRITE,ND=t.ACCESS_MODE_READ,xD=kD.internal.serverAddress.ServerAddress,DD=kD.error.PROTOCOL_ERROR,LD=(UD.fromRawRoutingTable=BD,UD.prototype.forget=function(e){this.readers=FD(this.readers,e),this.writers=FD(this.writers,e)},UD.prototype.forgetRouter=function(e){this.routers=FD(this.routers,e)},UD.prototype.forgetWriter=function(e){this.writers=FD(this.writers,e)},UD.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===ND&&0===this.readers.length||e===MD&&0===this.writers.length},UD.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},UD.prototype.allServers=function(){return AD(AD(AD([],RD(this.routers),!1),RD(this.readers),!1),RD(this.writers),!1)},UD.prototype.toString=function(){return"RoutingTable["+"database=".concat(this.databaseName,", ")+"expirationTime=".concat(this.expirationTime,", ")+"currentTime=".concat(Date.now(),", ")+"routers=[".concat(this.routers,"], ")+"readers=[".concat(this.readers,"], ")+"writers=[".concat(this.writers,"]]")},UD);function UD(e){var e=void 0===e?{}:e,t=e.database,r=e.routers,n=e.readers,o=e.writers,i=e.expirationTime,e=e.ttl;this.database=t||null,this.databaseName=t||"default database",this.routers=r||[],this.readers=n||[],this.writers=o||[],this.expirationTime=i||(0,kD.int)(0),this.ttl=e}function FD(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function BD(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,kD.int)(Date.now()),n=(0,kD.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?kD.Integer.MAX_VALUE:n}catch(e){throw(0,kD.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(kD.json.stringify(t),"\nError message: ").concat(e.message),DD)}}(r,t),i=function(t,r){try{var n=[],o=[],i=[];return t.servers.forEach(function(e){var t=e.role,e=e.addresses;"ROUTE"===t?n=qD(e).map(function(e){return xD.fromUrl(e)}):"WRITE"===t?i=qD(e).map(function(e){return xD.fromUrl(e)}):"READ"===t&&(o=qD(e).map(function(e){return xD.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,kD.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(kD.json.stringify(t.servers),"\nError message: ").concat(e.message),DD)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return VD(u,"routers",t),VD(a,"readers",t),new LD({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function VD(e,t,r){if(0===e.length)throw(0,kD.newError)("Received no "+t+" from router "+r,DD)}function qD(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}n.default=LD;var P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},WD=(Object.defineProperty(E,"__esModule",{value:!0}),P(n));function zD(e){this._routingContext=e}zD.prototype.lookupRoutingTableOnRouter=function(t,r,n,o){var i=this;return t._acquireConnection(function(e){return i._requestRawRoutingTable(e,t,r,n,o).then(function(e){return e.isNull?null:WD.default.fromRawRoutingTable(r,n,e)})})},zD.prototype._requestRawRoutingTable=function(r,n,o,e,i){var u=this;return new Promise(function(e,t){r.protocol().requestRoutingInformation({routingContext:u._routingContext,databaseName:o,impersonatedUser:i,sessionContext:{bookmarks:n._lastBookmarks,mode:n._mode,database:n._database,afterComplete:n._onComplete},onCompleted:e,onError:t})})},E.default=zD;var HD,GD,YD,I0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},av=(Object.defineProperty(KO,"__esModule",{value:!0}),KO.RoutingTable=KO.Rediscovery=void 0,I0(E)),g=(KO.Rediscovery=av.default,I0(n)),Hn=(KO.RoutingTable=g.default,KO.default=av.default,r&&r.__extends||(HD=function(e,t){return(HD=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])})(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}HD(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),KD=r&&r.__assign||function(){return(KD=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ZD=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),QD=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Gt=r&&r.__importStar||(GD=function(e){return(GD=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=GD(e),n=0;n<r.length;n++)"default"!==r[n]&&ZD(t,e,r[n]);return QD(t,e),t}),XD=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},JD=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},$D=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},eL=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},h=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},tL=(Object.defineProperty(ln,"__esModule",{value:!0}),e),rL=Gt(KO),nL=Dd,oL=h(hy),u=h(dg),iL=Zl,uL=Rg,aL=iv,sL=tL.error.SERVICE_UNAVAILABLE,cL=tL.error.SESSION_EXPIRED,lL=tL.internal.bookmarks.Bookmarks,m=tL.internal.constants,fL=m.ACCESS_MODE_READ,pL=m.ACCESS_MODE_WRITE,dL=m.BOLT_PROTOCOL_V3,hL=m.BOLT_PROTOCOL_V4_0,bL=m.BOLT_PROTOCOL_V4_4,yL=m.BOLT_PROTOCOL_V5_1,_L=null,vL=(0,tL.int)(3e4),ql=(YD=u.default,Hn(mL,YD),mL.prototype._createConnectionErrorHandler=function(){return new uL.ConnectionErrorHandler(cL)},mL.prototype._handleUnavailability=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forget(t,r||_L),e},mL.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),YD.prototype._handleSecurityError.call(this,e,t,r,n)},mL.prototype._handleWriteFailure=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forgetWriter(t,r||_L),(0,tL.newError)("No longer possible to write to server at "+t,cL,e)},mL.prototype.acquireConnection=function(){return XD(this,arguments,void 0,function(e){var n,t,r,o,i=this,e=void 0===e?{}:e,u=e.accessMode,a=e.database,s=e.bookmarks,c=e.impersonatedUser,l=e.onDatabaseNameResolved,f=e.auth,p=e.homeDb;return JD(this,function(e){switch(e.label){case 0:return(n={database:a||_L},t=new uL.ConnectionErrorHandler(cL,function(e,t){return i._handleUnavailability(e,t,n.database)},function(e,t){return i._handleWriteFailure(e,t,null!=p?p:n.database)},function(e,t,r){return i._handleSecurityError(e,t,r,n.database)}),this._startTime=(new Date).getTime(),this.SSREnabled()&&void 0!==p&&""===a)?!(r=this._routingTableRegistry.get(p,function(){return new rL.RoutingTable({database:p})}))||r.isStaleFor(u)?[3,2]:[4,this._getConnectionFromRoutingTable(r,f,u,t)]:[3,2];case 1:if(r=e.sent(),this.SSREnabled())return[2,r];r.release(),e.label=2;case 2:return[4,this._freshRoutingTable({accessMode:u,database:n.database,bookmarks:s,impersonatedUser:c,auth:f,onDatabaseNameResolved:function(e){n.database=n.database||e,l&&l(e)}})];case 3:return o=e.sent(),[2,this._getConnectionFromRoutingTable(o,f,u,t)]}})})},mL.prototype._getConnectionFromRoutingTable=function(i,u,a,s){return XD(this,void 0,void 0,function(){var t,r,n,o;return JD(this,function(e){switch(e.label){case 0:if(a===fL)r=this._loadBalancingStrategy.selectReader(i.readers),t="read";else{if(a!==pL)throw(0,tL.newError)("Illegal mode "+a);r=this._loadBalancingStrategy.selectWriter(i.writers),t="write"}if(!r)throw(0,tL.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(i),cL);e.label=1;case 1:return e.trys.push([1,5,,6]),[4,this._connectionPool.acquire({auth:u,startTime:this._startTime},r)];case 2:return(n=e.sent(),u)?[4,this._verifyStickyConnection({auth:u,connection:n,address:r})]:[3,4];case 3:return e.sent(),[2,n];case 4:return[2,new uL.DelegateConnection(n,s)];case 5:throw o=e.sent(),s.handleAndTransformError(o,r);case 6:return[2]}})})},mL.prototype._hasProtocolVersion=function(u){return XD(this,void 0,void 0,function(){var t,r,n,o,i;return JD(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:t=e.sent(),n=0,e.label=2;case 2:if(!(n<t.length))return[3,8];e.label=3;case 3:return e.trys.push([3,6,,7]),[4,this._createChannelConnection(t[n])];case 4:return i=e.sent(),o=i.protocol()?i.protocol().version:null,[4,i.close()];case 5:return e.sent(),o?[2,u(o)]:[2,!1];case 6:return i=e.sent(),r=i,[3,7];case 7:return n++,[3,2];case 8:if(r)throw r;return[2,!1]}})})},mL.prototype.supportsMultiDb=function(){return XD(this,void 0,void 0,function(){return JD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(hL)})];case 1:return[2,e.sent()]}})})},mL.prototype.supportsTransactionConfig=function(){return XD(this,void 0,void 0,function(){return JD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(dL)})];case 1:return[2,e.sent()]}})})},mL.prototype.supportsUserImpersonation=function(){return XD(this,void 0,void 0,function(){return JD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(bL)})];case 1:return[2,e.sent()]}})})},mL.prototype.supportsSessionAuth=function(){return XD(this,void 0,void 0,function(){return JD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(yL)})];case 1:return[2,e.sent()]}})})},mL.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},mL.prototype.verifyAuthentication=function(e){return XD(this,arguments,void 0,function(e){var t=this,n=e.database,o=e.accessMode,i=e.auth;return JD(this,function(e){return this._startTime=(new Date).getTime(),[2,this._verifyAuthentication({auth:i,getAddress:function(){return XD(t,void 0,void 0,function(){var t,r;return JD(this,function(e){switch(e.label){case 0:return t={database:n||_L},[4,this._freshRoutingTable({accessMode:o,database:t.database,auth:i,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:if(r=e.sent(),0===(r=o===pL?r.writers:r.readers).length)throw(0,tL.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),sL);return[2,r[0]]}})})}})]})})},mL.prototype.verifyConnectivityAndGetServerInfo=function(e){return XD(this,arguments,void 0,function(e){var t,r,n,o,i,u,a,s,c,l=e.database,f=e.accessMode;return JD(this,function(e){switch(e.label){case 0:return t={database:l||_L},this._startTime=(new Date).getTime(),[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===pL?r.writers:r.readers,n=(0,tL.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),sL),e.label=2;case 2:e.trys.push([2,9,10,11]),o=$D(r),i=o.next(),e.label=3;case 3:if(i.done)return[3,8];u=i.value,e.label=4;case 4:return e.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:u})];case 5:return[2,e.sent()];case 6:return a=e.sent(),n=a,[3,7];case 7:return i=o.next(),[3,3];case 8:return[3,11];case 9:return a=e.sent(),s={error:a},[3,11];case 10:try{i&&!i.done&&(c=o.return)&&c.call(o)}finally{if(s)throw s.error}return[7];case 11:throw n}})})},mL.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},mL.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},mL.prototype._freshRoutingTable=function(e){var e=void 0===e?{}:e,t=e.accessMode,r=e.database,n=e.bookmarks,o=e.impersonatedUser,i=e.onDatabaseNameResolved,e=e.auth,u=this._routingTableRegistry.get(r,function(){return new rL.RoutingTable({database:r})});return u.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(u)),this._refreshRoutingTable(u,n,o,e).then(function(e){return i(e.database),e})):u},mL.prototype._refreshRoutingTable=function(e,t,r,n){var o=e.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(o,e,t,r,n):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(o,e,t,r,n)},mL.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return XD(this,void 0,void 0,function(){var t,r,n,o,i;return JD(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,l)];case 1:return(t=eL.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],r)?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(u,a,s,c,l)];case 3:i=eL.apply(void 0,[e.sent(),2]),o=i[0],i=i[1],r=o,n=i||n,e.label=4;case 4:return[4,this._applyRoutingTableIfPossible(a,r,n)];case 5:return[2,e.sent()]}})})},mL.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return XD(this,void 0,void 0,function(){var t,r,n;return JD(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,s)];case 1:return r=eL.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a,s)];case 2:n=eL.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,r)];case 4:return[2,e.sent()]}})})},mL.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return XD(this,void 0,void 0,function(){var t,r;return JD(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=eL.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,mL._forgetRouter(o,n,r),[2,[null,t]])}})})},mL.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return XD(this,void 0,void 0,function(){var t;return JD(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(n)];case 1:return t=e.sent(),t=t.filter(function(e){return r.indexOf(e)<0}),[4,this._fetchRoutingTable(t,o,i,u,a)];case 2:return[2,e.sent()]}})})},mL.prototype._resolveSeedRouter=function(n){return XD(this,void 0,void 0,function(){var t,r=this;return JD(this,function(e){switch(e.label){case 0:return[4,this._hostNameResolver.resolve(n)];case 1:return t=e.sent(),[4,Promise.all(t.map(function(e){return r._dnsResolver.resolve(e)}))];case 2:return t=e.sent(),[2,[].concat.apply([],t)]}})})},mL.prototype._fetchRoutingTable=function(s,c,l,f,p){return XD(this,void 0,void 0,function(){var t=this;return JD(this,function(e){return[2,s.reduce(function(i,u,a){return XD(t,void 0,void 0,function(){var t,r,n,o;return JD(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=eL.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(mL._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=eL.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],!r)return[3,8];e.label=3;case 3:return e.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(r,c.database,u,f)];case 4:return[2,[e.sent(),null]];case 5:return o=e.sent(),[2,this._handleRediscoveryError(o,u)];case 6:return r.close(),[7];case 7:return[3,9];case 8:return[2,[null,n]];case 9:return[2]}})})},Promise.resolve([null,null]))]})})},mL.prototype._createSessionForRediscovery=function(o,i,u,a){return XD(this,void 0,void 0,function(){var t,r,n=this;return JD(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:a,startTime:this._startTime},o)];case 1:return(t=e.sent(),a)?[4,this._verifyStickyConnection({auth:a,connection:t,address:o})]:[3,3];case 2:e.sent(),e.label=3;case 3:return r=uL.ConnectionErrorHandler.create({errorCode:cL,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r)}}),r=t._sticky?new uL.DelegateConnection(t):new uL.DelegateConnection(t,r),r=new oL.default(r),t.protocol().version.isLessThan({major:4,minor:0})?[2,[new tL.Session({mode:pL,bookmarks:lL.empty(),connectionProvider:r}),null]]:[2,[new tL.Session({mode:fL,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},mL.prototype._handleRediscoveryError=function(e,t){if(["Neo.ClientError.Database.DatabaseNotFound","Neo.ClientError.Transaction.InvalidBookmark","Neo.ClientError.Transaction.InvalidBookmarkMixture","Neo.ClientError.Statement.ArgumentError","Neo.ClientError.Request.Invalid","Neo.ClientError.Statement.TypeError","N/A"].includes(e.code)||null!=(n=(r=e).code)&&n.startsWith("Neo.ClientError.Security.")&&!["Neo.ClientError.Security.AuthorizationExpired"].includes(r.code))throw e;if("Neo.ClientError.Procedure.ProcedureNotFound"===e.code)throw(0,tL.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),sL,e);var r,n;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},mL.prototype._applyRoutingTableIfPossible=function(t,r,n){return XD(this,void 0,void 0,function(){return JD(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r)];throw(0,tL.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),sL,n);case 1:return e.sent(),[2,r]}})})},mL.prototype._updateRoutingTable=function(t){return XD(this,void 0,void 0,function(){return JD(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.keepAll(t.allServers())];case 1:return e.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(t),this._log.info("Updated routing table ".concat(t)),[2]}})})},mL._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},mL.prototype._channelSsrCallback=function(e,t){if("OPEN"===t)!0===e?this._withSSR=this._withSSR+1:this._withoutSSR=this._withoutSSR+1;else{if("CLOSE"!==t)throw(0,tL.newError)("Channel SSR Callback invoked with action other than 'OPEN' or 'CLOSE'");!0===e?this._withSSR=this._withSSR-1:this._withoutSSR=this._withoutSSR-1}},mL.prototype.SSREnabled=function(){return 0<this._withSSR&&0===this._withoutSSR},mL);function mL(e){var t=e.id,r=e.address,n=e.routingContext,o=e.hostNameResolver,i=e.config,u=e.log,a=e.userAgent,s=e.boltAgent,c=e.authTokenManager,l=e.routingTablePurgeDelay,e=e.newPool,f=YD.call(this,{id:t,config:i,log:u,userAgent:a,boltAgent:s,authTokenManager:c,newPool:e},function(n){return XD(f,void 0,void 0,function(){var t,r;return JD(this,function(e){switch(e.label){case 0:return t=uL.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent(),this._routingContext,this._channelSsrCallback.bind(this)]))]}})})})||this;return f._routingContext=KD(KD({},n),{address:r.toString()}),f._seedRouter=r,f._rediscovery=new rL.default(f._routingContext),f._loadBalancingStrategy=new iL.LeastConnectedLoadBalancingStrategy(f._connectionPool),f._startTime=0,f._hostNameResolver=o,f._dnsResolver=new nL.HostNameResolver,f._log=u,f._useSeedRouter=!0,f._routingTableRegistry=new FL(l?(0,tL.int)(l):vL),f._refreshRoutingTable=aL.functional.reuseOngoingRequest(f._refreshRoutingTable,f),f._withSSR=0,f._withoutSSR=0,f}ln.default=ql;BL.prototype.register=function(e){return this._tables.set(e.database,e),this},BL.prototype.apply=function(e,t){var t=void 0===t?{}:t,r=t.applyWhenExists,t=t.applyWhenDontExists,t=void 0===t?function(){}:t;return this._tables.has(e)?r(this._tables.get(e)):"string"==typeof e||null===e?t():this._forEach(r),this},BL.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},BL.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},BL.prototype._forEach=function(e){var t,r;try{for(var n=$D(this._tables),o=n.next();!o.done;o=n.next())e(eL(o.value,2)[1])}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},BL.prototype._remove=function(e){return this._tables.delete(e),this},BL.prototype._removeIf=function(e){var t,r;try{for(var n=$D(this._tables),o=n.next();!o.done;o=n.next()){var i=eL(o.value,2),u=i[0];e(i[1])&&this._remove(u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this};var gL,OL,wL,EL,PL,TL,SL,jL,CL,IL,RL,AL,x,kL,rc,ML,NL,xL,DL,LL,UL,FL=BL;function BL(e){this._tables=new Map,this._routingTablePurgeDelay=e}function VL(e,t,r){void 0===r&&(r={}),NL(e,"Bolt URL");var n,o=LL.parseDatabaseUrl(e),i=!1,u=!1;switch(o.scheme){case"bolt":break;case"bolt+s":u=!0,n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":u=!0,n="TRUST_ALL_CERTIFICATES";break;case"neo4j":i=!0;break;case"neo4j+s":n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",i=u=!0;break;case"neo4j+ssc":n="TRUST_ALL_CERTIFICATES",i=u=!0;break;default:throw new Error("Unknown scheme: ".concat(o.scheme))}if(u){if("encrypted"in r||"trust"in r)throw new Error("Encryption/trust can only be configured either through URL or config, not both");r.encrypted=ML,r.trust=n,r.clientCertificate=(0,x.resolveCertificateProvider)(r.clientCertificate)}var a=function(e){if("object"==typeof(t=e)&&null!=t&&"getToken"in t&&"handleSecurityException"in t&&"function"==typeof t.getToken&&"function"==typeof t.handleSecurityException)return e;var t=e;return(t=t||{}).scheme=t.scheme||"none",(0,x.staticAuthTokenManager)({authToken:t})}(t),s=(r.userAgent=r.userAgent||UL,r.boltAgent=x.internal.boltAgent.fromVersion(AL.default),DL.fromUrl(o.hostAndPort)),t={address:s,typename:i?"Routing":"Direct",routing:i};return new RL.Driver(t,r,function(){{if(i)return function(e,t,r,n){return new kL.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if(xL(o.query))return function(e,t,r){return new kL.DirectConnectionProvider({id:e,config:t,log:r,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function qL(r,n){return CL(this,void 0,void 0,function(){var t;return IL(this,function(e){switch(e.label){case 0:t=VL(r,{scheme:"none",principal:"",credentials:""},n),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,t.getNegotiatedProtocolVersion()];case 2:return e.sent(),[2,!0];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})}return xf=rg,gL=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(xf,"__esModule",{value:!0}),xf.RoutingConnectionProvider=xf.DirectConnectionProvider=xf.PooledConnectionProvider=xf.SingleConnectionProvider=void 0,OL=hy,Object.defineProperty(xf,"SingleConnectionProvider",{enumerable:!0,get:function(){return gL(OL).default}}),wL=dg,Object.defineProperty(xf,"PooledConnectionProvider",{enumerable:!0,get:function(){return gL(wL).default}}),EL=O,Object.defineProperty(xf,"DirectConnectionProvider",{enumerable:!0,get:function(){return gL(EL).default}}),PL=ln,Object.defineProperty(xf,"RoutingConnectionProvider",{enumerable:!0,get:function(){return gL(PL).default}}),Bl=jt,SL=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),jL=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Kf=r&&r.__importStar||(TL=function(e){return(TL=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=TL(e),n=0;n<r.length;n++)"default"!==r[n]&&SL(t,e,r[n]);return jL(t,e),t}),Kl=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||SL(t,e,r)},Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.packstream=Bl.channel=Bl.buf=Bl.bolt=Bl.loadBalancing=void 0,Bl.loadBalancing=Kf(Zl),Bl.bolt=Kf(F),Bl.buf=Kf(vh),Bl.channel=Kf(Dd),Bl.packstream=Kf(cm),Kl(rg,Bl),T=L,CL=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},IL=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Jp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(T,"__esModule",{value:!0}),T.UnboundRelationship=T.Relationship=T.Node=T.Record=T.ServerInfo=T.GqlStatusObject=T.Notification=T.QueryStatistics=T.ProfiledPlan=T.Plan=T.ResultSummary=T.RxResult=T.RxManagedTransaction=T.RxTransaction=T.RxSession=T.EagerResult=T.Result=T.ManagedTransaction=T.Transaction=T.Session=T.Driver=T.temporal=T.spatial=T.graph=T.error=T.routing=T.session=T.types=T.logging=T.auth=T.isRetryableError=T.isRetriableError=T.Neo4jError=T.integer=T.isUnsupportedType=T.isUnboundRelationship=T.isRelationship=T.isPathSegment=T.isPath=T.isNode=T.isDateTime=T.isLocalDateTime=T.isDate=T.isTime=T.isLocalTime=T.isDuration=T.isPoint=T.isInt=T.int=T.authTokenManagers=void 0,T.StandardCase=T.RecordObjectMapping=T.mappingDecorators=T.rule=T.Rules=T.Rule=T.VectorType=T.Vector=T.vector=T.isVector=T.clientCertificateProviders=T.notificationFilterMinimumSeverityLevel=T.notificationFilterDisabledClassification=T.notificationFilterDisabledCategory=T.notificationSeverityLevel=T.notificationClassification=T.notificationCategory=T.resultTransformers=T.bookmarkManager=T.DateTime=T.LocalDateTime=T.Date=T.Time=T.LocalTime=T.Duration=T.Integer=T.Point=T.PathSegment=T.Path=void 0,T.driver=VL,T.hasReachableServer=qL,RL=U,Object.defineProperty(T,"Driver",{enumerable:!0,get:function(){return RL.Driver}}),AL=Jp(l),x=e,Object.defineProperty(T,"authTokenManagers",{enumerable:!0,get:function(){return x.authTokenManagers}}),Object.defineProperty(T,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(T,"isRetriableError",{enumerable:!0,get:function(){return x.isRetriableError}}),Object.defineProperty(T,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(T,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(T,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(T,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(T,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(T,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(T,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(T,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(T,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(T,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(T,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(T,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(T,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(T,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(T,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(T,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(T,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(T,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(T,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(T,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(T,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(T,"isUnsupportedType",{enumerable:!0,get:function(){return x.isUnsupportedType}}),Object.defineProperty(T,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(T,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(T,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(T,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(T,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(T,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(T,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(T,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(T,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(T,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(T,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(T,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(T,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(T,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(T,"GqlStatusObject",{enumerable:!0,get:function(){return x.GqlStatusObject}}),Object.defineProperty(T,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(T,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(T,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(T,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(T,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(T,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(T,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(T,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(T,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(T,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(T,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(T,"notificationClassification",{enumerable:!0,get:function(){return x.notificationClassification}}),Object.defineProperty(T,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(T,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(T,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return x.notificationFilterDisabledClassification}}),Object.defineProperty(T,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(T,"clientCertificateProviders",{enumerable:!0,get:function(){return x.clientCertificateProviders}}),Object.defineProperty(T,"isVector",{enumerable:!0,get:function(){return x.isVector}}),Object.defineProperty(T,"Vector",{enumerable:!0,get:function(){return x.Vector}}),Object.defineProperty(T,"VectorType",{enumerable:!0,get:function(){return x.VectorType}}),Object.defineProperty(T,"vector",{enumerable:!0,get:function(){return x.vector}}),Object.defineProperty(T,"Rule",{enumerable:!0,get:function(){return x.Rule}}),Object.defineProperty(T,"Rules",{enumerable:!0,get:function(){return x.Rules}}),Object.defineProperty(T,"rule",{enumerable:!0,get:function(){return x.rule}}),Object.defineProperty(T,"mappingDecorators",{enumerable:!0,get:function(){return x.mappingDecorators}}),Object.defineProperty(T,"RecordObjectMapping",{enumerable:!0,get:function(){return x.RecordObjectMapping}}),Object.defineProperty(T,"StandardCase",{enumerable:!0,get:function(){return x.StandardCase}}),kL=jt,rc=Jp(w),T.RxSession=rc.default,id=Jp(sr),T.RxTransaction=id.default,Vf=Jp(G),T.RxManagedTransaction=Vf.default,Jp=Jp(C),T.RxResult=Jp.default,c=x.internal.util,ML=c.ENCRYPTION_ON,NL=c.assertString,xL=c.isEmptyObjectOrNull,DL=x.internal.serverAddress.ServerAddress,LL=x.internal.urlUtil,UL="neo4j-javascript/"+AL.default,c={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},T.logging=c,Fl={Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,PathSegment:x.PathSegment,Path:x.Path,Result:x.Result,EagerResult:x.EagerResult,ResultSummary:x.ResultSummary,Record:x.Record,Point:x.Point,Date:x.Date,DateTime:x.DateTime,Duration:x.Duration,LocalDateTime:x.LocalDateTime,LocalTime:x.LocalTime,Time:x.Time,Integer:x.Integer,Vector:x.Vector,VectorType:x.VectorType,Rule:x.Rule,Rules:x.Rules},T.types=Fl,Mh={READ:RL.READ,WRITE:RL.WRITE},T.session=Mh,nb={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},T.integer=nb,Hl={isPoint:x.isPoint},T.spatial=Hl,Ul={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},T.temporal=Ul,w_={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},T.graph=w_,nb={authTokenManagers:x.authTokenManagers,driver:VL,hasReachableServer:qL,int:x.int,isInt:x.isInt,isPoint:x.isPoint,isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime,isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship,isUnsupportedType:x.isUnsupportedType,integer:nb,Neo4jError:x.Neo4jError,isRetriableError:x.isRetriableError,isRetryableError:x.isRetryableError,auth:x.auth,logging:c,types:Fl,session:Mh,routing:x.routing,error:x.error,graph:w_,spatial:Hl,temporal:Ul,Driver:RL.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:rc.default,RxTransaction:id.default,RxManagedTransaction:Vf.default,RxResult:Jp.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,GqlStatusObject:x.GqlStatusObject,ServerInfo:x.ServerInfo,Record:x.Record,Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,Path:x.Path,PathSegment:x.PathSegment,Point:x.Point,Integer:x.Integer,Duration:x.Duration,LocalTime:x.LocalTime,Time:x.Time,Date:x.Date,LocalDateTime:x.LocalDateTime,DateTime:x.DateTime,bookmarkManager:x.bookmarkManager,resultTransformers:x.resultTransformers,notificationCategory:x.notificationCategory,notificationSeverityLevel:x.notificationSeverityLevel,notificationFilterDisabledCategory:x.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:x.notificationFilterMinimumSeverityLevel,clientCertificateProviders:x.clientCertificateProviders,isVector:x.isVector,vector:x.vector,rule:x.rule,mappingDecorators:x.mappingDecorators,RecordObjectMapping:x.RecordObjectMapping,StandardCase:x.StandardCase},T.default=nb,D(L)});
|
|
1
|
+
((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).neo4j=t()})(this,function(){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L={},U={},e={},t={},n={},F={},B=(Object.defineProperty(F,"__esModule",{value:!0}),F.createBrokenObject=function(r,e){void 0===e&&(e={});function n(){throw r}return new Proxy(e,{get:function(e,t){return t===B||(t===V?r:void("toJSON"!==t&&n()))},set:n,apply:n,construct:n,defineProperty:n,deleteProperty:n,getOwnPropertyDescriptor:n,getPrototypeOf:n,has:n,isExtensible:n,ownKeys:n,preventExtensions:n,setPrototypeOf:n})},F.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[B]},F.getBrokenObjectReason=function(e){return e[V]},"__isBrokenObject__"),V="__reason__";Object.defineProperty(n,"__esModule",{value:!0}),n.stringify=function(e,t){return JSON.stringify(e,function(e,r){return(0,q.isBrokenObject)(r)?{__isBrokenObject__:!0,__reason__:(0,q.getBrokenObjectReason)(r)}:"bigint"==typeof r?"".concat(r,"n"):!0!==(null==t?void 0:t.sortedElements)||"object"!=typeof r||Array.isArray(r)?!0!==(null==t?void 0:t.useCustomToString)||"object"!=typeof r||Array.isArray(r)||"function"!=typeof r.toString||r.toString===Object.prototype.toString?r:null==r?void 0:r.toString():Object.keys(r).sort().reduce(function(e,t){return e[t]=r[t],e},{})})};var q=F;var W,z,H,G={},o=(o=G,Object.defineProperty(o,"__esModule",{value:!0}),o.rawPolyfilledDiagnosticRecord=void 0,o.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(o.rawPolyfilledDiagnosticRecord),r&&r.__extends||(W=function(e,t){return(W=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])}))(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}W(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Y=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),K=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=r&&r.__importStar||(z=function(e){return(z=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=z(e),n=0;n<r.length;n++)"default"!==r[n]&&Y(t,e,r[n]);return K(t,e),t}),Z=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.GQLError=t.Neo4jError=t.isRetryableError=t.isRetriableError=void 0,t.newError=function(e,t,r,n,o,i){return new oe(e,null!=t?t:ee,null!=n?n:"50N42",null!=o?o:"error: general processing exception - unexpected error. "+e,null!=i?i:Q.rawPolyfilledDiagnosticRecord,r)},t.newGQLError=function(e,t,r,n,o){return new te(e,null!=r?r:"50N42",null!=n?n:"error: general processing exception - unexpected error. "+e,null!=o?o:Q.rawPolyfilledDiagnosticRecord,t)},i(n)),Q=G,i={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"},X=(Object.freeze(i),Object.values(i)),J="ServiceUnavailable",$=(t.SERVICE_UNAVAILABLE=J,"SessionExpired"),ee=(t.SESSION_EXPIRED=$,t.PROTOCOL_ERROR="ProtocolError","N/A"),te=(H=Error,o(re,H),re.prototype.containsGqlCause=function(e){return void 0!==this.findByGqlStatus(e)},re.prototype.findByGqlStatus=function(e){return this.gqlStatus===e?this:void 0!==this.cause&&(this.cause instanceof re||this.cause instanceof oe)?this.cause.findByGqlStatus(e):void 0},Object.defineProperty(re.prototype,"diagnosticRecordAsJsonString",{get:function(){return Z.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),re);function re(e,t,r,n,o){e=H.call(this,e,null!=o?{cause:o}:void 0)||this;return e.constructor=re,e.__proto__=re.prototype,e.cause=null!=o?o:void 0,e.gqlStatus=t,e.gqlStatusDescription=r,e.diagnosticRecord=n,e.classification=void 0!==(o=e.diagnosticRecord)&&void 0!==o._classification&&X.includes(o._classification)?null==o?void 0:o._classification:"UNKNOWN",e.rawClassification=null!=(t=null==n?void 0:n._classification)?t:void 0,e.name="GQLError",e}t.GQLError=te;o(ie,ne=te),ie.isRetriable=function(e){return this.isRetryable(e)},ie.isRetryable=function(e){return null!=e&&e instanceof ie&&e.retryable};var ne,oe=ie;function ie(e,t,r,n,o,i){e=ne.call(this,e,r,n,o,i)||this,e.constructor=ie,e.__proto__=ie.prototype,e.code=t,e.name="Neo4jError",n=(r=t)===J||r===$||"Neo.ClientError.Security.AuthorizationExpired"===r||(e=>!0===(null==e?void 0:e.includes("TransientError")))(r);return e.retriable=n,e.retryable=n,e}i=(t.Neo4jError=oe).isRetriable,t.isRetriableError=i,o=oe.isRetryable;t.isRetryableError=o;var i={},ue=(Object.defineProperty(i,"__esModule",{value:!0}),i.toString=i.toNumber=i.inSafeRange=i.isInt=i.int=void 0,t),ae=new Map,o=(d.prototype.inSafeRange=function(){return this.greaterThanOrEqual(d.MIN_SAFE_VALUE)&&this.lessThanOrEqual(d.MAX_SAFE_VALUE)},d.prototype.toInt=function(){return this.low},d.prototype.toNumber=function(){return this.high*se+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(se)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(se)+BigInt(e.low>>>0)))},d.prototype.toNumberOrInfinity=function(){return this.lessThan(d.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(d.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},d.prototype.toString=function(e){if((e=null!=e?e:10)<2||36<e)throw RangeError("radix out of range: "+e.toString());if(this.isZero())return"0";var t,r,n;if(this.isNegative())return this.equals(d.MIN_VALUE)?(t=d.fromNumber(e),n=(r=this.div(t)).multiply(t).subtract(this),r.toString(e)+n.toInt().toString(e)):"-"+this.negate().toString(e);for(var o=d.fromNumber(Math.pow(e,6)),i=(n=this,"");;){var u=n.div(o),a=(n.subtract(u.multiply(o)).toInt()>>>0).toString(e);if((n=u).isZero())return a+i;for(;a.length<6;)a="0"+a;i=""+a+i}},d.prototype.valueOf=function(){return this.toBigInt()},d.prototype.getHighBits=function(){return this.high},d.prototype.getLowBits=function(){return this.low},d.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(d.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,t=0,t=31;0<t&&0==(e&1<<t);t--);return 0!==this.high?t+33:t+1},d.prototype.isZero=function(){return 0===this.high&&0===this.low},d.prototype.isNegative=function(){return this.high<0},d.prototype.isPositive=function(){return 0<=this.high},d.prototype.isOdd=function(){return 1==(1&this.low)},d.prototype.isEven=function(){return 0==(1&this.low)},d.prototype.equals=function(e){e=d.fromValue(e);return this.high===e.high&&this.low===e.low},d.prototype.notEquals=function(e){return!this.equals(e)},d.prototype.lessThan=function(e){return this.compare(e)<0},d.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},d.prototype.greaterThan=function(e){return 0<this.compare(e)},d.prototype.greaterThanOrEqual=function(e){return 0<=this.compare(e)},d.prototype.compare=function(e){var t,r,e=d.fromValue(e);return this.equals(e)?0:(t=this.isNegative(),r=e.isNegative(),t&&!r||(t||!r)&&this.subtract(e).isNegative()?-1:1)},d.prototype.negate=function(){return this.equals(d.MIN_VALUE)?d.MIN_VALUE:this.not().add(d.ONE)},d.prototype.add=function(e){var e=d.fromValue(e),t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=0,a=0,s=0,c=0;return a+=(s=s+((c+=o+(65535&e.low))>>>16)+(n+(e.low>>>16)))>>>16,d.fromBits((s&=65535)<<16|(c&=65535),((u+=(a+=r+(65535&e.high))>>>16)+(t+i)&65535)<<16|(a&=65535))},d.prototype.subtract=function(e){e=d.fromValue(e);return this.add(e.negate())},d.prototype.multiply=function(e){var t,r,n,o,i,u,a,s,c,l,f;return this.isZero()||(e=d.fromValue(e)).isZero()?d.ZERO:this.equals(d.MIN_VALUE)?e.isOdd()?d.MIN_VALUE:d.ZERO:e.equals(d.MIN_VALUE)?this.isOdd()?d.MIN_VALUE:d.ZERO:this.isNegative()?e.isNegative()?this.negate().multiply(e.negate()):this.negate().multiply(e).negate():e.isNegative()?this.multiply(e.negate()).negate():this.lessThan(le)&&e.lessThan(le)?d.fromNumber(this.toNumber()*e.toNumber()):(t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,f=(f=l=c=s=0)+((c=c+((l+=o*(e=65535&e.low))>>>16)+n*e)>>>16)+((c=(c&65535)+o*a)>>>16),d.fromBits((c&=65535)<<16|(l&=65535),(s=(s=(s+=(f+=r*e)>>>16)+((f=(f&65535)+n*a)>>>16)+((f=(f&65535)+o*u)>>>16))+(t*e+r*a+n*u+o*i)&65535)<<16|(f&=65535)))},d.prototype.div=function(e){var t,r,n,o=d.fromValue(e);if(o.isZero())throw(0,ue.newError)("division by zero");if(this.isZero())return d.ZERO;if(this.equals(d.MIN_VALUE))return o.equals(d.ONE)||o.equals(d.NEG_ONE)?d.MIN_VALUE:o.equals(d.MIN_VALUE)?d.ONE:(n=this.shiftRight(1).div(o).shiftLeft(1)).equals(d.ZERO)?o.isNegative()?d.ONE:d.NEG_ONE:(t=this.subtract(o.multiply(n)),n.add(t.div(o)));if(o.equals(d.MIN_VALUE))return d.ZERO;if(this.isNegative())return o.isNegative()?this.negate().div(o.negate()):this.negate().div(o).negate();if(o.isNegative())return this.div(o.negate()).negate();for(r=d.ZERO,t=this;t.greaterThanOrEqual(o);){n=Math.max(1,Math.floor(t.toNumber()/o.toNumber()));for(var i=Math.ceil(Math.log(n)/Math.LN2),u=i<=48?1:Math.pow(2,i-48),a=d.fromNumber(n),s=a.multiply(o);s.isNegative()||s.greaterThan(t);)s=(a=d.fromNumber(n-=u)).multiply(o);a.isZero()&&(a=d.ONE),r=r.add(a),t=t.subtract(s)}return r},d.prototype.modulo=function(e){e=d.fromValue(e);return this.subtract(this.div(e).multiply(e))},d.prototype.not=function(){return d.fromBits(~this.low,~this.high)},d.prototype.and=function(e){e=d.fromValue(e);return d.fromBits(this.low&e.low,this.high&e.high)},d.prototype.or=function(e){e=d.fromValue(e);return d.fromBits(this.low|e.low,this.high|e.high)},d.prototype.xor=function(e){e=d.fromValue(e);return d.fromBits(this.low^e.low,this.high^e.high)},d.prototype.shiftLeft=function(e){e=d.toNumber(e);return 0==(e&=63)?d.ZERO:e<32?d.fromBits(this.low<<e,this.high<<e|this.low>>>32-e):d.fromBits(0,this.low<<e-32)},d.prototype.shiftRight=function(e){var t=d.toNumber(e),e=d.toNumber(e);return 0==(t&=63)?d.ZERO:e<32?d.fromBits(this.low>>>t|this.high<<32-t,this.high>>t):d.fromBits(this.high>>t-32,0<=this.high?0:-1)},d.isInteger=function(e){return!0===(null==e?void 0:e.__isInteger__)},d.fromInt=function(e){var t;return-128<=(e|=0)&&e<128&&null!=(t=ae.get(e))||(t=new d(e,e<0?-1:0),-128<=e&&e<128&&ae.set(e,t)),t},d.fromBits=function(e,t){return new d(e,t)},d.fromNumber=function(e){return isNaN(e)||!isFinite(e)?d.ZERO:e<=-ce?d.MIN_VALUE:ce<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%se|0,e/se|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,ue.newError)("number format error: empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return d.ZERO;if((t=null!=t?t:10)<2||36<t)throw(0,ue.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,ue.newError)('number format error: interior "-" character: '+e);if(0===r)return d.fromString(e.substring(1),t).negate();for(var o,i,u=d.fromNumber(Math.pow(t,8)),a=d.ZERO,s=0;s<e.length;s+=8){var c,l=Math.min(8,e.length-s),f=e.substring(s,s+l),p=parseInt(f,t);if(!0===n&&(o=f,c=p,i=t,Number.isNaN(o)||Number.isNaN(c)||((e,t,r)=>(e=e.toString(t),t=Math.max(r-e.length,0),r="0".repeat(t),"".concat(r).concat(e)))(c,i,o.length)!==o.toLowerCase()))throw(0,ue.newError)('number format error: "'.concat(f,'" is NaN in radix ').concat(t,": ").concat(e));a=(l<8?(c=d.fromNumber(Math.pow(t,l)),a.multiply(c)):a=a.multiply(u)).add(d.fromNumber(p))}return a},d.fromValue=function(e,t){return void 0===t&&(t={}),e instanceof d?e:"number"==typeof e?(!0===t.ceilFloat&&(e=Math.ceil(e)),d.fromNumber(e)):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(o.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var se=4294967296,ce=se*se/2,le=o.fromInt(1<<24),u=o.fromValue,u=(i.int=u,o.isInteger),u=(i.isInt=u,o.inSafeRange),u=(i.inSafeRange=u,o.toNumber),u=(i.toNumber=u,o.toString),u=(i.toString=u,i.default=o,{}),o={},a={},fe={},pe={},de=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},he=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},be=(Object.defineProperty(pe,"__esModule",{value:!0}),pe.nameConventions=pe.StandardCase=void 0,pe.StandardCase={SnakeCase:"snake_case",KebabCase:"kebab-case",ScreamingSnakeCase:"SCREAMING_SNAKE_CASE",PascalCase:"PascalCase",CamelCase:"camelCase"},pe.nameConventions={snake_case:{tokenize:function(e){return e.split("_")},encode:function(e){return e.join("_")}},"kebab-case":{tokenize:function(e){return e.split("-")},encode:function(e){return e.join("-")}},PascalCase:{tokenize:function(e){return e.split(/(?=[A-Z])/).map(function(e){return e.toLowerCase()})},encode:function(e){var t,r,n="";try{for(var o=de(e),i=o.next();!i.done;i=o.next()){var u=i.value;n+=u=u.charAt(0).toUpperCase()+u.slice(1)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}},camelCase:{tokenize:function(e){return e.split(/(?=[A-Z])/).map(function(e){return e.toLowerCase()})},encode:function(e){var t,r,n="";try{for(var o=de(e.entries()),i=o.next();!i.done;i=o.next()){var u=he(i.value,2),a=u[0],s=u[1];n+=s=0!==a?s.charAt(0).toUpperCase()+s.slice(1):s}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}},SCREAMING_SNAKE_CASE:{tokenize:function(e){return e.split("_").map(function(e){return e.toLowerCase()})},encode:function(e){return e.join("_").toUpperCase()}}},fe),ye=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_e=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ve=(Object.defineProperty(be,"__esModule",{value:!0}),be.RecordObjectMapping=be.defaultNameMapping=be.rulesRegistry=void 0,be.as=function(e,t,r){var n,o,i,u,a="function"==typeof t?t:Object,s=we(t,r),c=[],l=new a;try{for(var f=ye(Object.entries(null!=s?s:{})),p=f.next();!p.done;p=f.next()){var d=_e(p.value,2),h=d[0],b=d[1];c.push(h),ge(e,l,h,b)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}try{for(var y=ye(Object.getOwnPropertyNames(l)),_=y.next();!_.done;_=y.next()){h=_.value;c.includes(h)||ge(e,l,h,null==s?void 0:s[h])}}catch(e){i={error:e}}finally{try{_&&!_.done&&(u=y.return)&&u.call(y)}finally{if(i)throw i.error}}return l},be.valueAs=Oe,be.optionalParameterConversion=function(e,t){return(!0!==t.optional||null!=e)&&null!=e&&null!=t.parameterConversion?t.parameterConversion(e):e},be.validateAndCleanParameters=function(e,t){var r={},n=we(Object.getPrototypeOf(e).constructor,t);{if(null==n)return e;for(var o in n){var i=e[o],u=null!=(u=n[o].from)?u:(0,be.defaultNameMapping)(o);if(null==(i=null!=i&&null!=n[o].parameterConversion?n[o].parameterConversion(i):i)){if(!0!==n[o].optional)throw(0,ve.newError)("Mapped Parameter object did not include required parameter with key ".concat(o,", \n check provided parameters and parameter rules."))}else null!=n[o].validate&&n[o].validate(i,o);r[u]=i}return r}},be.getRules=we,t),me=pe;function ge(e,t,r,n){var o,i,u=(0,be.defaultNameMapping)(r);try{i=e.get(null!=(o=null==n?void 0:n.from)?o:u)}catch(e){if(!0===(null==n?void 0:n.optional)&&e instanceof ve.Neo4jError)return;throw e}e="".concat(t.constructor.name,"#").concat(r);t[r]=Oe(i,e,n)}function Oe(e,t,r){return(!0!==(null==r?void 0:r.optional)||null!=e)&&("function"==typeof(null==r?void 0:r.validate)&&r.validate(e,t),null!=(null==r?void 0:r.convert))?r.convert(e,t):e}function we(e,t){t="object"==typeof e?e:t;return null!=t?t:"object"!=typeof e?be.rulesRegistry[e.name]:void 0}be.rulesRegistry={},be.defaultNameMapping=function(e){return e},be.RecordObjectMapping=Object.freeze({clearMappingRegistry:function(){be.rulesRegistry={}},getCaseTranslator:function(t,r){var e=Object.keys(me.nameConventions);if(!e.includes(t))throw(0,ve.newError)("Naming convention ".concat(t," is not recognized, \n please provide a recognized name convention or manually provide a translation function."));if(e.includes(r))return function(e){return me.nameConventions[t].encode(me.nameConventions[r].tokenize(e))};throw(0,ve.newError)("Naming convention ".concat(r," is not recognized, \n please provide a recognized name convention or manually provide a translation function."))},register:function(e,t){be.rulesRegistry[e.name]=t},translateIdentifiers:function(e){be.defaultNameMapping=e}});var s,Ee,Pe,Te,c,Se,je,Ce,Ie,Re=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ae=(Object.defineProperty(a,"__esModule",{value:!0}),a.ENCRYPTION_OFF=a.ENCRYPTION_ON=void 0,a.isEmptyObjectOrNull=function(e){if(null!==e){if(!xe(e))return!1;for(var t in e)if(void 0!==e[t])return!1}return!0},a.isObject=xe,a.isString=Le,a.assertObject=function(e,t){if(xe(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,Me.stringify)(e))},a.assertString=De,a.assertNumber=function(e,t){if("number"==typeof e)return e;throw new TypeError(t+" expected to be a number but was: "+(0,Me.stringify)(e))},a.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,Ae.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,Me.stringify)(e))},a.assertValidDate=function(e,t){if("[object Date]"!==Object.prototype.toString.call(e))throw new TypeError(t+" expected to be a standard JavaScript Date but was: "+(0,Me.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,Me.stringify)(e));return e},a.validateQueryAndParameters=function(e,t,r){var n="",t=null!=t?t:{},o=null==r?void 0:r.parameterRules,i=null!=(i=null==r?void 0:r.skipAsserts)&&i;if("string"==typeof e)n=e;else if(e instanceof String)n=e.toString();else if("object"==typeof e&&null!=e.text){if(!i&&null!=(null==r?void 0:r.parameterRules))throw(0,ke.newError)("When using a Query object, parameterRules should be present in the object and not in a separate argument.");n=e.text,t=null!=(r=e.parameters)?r:{},o=e.parameterRules}i||(t=(0,Ne.validateAndCleanParameters)(t,o),(e=>{if(De(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.")})(n),(e=>{var t;if(!xe(e))throw t=null!=e.constructor?" "+e.constructor.name:"",new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(t," ").concat(JSON.stringify(e)))})(t));return{validatedQuery:n,params:t}},a.equals=function e(t,r){var n,o;if(t===r)return!0;if(null===t||null===r)return!1;if("object"==typeof t&&"object"==typeof r){var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;try{for(var a=Re(i),s=a.next();!s.done;s=a.next()){var c=s.value;if(!e(t[c],r[c]))return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return!0}return!1},i),Me=n,Ne=fe,ke=t;a.ENCRYPTION_ON="ENCRYPTION_ON";function xe(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function De(e,t){if(Le(e))return e;throw new TypeError((0,Me.stringify)(t)+" expected to be string but was: "+(0,Me.stringify)(e))}function Le(e){return"[object String]"===Object.prototype.toString.call(e)}function Ue(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,c.int)(e),this._maxInteger=(0,c.int)(t)}function Fe(e){return(0,c.int)(e).div(12)}function Be(e){return(0,c.int)(e).modulo(12)}function Ve(e,t){return(0,c.int)(t).greaterThan(0)&&(0,c.int)(e).lessThan(0)&&(e=(0,c.int)(e).add(1)),(0,c.int)(e).div(s.SECONDS_PER_HOUR)}function qe(e,t){(0,c.int)(t).greaterThan(0)&&(0,c.int)(e).lessThan(0)&&(e=(0,c.int)(e).add(1));t=(0,c.int)(e).div(s.SECONDS_PER_MINUTE),e=t.isNegative();return Ye(t=e?t.negate():t,s.MINUTES_PER_HOUR).multiply(e?-1:1)}function We(e,t,r){e=(0,c.int)(e),t=(0,c.int)(t),r=(0,c.int)(r);var n=e.multiply(365);return n=(n=(n=e.greaterThanOrEqual(0)?n.add(e.add(3).div(4).subtract(e.add(99).div(100)).add(e.add(399).div(400))):n.subtract(e.div(-4).subtract(e.div(-100)).add(e.div(-400)))).add(t.multiply(367).subtract(362).div(12))).add(r.subtract(1)),t.greaterThan(2)&&(n=n.subtract(1),(e=>{if((e=(0,c.int)(e)).modulo(4).equals(0)){if(e.modulo(100).equals(0))return!!e.modulo(400).equals(0);return 1}})(e)||(n=n.subtract(1))),n.subtract(s.DAYS_0000_TO_1970)}function ze(e,t){return 1===e?t%400==0||t%4==0&&t%100!=0?29:28:[0,2,4,6,7,9,11].includes(e)?31:30}function He(e,t,r){if((0,je.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,Se.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function Ge(e,t){e=(0,c.int)(e),t=(0,c.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function Ye(e,t){return e=(0,c.int)(e),t=(0,c.int)(t),e.subtract(Ge(e,t).multiply(t))}function Ke(e){return(e=(0,c.int)(e)).equals(0)?"":"."+Ze(e,9)}function Ze(e,t,r){var n=(e=(0,c.int)(e)).isNegative(),o=(e=n?e.negate():e).toString();if(null!=t)for(;o.length<t;)o="0"+o;return n?"-"+o:!0===(null==r?void 0:r.usePositiveSign)?"+"+o:o}a.ENCRYPTION_OFF="ENCRYPTION_OFF",s=o,Pe=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Te=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=r&&r.__importStar||(Ee=function(e){return(Ee=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Ee(e),n=0;n<r.length;n++)"default"!==r[n]&&Pe(t,e,r[n]);return Te(t,e),t}),Object.defineProperty(s,"__esModule",{value:!0}),s.SECONDS_PER_DAY=s.DAYS_PER_400_YEAR_CYCLE=s.DAYS_0000_TO_1970=s.NANOS_PER_HOUR=s.NANOS_PER_MINUTE=s.NANOS_PER_MILLISECOND=s.NANOS_PER_SECOND=s.SECONDS_PER_HOUR=s.SECONDS_PER_MINUTE=s.MINUTES_PER_HOUR=s.NANOSECOND_OF_SECOND_RANGE=s.SECOND_OF_MINUTE_RANGE=s.MINUTE_OF_HOUR_RANGE=s.HOUR_OF_DAY_RANGE=s.DAY_OF_MONTH_RANGE=s.MONTH_OF_YEAR_RANGE=s.YEAR_RANGE=void 0,s.normalizeYearsForDuration=Fe,s.normalizeMonthsForDuration=Be,s.normalizeHoursForDuration=Ve,s.normalizeMinutesForDuration=qe,s.normalizeSecondsForDuration=function(e,t){return(0,c.int)(e).add(Ge(t,s.NANOS_PER_SECOND))},s.normalizeNanosecondsForDuration=function(e){return Ye(e,s.NANOS_PER_SECOND)},s.localTimeToNanoOfDay=function(e,t,r,n){e=(0,c.int)(e),t=(0,c.int)(t),r=(0,c.int)(r),n=(0,c.int)(n);e=e.multiply(s.NANOS_PER_HOUR);return(e=(e=e.add(t.multiply(s.NANOS_PER_MINUTE))).add(r.multiply(s.NANOS_PER_SECOND))).add(n)},s.localDateTimeToEpochSecond=function(e,t,r,n,o,i,u){e=We(e,t,r),t=((e,t,r)=>(e=(0,c.int)(e),t=(0,c.int)(t),r=(0,c.int)(r),(e=(e=e.multiply(s.SECONDS_PER_HOUR)).add(t.multiply(s.SECONDS_PER_MINUTE))).add(r)))(n,o,i);return e.multiply(s.SECONDS_PER_DAY).add(t)},s.dateToEpochDay=We,s.durationToIsoString=function(e,t,r,n){if((0,c.int)(e).equals(0)&&(0,c.int)(t).equals(0)&&(0,c.int)(r).equals(0)&&(0,c.int)(n).equals(0))return"PT0S";var o=Ze(Fe(e)),e=Ze(Be(e)),t=Ze(t),i=Ze(Ve(r,n)),u=Ze(qe(r,n)),r=((e,t)=>{e=(0,c.int)(e),t=(0,c.int)(t);var r,n=e.isNegative(),o=t.greaterThan(0);return e=n&&o?(e=e.add(1).negate().modulo(60).negate()).equals(0)?"-0":e.toString():e.modulo(60).toString(),null!=(r=o?Ke((n?t.negate().add(2*s.NANOS_PER_SECOND):t.add(s.NANOS_PER_SECOND)).modulo(s.NANOS_PER_SECOND)):r)?e+r:e})(r,n);return"P".concat("0"!==o?o+"Y":"")+"".concat("0"!==e?e+"M":"")+"".concat("0"!==t?t+"D":"","T")+"".concat("0"!==i?i+"H":"")+"".concat("0"!==u?u+"M":"")+"".concat("0"!==r?r+"S":"")},s.timeToIsoString=function(e,t,r,n){e=Ze(e,2),t=Ze(t,2),r=Ze(r,2),n=Ke(n);return"".concat(e,":").concat(t,":").concat(r).concat(n)},s.timeZoneOffsetToIsoString=function(e){if((e=(0,c.int)(e)).equals(0))return"Z";var t=e.isNegative();t&&(e=e.multiply(-1));var t=t?"-":"+",r=Ze(e.div(s.SECONDS_PER_HOUR),2),n=Ze(e.div(s.SECONDS_PER_MINUTE).modulo(s.MINUTES_PER_HOUR),2),e=e.modulo(s.SECONDS_PER_MINUTE),e=e.equals(0)?null:Ze(e,2);return null!=e?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},s.dateToIsoString=function(e,t,r){e=(e=>(e=(0,c.int)(e)).isNegative()||e.greaterThan(9999)?Ze(e,6,{usePositiveSign:!0}):Ze(e,4))(e),t=Ze(t,2),r=Ze(r,2);return"".concat(e,"-").concat(t,"-").concat(r)},s.isoStringToStandardDate=function(e){return new Date(e)},s.toStandardDate=function(e){return new Date(e)},s.newDate=function(e){return new Date(e)},s.totalNanoseconds=function(e,t){t=null!=t?t:0;e=e.getMilliseconds()*s.NANOS_PER_MILLISECOND;return((e,t)=>e instanceof c.default?e.add(t):"bigint"==typeof e?e+BigInt(t):e+t)(t,e)},s.timeZoneOffsetInSeconds=function(e){var t=e.getSeconds()-e.getUTCSeconds(),r=e.getMinutes()-e.getUTCMinutes(),n=e.getHours()-e.getUTCHours(),e=(e=>e.getMonth()===e.getUTCMonth()?e.getDate()-e.getUTCDate():e.getFullYear()>e.getUTCFullYear()||e.getMonth()>e.getUTCMonth()&&e.getFullYear()===e.getUTCFullYear()?e.getDate()+ze(e.getUTCMonth(),e.getUTCFullYear())-e.getUTCDate():e.getDate()-(e.getUTCDate()+ze(e.getMonth(),e.getFullYear())))(e);return n*s.SECONDS_PER_HOUR+r*s.SECONDS_PER_MINUTE+t+e*s.SECONDS_PER_DAY},s.assertValidYear=function(e){return He(e,s.YEAR_RANGE,"Year")},s.assertValidMonth=function(e){return He(e,s.MONTH_OF_YEAR_RANGE,"Month")},s.assertValidDay=function(e){return He(e,s.DAY_OF_MONTH_RANGE,"Day")},s.assertValidHour=function(e){return He(e,s.HOUR_OF_DAY_RANGE,"Hour")},s.assertValidMinute=function(e){return He(e,s.MINUTE_OF_HOUR_RANGE,"Minute")},s.assertValidSecond=function(e){return He(e,s.SECOND_OF_MINUTE_RANGE,"Second")},s.assertValidNanosecond=function(e){return He(e,s.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},s.assertValidZoneId=function(t,r){var e=Ce.get(r);if(!0!==e){if(!1===e)throw Ie(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),Ce.set(r,!0)}catch(e){throw Ce.set(r,!1),Ie(r,t)}}},s.floorDiv=Ge,s.floorMod=Ye,c=l(i),Se=t,je=a,Ue.prototype.contains=function(e){var t;return(0,c.isInt)(e)&&e instanceof c.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,c.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},Ue.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},l=Ue,s.YEAR_RANGE=new l(-999999999,999999999),s.MONTH_OF_YEAR_RANGE=new l(1,12),s.DAY_OF_MONTH_RANGE=new l(1,31),s.HOUR_OF_DAY_RANGE=new l(0,23),s.MINUTE_OF_HOUR_RANGE=new l(0,59),s.SECOND_OF_MINUTE_RANGE=new l(0,59),s.NANOSECOND_OF_SECOND_RANGE=new l(0,999999999),s.MINUTES_PER_HOUR=60,s.SECONDS_PER_MINUTE=60,s.SECONDS_PER_HOUR=s.SECONDS_PER_MINUTE*s.MINUTES_PER_HOUR,s.NANOS_PER_SECOND=1e9,s.NANOS_PER_MILLISECOND=1e6,s.NANOS_PER_MINUTE=s.NANOS_PER_SECOND*s.SECONDS_PER_MINUTE,s.NANOS_PER_HOUR=s.NANOS_PER_MINUTE*s.MINUTES_PER_HOUR,s.DAYS_0000_TO_1970=719528,s.DAYS_PER_400_YEAR_CYCLE=146097,s.SECONDS_PER_DAY=86400,Ce=new Map,Ie=function(e,t){return(0,Se.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))};var Qe,Xe=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Je=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=r&&r.__importStar||(Qe=function(e){return(Qe=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Qe(e),n=0;n<r.length;n++)"default"!==r[n]&&Xe(t,e,r[n]);return Je(t,e),t}),$e=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},f=(Object.defineProperty(u,"__esModule",{value:!0}),u.DateTime=u.LocalDateTime=u.Date=u.Time=u.LocalTime=u.Duration=void 0,u.isDuration=function(e){return bt(e,nt)},u.isLocalTime=function(e){return bt(e,ot)},u.isTime=function(e){return bt(e,it)},u.isDate=function(e){return bt(e,ut)},u.isLocalDateTime=function(e){return bt(e,at)},u.isDateTime=function(e){return bt(e,st)},l(o)),et=a,tt=t,rt=l(i),l={value:!0,enumerable:!1,configurable:!1,writable:!1},nt="__isDuration__",ot="__isLocalTime__",it="__isTime__",ut="__isDate__",at="__isLocalDateTime__",st="__isDateTime__",p=(ct.fromString=function(e){if("T"===e.slice(-1).toUpperCase())throw(0,tt.newError)("Duration string '".concat(e,"' ends with 'T', time delimiter must be excluded if Duration contains no time components"));var t=String(e.replace(/,/g,".")).match(new RegExp(/^([-|+]?)[P|p](?:(-?\d*\.?\d*)[Y|y])?(?:(-?\d*\.?\d*)[M|m])?(?:(-?\d*\.?\d*)[W|w])?(?:(-?\d*\.?\d*)[D|d])?/.source+/([T|t](?:(-?\d*\.?\d*)[H|h])?(?:(-?\d*\.?\d*)[M|m])?(?:(-)?(\d*)(\.\d*)?[S|s])?)?$/.source));if(null===t)throw(0,tt.newError)("Duration could not be parsed from string: ".concat(e));if(null==t[2]&&null==t[3]&&null==t[4]&&null==t[5]&&null==t[7]&&null==t[8]&&null==t[10]&&null==t[11])throw(0,tt.newError)("Duration could not be parsed from string: ".concat(e));var e="-"===t[1]?-1:1,r=e*vt(t[2],"Years")*12+vt(t[3],"Months"),n=e*vt(t[4],"Weeks")*7+vt(t[5],"Days"),o=3600*vt(t[7],"Hours")+60*vt(t[8],"Minutes"),i=mt((null!=(i=t[9])?i:"")+(null!=(i=t[10])?i:"0")),u=e*(t=(null!=(u=t[9])?u:"")+"0"+(null!=(u=t[11])?u:""),Math.round(vt(t,"nanoseconds")*Math.pow(10,9)));return Ot(r,"Months"),Ot(n,"Days"),Ot(o,"Seconds"),Ot(u,"Nanoseconds"),new ct((0,rt.int)(r),(0,rt.int)(n),(0,rt.int)(BigInt(e)*(BigInt(o)+i.toBigInt())),(0,rt.int)(u))},ct.prototype.toString=function(){return f.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},ct);function ct(e,t,r,n){this.months=(0,et.assertNumberOrInteger)(e,"Months"),this.days=(0,et.assertNumberOrInteger)(t,"Days"),(0,et.assertNumberOrInteger)(r,"Seconds"),(0,et.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=f.normalizeSecondsForDuration(r,n),"number"==typeof r&&(0,rt.isInt)(this.seconds)&&(this.seconds=this.seconds.toNumber()),"bigint"==typeof r&&(0,rt.isInt)(this.seconds)&&(this.seconds=this.seconds.toBigInt()),this.nanoseconds=f.normalizeNanosecondsForDuration(n),"number"==typeof n&&(0,rt.isInt)(this.nanoseconds)&&(this.nanoseconds=this.nanoseconds.toNumber()),"bigint"==typeof n&&(0,rt.isInt)(this.nanoseconds)&&(this.nanoseconds=this.nanoseconds.toBigInt()),Object.freeze(this)}u.Duration=p,Object.defineProperty(p.prototype,nt,l);lt.fromStandardDate=function(e,t){_t(e,t);t=f.totalNanoseconds(e,t);return new lt(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof rt.default?t.toInt():"bigint"==typeof t?(0,rt.int)(t).toInt():t)},lt.prototype.toString=function(){return f.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)},lt.fromString=function(e){e=String(e.replace(/,/g,".")).match(/^[T|t]?(\d{2})(?::?(\d{2}))?(?::?(\d{2}))?(\.\d+)?$/);if(null===e)throw(0,tt.newError)("LocalTime could not be parsed from string");e=$e(gt(e[1],e[2],e[3],e[4]),4);return new lt(e[0],e[1],e[2],e[3])};p=lt;function lt(e,t,r,n){this.hour=f.assertValidHour(e),this.minute=f.assertValidMinute(t),this.second=f.assertValidSecond(r),this.nanosecond=f.assertValidNanosecond(n),Object.freeze(this)}u.LocalTime=p,Object.defineProperty(p.prototype,ot,l);ft.fromStandardDate=function(e,t){return _t(e,t),new ft(e.getHours(),e.getMinutes(),e.getSeconds(),(0,rt.toNumber)(f.totalNanoseconds(e,t)),f.timeZoneOffsetInSeconds(e))},ft.prototype.toString=function(){return f.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+f.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)},ft.fromString=function(e){e=String(e.replace(/,/g,".")).match(/^[T|t]?(\d{2})(?::?(\d{2}))?(?::?(\d{2}))?(\.\d+)?([Z|z]$|\+|-)(\d{2})?(?::?(\d{2}))?(?::?(\d{2}))?$/);if(null===e)throw(0,tt.newError)("Time could not be parsed from string");var t=$e(gt(e[1],e[2],e[3],e[4]),4),r=t[0],n=t[1],o=t[2],t=t[3];if("Z"===e[5])return new ft(r,n,o,t,(0,rt.int)(0));if(null==e[6])throw(0,tt.newError)("Error parsing timezone offset.");return new ft(r,n,o,t,(0,rt.int)(("+"===e[5]?1:-1)*(3600*mt(e[6]).toInt()+60*mt(e[7]).toInt()+mt(e[8]).toInt())))};p=ft;function ft(e,t,r,n,o){this.hour=f.assertValidHour(e),this.minute=f.assertValidMinute(t),this.second=f.assertValidSecond(r),this.nanosecond=f.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,et.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}u.Time=p,Object.defineProperty(p.prototype,it,l);pt.fromStandardDate=function(e){return this.fromStandardDateLocal(e)},pt.fromStandardDateLocal=function(e){return _t(e),new pt(e.getFullYear(),e.getMonth()+1,e.getDate())},pt.fromStandardDateUTC=function(e){return _t(e),new pt(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate())},pt.prototype.toStandardDate=function(){return f.isoStringToStandardDate(this.toString())},pt.prototype.toString=function(){return f.dateToIsoString(this.year,this.month,this.day)},pt.fromString=function(e){e=String(e.replace(/,/g,".")).match(/^([+|-]\d{5,}|\d{4})-(\d{2})-(\d{2})$/);if(null===e)throw(0,tt.newError)("Date could not be parsed from string. Expects date in format 'YYYY-MM-DD' or '[+|-]YYYYY-MM-DD'");return new pt(mt(e[1]),mt(e[2]),mt(e[3]))};p=pt;function pt(e,t,r){this.year=f.assertValidYear(e),this.month=f.assertValidMonth(t),this.day=f.assertValidDay(r),Object.freeze(this)}u.Date=p,Object.defineProperty(p.prototype,ut,l);dt.fromStandardDate=function(e,t){return _t(e,t),new dt(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,rt.toNumber)(f.totalNanoseconds(e,t)))},dt.prototype.toStandardDate=function(){return f.isoStringToStandardDate(this.toString())},dt.prototype.toString=function(){return yt(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},dt.fromString=function(e){e=String(e.replace(/,/g,".")).match(/^([+|-]\d{5,}|\d{4})-(\d{2})-(\d{2})[T|t](\d{2})(?::?(\d{2}))?(?::?(\d{2}))?(\.\d+)?$/);if(null===e)throw(0,tt.newError)("LocalDateTime could not be parsed from string");var t=$e(gt(e[4],e[5],e[6],e[7]),4),r=t[0],n=t[1],o=t[2],t=t[3];return new dt(mt(e[1]),mt(e[2]),mt(e[3]),r,n,o,t)};p=dt;function dt(e,t,r,n,o,i,u){this.year=f.assertValidYear(e),this.month=f.assertValidMonth(t),this.day=f.assertValidDay(r),this.hour=f.assertValidHour(n),this.minute=f.assertValidMinute(o),this.second=f.assertValidSecond(i),this.nanosecond=f.assertValidNanosecond(u),Object.freeze(this)}u.LocalDateTime=p,Object.defineProperty(p.prototype,at,l);ht.fromStandardDate=function(e,t){return _t(e,t),new ht(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,rt.toNumber)(f.totalNanoseconds(e,t)),f.timeZoneOffsetInSeconds(e),null)},ht.prototype.toStandardDate=function(){return f.toStandardDate(this._toUTC())},ht.prototype.toString=function(){var e;return yt(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?f.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},ht.fromString=function(e){e=String(e.replace(/,/g,".")).match(new RegExp(/^([+|-]\d{5,}|\d{4})-(\d{2})-(\d{2})[T|t](\d{2})(?::?(\d{2}))?(?::?(\d{2}))?(\.\d+)?/.source+/([Z|z]|\+|-)?(?:(\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?(?:\[([^\]]*)\])?$/.source));if(null===e)throw(0,tt.newError)("DateTime could not be parsed from string");var t=$e(gt(e[4],e[5],e[6],e[7]),4),r=t[0],n=t[1],o=t[2],t=t[3];if("Z"===e[8]){if(null!=e[9])throw(0,tt.newError)("DateTime could not be parsed from string, can not parse string with offset after Z");return new ht(mt(e[1]),mt(e[2]),mt(e[3]),r,n,o,t,(0,rt.int)(0),e[12])}if("+"===e[8]||"-"===e[8]){if(null==e[9])throw(0,tt.newError)("DateTime could not be parsed from string, could not parse an offset after ".concat(e[8]," sign."));return new ht(mt(e[1]),mt(e[2]),mt(e[3]),r,n,o,t,(0,rt.int)(("+"===e[8]?1:-1)*(3600*parseInt(e[9])+60*parseInt(e[10])+parseInt("0"+e[11]))),e[12])}if(void 0!==e[12])return new ht(mt(e[1]),mt(e[2]),mt(e[3]),r,n,o,t,void 0,e[12]);throw(0,tt.newError)("DateTime could not be parsed from string, provided string needs either timezoneId or offset")},ht.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=f.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,rt.int)(e).multiply(1e3).add((0,rt.int)(this.nanosecond).div(1e6)).toNumber()};p=ht;function ht(e,t,r,n,o,i,u,a,s){this.year=f.assertValidYear(e),this.month=f.assertValidMonth(t),this.day=f.assertValidDay(r),this.hour=f.assertValidHour(n),this.minute=f.assertValidMinute(o),this.second=f.assertValidSecond(i),this.nanosecond=f.assertValidNanosecond(u);e=$e(((e,t)=>{var r,n=null!=e,o=null!=t&&""!==t;if(n||o)return r=[void 0,void 0],n&&((0,et.assertNumberOrInteger)(e,"Time zone offset in seconds"),r[0]=e),o&&((0,et.assertString)(t,"Time zone ID"),f.assertValidZoneId("Time zone ID",t),r[1]=t),r;throw(0,tt.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(e," and id: ").concat(t))})(a,s),2),t=e[0],r=e[1];this.timeZoneOffsetSeconds=t,this.timeZoneId=null!=r?r:void 0,Object.freeze(this)}function bt(e,t){return null!=e&&!0===e[t]}function yt(e,t,r,n,o,i,u){return f.dateToIsoString(e,t,r)+"T"+f.timeToIsoString(n,o,i,u)}function _t(e,t){(0,et.assertValidDate)(e,"Standard date"),null!=t&&(0,et.assertNumberOrInteger)(t,"Nanosecond")}function vt(e,t){if(void 0===e||0===e.length)return 0;var r=parseFloat(e);if(isNaN(r))throw(0,tt.newError)("Failed to parse temporal field ".concat(t,". Got string: ").concat(e,"."));return r}function mt(e){return void 0===e||0===e.length?(0,rt.int)(0):(0,rt.int)(e)}function gt(e,t,r,n){var o,i,u,n=void 0!==n?parseFloat("0"+n):0,e=void 0===t||""===t?(o=mt(e),i=(0,rt.int)(60*n),u=(0,rt.int)(3600*n%60),(0,rt.int)(3600*n*Math.pow(10,9)%Math.pow(10,9))):void 0===r||""===r?(o=mt(e),i=mt(t),u=(0,rt.int)(60*n%60),(0,rt.int)(60*n*Math.pow(10,9)%Math.pow(10,9))):(o=mt(e),i=mt(t),u=mt(r),(0,rt.int)(n*Math.pow(10,9)));return[o,i,u,e]}function Ot(e,t){if(!Number.isInteger(e))throw(0,tt.newError)("Parsing Duration field: ".concat(t," resulted in a non-integer value. Bolt protocol can only send durations which can be simplified to integer values of months, days, seconds and nanoseconds."))}u.DateTime=p,Object.defineProperty(p.prototype,st,l);var p={},wt=(Object.defineProperty(p,"__esModule",{value:!0}),p.PathSegment=p.Path=p.UnboundRelationship=p.Relationship=p.Node=void 0,p.isNode=function(e){return It(e,Pt)},p.isRelationship=function(e){return It(e,Tt)},p.isUnboundRelationship=function(e){return It(e,St)},p.isPath=function(e){return It(e,jt)},p.isPathSegment=function(e){return It(e,Ct)},n),Et=fe,l={value:!0,enumerable:!1,configurable:!1,writable:!1},Pt="__isNode__",Tt="__isRelationship__",St="__isUnboundRelationship__",jt="__isPath__",Ct="__isPathSegment__";function It(e,t){return null!=e&&!0===e[t]}At.prototype.as=function(e,t){var r=this;return(0,Et.as)({get:function(e){return r.properties[e]}},e,t)},At.prototype.toString=function(){for(var e="("+this.elementId,t=0;t<this.labels.length;t++)e+=":"+this.labels[t];var r=Object.keys(this.properties);if(0<r.length){e+=" {";for(t=0;t<r.length;t++)0<t&&(e+=","),e+=r[t]+":"+(0,wt.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var Rt=At;function At(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=Lt(n,function(){return e.toString()})}p.Node=Rt,Object.defineProperty(Rt.prototype,Pt,l);Nt.prototype.as=function(e,t){var r=this;return(0,Et.as)({get:function(e){return r.properties[e]}},e,t)},Nt.prototype.toString=function(){var e="("+this.startNodeElementId+")-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,wt.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var Mt=Nt;function Nt(e,t,r,n,o,i,u,a){this.identity=e,this.start=t,this.end=r,this.type=n,this.properties=o,this.elementId=Lt(i,function(){return e.toString()}),this.startNodeElementId=Lt(u,function(){return t.toString()}),this.endNodeElementId=Lt(a,function(){return r.toString()})}p.Relationship=Mt,Object.defineProperty(Mt.prototype,Tt,l);kt.prototype.bind=function(e,t){return new Mt(this.identity,e,t,this.type,this.properties,this.elementId)},kt.prototype.bindTo=function(e,t){return new Mt(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},kt.prototype.as=function(e,t){var r=this;return(0,Et.as)({get:function(e){return r.properties[e]}},e,t)},kt.prototype.toString=function(){var e="-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,wt.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};Rt=kt;function kt(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=Lt(n,function(){return e.toString()})}p.UnboundRelationship=Rt,Object.defineProperty(Rt.prototype,St,l);function xt(e,t,r){this.start=e,this.relationship=t,this.end=r}p.PathSegment=xt,Object.defineProperty(xt.prototype,Ct,l);function Dt(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function Lt(e,t){return null==e?t():e}p.Path=Dt,Object.defineProperty(Dt.prototype,jt,l);var Rt={},Ut=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Ft=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Bt=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Vt=(Object.defineProperty(Rt,"__esModule",{value:!0}),t),qt=fe;function Wt(e,t,r){var n;this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!=r?r:(n={},e.forEach(function(e,t){n[e]=t}),n)}Wt.prototype.forEach=function(e){var t,r;try{for(var n=Ft(this.entries()),o=n.next();!o.done;o=n.next()){var i=Bt(o.value,2),u=i[0];e(i[1],u,this)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},Wt.prototype.map=function(e){var t,r,n=[];try{for(var o=Ft(this.entries()),i=o.next();!i.done;i=o.next()){var u=Bt(i.value,2),a=u[0];n.push(e(u[1],a,this))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},Wt.prototype.as=function(e,t){return(0,qt.as)(this,e,t)},Wt.prototype.entries=function(){var t;return Ut(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,[this.keys[t],this._fields[t]]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},Wt.prototype.values=function(){var t;return Ut(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},Wt.prototype[Symbol.iterator]=function(){var t;return Ut(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},Wt.prototype.toObject=function(){var t,e,r={};try{for(var n=Ft(this.entries()),o=n.next();!o.done;o=n.next()){var i=Bt(o.value,2);r[i[0]]=i[1]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},Wt.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,Vt.newError)("This record has no field with key '".concat(e.toString(),"', available keys are: [")+this.keys.toString()+"].")}else t=e;if(t>this._fields.length-1||t<0)throw(0,Vt.newError)("This record has no field with index '"+t.toString()+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[t]},Wt.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},Rt.default=Wt;var l={},zt=(Object.defineProperty(l,"__esModule",{value:!0}),l.Point=void 0,l.isPoint=function(e){var t=e;return null!=e&&!0===t[Ht]},a),Ht="__isPoint__",h=(Gt.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(Yt(this.srid),", x=").concat(Yt(this.x),", y=").concat(Yt(this.y),"}"):"Point{srid=".concat(Yt(this.srid),", x=").concat(Yt(this.x),", y=").concat(Yt(this.y),", z=").concat(Yt(this.z),"}")},Gt);function Gt(e,t,r,n){this.srid=(0,zt.assertNumberOrInteger)(e,"SRID"),this.x=(0,zt.assertNumber)(t,"X coordinate"),this.y=(0,zt.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,zt.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function Yt(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}l.Point=h,Object.defineProperty(h.prototype,Ht,{value:!0,enumerable:!1,configurable:!1,writable:!1});var Kt,h={},Zt={},Qt=r&&r.__assign||function(){return(Qt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Xt=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Jt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),b=r&&r.__importStar||(Kt=function(e){return(Kt=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Kt(e),n=0;n<r.length;n++)"default"!==r[n]&&Xt(t,e,r[n]);return Jt(t,e),t}),$t=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},er=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},tr=(Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.GqlStatusObject=Zt.Notification=Zt.notificationClassification=Zt.notificationCategory=Zt.notificationSeverityLevel=void 0,Zt.polyfillGqlStatusObject=dr,Zt.polyfillNotification=pr,Zt.buildGqlStatusObjectFromMetadata=function(e){if(null!=e.statuses)return e.statuses.map(function(e){return new lr(e)});var t=(e=>!0===(null==e?void 0:e.have_records_streamed)?hr.SUCCESS:!1===(null==e?void 0:e.has_keys)?hr.OMITTED_RESULT:!0===(null==e?void 0:e.pulled)?hr.NO_DATA:hr.NO_DATA_UNKNOWN_SUBCONDITION)(e.stream_summary);return er([t],$t(null!=(e=null==(t=e.notifications)?void 0:t.map(dr))?e:[]),!1).sort(function(e,t){return yr(e)-yr(t)})},Zt.buildNotificationsFromMetadata=function(e){return null==e.notifications?null==e.statuses?[]:e.statuses.map(pr).filter(function(e){return null!=e}):e.notifications.map(function(e){return new cr(e)})},b(n)),rr=G,nr=i,or={WARNING:{gql_status:"01N42",status_description:"warn: unknown warning"},NO_DATA:{gql_status:"02N42",status_description:"note: no data - unknown subcondition"},INFORMATION:{gql_status:"03N42",status_description:"info: unknown notification"},ERROR:{gql_status:"50N42",status_description:"error: general processing exception - unexpected error"}},ir={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},ur=(Zt.notificationSeverityLevel=ir,Object.freeze(ir),Object.values(ir)),b={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",SCHEMA:"SCHEMA",UNKNOWN:"UNKNOWN"},ar=(Zt.notificationCategory=b,Object.freeze(b),Object.values(b)),sr=b,cr=(Zt.notificationClassification=sr,function(e){this.code=e.code,this.title=e.title,this.description=e.description,this.position=_r(e.position),this.severityLevel=vr(e.severity),this.rawSeverityLevel=e.severity,this.category=mr(e.category),this.rawCategory=e.category}),lr=(Zt.Notification=cr,Object.defineProperty(fr.prototype,"diagnosticRecordAsJsonString",{get:function(){return tr.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),fr);function fr(e){var t;this.gqlStatus=e.gql_status,this.statusDescription=e.status_description,this.diagnosticRecord=null!=(t=e.diagnostic_record)?t:{},this.position=null!=this.diagnosticRecord._position?_r(this.diagnosticRecord._position):void 0,this.severity=vr(this.diagnosticRecord._severity),this.rawSeverity=this.diagnosticRecord._severity,this.classification=mr(this.diagnosticRecord._classification),this.rawClassification=this.diagnosticRecord._classification,this.isNotification=null!=e.neo4j_code,Object.freeze(this)}function pr(e){var t;if(null!=e.neo4j_code)return new cr({code:e.neo4j_code,title:e.title,description:e.description,severity:null==(t=e.diagnostic_record)?void 0:t._severity,category:null==(t=e.diagnostic_record)?void 0:t._classification,position:null==(t=e.diagnostic_record)?void 0:t._position})}function dr(e){var t=e.severity===ir.WARNING?or.WARNING:or.INFORMATION,r={gql_status:t.gql_status,status_description:null!=(r=e.description)?r:t.status_description,neo4j_code:e.code,title:e.title,diagnostic_record:Qt({},rr.rawPolyfilledDiagnosticRecord)};return null!=e.severity&&(r.diagnostic_record._severity=e.severity),null!=e.category&&(r.diagnostic_record._classification=e.category),null!=e.position&&(r.diagnostic_record._position=e.position),new lr(r)}var hr={SUCCESS:new(Zt.GqlStatusObject=lr)({gql_status:"00000",status_description:"note: successful completion",diagnostic_record:rr.rawPolyfilledDiagnosticRecord}),NO_DATA:new lr({gql_status:"02000",status_description:"note: no data",diagnostic_record:rr.rawPolyfilledDiagnosticRecord}),NO_DATA_UNKNOWN_SUBCONDITION:new lr(Qt(Qt({},or.NO_DATA),{diagnostic_record:rr.rawPolyfilledDiagnosticRecord})),OMITTED_RESULT:new lr({gql_status:"00001",status_description:"note: successful completion - omitted result",diagnostic_record:rr.rawPolyfilledDiagnosticRecord})};Object.freeze(hr);var br=Object.freeze({"02":0,"01":1,"00":2});function yr(e){var e=null==(e=e.gqlStatus)?void 0:e.slice(0,2);return null!=(e=br[e])?e:9999}function _r(e){return null==e?{}:{offset:(0,nr.toNumber)(e.offset),line:(0,nr.toNumber)(e.line),column:(0,nr.toNumber)(e.column)}}function vr(e){return ur.includes(e)?e:ir.UNKNOWN}function mr(e){return ar.includes(e)?e:sr.UNKNOWN}Zt.default=lr,Object.defineProperty(h,"__esModule",{value:!0}),h.Stats=h.QueryStatistics=h.ProfiledPlan=h.Plan=h.ServerInfo=h.queryType=void 0;var gr=i,Or=Zt,G=(wr.prototype.hasPlan=function(){return this.plan instanceof Er},wr.prototype.hasProfile=function(){return this.profile instanceof Pr},wr);function wr(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new Sr(null!=(e=r.stats)?e:{}),this.plan=(null!=r.plan||null!=r.profile)&&new Er(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new Pr(r.profile),this.notifications=(0,Or.buildNotificationsFromMetadata)(r),this.gqlStatusObjects=(0,Or.buildGqlStatusObjectFromMetadata)(r),this.server=new Cr(r.server,n),this.resultConsumedAfter=r.result_consumed_after,this.resultAvailableAfter=r.result_available_after,this.database={name:null!=(e=r.db)?e:null}}var Er=function t(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.children=null!=e.children?e.children.map(function(e){return new t(e)}):[]},Pr=(h.Plan=Er,Tr.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},Tr);function Tr(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=Ir("dbHits",e),this.rows=Ir("rows",e),this.pageCacheMisses=Ir("pageCacheMisses",e),this.pageCacheHits=Ir("pageCacheHits",e),this.pageCacheHitRatio=Ir("pageCacheHitRatio",e),this.time=Ir("time",e),this.children=null!=e.children?e.children.map(function(e){return new Tr(e)}):[]}h.ProfiledPlan=Pr;h.Stats=function(){this.nodesCreated=0,this.nodesDeleted=0,this.relationshipsCreated=0,this.relationshipsDeleted=0,this.propertiesSet=0,this.labelsAdded=0,this.labelsRemoved=0,this.indexesAdded=0,this.indexesRemoved=0,this.constraintsAdded=0,this.constraintsRemoved=0},jr.prototype.containsUpdates=function(){var r=this;return void 0!==this._containsUpdates?this._containsUpdates:0<Object.keys(this._stats).reduce(function(e,t){return e+r._stats[t]},0)},jr.prototype.updates=function(){return this._stats},jr.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},jr.prototype.systemUpdates=function(){return this._systemUpdates};var Sr=jr;function jr(r){var n=this;this._stats={nodesCreated:0,nodesDeleted:0,relationshipsCreated:0,relationshipsDeleted:0,propertiesSet:0,labelsAdded:0,labelsRemoved:0,indexesAdded:0,indexesRemoved:0,constraintsAdded:0,constraintsRemoved:0},this._systemUpdates=0,Object.keys(r).forEach(function(e){var t=e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()});t in n._stats?n._stats[t]=(0,gr.toNumber)(r[e]):"systemUpdates"===t?n._systemUpdates=(0,gr.toNumber)(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}h.QueryStatistics=Sr;var Cr=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Ir(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?(t=t[e],(0,gr.toNumber)(t)):r}h.ServerInfo=Cr;function Rr(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}h.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},h.default=G;var b={},G=(Object.defineProperty(b,"__esModule",{value:!0}),b.notificationFilterDisabledClassification=b.notificationFilterDisabledCategory=b.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),G=(b.notificationFilterMinimumSeverityLevel=G,Object.freeze(G),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"}),G=(b.notificationFilterDisabledCategory=G,Object.freeze(G),b.notificationFilterDisabledClassification=G,b.default=Rr,{}),y={},Ar={},_=(Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.FailedObserver=Ar.CompletedObserver=void 0,Mr.prototype.subscribe=function(e){kr(e,e.onKeys,[]),kr(e,e.onCompleted,{})},Mr.prototype.cancel=function(){},Mr.prototype.pause=function(){},Mr.prototype.resume=function(){},Mr.prototype.prepareToHandleSingleResponse=function(){},Mr.prototype.markCompleted=function(){},Mr.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},Mr);function Mr(){}function Nr(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function kr(e,t,r){null!=t&&t.bind(e)(r)}Ar.CompletedObserver=_,Nr.prototype.subscribe=function(e){kr(e,e.onError,this._error),this._observers.push(e)},Nr.prototype.onError=function(t){kr(this,this._beforeError,t),this._observers.forEach(function(e){return kr(e,e.onError,t)})},Nr.prototype.cancel=function(){},Nr.prototype.pause=function(){},Nr.prototype.resume=function(){},Nr.prototype.markCompleted=function(){},Nr.prototype.prepareToHandleSingleResponse=function(){},Ar.FailedObserver=Nr;var xr,_={},Dr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Lr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),v=r&&r.__importStar||(xr=function(e){return(xr=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=xr(e),n=0;n<r.length;n++)"default"!==r[n]&&Dr(t,e,r[n]);return Lr(t,e),t}),Ur=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Fr=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Br=(Object.defineProperty(_,"__esModule",{value:!0}),_.Bookmarks=void 0,v(a)),v=(Vr.empty=function(){return qr},Vr.prototype.isEmpty=function(){return 0===this._values.length},Vr.prototype.values=function(){return this._values},Vr.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},Vr.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},Vr);function Vr(e){this._values=(e=>{if(null==e||""===e)return[];if(Br.isString(e))return[e];if(Array.isArray(e)){for(var t=new Set,r=function r(e){return e.reduce(function(e,t){return Array.isArray(t)?e.concat(r(t)):e.concat(t)},[])}(e),n=0;n<r.length;n++){var o=r[n];if(null!=o){if(!Br.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return Fr([],Ur(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))})(e)}var qr=new(_.Bookmarks=v)(null);var v={},Wr={},m=(Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.ProtocolVersion=void 0,zr.prototype.getMajor=function(){return this.major},zr.prototype.getMinor=function(){return this.major},zr.prototype.isLessThan=function(e){return this.major<e.major||this.major===e.major&&this.minor<e.minor},zr.prototype.isGreaterThan=function(e){return this.major>e.major||this.major===e.major&&this.minor>e.minor},zr.prototype.isGreaterOrEqualTo=function(e){return!this.isLessThan(e)},zr.prototype.isLessOrEqualTo=function(e){return!this.isGreaterThan(e)},zr.prototype.isEqualTo=function(e){return this.major===e.major&&this.minor===e.minor},zr.prototype.toString=function(){return this.major.toString()+"."+this.minor.toString()},zr);function zr(e,t){this.major=e,this.minor=t}Wr.ProtocolVersion=m,Object.defineProperty(v,"__esModule",{value:!0}),v.TELEMETRY_APIS=v.BOLT_PROTOCOL_V6_0=v.BOLT_PROTOCOL_V5_8=v.BOLT_PROTOCOL_V5_7=v.BOLT_PROTOCOL_V5_6=v.BOLT_PROTOCOL_V5_5=v.BOLT_PROTOCOL_V5_4=v.BOLT_PROTOCOL_V5_3=v.BOLT_PROTOCOL_V5_2=v.BOLT_PROTOCOL_V5_1=v.BOLT_PROTOCOL_V5_0=v.BOLT_PROTOCOL_V4_4=v.BOLT_PROTOCOL_V4_3=v.BOLT_PROTOCOL_V4_2=v.BOLT_PROTOCOL_V4_1=v.BOLT_PROTOCOL_V4_0=v.BOLT_PROTOCOL_V3=v.BOLT_PROTOCOL_V2=v.BOLT_PROTOCOL_V1=v.DEFAULT_POOL_MAX_SIZE=v.DEFAULT_POOL_ACQUISITION_TIMEOUT=v.DEFAULT_CONNECTION_TIMEOUT_MILLIS=v.ACCESS_MODE_WRITE=v.ACCESS_MODE_READ=v.FETCH_ALL=void 0;var Hr,Gr,m=Wr,g=(v.FETCH_ALL=-1,v.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,v.DEFAULT_POOL_MAX_SIZE=100,v.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,v.ACCESS_MODE_READ="READ",v.ACCESS_MODE_WRITE="WRITE",new m.ProtocolVersion(1,0)),g=(v.BOLT_PROTOCOL_V1=g,new m.ProtocolVersion(2,0)),g=(v.BOLT_PROTOCOL_V2=g,new m.ProtocolVersion(3,0)),g=(v.BOLT_PROTOCOL_V3=g,new m.ProtocolVersion(4,0)),g=(v.BOLT_PROTOCOL_V4_0=g,new m.ProtocolVersion(4,1)),g=(v.BOLT_PROTOCOL_V4_1=g,new m.ProtocolVersion(4,2)),g=(v.BOLT_PROTOCOL_V4_2=g,new m.ProtocolVersion(4,3)),g=(v.BOLT_PROTOCOL_V4_3=g,new m.ProtocolVersion(4,4)),g=(v.BOLT_PROTOCOL_V4_4=g,new m.ProtocolVersion(5,0)),g=(v.BOLT_PROTOCOL_V5_0=g,new m.ProtocolVersion(5,1)),g=(v.BOLT_PROTOCOL_V5_1=g,new m.ProtocolVersion(5,2)),g=(v.BOLT_PROTOCOL_V5_2=g,new m.ProtocolVersion(5,3)),g=(v.BOLT_PROTOCOL_V5_3=g,new m.ProtocolVersion(5,4)),g=(v.BOLT_PROTOCOL_V5_4=g,new m.ProtocolVersion(5,5)),g=(v.BOLT_PROTOCOL_V5_5=g,new m.ProtocolVersion(5,6)),g=(v.BOLT_PROTOCOL_V5_6=g,new m.ProtocolVersion(5,7)),g=(v.BOLT_PROTOCOL_V5_7=g,new m.ProtocolVersion(5,8)),g=(v.BOLT_PROTOCOL_V5_8=g,new m.ProtocolVersion(6,0)),m=(v.BOLT_PROTOCOL_V6_0=g,v.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),g={},O=r&&r.__extends||(Hr=function(e,t){return(Hr=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])}))(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}Hr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Yr=(Object.defineProperty(g,"__esModule",{value:!0}),g.Logger=void 0,t),Kr="error",Zr="warn",Qr="info",Xr="debug",Jr=((w={})[Kr]=0,w[Zr]=1,w[Qr]=2,w[Xr]=3,w),w=($r.create=function(e){return null!=(null==e?void 0:e.logging)?new $r((e=>{if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=Jr[e];if(null!=t||0===t)return e;throw(0,Yr.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(Jr).toString()))})(e=e.logging),(e=>{if(null!=(null==e?void 0:e.logger)){var t=e.logger;if(null!=t&&"function"==typeof t)return t}throw(0,Yr.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))})(e)):this.noOp()},$r.noOp=function(){return tn},$r.prototype.isErrorEnabled=function(){return rn(this._level,Kr)},$r.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(Kr,e)},$r.prototype.isWarnEnabled=function(){return rn(this._level,Zr)},$r.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(Zr,e)},$r.prototype.isInfoEnabled=function(){return rn(this._level,Qr)},$r.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(Qr,e)},$r.prototype.isDebugEnabled=function(){return rn(this._level,Xr)},$r.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(Xr,e)},$r);function $r(e,t){this._level=e,this._loggerFunction=t}function en(){return Gr.call(this,Qr,function(e,t){})||this}g.Logger=w,O(en,Gr=w),en.prototype.isErrorEnabled=function(){return!1},en.prototype.error=function(e){},en.prototype.isWarnEnabled=function(){return!1},en.prototype.warn=function(e){},en.prototype.isInfoEnabled=function(){return!1},en.prototype.info=function(e){},en.prototype.isDebugEnabled=function(){return!1},en.prototype.debug=function(e){};var tn=new en;function rn(e,t){return Jr[t]<=Jr[e]}var nn,O=r&&r.__extends||(nn=function(e,t){return(nn=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])}))(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}nn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),on=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},un=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},an=(Object.defineProperty(m,"__esModule",{value:!0}),m.EMPTY_CONNECTION_HOLDER=m.ReadOnlyConnectionHolder=m.ConnectionHolder=void 0,t),sn=a,cn=v,ln=_,fn=g,w=(pn.prototype.mode=function(){return this._mode},pn.prototype.database=function(){return this._database},pn.prototype.setDatabase=function(e){this._database=e},pn.prototype.bookmarks=function(){return this._bookmarks},pn.prototype.connectionProvider=function(){return this._connectionProvider},pn.prototype.referenceCount=function(){return this._referenceCount},pn.prototype.initializeConnection=function(e){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider,e),this._referenceCount++,!0)},pn.prototype._createConnectionPromise=function(o,i){return on(this,void 0,void 0,function(){var t,r,n;return un(this,function(e){switch(e.label){case 0:return r=(t=o).acquireConnection,n={accessMode:this._mode,database:this._database},[4,this._getBookmarks()];case 1:return[4,r.apply(t,[(n.bookmarks=e.sent(),n.impersonatedUser=this._impersonatedUser,n.onDatabaseNameResolved=this._onDatabaseNameResolved,n.auth=this._auth,n.homeDb=i,n)])];case 2:return[2,e.sent()]}})})},pn.prototype._getBookmarks=function(){return on(this,void 0,void 0,function(){return un(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},pn.prototype.getConnection=function(){return this._connectionPromise},pn.prototype.releaseConnection=function(){return 0!==this._referenceCount&&(this._referenceCount--,0===this._referenceCount)?this._releaseConnection():this._connectionPromise},pn.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},pn.prototype.log=function(){return this._log},pn.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(vn).then(function(){return e.release().then(function(){return null})}):e.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},pn.prototype._logError=function(e){return this._log.isWarnEnabled()&&this._log.warn("ConnectionHolder got an error while releasing the connection. Error ".concat(e,". Stacktrace: ").concat(e.stack)),null},pn);function pn(e){var t=e.mode,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,a=e.getConnectionAcquistionBookmarks,s=e.auth,e=e.log;this._mode=null!=t?t:cn.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=r?(0,sn.assertString)(r,"database"):"",this._bookmarks=null!=n?n:ln.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._auth=s,this._log=e,this._logError=this._logError.bind(this),this._getConnectionAcquistionBookmarks=null!=a?a:function(){return Promise.resolve(ln.Bookmarks.empty())}}m.ConnectionHolder=w;O(yn,dn=w),yn.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},yn.prototype.getConnection=function(){return this._connectionHolder.getConnection()},yn.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},yn.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var dn,hn,bn=yn;function yn(e){var t=dn.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider(),log:e.log()})||this;return t._connectionHolder=e,t}function _n(){return hn.call(this,{log:fn.Logger.create({})})||this}m.ReadOnlyConnectionHolder=bn,m.default=bn,O(_n,hn=w),_n.prototype.mode=function(){},_n.prototype.database=function(){},_n.prototype.initializeConnection=function(){return!0},_n.prototype.getConnection=function(){return on(this,void 0,void 0,function(){return un(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,an.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},_n.prototype.releaseConnection=function(){return on(this,void 0,void 0,function(){return un(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},_n.prototype.close=function(){return on(this,void 0,void 0,function(){return un(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};bn=new _n;function vn(e){return null}m.EMPTY_CONNECTION_HOLDER=bn;var mn,O={},gn=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),On=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),w=r&&r.__importStar||(mn=function(e){return(mn=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=mn(e),n=0;n<r.length;n++)"default"!==r[n]&&gn(t,e,r[n]);return On(t,e),t}),wn=(Object.defineProperty(O,"__esModule",{value:!0}),O.TxConfig=void 0,w(a)),En=t,Pn=i,bn=(Tn.empty=function(){return Sn},Tn.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},Tn);function Tn(e,t){var r;null!=(r=e)&&wn.assertObject(r,"Transaction config"),this.timeout=((e,t)=>{if(wn.isObject(e)&&null!=e.timeout){wn.assertNumberOrInteger(e.timeout,"Transaction timeout"),(e=>"number"==typeof e.timeout&&!Number.isInteger(e.timeout))(e)&&!0===(null==t?void 0:t.isInfoEnabled())&&null!=t&&t.info("Transaction timeout expected to be an integer, got: ".concat(e.timeout,". The value will be rounded up."));t=(0,Pn.int)(e.timeout,{ceilFloat:!0});if(t.isNegative())throw(0,En.newError)("Transaction timeout should not be negative");return t}return null})(e,t),this.metadata=(e=>{if(wn.isObject(e)&&null!=e.metadata){e=e.metadata;if(wn.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null})(e)}var Sn=new(O.TxConfig=bn)({});var w={},jn=r&&r.__assign||function(){return(jn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Cn=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},In=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Rn=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},An=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Mn=(Object.defineProperty(w,"__esModule",{value:!0}),w.TransactionExecutor=void 0,t),Nn=v;function kn(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,An([e,t],Rn(r),!1))}function xn(e){return clearTimeout(e)}function Dn(e,t,r,n,o){void 0===o&&(o={setTimeout:kn,clearTimeout:xn}),this._maxRetryTimeMs=Ln(e,3e4),this._initialRetryDelayMs=Ln(t,1e3),this._multiplier=Ln(r,2),this._jitterFactor=Ln(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=Nn.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}function Ln(e,t){return null!=e?e:t}Dn.prototype.execute=function(n,o,i){var u=this,a={apiTransactionConfig:{api:this.telemetryApi,onTelemetrySuccess:function(){a.apiTransactionConfig=void 0}}};return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i,a).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i,a)})},Dn.prototype.close=function(){var t=this;this._inFlightTimeoutIds.forEach(function(e){return t._clearTimeout(e)}),this._inFlightTimeoutIds=[]},Dn.prototype._retryTransactionPromise=function(o,i,e,r,u,a,s){var c=this;return Date.now()-r>this._maxRetryTimeMs||!(0,Mn.isRetryableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=c._computeDelayWithJitter(u),n=c._setTimeout(function(){c._inFlightTimeoutIds=c._inFlightTimeoutIds.filter(function(e){return e!==n}),c._executeTransactionInsidePromise(o,i,e,t,a,s).catch(t)},r);c._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*c._multiplier;return c._retryTransactionPromise(o,i,e,r,t,a,s)})},Dn.prototype._executeTransactionInsidePromise=function(u,a,s,c,l,f){return Cn(this,void 0,void 0,function(){var t,r,n,o,i=this;return In(this,function(e){switch(e.label){case 0:return(e.trys.push([0,4,,5]),r=u(null!=(null==f?void 0:f.apiTransactionConfig)?jn({},null==f?void 0:f.apiTransactionConfig):void 0),this.pipelineBegin)?(n=r,[3,3]):[3,1];case 1:return[4,r];case 2:n=e.sent(),e.label=3;case 3:return t=n,[3,5];case 4:return o=e.sent(),c(o),[2];case 5:return o=(null!=l?l:function(e){return e})(t),this._safeExecuteTransactionWork(o,a).then(function(e){return i._handleTransactionWorkSuccess(e,t,s,c)}).catch(function(e){return i._handleTransactionWorkFailure(e,t,c)}),[2]}})})},Dn.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},Dn.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},Dn.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},Dn.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},Dn.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,Mn.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,Mn.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,Mn.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,Mn.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},w.TransactionExecutor=Dn;var bn={},Un=r&&r.__assign||function(){return(Un=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Fn=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Bn=(Object.defineProperty(bn,"__esModule",{value:!0}),bn.Url=void 0,bn.parseDatabaseUrl=function(e){(0,Bn.assertString)(e,"URL");var t=(e=>(e=e.trim()).includes("://")?{schemeMissing:!1,url:e}:{schemeMissing:!0,url:"none://".concat(e)})(e),r=(e=>{function u(e,t){t=e.indexOf(t);return 0<=t?[e.substring(0,t),e[t],e.substring(t+1)]:[e,"",""]}function t(e){var t,r={},n=((t="@")===(t=0<=(t=(o=e).lastIndexOf(t))?[o.substring(0,t),o[t],o.substring(t+1)]:["","",o])[1]&&(r.userInfo=decodeURIComponent(t[0]),e=t[2]),Fn((o="]",n=u(n=e,i="["),[(i=u(n[2],o))[0],i[2]]),2)),o=n[0],i=n[1];return""!==o?(r.host=o,t=u(i,":")):(t=u(e,":"),r.host=t[0]),":"===t[1]&&(r.port=t[2]),r}var r,n={};return":"===(r=u(e,":"))[1]&&(n.scheme=decodeURIComponent(r[0]),e=r[2]),"#"===(r=u(e,"#"))[1]&&(n.fragment=decodeURIComponent(r[2]),e=r[0]),"?"===(r=u(e,"?"))[1]&&(n.query=r[2],e=r[0]),e.startsWith("//")?(r=u(e.substr(2),"/"),(n=Un(Un({},n),t(r[0]))).path=r[1]+r[2]):n.path=e,n})(t.url),t=t.schemeMissing?null:(e=>null==e?null:e=":"===(e=e.trim()).charAt(e.length-1)?e.substring(0,e.length-1):e)(r.scheme),n=(e=>{if(null!=e)return e.trim();throw new Error("Unable to extract host from null or undefined URL")})(r.host),o=(e=>{if(""===e||null==e)throw new Error("Illegal host ".concat(e));return e.includes(":")?Gn(e):e})(n),i=((e,t)=>null==(e="string"==typeof e?parseInt(e,10):e)||isNaN(e)?Yn(t):e)(r.port,t),o="".concat(o,":").concat(i),u=((e,r)=>{var e=null!=e?(e=>e="?"===(null==(e=(null!=e?e:"").trim())?void 0:e.charAt(0))?e.substring(1,e.length):e)(e):null,n={};return null!=e&&e.split("&").forEach(function(e){e=e.split("=");if(2!==e.length)throw new Error("Invalid parameters: '".concat(e.toString(),"' in URL '").concat(r,"'."));var t=Hn(e[0],"key",r),e=Hn(e[1],"value",r);if(void 0!==n[t])throw new Error("Duplicated query parameters with key '".concat(t,"' in URL '").concat(r,"'"));n[t]=e}),n})(null!=(u=r.query)?u:(e=>"string"!=typeof e?null:Fn(e.split("?"),2)[1])(r.resourceName),e);return new zn(t,n,i,o,u)},bn.defaultPortForScheme=Yn,bn.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},bn.formatIPv6Address=function(e,t){e=Gn(e);return"".concat(e,":").concat(t)},a),Vn=7687,qn=7474,Wn=7473,zn=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Hn(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function Gn(e){var t="["===e.charAt(0),r="]"===e.charAt(e.length-1);if(t||r){if(t&&r)return e;throw new Error("Illegal IPv6 address ".concat(e))}return"[".concat(e,"]")}function Yn(e){return"http"===e?qn:"https"===e?Wn:Vn}bn.Url=zn;var Kn,Zn={},Qn=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Xn=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),E=r&&r.__importStar||(Kn=function(e){return(Kn=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Kn(e),n=0;n<r.length;n++)"default"!==r[n]&&Qn(t,e,r[n]);return Xn(t,e),t}),Jn=(Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.ServerAddress=void 0,a),$n=E(bn);function eo(e,t,r,n){this._host=(0,Jn.assertString)(e,"host"),this._resolved=null!=t?(0,Jn.assertString)(t,"resolved"):null,this._port=(0,Jn.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}eo.prototype.host=function(){return this._host},eo.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},eo.prototype.port=function(){return this._port},eo.prototype.resolveWith=function(e){return new eo(this._host,e,this._port,this._hostPort)},eo.prototype.asHostPort=function(){return this._hostPort},eo.prototype.asKey=function(){return this._hostPort},eo.prototype.toString=function(){return this._stringValue},eo.fromUrl=function(e){e=$n.parseDatabaseUrl(e);return new eo(e.host,null,e.port,e.hostAndPort)},Zn.ServerAddress=eo;var E={},P={};function to(){}Object.defineProperty(P,"__esModule",{value:!0}),to.prototype.resolve=function(){throw new Error("Abstract function")},to.prototype._resolveToItself=function(e){return Promise.resolve([e])},P.default=to;var T={},ro=(Object.defineProperty(T,"__esModule",{value:!0}),Zn);function no(e){return Promise.resolve([e])}function oo(e){this._resolverFunction=null!=e?e:no}oo.prototype.resolve=function(t){var r=this;return new Promise(function(e){return e(r._resolverFunction(t.asHostPort()))}).then(function(e){if(Array.isArray(e))return e.map(function(e){return ro.ServerAddress.fromUrl(e)});throw new TypeError("Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses."+"Each address is '<host>:<port>'. Got: ".concat(e))})},T.default=oo;var io,S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P=(Object.defineProperty(E,"__esModule",{value:!0}),E.ConfiguredCustomResolver=E.BaseHostNameResolver=void 0,S(P)),P=(E.BaseHostNameResolver=P.default,S(T)),S=(E.ConfiguredCustomResolver=P.default,{}),P={};Object.defineProperty(P,"__esModule",{value:!0}),P.fromVersion=function(e,t){void 0===t&&(t=function(){return{get userAgent(){}}});var t=t(),r=null!=t.userAgent?t.userAgent.split("(")[1].split(")")[0]:void 0,t=t.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:r,languageDetails:t}},uo=S,io=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),j=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||io(t,e,r)},Object.defineProperty(uo,"__esModule",{value:!0}),j(P,uo);var j={},P={},uo=(Object.defineProperty(P,"__esModule",{value:!0}),P.DEFAULT_ACQUISITION_TIMEOUT=P.DEFAULT_MAX_SIZE=void 0,P.DEFAULT_MAX_SIZE=100,P.DEFAULT_ACQUISITION_TIMEOUT=6e4,ao.defaultConfig=function(){return new ao(100,6e4)},ao.fromDriverConfig=function(e){return new ao(co(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,co(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},ao);function ao(e,t){this.maxSize=so(e,100),this.acquisitionTimeout=so(t,6e4)}function so(e,t){return co(e)?e:t}function co(e){return 0===e||null!=e}P.default=uo;var uo={},lo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},fo=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},po=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ho=(Object.defineProperty(uo,"__esModule",{value:!0}),po(P)),bo=t,yo=g,po=(_o.prototype.acquire=function(s,c,l){return lo(this,void 0,void 0,function(){var o,i,t,u,a=this;return fo(this,function(e){switch(e.label){case 0:if(o=c.asKey(),i=this._acquireRequests,t=i[o],(u=null!=s.startTime&&0!==s.startTime?(new Date).getTime()-s.startTime:0)>=this._acquisitionTimeout)throw this.getAcquisitionTimeoutError(c);return null==t&&(i[o]=[]),[4,new Promise(function(e,t){var r=setTimeout(function(){var e=i[o];null!=e&&(i[o]=e.filter(function(e){return e!==n})),n.isCompleted()||n.reject(a.getAcquisitionTimeoutError(c))},a._acquisitionTimeout-u),n=("object"==typeof r&&r.unref(),new go(o,s,l,e,t,r,a._log));i[o].push(n),a._processPendingAcquireRequests(c)})];case 1:return[2,e.sent()]}})})},_o.prototype.getAcquisitionTimeoutError=function(e){var t=e.asKey(),r=this.activeResourceCount(e),e=this.has(e)?this._pools[t].length:0;return(0,bo.newError)("Connection acquisition timed out in ".concat(this._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(r,", Idle conn count = ").concat(e,"."))},_o.prototype.purge=function(t){return lo(this,void 0,void 0,function(){return fo(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t.asKey())];case 1:return[2,e.sent()]}})})},_o.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},_o.prototype.close=function(){return lo(this,void 0,void 0,function(){var r=this;return fo(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(t){return lo(r,void 0,void 0,function(){return fo(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}})})})).then()];case 1:return[2,e.sent()]}})})},_o.prototype.keepAll=function(o){return lo(this,void 0,void 0,function(){var t,r,n=this;return fo(this,function(e){switch(e.label){case 0:return t=o.map(function(e){return e.asKey()}),r=Object.keys(this._pools),r=r.filter(function(e){return!t.includes(e)}),[4,Promise.all(r.map(function(t){return lo(n,void 0,void 0,function(){return fo(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t)];case 1:return[2,e.sent()]}})})})).then()];case 1:return[2,e.sent()]}})})},_o.prototype.has=function(e){return e.asKey()in this._pools},_o.prototype.activeResourceCount=function(e){return null!=(e=this._activeResourceCounts[e.asKey()])?e:0},_o.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return null==t&&(t=new So,this._pools[e]=t,this._pendingCreates[e]=0),t},_o.prototype._acquire=function(c,l,f){return lo(this,void 0,void 0,function(){var t,n,r,o,i,u,a,s=this;return fo(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,bo.newError)("Pool is closed, it is no more able to serve requests.");if(t=l.asKey(),n=this._getOrInitializePoolFor(t),f)return[3,10];e.label=1;case 1:if(!(0<n.length))return[3,10];if(null==(r=n.pop()))return[3,1];vo(t,this._activeResourceCounts),null!=this._removeIdleObserver&&this._removeIdleObserver(r),o=!1,e.label=2;case 2:return e.trys.push([2,4,,6]),[4,this._validateOnAcquire(c,r)];case 3:return o=e.sent(),[3,6];case 4:return i=e.sent(),mo(t,this._activeResourceCounts),n.removeInUse(r),[4,this._destroy(r)];case 5:throw e.sent(),i;case 6:return o?(this._log.isDebugEnabled()&&this._log.debug("".concat(r," acquired from the pool ").concat(t)),[2,{resource:r,pool:n}]):[3,7];case 7:return mo(t,this._activeResourceCounts),n.removeInUse(r),[4,this._destroy(r)];case 8:e.sent(),e.label=9;case 9:return[3,1];case 10:if(0<this._maxSize&&this.activeResourceCount(l)+this._pendingCreates[t]>=this._maxSize)return[2,{resource:null,pool:n}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=11;case 11:return(e.trys.push([11,,15,16]),this.activeResourceCount(l)+n.length>=this._maxSize&&f)?null==(a=n.pop())?[3,13]:(null!=this._removeIdleObserver&&this._removeIdleObserver(a),n.removeInUse(a),[4,this._destroy(a)]):[3,13];case 12:e.sent(),e.label=13;case 13:return[4,this._create(c,l,function(t,r){return lo(s,void 0,void 0,function(){return fo(this,function(e){switch(e.label){case 0:return[4,this._release(t,r,n)];case 1:return[2,e.sent()]}})})})];case 14:return u=e.sent(),n.pushInUse(u),vo(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(u," created for the pool ").concat(t)),[3,16];case 15:return this._pendingCreates[t]=this._pendingCreates[t]-1,[7];case 16:return[2,{resource:u,pool:n}]}})})},_o.prototype._release=function(n,o,i){return lo(this,void 0,void 0,function(){var t,r=this;return fo(this,function(e){switch(e.label){case 0:t=n.asKey(),e.label=1;case 1:return(e.trys.push([1,,9,10]),i.isActive())?[4,this._validateOnRelease(o)]:[3,6];case 2:return e.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(o," destroyed and can't be released to the pool ").concat(t," because it is not functional")),i.removeInUse(o),[4,this._destroy(o)]);case 3:return e.sent(),[3,5];case 4:null!=this._installIdleObserver&&this._installIdleObserver(o,{onError:function(e){r._log.debug("Idle connection ".concat(o," destroyed because of error: ").concat(e));e=r._pools[t];null!=e&&(r._pools[t]=e.filter(function(e){return e!==o}),e.removeInUse(o)),r._destroy(o).catch(function(){})}}),i.push(o),this._log.isDebugEnabled()&&this._log.debug("".concat(o," released to the pool ").concat(t)),e.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(o," destroyed and can't be released to the pool ").concat(t," because pool has been purged")),i.removeInUse(o),[4,this._destroy(o)];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:return mo(t,this._activeResourceCounts),this._processPendingAcquireRequests(n),[7];case 10:return[2]}})})},_o.prototype._purgeKey=function(o){return lo(this,void 0,void 0,function(){var t,r,n;return fo(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],null==t)return[3,2];for(;0<t.length;)null!=(n=t.pop())&&(null!=this._removeIdleObserver&&this._removeIdleObserver(n),r.push(this._destroy(n)));return t.close(),delete this._pools[o],[4,Promise.all(r)];case 1:e.sent(),e.label=2;case 2:return[2]}})})},_o.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];null!=e&&(null!=(n=e.shift())?this._acquire(n.context,r,n.requireNew).catch(function(e){return n.reject(e),{resource:null,pool:null}}).then(function(e){var t=e.resource,e=e.pool;null!=t&&null!=e?n.isCompleted()?o._release(r,t,e).catch(function(e){o._log.isDebugEnabled()&&o._log.debug("".concat(t," could not be release back to the pool. Cause: ").concat(e))}):n.resolve(t):n.isCompleted()||(null==o._acquireRequests[i]&&(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}).catch(function(e){return n.reject(e)}):delete this._acquireRequests[i])},_o);function _o(e){var t=e.create,t=void 0===t?function(e,t,r){return lo(s,void 0,void 0,function(){return fo(this,function(e){switch(e.label){case 0:return[4,Promise.reject(new Error("Not implemented"))];case 1:return[2,e.sent()]}})})}:t,r=e.destroy,r=void 0===r?function(e){return lo(s,void 0,void 0,function(){return fo(this,function(e){switch(e.label){case 0:return[4,Promise.resolve()];case 1:return[2,e.sent()]}})})}:r,n=e.validateOnAcquire,n=void 0===n?function(e,t){return!0}:n,o=e.validateOnRelease,o=void 0===o?function(e){return!0}:o,i=e.installIdleObserver,i=void 0===i?function(e,t){}:i,u=e.removeIdleObserver,u=void 0===u?function(e){}:u,a=e.config,a=void 0===a?ho.default.defaultConfig():a,e=e.log,e=void 0===e?yo.Logger.noOp():e,s=this;this._create=t,this._destroy=r,this._validateOnAcquire=n,this._validateOnRelease=o,this._installIdleObserver=i,this._removeIdleObserver=u,this._maxSize=a.maxSize,this._acquisitionTimeout=a.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function vo(e,t){var r=null!=(r=t[e])?r:0;t[e]=r+1}function mo(e,t){var r=(null!=(r=t[e])?r:0)-1;0<r?t[e]=r:delete t[e]}Object.defineProperty(Oo.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(Oo.prototype,"requireNew",{get:function(){var e;return null!=(e=this._config.requireNew)&&e},enumerable:!1,configurable:!0}),Oo.prototype.isCompleted=function(){return this._completed},Oo.prototype.resolve=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(e," acquired from the pool ").concat(this._key)),this._resolve(e))},Oo.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var go=Oo;function Oo(e,t,r,n,o,i,u){this._key=e,this._context=t,this._resolve=n,this._reject=o,this._timeoutId=i,this._log=u,this._completed=!1,this._config=null!=r?r:{}}jo.prototype.isActive=function(){return this._active},jo.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},jo.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},jo.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(jo.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),jo.prototype.pop=function(){var e=this._elements.pop();return null!=e&&this._elementsInUse.add(e),e},jo.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},jo.prototype.pushInUse=function(e){this._elementsInUse.add(e)},jo.prototype.removeInUse=function(e){this._elementsInUse.delete(e)};var wo,Eo,Po,To,So=jo;function jo(){this._active=!0,this._elements=[],this._elementsInUse=new Set}uo.default=po,po=j,Eo=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Po=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),C=r&&r.__importStar||(wo=function(e){return(wo=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=wo(e),n=0;n<r.length;n++)"default"!==r[n]&&Eo(t,e,r[n]);return Po(t,e),t}),xo=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(po,"__esModule",{value:!0}),po.DEFAULT_MAX_SIZE=po.DEFAULT_ACQUISITION_TIMEOUT=po.PoolConfig=po.Pool=void 0,To=C(P),po.PoolConfig=To.default,Object.defineProperty(po,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return To.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(po,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return To.DEFAULT_MAX_SIZE}}),C=xo(uo),po.Pool=C.default,po.default=C.default;function Co(e){console.log("Uncaught error when processing result: "+e)}function Io(e){}function Ro(e){}var Ao,Mo,No=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ko=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),P=r&&r.__importStar||(Ao=function(e){return(Ao=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Ao(e),n=0;n<r.length;n++)"default"!==r[n]&&No(t,e,r[n]);return ko(t,e),t}),xo=(Object.defineProperty(y,"__esModule",{value:!0}),y.pool=y.boltAgent=y.objectUtil=y.resolver=y.serverAddress=y.urlUtil=y.logger=y.transactionExecutor=y.txConfig=y.connectionHolder=y.constants=y.bookmarks=y.observer=y.temporalUtil=y.util=void 0,P(a)),uo=(y.util=xo,P(o)),po=(y.temporalUtil=uo,P(Ar)),C=(y.observer=po,P(_)),xo=(y.bookmarks=C,P(v)),o=(y.constants=xo,P(m)),uo=(y.connectionHolder=o,P(O)),po=(y.txConfig=uo,P(w)),C=(y.transactionExecutor=po,P(g)),xo=(y.logger=C,P(bn)),o=(y.urlUtil=xo,P(Zn)),uo=(y.serverAddress=o,P(E)),po=(y.resolver=uo,P(F)),C=(y.objectUtil=po,P(S)),bn=(y.boltAgent=C,P(j)),xo=(y.pool=bn,r&&r.__extends||(Mo=function(e,t){return(Mo=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])}))(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}Mo(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Do=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Lo=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Zn=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Uo=(Object.defineProperty(G,"__esModule",{value:!0}),Zn(h)),Fo=y,Bo=t,Vo=Fo.connectionHolder.EMPTY_CONNECTION_HOLDER;qo.prototype.as=function(t,r){if(null!=this._p)throw(0,Bo.newError)("Cannot call .as() on a Result that is being consumed");return this._mapper=function(e){return e.as(t,r)},this},qo.prototype.keys=function(){var o=this;return null!==this._keys?Promise.resolve(this._keys):null!==this._error?Promise.reject(this._error):new Promise(function(r,n){o._streamObserverPromise.then(function(e){var t=o._decorateObserver({onKeys:function(e){return r(e)},onError:function(e){return n(e)}},!0);o._ownedObservers.push(t),e.subscribe(t)}).catch(n)})},qo.prototype.summary=function(){var o=this;return null!==this._summary?Promise.resolve(this._summary):null!==this._error?Promise.reject(this._error):new Promise(function(r,n){o._streamObserverPromise.then(function(e){var t=o._decorateObserver({onCompleted:function(e){return r(e)},onError:function(e){return n(e)}});e.cancel(),o._ownedObservers.push(t),e.subscribe(t)}).catch(n)})},qo.prototype._getOrCreatePromise=function(){var o=this;return null==this._p&&(this._p=new Promise(function(t,r){var n=[];o._subscribe({onNext:function(e){null!=o._mapper?n.push(o._mapper(e)):n.push(e)},onCompleted:function(e){t({records:n,summary:e})},onError:function(e){r(e)}}).catch(function(){})})),this._p},qo.prototype[Symbol.asyncIterator]=function(){var e,n,r,o,i,u=this;return this.isOpen()?(n={paused:!0,firstRun:!0,finished:!1},r=function(){var e,t;null!=n.streaming&&(e=(t=null!=(t=null==(t=n.queuedObserver)?void 0:t.size)?t:0)>=u._watermarks.high,t=t<=u._watermarks.low,e&&!n.paused?(n.paused=!0,n.streaming.pause()):(t&&n.paused||n.firstRun&&!e)&&(n.firstRun=!1,n.paused=!1,n.streaming.resume()))},o=function(){return Do(u,void 0,void 0,function(){var t;return Lo(this,function(e){switch(e.label){case 0:return void 0!==n.queuedObserver?[3,2]:(n.queuedObserver=this._createQueuedResultObserver(r),t=n,[4,this._subscribe(n.queuedObserver,!0).catch(function(){})]);case 1:t.streaming=e.sent(),r(),e.label=2;case 2:return[2,n.queuedObserver]}})})},i=function(e){if(void 0===e)throw(0,Bo.newError)("InvalidState: Result stream finished without Summary",Bo.PROTOCOL_ERROR);return!0},{next:function(){return Do(u,void 0,void 0,function(){var t;return Lo(this,function(e){switch(e.label){case 0:return n.finished&&i(n.summary)?[2,{done:!0,value:n.summary}]:[4,o()];case 1:return[4,e.sent().dequeue()];case 2:return!0===(t=e.sent()).done&&(n.finished=t.done,n.summary=t.value),[2,t]}})})},return:function(r){return Do(u,void 0,void 0,function(){var t;return Lo(this,function(e){switch(e.label){case 0:return n.finished&&i(n.summary)?[2,{done:!0,value:null!=r?r:n.summary}]:(null!=(t=n.streaming)&&t.cancel(),[4,o()]);case 1:return[4,e.sent().dequeueUntilDone()];case 2:return t=e.sent(),n.finished=!0,t.value=null!=r?r:t.value,n.summary=t.value,[2,t]}})})},peek:function(){return Do(u,void 0,void 0,function(){return Lo(this,function(e){switch(e.label){case 0:return n.finished&&i(n.summary)?[2,{done:!0,value:n.summary}]:[4,o()];case 1:return[4,e.sent().head()];case 2:return[2,e.sent()]}})})}}):(e=(0,Bo.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}})},qo.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},qo.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},qo.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},qo.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},qo.prototype.isOpen=function(){return null===this._summary&&null===this._error},qo.prototype._subscribe=function(e,t,r){void 0===t&&(t=!1);var n=this._decorateObserver(e,r=void 0===r?!1:r);return this._ownedObservers.push(n),this._streamObserverPromise.then(function(e){return t&&e.pause(),e.subscribe(n),e}).catch(function(e){return null!=n.onError&&n.onError(e),Promise.reject(e)})},qo.prototype._decorateObserver=function(n,e){var t,o=this,r=null!=(t=n.onCompleted)?t:Io,i=null!=(t=n.onError)?t:Co,u=null!=(t=n.onKeys)?t:Ro;return{onNext:null!=n.onNext?n.onNext.bind(n):void 0,onKeys:function(e){return o._keys=e,u.call(n,e)},onCompleted:!0===e?void 0:function(e){o._releaseConnectionAndGetSummary(e).then(function(e){return null!==o._summary?r.call(n,o._summary):(o._summary=e,r.call(n,e))}).catch(i)},onError:function(r,e){!0===e&&void 0===o._retriedError&&r instanceof Bo.Neo4jError&&!0===(null==(e=r.diagnosticRecord)?void 0:e._idempotent)&&void 0!==o._retry?(o._retriedError=r,o._streamObserverPromise.then(function(e){void 0!==e.unsubscribeAll&&e.unsubscribeAll()},function(){}),o._streamObserverPromise=o._retry(),o._streamObserverPromise.then(function(t){o._ownedObservers.forEach(function(e){t.subscribe(e)})},function(){})):o._retriedError!==r&&o._connectionHolder.releaseConnection().then(function(){var e,t;e=r,null!=(t=o._stack)&&(e.stack=e.toString()+"\n"+t),o._error=r,i.call(n,r)}).catch(i)}}},qo.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},qo.prototype._releaseConnectionAndGetSummary=function(t){var e=Fo.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(e){return o.releaseConnection().then(function(){return null==e?void 0:e.getProtocolVersion()})},function(e){}).then(function(e){return new Uo.default(r,n,t,e)})},qo.prototype._createQueuedResultObserver=function(n){var t=this;function o(){var r={};return r.promise=new Promise(function(e,t){r.resolve=e,r.reject=t}),r}function i(e){return e instanceof Error}function r(){return Do(this,void 0,void 0,function(){var t;return Lo(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(t=u.shift())?t:(0,Bo.newError)("Unexpected empty buffer",Bo.PROTOCOL_ERROR),n(),i(t))throw t;return[2,t]}return a.resolvable=o(),[4,a.resolvable.promise];case 1:return[2,e.sent()]}})})}var u=[],a={resolvable:null},s={onNext:function(e){null!=t._mapper?s._push({done:!1,value:t._mapper(e)}):s._push({done:!1,value:e})},onCompleted:function(e){s._push({done:!0,value:e})},onError:function(e){s._push(e)},_push:function(e){var t;null!==a.resolvable?(t=a.resolvable,a.resolvable=null,i(e)?t.reject(e):t.resolve(e)):(u.push(e),n())},dequeue:r,dequeueUntilDone:function(){return Do(t,void 0,void 0,function(){var t;return Lo(this,function(e){switch(e.label){case 0:return[4,r()];case 1:return!0===(t=e.sent()).done?[2,t]:[3,0];case 2:return[2]}})})},head:function(){return Do(t,void 0,void 0,function(){var t,r;return Lo(this,function(e){switch(e.label){case 0:if(0<u.length){if(i(t=u[0]))throw t;return[2,t]}a.resolvable=o(),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,a.resolvable.promise];case 2:return t=e.sent(),u.unshift(t),[2,t];case 3:throw r=e.sent(),u.unshift(r),r;case 4:return n(),[7];case 5:return[2]}})})},get size(){return u.length}};return s};o=qo;function qo(e,t,r,n,o,i){var u;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[Ho]="Result",this._stack=null!=(u=new Error("")).stack?u.stack.replace(/^Error(\n\r)*/,""):null,this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=n?n:Vo,this._keys=null,this._summary=null,this._error=null,this._mapper=null,this._watermarks=o,this._retry=i,this._ownedObservers=[],this._retriedError=void 0}var Wo,zo,Ho=Symbol.toStringTag,E=(xo(Go,Wo=o),Go);function Go(){return null!==Wo&&Wo.apply(this,arguments)||this}function Yo(){return null!==zo&&zo.apply(this,arguments)||this}xo(Yo,zo=o),G.default=E;uo={};Object.defineProperty(uo,"__esModule",{value:!0});uo.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};F={},Object.defineProperty(F,"__esModule",{value:!0}),F.Releasable=void 0,Ko.prototype.release=function(){throw new Error("Not implemented")},po=Ko;function Ko(){}function Zo(){}F.Releasable=po,Zo.prototype.acquireConnection=function(e){throw Error("Not implemented")},Zo.prototype.supportsMultiDb=function(){throw Error("Not implemented")},Zo.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},Zo.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},Zo.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},Zo.prototype.SSREnabled=function(){return!1},Zo.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},Zo.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},Zo.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},Zo.prototype.close=function(){throw Error("Not implemented")},F.default=Zo;S={};function Qo(){}Object.defineProperty(S,"__esModule",{value:!0}),Qo.prototype.beginTransaction=function(e){throw new Error("Not implemented")},Qo.prototype.run=function(e,t,r){throw new Error("Not implemented")},Qo.prototype.commitTransaction=function(e){throw new Error("Not implemented")},Qo.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},Qo.prototype.resetAndFlush=function(){throw new Error("Not implemented")},Qo.prototype.isOpen=function(){throw new Error("Not implemented")},Qo.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},Qo.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},S.default=Qo;var C={},Xo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Jo=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$o=(Object.defineProperty(C,"__esModule",{value:!0}),a),ei=m,ti=_,ri=O,ni=Ar,oi=t,ii=P(G);function ui(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,f=this;this._connectionHolder=t,this._reactive=i,this._state=ai.ACTIVE,this._onClose=r,this._onBookmarks=n,this._onConnection=o,this._onError=this._onErrorCallback.bind(this),this._fetchSize=u,this._onComplete=this._onCompleteCallback.bind(this),this._results=[],this._impersonatedUser=a,this._lowRecordWatermark=c,this._highRecordWatermark=s,this._bookmarks=ti.Bookmarks.empty(),this._notificationFilter=l,this._apiTelemetryConfig=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){f._acceptActive=e})}ui.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return Xo(t,void 0,void 0,function(){var t,r=this;return Jo(this,function(e){switch(e.label){case 0:return(this._onConnection(),null==n)?[3,2]:(t=this,[4,o()]);case 1:return t._bookmarks=e.sent(),[2,n.beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,apiTelemetryConfig:this._apiTelemetryConfig,beforeError:function(e){null!=u&&u.onError(e),r._onError(e).catch(function(){})},afterComplete:function(e){null!=u&&u.onComplete(e),void 0!==e.db&&null!=(null==u?void 0:u.onDB)&&u.onDB(e.db),r._onComplete(e)}})];case 2:throw(0,oi.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},ui.prototype.run=function(e,t,r){e=(0,$o.validateQueryAndParameters)(e,t,{parameterRules:r}),t=e.validatedQuery,r=this._state.run(t,e.params,{connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,reactive:this._reactive,fetchSize:this._fetchSize,highRecordWatermark:this._highRecordWatermark,lowRecordWatermark:this._lowRecordWatermark,preparationJob:this._activePromise});return this._results.push(r),r},ui.prototype.commit=function(){var t=this,r=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:function(e){return t._onCompleteCallback(e,t._bookmarks)},onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},ui.prototype.rollback=function(){var r=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},ui.prototype.isOpen=function(){return this._state===ai.ACTIVE},ui.prototype.close=function(){return Xo(this,void 0,void 0,function(){return Jo(this,function(e){switch(e.label){case 0:return this.isOpen()?[4,this.rollback()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},ui.prototype[Symbol.asyncDispose]=function(){return this.close()},ui.prototype._onErrorCallback=function(t){return this._state===ai.FAILED?Promise.resolve(null):(this._state=ai.FAILED,this._onClose(),this._results.forEach(function(e){e.isOpen()&&e._streamObserverPromise.then(function(e){return e.onError(t)}).catch(function(e){})}),this._connectionHolder.releaseConnection())},ui.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new ti.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:ti.Bookmarks.empty(),null==e?void 0:e.db)};var ai={ACTIVE:{commit:function(e){return{result:si(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:ai.SUCCEEDED}},rollback:function(e){return{result:si(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:ai.ROLLED_BACK}},run:function(t,r,e){var n=e.connectionHolder,o=e.onError,i=e.onComplete,u=e.onConnection,a=e.reactive,s=e.fetchSize,c=e.highRecordWatermark,l=e.lowRecordWatermark,e=e.preparationJob,f=null!=e?e:Promise.resolve();return ci(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.run(t,r,{bookmarks:ti.Bookmarks.empty(),txConfig:ri.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,oi.newError)("No connection available")}).catch(function(e){return new ni.FailedObserver({error:e,onError:o})}),t,r,n,c,l)}},FAILED:{commit:function(e){var t=e.connectionHolder,e=e.onError;return{result:ci(new ni.FailedObserver({error:(0,oi.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:e}),"COMMIT",{},t,0,0),state:ai.FAILED}},rollback:function(e){e=e.connectionHolder;return{result:ci(new ni.CompletedObserver,"ROLLBACK",{},e,0,0),state:ai.FAILED}},run:function(e,t,r){var n=r.connectionHolder,r=r.onError;return ci(new ni.FailedObserver({error:(0,oi.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:r}),e,t,n,0,0)}},SUCCEEDED:{commit:function(e){var t=e.connectionHolder,e=e.onError;return{result:ci(new ni.FailedObserver({error:(0,oi.newError)("Cannot commit this transaction, because it has already been committed."),onError:e}),"COMMIT",{},ei.EMPTY_CONNECTION_HOLDER,0,0),state:ai.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,e=e.onError;return{result:ci(new ni.FailedObserver({error:(0,oi.newError)("Cannot rollback this transaction, because it has already been committed."),onError:e}),"ROLLBACK",{},ei.EMPTY_CONNECTION_HOLDER,0,0),state:ai.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,r=r.onError;return ci(new ni.FailedObserver({error:(0,oi.newError)("Cannot run query in this transaction, because it has already been committed."),onError:r}),e,t,n,0,0)}},ROLLED_BACK:{commit:function(e){var t=e.connectionHolder,e=e.onError;return{result:ci(new ni.FailedObserver({error:(0,oi.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:e}),"COMMIT",{},t,0,0),state:ai.ROLLED_BACK}},rollback:function(e){e=e.connectionHolder;return{result:ci(new ni.FailedObserver({error:(0,oi.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},e,0,0),state:ai.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,r=r.onError;return ci(new ni.FailedObserver({error:(0,oi.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:r}),e,t,n,0,0)}}};function si(r,e,n,o,i,u,t){var a=null!=t?t:Promise.resolve(),t=e.getConnection().then(function(e){return a.then(function(){return e})}).then(function(t){return i(),u.forEach(function(e){return e._cancel()}),Promise.all(u.map(function(e){return e.summary()})).then(function(e){if(null!=t)return r?t.commitTransaction({beforeError:n,afterComplete:o}):t.rollbackTransaction({beforeError:n,afterComplete:o});throw(0,oi.newError)("No connection available")})}).catch(function(e){return new ni.FailedObserver({error:e,onError:n})});return new ii.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function ci(e,t,r,n,o,i){return void 0===n&&(n=ei.EMPTY_CONNECTION_HOLDER),new ii.default(Promise.resolve(e),t,r,new ei.ReadOnlyConnectionHolder(null!=n?n:ei.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}C.default=ui;j={};function li(e){e=e.run;this._run=e}Object.defineProperty(j,"__esModule",{value:!0}),li.fromTransaction=function(e){return new li({run:e.run.bind(e)})},li.prototype.run=function(e,t,r){return this._run(e,t,r)},j.default=li;var fi,pi,di,bn={},Zn=r&&r.__extends||(fi=function(e,t){return(fi=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])}))(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}fi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),hi=r&&r.__assign||function(){return(hi=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},xo=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(bn,"__esModule",{value:!0}),xo(C)),E=(di=o.default,Zn(bi,di),bi.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},bi.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},bi.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},bi.prototype._getOrCreateBeginPromise=function(){var r=this;return null==this._beginPromise&&(this._beginPromise=new Promise(function(e,t){r._resolve=e,r._reject=t,null!=r._beginError&&t(r._beginError),null!=r._beginMetadata&&e(r._toTransaction())})),this._beginPromise},bi.prototype._toTransaction=function(){return hi(hi({},this),{run:di.prototype.run.bind(this),commit:di.prototype.commit.bind(this),rollback:di.prototype.rollback.bind(this),close:di.prototype.close.bind(this),isOpen:di.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},bi.prototype._begin=function(e,t){return di.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this),onDB:this._onDbCallback})},bi.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},bi.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},bi);function bi(e){var t=e.connectionHolder,r=e.onDbCallback,t=di.call(this,{connectionHolder:t,onClose:e.onClose,onBookmarks:e.onBookmarks,onConnection:e.onConnection,reactive:e.reactive,fetchSize:e.fetchSize,impersonatedUser:e.impersonatedUser,highRecordWatermark:e.highRecordWatermark,lowRecordWatermark:e.lowRecordWatermark,notificationFilter:e.notificationFilter,apiTelemetryConfig:e.apiTelemetryConfig})||this;return t[pi]="TransactionPromise",t._onDbCallback=r,t}pi=Symbol.toStringTag,bn.default=E;var po={},P={},yi=(Object.defineProperty(P,"__esModule",{value:!0}),P.cacheKey=function(e,t){return null==t?void 0!==e?"basic"!==e.scheme?"kerberos"!==e.scheme?"bearer"!==e.scheme?"none"!==e.scheme?(0,yi.stringify)(e,{sortedElements:!0}):"none":"bearer:"+e.credentials:"kerberos:"+e.credentials:"basic:"+(null!=(e=e.principal)?e:""):"DEFAULT":"basic:"+t},n);var _i=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},vi=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},mi=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},gi=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},xo=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Oi=(Object.defineProperty(po,"__esModule",{value:!0}),Ar),wi=a,Ei=v,Pi=t,Ti=xo(G),Si=m,ji=w,Ci=_,Ii=O,Ri=xo(bn),Ai=xo(j),Mi=P;function Ni(e){var t=e.mode,r=e.connectionProvider,n=e.bookmarks,o=e.database,i=e.config,u=e.reactive,a=e.fetchSize,s=e.impersonatedUser,c=e.bookmarkManager,l=e.notificationFilter,f=e.auth,p=e.log,d=e.homeDatabaseCallback,e=e.disableAutoCommitRetries,t=(this._mode=t,this._database=o,this._reactive=u,this._fetchSize=a,this._homeDatabaseCallback=d,this._auth=f,this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new Si.ConnectionHolder({mode:Ei.ACCESS_MODE_READ,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved.bind(this),getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:p}),this._writeConnectionHolder=new Si.ConnectionHolder({mode:Ei.ACCESS_MODE_WRITE,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved.bind(this),getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:p}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:Ci.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=(e=>(e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null,new ji.TransactionExecutor(e)))(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=l,this._log=p,this._databaseGuess=null==i?void 0:i.cachedHomeDatabase,this._isRoutingSession=null!=(u=null==i?void 0:i.routingDriver)&&u,this._disableAutoCommitRetries=null!=(a=null!=e?e:null==i?void 0:i.disableAutoCommitRetries)&&a}Ni.prototype.run=function(e,t,r,n){var i=this,e=(0,wi.validateQueryAndParameters)(e,t,{parameterRules:n}),u=e.validatedQuery,a=e.params,s=null!=r?new Ii.TxConfig(r,this._log):Ii.TxConfig.empty(),t=this._run(u,a,function(n,o){return _i(i,void 0,void 0,function(){var t,r=this;return vi(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.run(u,a,{bookmarks:t,txConfig:s,mode:this._mode,database:this._database,apiTelemetryConfig:!0===o?void 0:{api:Ei.TELEMETRY_APIS.AUTO_COMMIT_TRANSACTION},impersonatedUser:this._impersonatedUser,afterComplete:function(e){return r._onCompleteCallback(e,t)},reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,onDb:this._onDatabaseNameResolved.bind(this)})]}})})});return this._results.push(t),t},Ni.prototype._run=function(e,t,r){var n=this,o=this._acquireAndConsumeConnection(r),i=o.connectionHolder,o=o.resultPromise.catch(function(e){return Promise.resolve(new Oi.FailedObserver({error:e}))}),u={high:this._highRecordWatermark,low:this._lowRecordWatermark},a=this._disableAutoCommitRetries?void 0:function(){return n._acquireAndConsumeConnection(r,!0).resultPromise.catch(function(e){return Promise.resolve(new Oi.FailedObserver({error:e}))})};return new Ti.default(o,e,t,i,u,a)},Ni.prototype._acquireConnection=function(e){var r=this,e=this._acquireAndConsumeConnection(e),n=e.connectionHolder;return e.resultPromise.then(function(t){return _i(r,void 0,void 0,function(){return vi(this,function(e){switch(e.label){case 0:return[4,n.releaseConnection()];case 1:return e.sent(),[2,t]}})})})},Ni.prototype._acquireAndConsumeConnection=function(t,r){var e=this._connectionHolderWithMode(this._mode),n=this._open?this._hasTx||!0!==r&&!e.initializeConnection(this._databaseGuess)?Promise.reject((0,Pi.newError)("Queries cannot be run directly on a session with ongoing work; either await the previous work, run in an existing transaction or use a different session.")):e.getConnection().then(function(e){return t(e,r)}):Promise.reject((0,Pi.newError)("Cannot run query in a closed session."));return{connectionHolder:e,resultPromise:n}},Ni.prototype.beginTransaction=function(e){var t=Ii.TxConfig.empty();return null!=e&&(t=new Ii.TxConfig(e,this._log)),this._beginTransaction(this._mode,t,{api:Ei.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},Ni.prototype._beginTransaction=function(e,t,r){var n=this;if(!this._open)throw(0,Pi.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,Pi.newError)("You cannot begin a transaction on a session with ongoing work; either run from within an existing transaction or use a different session.");e=Ni._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(this._databaseGuess),this._hasTx=!0,e=new Ri.default({connectionHolder:e,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmarks:function(e,t,r){return n._updateBookmarks(e,t,r)},onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,apiTelemetryConfig:r,onDbCallback:this._onDatabaseNameResolved.bind(this)});return e._begin(function(){return n._bookmarks()},t),e},Ni.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,Pi.newError)("You cannot run more transactions on a closed session.")},Ni.prototype._transactionClosed=function(){this._hasTx=!1},Ni.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},Ni.prototype._bookmarks=function(){return _i(this,void 0,void 0,function(){var t;return vi(this,function(e){switch(e.label){case 0:return[4,null==(t=this._bookmarkManager)?void 0:t.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Ci.Bookmarks(gi(gi([],mi(t),!1),mi(this._configuredBookmarks),!1))]}})})},Ni.prototype.executeRead=function(e,t){t=new Ii.TxConfig(t,this._log);return this._executeInTransaction(Ei.ACCESS_MODE_READ,t,e)},Ni.prototype.executeWrite=function(e,t){t=new Ii.TxConfig(t,this._log);return this._executeInTransaction(Ei.ACCESS_MODE_WRITE,t,e)},Ni.prototype._executeInTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e,Ai.default.fromTransaction)},Ni.prototype._onDatabaseNameResolved=function(e){var t;this._isRoutingSession&&(this._databaseGuess=e,this._databaseNameResolved||(this._database=t=null!=e?e:"",this._readConnectionHolder.setDatabase(t),this._writeConnectionHolder.setDatabase(t),this._databaseNameResolved=!0,null!=this._homeDatabaseCallback&&this._homeDatabaseCallback((0,Mi.cacheKey)(this._auth,this._impersonatedUser),e)))},Ni.prototype._getConnectionAcquistionBookmarks=function(){return _i(this,void 0,void 0,function(){var t;return vi(this,function(e){switch(e.label){case 0:return[4,null==(t=this._bookmarkManager)?void 0:t.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Ci.Bookmarks(gi(gi([],mi(this._configuredBookmarks),!1),mi(t),!1))]}})})},Ni.prototype._updateBookmarks=function(e,t,r){var n;null==e||e.isEmpty()||(null!=(n=this._bookmarkManager)&&n.updateBookmarks(null!=(n=null==t?void 0:t.values())?n:[],null!=(t=null==e?void 0:e.values())?t:[]).catch(function(){}),this._lastBookmarks=e,this._configuredBookmarks=Ci.Bookmarks.empty())},Ni.prototype.close=function(){return _i(this,void 0,void 0,function(){return vi(this,function(e){switch(e.label){case 0:return this._open?(this._open=!1,this._results.forEach(function(e){return e._cancel()}),this._transactionExecutor.close(),[4,this._readConnectionHolder.close(this._hasTx)]):[3,3];case 1:return e.sent(),[4,this._writeConnectionHolder.close(this._hasTx)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},Ni.prototype[Symbol.asyncDispose]=function(){return this.close()},Ni.prototype._connectionHolderWithMode=function(e){if(e===Ei.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===Ei.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,Pi.newError)("Unknown access mode: "+e)},Ni.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new Ci.Bookmarks(e.bookmark),t,e.db)},Ni.prototype._calculateWatermaks=function(){return this._fetchSize===Ei.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},Ni.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},Ni._validateSessionMode=function(e){e=null!=e?e:Ei.ACCESS_MODE_WRITE;if(e!==Ei.ACCESS_MODE_READ&&e!==Ei.ACCESS_MODE_WRITE)throw(0,Pi.newError)("Illegal session mode "+e);return e},po.default=Ni;var o={},Zn={},ki=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},xi=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Di=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Li=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ui=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},E=(Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new Bi(t,e.bookmarksSupplier,e.bookmarksConsumer)},Fi.prototype.updateBookmarks=function(e,t){return ki(this,void 0,void 0,function(){return xi(this,function(e){throw new Error("Not implemented")})})},Fi.prototype.getBookmarks=function(){return ki(this,void 0,void 0,function(){return xi(this,function(e){throw new Error("Not implemented")})})},Fi);function Fi(){throw new Error("Not implemented")}Zn.default=E;Vi.prototype.updateBookmarks=function(f,p){return ki(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return xi(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=Di(f),n=r.next();!n.done;n=r.next())u=n.value,t.delete(u)}catch(e){a={error:e}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}}try{for(o=Di(p),i=o.next();!i.done;i=o.next())u=i.value,t.add(u)}catch(e){c={error:e}}finally{try{i&&!i.done&&(l=o.return)&&l.call(o)}finally{if(c)throw c.error}}return"function"!=typeof this._bookmarksConsumer?[3,2]:[4,this._bookmarksConsumer(Ui([],Li(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Vi.prototype.getBookmarks=function(){return ki(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return xi(this,function(e){switch(e.label){case 0:return t=new Set(this._bookmarks),"function"!=typeof this._bookmarksSupplier?[3,2]:[4,this._bookmarksSupplier()];case 1:a=null!=(a=e.sent())?a:[];try{for(r=Di(a),n=r.next();!n.done;n=r.next())o=n.value,t.add(o)}catch(e){i={error:e}}finally{try{n&&!n.done&&(u=r.return)&&u.call(r)}finally{if(i)throw i.error}}e.label=2;case 2:return[2,Ui([],Li(t),!1)]}})})};var Bi=Vi;function Vi(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var Ar={},qi=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Wi=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zi=(Object.defineProperty(Ar,"__esModule",{value:!0}),m(uo)),Hi=t;function Gi(){}Gi.prototype.eagerResultTransformer=function(){return Yi},Gi.prototype.eager=function(){return Yi},Gi.prototype.mappedResultTransformer=function(e){return Ki(e)},Gi.prototype.mapped=function(e){return Ki(e)},Gi.prototype.first=function(){return Zi},Gi.prototype.summary=function(){return Qi},Gi.prototype.hydrated=function(r,n){var e=this;return function(t){return qi(e,void 0,void 0,function(){return Wi(this,function(e){switch(e.label){case 0:return[4,t.as(r,n).then()];case 1:return[2,e.sent()]}})})}};w=new Gi;function Yi(o){return qi(this,void 0,void 0,function(){var t,r,n;return Wi(this,function(e){switch(e.label){case 0:return[4,o];case 1:return r=e.sent(),t=r.summary,r=r.records,[4,o.keys()];case 2:return n=e.sent(),[2,new zi.default(n,r,t)]}})})}function Ki(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,Hi.newError)("Requires a map or/and a collect functions.");return function(o){return qi(e,void 0,void 0,function(){return Wi(this,function(e){switch(e.label){case 0:return[4,new Promise(function(t,r){var n={records:[],keys:[]};o.subscribe({onKeys:function(e){n.keys=e},onNext:function(e){var t;null!=i.map?void 0!==(t=i.map(e))&&n.records.push(t):n.records.push(e)},onCompleted:function(e){null!=i.collect?t(i.collect(n.records,e,n.keys)):t({records:n.records,summary:e,keys:n.keys})},onError:function(e){r(e)}})})];case 1:return[2,e.sent()]}})})}}function Zi(o){return qi(this,void 0,void 0,function(){var t,r,n;return Wi(this,function(e){switch(e.label){case 0:return[4,(t=o[Symbol.asyncIterator]()).next()];case 1:n=e.sent(),r=n.value,n=n.done,e.label=2;case 2:return e.trys.push([2,,3,6]),!0===n?[2,void 0]:[2,r];case 3:return null==t.return?[3,5]:[4,t.return()];case 4:e.sent(),e.label=5;case 5:return[7];case 6:return[2]}})})}function Qi(t){return qi(this,void 0,void 0,function(){return Wi(this,function(e){switch(e.label){case 0:return[4,t.summary()];case 1:return[2,e.sent()]}})})}Object.freeze(w),Ar.default=w;var O={},Xi=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ji=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},$i=(Object.defineProperty(O,"__esModule",{value:!0}),v);function eu(e){this._createSession=e}eu.prototype.execute=function(o,i,u,a){return Xi(this,void 0,void 0,function(){var t,r,n=this;return Ji(this,function(e){switch(e.label){case 0:t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser,auth:o.auth}),r=((e,t,r)=>("function"==typeof(null==e?void 0:e.addEventListener)&&e.addEventListener(t,r),{uninstall:function(){"function"==typeof(null==e?void 0:e.removeEventListener)&&e.removeEventListener(t,r)}}))(o.signal,"abort",function(){return Xi(n,void 0,void 0,function(){return Ji(this,function(e){switch(e.label){case 0:return[4,t.close()];case 1:return[2,e.sent()]}})})}),t._configureTransactionExecutor(!0,$i.TELEMETRY_APIS.EXECUTE_QUERY),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READ"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return Xi(n,void 0,void 0,function(){var t;return Ji(this,function(e){switch(e.label){case 0:return t=r.run(i,u,a),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})},o.transactionConfig)];case 2:return[2,e.sent()];case 3:return r.uninstall(),[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},O.default=eu;xo={};function tu(e){this.maxSize=e,this.pruneCount=Math.max(Math.round(.01*e*Math.log(e)),1),this.map=new Map}Object.defineProperty(xo,"__esModule",{value:!0}),tu.prototype.set=function(e,t){this.map.set(e,{database:t,lastUsed:Date.now()}),this._pruneCache()},tu.prototype.get=function(e){e=this.map.get(e);if(void 0!==e)return e.lastUsed=Date.now(),e.database},tu.prototype.delete=function(e){this.map.delete(e)},tu.prototype._pruneCache=function(){if(this.map.size>this.maxSize)for(var e=Array.from(this.map.entries()).sort(function(e,t){return e[1].lastUsed-t[1].lastUsed}),t=0;t<this.pruneCount;t++)this.map.delete(e[t][0])},xo.default=tu;function ru(){this.routing=Eu.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0,this.transactionConfig=void 0,this.auth=void 0,this.signal=void 0}var nu=r&&r.__assign||function(){return(nu=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ou=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},iu=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},uu=(Object.defineProperty(o,"__esModule",{value:!0}),o.QueryConfig=o.SessionConfig=o.routing=o.WRITE=o.READ=o.Driver=void 0,_),au=E(T),su=v,cu=g,lu=E(po),fu=a,pu=Zn,du=E(Ar),hu=E(O),bu=t,yu=E(xo),_u=P,vu=36e5,mu=1e3,gu=su.ACCESS_MODE_READ,Ou=(o.READ=gu,su.ACCESS_MODE_WRITE),wu=(o.WRITE=Ou,0),Eu=(o.SessionConfig=function(){this.defaultAccessMode=Ou,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.auth=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0,this.disableAutoCommitRetries=void 0},{WRITE:"WRITE",READ:"READ"}),m=(o.routing=Eu,Object.freeze(Eu),o.QueryConfig=ru,Object.defineProperty(Pu.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Pu.prototype.executeQuery=function(e,t){return ou(this,arguments,void 0,function(t,r,n,o){var i,u,a;return void 0===n&&(n={}),iu(this,function(e){switch(e.label){case 0:if(i=null===n.bookmarkManager?void 0:null!=(i=n.bookmarkManager)?i:this.executeQueryBookmarkManager,u=null!=(u=n.resultTransformer)?u:du.default.eager(),(a=null!=(a=n.routing)?a:Eu.WRITE)!==Eu.READ&&a!==Eu.WRITE)throw(0,bu.newError)('Illegal query routing config: "'.concat(a,'"'));return[4,this._queryExecutor.execute({resultTransformer:u,bookmarkManager:i,routing:a,database:n.database,impersonatedUser:n.impersonatedUser,transactionConfig:n.transactionConfig,auth:n.auth,signal:n.signal},t,r,o)];case 1:return[2,e.sent()]}})})},Pu.prototype.verifyConnectivity=function(e){var e=(void 0===e?{}:e).database,r=void 0===e?"":e,n=this._getOrCreateConnectionProvider();return new Promise(function(e,t){n.verifyConnectivityAndGetServerInfo({database:r,accessMode:gu}).then(function(){return e()}).catch(function(e){return t(e)})})},Pu.prototype.verifyAuthentication=function(){return ou(this,arguments,void 0,function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return iu(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:gu})];case 1:return[2,e.sent()]}})})},Pu.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:gu})},Pu.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Pu.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Pu.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Pu.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},Pu.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Pu.prototype.isEncrypted=function(){return this._isEncrypted()},Pu.prototype._supportsRouting=function(){return this._meta.routing},Pu.prototype._isEncrypted=function(){return this._config.encrypted===fu.ENCRYPTION_ON||!0===this._config.encrypted},Pu.prototype._getTrust=function(){return this._config.trust},Pu.prototype.session=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.database,n=e.bookmarkManager,o=e.notificationFilter,i=e.auth,u=e.disableAutoCommitRetries;return this._newSession({defaultAccessMode:void 0===t?Ou:t,bookmarkOrBookmarks:e.bookmarks,database:void 0===r?"":r,reactive:!1,impersonatedUser:e.impersonatedUser,fetchSize:Su(e.fetchSize,this._config.fetchSize),bookmarkManager:n,notificationFilter:o,auth:i,disableAutoCommitRetries:u})},Pu.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Pu.prototype[Symbol.asyncDispose]=function(){return this.close()},Pu.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Pu.prototype._homeDatabaseCallback=function(e,t){this.homeDatabaseCache.set(e,t)},Pu.prototype._newSession=function(e){var t=e.defaultAccessMode,r=e.bookmarkOrBookmarks,n=e.database,o=e.reactive,i=e.impersonatedUser,u=e.fetchSize,a=e.bookmarkManager,s=e.notificationFilter,c=e.auth,e=e.disableAutoCommitRetries,t=lu.default._validateSessionMode(t),l=this._getOrCreateConnectionProvider(),f=this.homeDatabaseCache.get((0,_u.cacheKey)(c,i)),p=this._homeDatabaseCallback.bind(this),r=null!=r?new uu.Bookmarks(r):uu.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:l,bookmarks:r,config:nu({cachedHomeDatabase:f,routingDriver:this._supportsRouting()},this._config),reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:s,auth:c,log:this._log,homeDatabaseCallback:p,disableAutoCommitRetries:e})},Pu.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new au.default(e.resolver)))),this._connectionProvider},Pu);function Pu(e,t,r,n,o){void 0===n&&(n=function(e){return new lu.default(e)}),void 0===o&&(o=function(e){return new hu.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=Tu(i.maxConnectionLifetime,vu),i.maxConnectionPoolSize=Tu(i.maxConnectionPoolSize,su.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=Tu(i.connectionAcquisitionTimeout,su.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=Su(i.fetchSize,mu),i.connectionTimeout=(e=>0===(e=parseInt(e.connectionTimeout,10))||!isNaN(e)&&e<0?null:isNaN(e)?su.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e)(i),i.connectionLivenessCheckTimeout=(e=>{if(null!=e){if((e=parseInt(e,10))<0||Number.isNaN(e))throw new Error("The connectionLivenessCheckTimeout can only be a positive value or 0 for always. However connectionLivenessCheckTimeout = ".concat(e));return e}})(i.connectionLivenessCheckTimeout);var i=cu.Logger.create(t);((e,t)=>{var r=e.resolver;if(null!=r&&"function"!=typeof r)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof r));if(e.connectionAcquisitionTimeout<e.connectionTimeout&&t.warn('Configuration for "connectionAcquisitionTimeout" should be greater than or equal to "connectionTimeout". Otherwise, the connection acquisition timeout will take precedence for over the connection timeout in scenarios where a new connection is created while it is acquired'),null==(null==(r=e.notificationFilter)?void 0:r.disabledCategories)||null==(null==(t=e.notificationFilter)?void 0:t.disabledClassifications))return;throw new Error('The notificationFilter can\'t have both "disabledCategories" and "disabledClassifications" configured at the same time.')})(t,i),this._id=wu++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,pu.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this.homeDatabaseCache=new yu.default(1e4),this._afterConstruction()}function Tu(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function Su(e,t){e=parseInt(e,10);if(0<e||e===su.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(su.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}o.Driver=m,o.default=m;var w={},ju=(Object.defineProperty(w,"__esModule",{value:!0}),t),Cu=n;function Iu(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}w.default={basic:function(e,t,r){return null!=r?{scheme:"basic",principal:e,credentials:t,realm:r}:{scheme:"basic",principal:e,credentials:t}},kerberos:function(e){return{scheme:"kerberos",principal:"",credentials:e}},bearer:function(e){return{scheme:"bearer",credentials:e}},none:function(){return{scheme:"none"}},custom:function(e,t,r,n,o){n={scheme:n,principal:e};if(Iu(t)&&(n.credentials=t),Iu(r)&&(n.realm=r),Iu(o)){try{(0,Cu.stringify)(o)}catch(e){throw(0,ju.newError)("Circular references in custom auth token parameters",void 0,e)}n.parameters=o}return n}};var _={},Ru=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Au=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Mu=(Object.defineProperty(_,"__esModule",{value:!0}),_.authTokenManagers=_.AuthTokenAndExpiration=void 0,_.staticAuthTokenManager=function(e){e=e.authToken;return new Bu(e)},T(w)),Nu=y;function ku(){}function xu(){}ku.prototype.getToken=function(){throw new Error("Not Implemented")},ku.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},_.default=ku,_.AuthTokenAndExpiration=function(){this.token=Mu.default.none(),this.expiration=void 0},xu.prototype.bearer=function(e){e=e.tokenProvider;if("function"!=typeof e)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof e));return new Uu(e,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},xu.prototype.basic=function(e){var t=this,r=e.tokenProvider;if("function"!=typeof r)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof r));return new Uu(function(){return Ru(t,void 0,void 0,function(){var t;return Au(this,function(e){switch(e.label){case 0:return t={},[4,r()];case 1:return[2,(t.token=e.sent(),t)]}})})},["Neo.ClientError.Security.Unauthorized"])};v=new xu;_.authTokenManagers=v,Object.freeze(v);Lu.prototype.subscribe=function(e){this._subscribers.push(e)},Lu.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},Lu.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var Du=Lu;function Lu(e){this._subscribers=e=void 0===e?[]:e}Fu.prototype.getToken=function(){return Ru(this,void 0,void 0,function(){var t;return Au(this,function(e){switch(e.label){case 0:return void 0===this._currentAuthData||void 0!==this._currentAuthData.expiration&&this._currentAuthData.expiration<new Date?[4,this._refreshAuthToken()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2,null==(t=this._currentAuthData)?void 0:t.token]}})})},Fu.prototype.handleSecurityException=function(e,t){return!!this._handledSecurityCodes.includes(t)&&(Nu.util.equals(e,null==(t=this._currentAuthData)?void 0:t.token)&&this._scheduleRefreshAuthToken(),!0)},Fu.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new Du,Promise.resolve(this._tokenProvider()).then(function(e){var t;r._currentAuthData=e,null!=(t=r._refreshObservable)&&t.onCompleted(e)}).catch(function(e){var t;null!=(t=r._refreshObservable)&&t.onError(e)}).finally(function(){r._refreshObservable=void 0})),void 0!==e&&this._refreshObservable.subscribe(e)},Fu.prototype._refreshAuthToken=function(){return Ru(this,void 0,void 0,function(){var r=this;return Au(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e,t){r._scheduleRefreshAuthToken({onCompleted:e,onError:t})})];case 1:return[2,e.sent()]}})})};var Uu=Fu;function Fu(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}Vu.prototype.getToken=function(){return this._authToken},Vu.prototype.handleSecurityException=function(e,t){return!1};var Bu=Vu;function Vu(e){this._authToken=e}function qu(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0}var Wu,zu,g={},a=r&&r.__extends||(Wu=function(e,t){return(Wu=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])}))(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}Wu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),O=(Object.defineProperty(g,"__esModule",{value:!0}),g.InternalConfig=g.Config=void 0,g.Config=qu,a(Hu,zu=qu),Hu);function Hu(){return null!==zu&&zu.apply(this,arguments)||this}g.InternalConfig=O;var Gu,Yu,E={},xo=r&&r.__extends||(Gu=function(e,t){return(Gu=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])}))(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}Gu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ku=r&&r.__assign||function(){return(Ku=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Zu=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Qu=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),P=r&&r.__importStar||(Yu=function(e){return(Yu=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Yu(e),n=0;n<r.length;n++)"default"!==r[n]&&Zu(t,e,r[n]);return Qu(t,e),t}),Xu=(Object.defineProperty(E,"__esModule",{value:!0}),E.clientCertificateProviders=E.RotatingClientCertificateProvider=E.ClientCertificateProvider=void 0,E.resolveCertificateProvider=function(e){if(null==e)return;if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;{var t;if(ra(e))return t=Ku({},e),{getClientCertificate:function(){return t},hasUpdate:function(){return!1}}}throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(Xu.stringify(e)))},P(n)),m=(E.default=function(){this.certfile="",this.keyfile="",this.password=void 0},Ju.prototype.hasUpdate=function(){throw new Error("Not Implemented")},Ju.prototype.getClientCertificate=function(){throw new Error("Not Implemented")},Ju);function Ju(){}E.ClientCertificateProvider=m;xo(ea,$u=m),ea.prototype.updateCertificate=function(e){throw new Error("Not implemented")};var $u,T=ea;function ea(){return null!==$u&&$u.apply(this,arguments)||this}function ta(){}E.RotatingClientCertificateProvider=T,ta.prototype.rotating=function(e){var t,e=e.initialCertificate;if(null!=e&&ra(e))return t=Ku({},e),new ua(t);throw new TypeError("initialCertificate should be ClientCertificate, but got ".concat(Xu.stringify(e)))};v=new ta;function ra(e){return null!=e&&"object"==typeof e&&"certfile"in e&&(na(r=e.certfile)||oa(r,na))&&"keyfile"in e&&(t(r=e.keyfile)||oa(r,t))&&ia("password",e);function t(e){return"string"==typeof e||null!=e&&"object"==typeof e&&"path"in e&&"string"==typeof e.path&&ia("password",e)}var r}function na(e){return"string"==typeof e}function oa(e,t,r){return void 0===r&&(r=!1),Array.isArray(e)&&(r||0<e.length)&&e.filter(t).length===e.length}function ia(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}E.clientCertificateProviders=v,Object.freeze(v);aa.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},aa.prototype.getClientCertificate=function(){return this._certificate},aa.prototype.updateCertificate=function(e){if(!ra(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(Xu.stringify(e)));this._certificate=Ku({},e),this._updated=!0};var ua=aa;function aa(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}var a={},sa=(Object.defineProperty(a,"__esModule",{value:!0}),a.vector=function(t){try{return new fa(t)}catch(e){throw(0,sa.newError)("Invalid argument type passed to vector constructor function: should be signed integer or float TypedArray, got: ".concat(null!=(t=null==(t=null==t?void 0:t.constructor)?void 0:t.name)?t:"undefined or type without constructor name"))}},a.isVector=function(e){return null!=e&&!0===e[ca]},t),ca="__isVector__",la={INT8:"INT8",INT16:"INT16",INT32:"INT32",INT64:"INT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"},fa=(Object.freeze(la),pa.prototype.asTypedArray=function(){return this._typedArray},pa.prototype.getType=function(){return this._type},pa.prototype.toString=function(){return"vector([".concat(this._typedArray.join(", "),"], ").concat(this._typedArray.length,", ").concat((e=>{switch(e){case"INT8":return"INTEGER8 NOT NULL";case"INT16":return"INTEGER16 NOT NULL";case"INT32":return"INTEGER32 NOT NULL";case"INT64":return"INTEGER NOT NULL";case"FLOAT32":return"FLOAT32 NOT NULL";case"FLOAT64":return"FLOAT NOT NULL";default:throw(0,sa.newError)("Cannot stringify vector with unsupported type. Got type: ".concat(e))}})(this._type),")")},pa);function pa(e){var t;if(e instanceof Int8Array)this._type=la.INT8;else if(e instanceof Int16Array)this._type=la.INT16;else if(e instanceof Int32Array)this._type=la.INT32;else if(e instanceof BigInt64Array)this._type=la.INT64;else if(e instanceof Float32Array)this._type=la.FLOAT32;else{if(!(e instanceof Float64Array))throw(0,sa.newError)("Invalid argument type passed to Vector constructor: should be signed integer or float TypedArray, got: ".concat(null!=(t=null==(t=null==e?void 0:e.constructor)?void 0:t.name)?t:"undefined or type without constructor name"));this._type=la.FLOAT64}this._typedArray=e}a.default=fa,Object.defineProperty(fa.prototype,ca,{value:!0,enumerable:!1,configurable:!1,writable:!1});var da,ha,ba,ya,_a,va,ma,ga,Oa,wa,Ea,Pa,O={};function Ta(e,t){if(null!=t){if(!0===t.stringify)return e.toString();if(!0===t.jsNativeDate)return e.toStandardDate()}return e}da=O,ba=r&&r.__assign||function(){return(ba=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ya=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),_a=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),P=r&&r.__importStar||(ha=function(e){return(ha=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=ha(e),n=0;n<r.length;n++)"default"!==r[n]&&ya(t,e,r[n]);return _a(t,e),t}),Object.defineProperty(da,"__esModule",{value:!0}),da.rule=void 0,va=fe,ma=p,ga=l,Oa=u,wa=a,Ea=t,Pa=P(i),da.rule=Object.freeze({asBoolean:function(e){return ba({validate:function(e,t){if("boolean"!=typeof e)throw new TypeError("".concat(t," should be a boolean but received ").concat(typeof e))}},e)},asString:function(e){return ba({validate:function(e,t){if("string"!=typeof e)throw new TypeError("".concat(t," should be a string but received ").concat(typeof e))}},e)},asNumber:function(r){return ba({validate:function(e,t){if((0,Pa.isInt)(e)&&!0!==(null==r?void 0:r.isInteger))throw new TypeError('Number returned as Integer Object. To use asNumber mapping with Integers, set "isInteger" in rule configuration.');if(!0!==(null==r?void 0:r.isInteger)&&"bigint"==typeof e)throw new TypeError('Number returned as BigInt. To use asNumber mapping with integer values, set "isInteger" in rule configuration.');if("number"!=typeof e&&(!(0,Pa.isInt)(e)||!0!==(null==r?void 0:r.isInteger)))throw new TypeError("".concat(t," should be a number but received ").concat(typeof e));if(!0===(null==r?void 0:r.isInteger)&&"number"==typeof e&&!Number.isInteger(e))throw new TypeError("".concat(t," should be an integer value but received decimal number."))},convert:function(e){return"bigint"==typeof e?Number(e):(0,Pa.isInt)(e)?e.toNumber():e},parameterConversion:function(e){return!0===(null==r?void 0:r.isInteger)?Pa.default.fromValue(e):e}},r)},asBigInt:function(r){return ba({validate:function(e,t){if("bigint"!=typeof e&&(!0!==(null==r?void 0:r.acceptNumber)||"number"!=typeof e)&&!(0,Pa.isInt)(e))throw new TypeError("".concat(t," should be a bigint but received ").concat(typeof e))},convert:function(e){return"number"==typeof e?BigInt(e):(0,Pa.isInt)(e)?e.toBigInt():e}},r)},asInteger:function(r){return ba({validate:function(e,t){if("bigint"!=typeof e&&!(0,Pa.isInt)(e)&&("number"!=typeof e||!0!==(null==r?void 0:r.acceptNumber)))throw new TypeError("".concat(t," should be an Integer but received ").concat(typeof e))},convert:function(e){return"bigint"==typeof e?Pa.default.fromValue(e):e}},r)},asNode:function(e){return ba({validate:function(e,t){if(!(0,ma.isNode)(e))throw new TypeError("".concat(t," should be a Node but received ").concat(typeof e))}},e)},asRelationship:function(e){return ba({validate:function(e,t){if(!(0,ma.isRelationship)(e))throw new TypeError("".concat(t," should be a Relationship but received ").concat(typeof e))}},e)},asPath:function(e){return ba({validate:function(e,t){if(!(0,ma.isPath)(e))throw new TypeError("".concat(t," should be a Path but received ").concat(typeof e))}},e)},asPoint:function(e){return ba({validate:function(e,t){if(!(0,ga.isPoint)(e))throw new TypeError("".concat(t," should be a Point but received ").concat(typeof e))}},e)},asDuration:function(t){if(null==(null==t?void 0:t.stringify)||null==(null==t?void 0:t.convert)&&null==t.parameterConversion)return ba({validate:function(e,t){if(!(0,Oa.isDuration)(e))throw new TypeError("".concat(t," should be a Duration but received ").concat(typeof e))},convert:function(e){return!0===(null==t?void 0:t.stringify)?e.toString():e},parameterConversion:!0===(null==t?void 0:t.stringify)?function(e){return Oa.Duration.fromString(e)}:void 0},t);throw(0,Ea.newError)("Provided rule already has convert and/or parameterConversion function, stringify can not be used in combination with custom conversion functions.")},asLocalTime:function(t){if(null==(null==t?void 0:t.stringify)||null==(null==t?void 0:t.convert)&&null==t.parameterConversion)return ba({validate:function(e,t){if(!(0,Oa.isLocalTime)(e))throw new TypeError("".concat(t," should be a LocalTime but received ").concat(typeof e))},convert:function(e){return!0===(null==t?void 0:t.stringify)?e.toString():e},parameterConversion:!0===(null==t?void 0:t.stringify)?function(e){return Oa.LocalTime.fromString(e)}:void 0},t);throw(0,Ea.newError)("Provided rule already has convert and/or parameterConversion function, stringify can not be used in combination with custom conversion functions.")},asTime:function(t){if(null==(null==t?void 0:t.stringify)||null==(null==t?void 0:t.convert)&&null==t.parameterConversion)return ba({validate:function(e,t){if(!(0,Oa.isTime)(e))throw new TypeError("".concat(t," should be a Time but received ").concat(typeof e))},convert:function(e){return!0===(null==t?void 0:t.stringify)?e.toString():e},parameterConversion:!0===(null==t?void 0:t.stringify)?function(e){return Oa.Time.fromString(e)}:void 0},t);throw(0,Ea.newError)("Provided rule already has convert and/or parameterConversion function, stringify can not be used in combination with custom conversion functions.")},asDate:function(t){if(null!=(null==t?void 0:t.stringify)&&(null!=(null==t?void 0:t.convert)||null!=t.parameterConversion))throw(0,Ea.newError)("Provided rule already has convert and/or parameterConversion function, stringify can not be used in combination with custom conversion functions.");if(null!=(null==t?void 0:t.jsNativeDate)&&(null!=(null==t?void 0:t.convert)||null!=t.parameterConversion))throw(0,Ea.newError)("Provided rule already has convert and/or parameterConversion function, jsNativeDate can not be used in combination with custom conversion functions.");if(!0===(null==t?void 0:t.stringify)&&!0===(null==t?void 0:t.jsNativeDate))throw(0,Ea.newError)("both stringify and jsNativeDate cannot be set; use one or neither");var e;return!0===(null==t?void 0:t.stringify)&&(e=function(e){return Oa.Date.fromString(e)}),!0===(null==t?void 0:t.jsNativeDate)&&(e=function(e){return Oa.Date.fromStandardDateLocal(e)}),ba({validate:function(e,t){if(!(0,Oa.isDate)(e))throw new TypeError("".concat(t," should be a Date but received ").concat(typeof e))},convert:function(e){return Ta(e,t)},parameterConversion:e},t)},asLocalDateTime:function(t){if(null!=(null==t?void 0:t.stringify)&&(null!=(null==t?void 0:t.convert)||null!=t.parameterConversion))throw(0,Ea.newError)("Provided rule already has convert and/or parameterConversion function, stringify can not be used in combination with custom conversion functions.");if(null!=(null==t?void 0:t.jsNativeDate)&&(null!=(null==t?void 0:t.convert)||null!=t.parameterConversion))throw(0,Ea.newError)("Provided rule already has convert and/or parameterConversion function, jsNativeDate can not be used in combination with custom conversion functions.");if(!0===(null==t?void 0:t.stringify)&&!0===(null==t?void 0:t.jsNativeDate))throw(0,Ea.newError)("both stringify and jsNativeDate cannot be set; use one or neither");var e;return!0===(null==t?void 0:t.stringify)&&(e=function(e){return Oa.LocalDateTime.fromString(e)}),!0===(null==t?void 0:t.jsNativeDate)&&(e=function(e){return Oa.LocalDateTime.fromStandardDate(e)}),ba({validate:function(e,t){if(!(0,Oa.isLocalDateTime)(e))throw new TypeError("".concat(t," should be a LocalDateTime but received ").concat(typeof e))},convert:function(e){return Ta(e,t)},parameterConversion:e},t)},asDateTime:function(t){if(null!=(null==t?void 0:t.stringify)&&(null!=(null==t?void 0:t.convert)||null!=t.parameterConversion))throw(0,Ea.newError)("Provided rule already has convert and/or parameterConversion function, stringify can not be used in combination with custom conversion functions.");if(null!=(null==t?void 0:t.jsNativeDate)&&(null!=(null==t?void 0:t.convert)||null!=t.parameterConversion))throw(0,Ea.newError)("Provided rule already has convert and/or parameterConversion function, jsNativeDate can not be used in combination with custom conversion functions.");if(!0===(null==t?void 0:t.stringify)&&!0===(null==t?void 0:t.jsNativeDate))throw(0,Ea.newError)("both stringify and jsNativeDate cannot be set; use one or neither");var e;return!0===(null==t?void 0:t.stringify)&&(e=function(e){return Oa.DateTime.fromString(e)}),!0===(null==t?void 0:t.jsNativeDate)&&(e=function(e){return Oa.DateTime.fromStandardDate(e)}),ba({validate:function(e,t){if(!(0,Oa.isDateTime)(e))throw new TypeError("".concat(t," should be a DateTime but received ").concat(typeof e))},convert:function(e){return Ta(e,t)},parameterConversion:e},t)},asList:function(o){return ba({validate:function(e,r){var t;if(!Array.isArray(e))throw new TypeError("".concat(r," should be a list but received ").concat(typeof e));var n=null==(t=null==o?void 0:o.apply)?void 0:t.validate;null!=n&&e.forEach(function(e,t){return n(e,"".concat(r,"[").concat(t,"]"))})},convert:function(e,r){return null!=(null==o?void 0:o.apply)?e.map(function(e,t){return(0,va.valueAs)(e,"".concat(r,"[").concat(t,"]"),o.apply)}):e},parameterConversion:function(e){var t=null==o?void 0:o.apply;return null!=t?e.map(function(e){return(0,va.optionalParameterConversion)(e,t)}):e}},o)},asVector:function(r){if(null==(null==r?void 0:r.asTypedList)||null==(null==r?void 0:r.convert)&&null==r.parameterConversion)return ba({validate:function(e,t){if(!(0,wa.isVector)(e))throw new TypeError("".concat(t," should be a vector but received ").concat(typeof e));if(null!=(null==r?void 0:r.dimension)&&e.asTypedArray().length!==r.dimension)throw new TypeError("".concat(t," should be a vector of length ").concat(r.dimension," but received length ").concat(e.asTypedArray().length));if(null!=(null==r?void 0:r.type)&&e.getType()!==r.type)throw new TypeError("".concat(t," should be a vector of type ").concat(r.type," but received type ").concat(e.getType()))},convert:function(e){return!0===(null==r?void 0:r.asTypedList)?e._typedArray:e},parameterConversion:!0===(null==r?void 0:r.asTypedList)?function(e){return(0,wa.vector)(e)}:void 0},r);throw(0,Ea.newError)("Provided rule already has convert and/or parameterConversion function, asTypedList can not be used in combination with custom conversion functions.")},asObject:function(e,t){var i="function"==typeof e?e:Object,u=(0,va.getRules)(e,t);return ba({validate:function(e,t){for(var r in u){var n=null!=u[r].from?u[r].from:(0,va.defaultNameMapping)(r);if(null==e[n]){if(!0===u[r].optional)continue;throw(0,Ea.newError)("Mapped object did not include required field ".concat(t," with key ").concat(n,"."))}null!=u[r].validate&&u[r].validate(e[n],"".concat(t,"[").concat(r,"]"))}},convert:function(e,t){var r,n=new i;for(r in u){var o=null!=u[r].from?u[r].from:(0,va.defaultNameMapping)(r);null!=e[o]&&null!=u[r].convert?n[r]=u[r].convert(e[o],"".concat(t,"[").concat(o,"]")):n[r]=e[o]}return n},parameterConversion:function(e){var t,r={};for(t in u){var n=null!=u[t].from?u[t].from:(0,va.defaultNameMapping)(t);null!=e[t]&&null!=u[t].parameterConversion?r[n]=u[t].parameterConversion(e[t]):r[n]=e[t]}return r}},da.rule)}});var xo={},Sa=r&&r.__assign||function(){return(Sa=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ja=(Object.defineProperty(xo,"__esModule",{value:!0}),fe),Ca=O;xo.default={booleanProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asBoolean(r)}},stringProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asString(r)}},numberProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asNumber(r)}},bigIntProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asBigInt(r)}},integerProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asInteger(r)}},nodeProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asNode(r)}},relationshipProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asRelationship(r)}},pathProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asPath(r)}},pointProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asPoint(r)}},durationProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asDuration(r)}},localTimeProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asLocalTime(r)}},timeProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asTime(r)}},dateProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asDate(r)}},localDateTimeProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asLocalDateTime(r)}},dateTimeProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asDateTime(r)}},listProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asList(Sa({apply:Sa({},t.metadata[t.name])},r))}},vectorProperty:function(r){return function(e,t){t.metadata[t.name]=Ca.rule.asVector(r)}},objectProperty:function(r,n){return function(e,t){t.metadata[t.name]=Ca.rule.asObject(r,n)}},optionalProperty:function(){return function(e,t){t.metadata[t.name]=Sa({optional:!0},t.metadata[t.name])}},mapPropertyFromName:function(r){return function(e,t){t.metadata[t.name]=Sa({from:r},t.metadata[t.name])}},convertPropertyToType:function(r){return function(e,t){t.metadata[t.name]=Sa({convert:function(e){return e.as(r)}},t.metadata[t.name])}},mappedClass:function(){return function(e,t){ja.rulesRegistry[t.name]=t.metadata}}};var Ia,Ra,Aa,Ma,Na,ka,xa,Da,La,Ua,Fa,Ba,Va,qa,Wa,za,Ha,Ga,Ya,Ka,Za,Qa,m={},Xa=(Object.defineProperty(m,"__esModule",{value:!0}),m.isUnsupportedType=function(e){return null!=e&&!0===e[Xa]},"__isUnsupportedType__"),T=(Ja.prototype.toString=function(){return"UnsupportedType<".concat(this.name,">")},Ja);function Ja(e,t,r,n){this.name=e,this.minimumProtocolVersion="".concat(t,".").concat(r),this.message=n}m.default=T,Object.defineProperty(T.prototype,Xa,{value:!0,enumerable:!1,configurable:!1,writable:!1}),v=e,Ra=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Aa=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),P=r&&r.__importStar||(Ia=function(e){return(Ia=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Ia(e),n=0;n<r.length;n++)"default"!==r[n]&&Ra(t,e,r[n]);return Aa(t,e),t}),T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(v,"__esModule",{value:!0}),v.Result=v.Stats=v.QueryStatistics=v.ProfiledPlan=v.Plan=v.GqlStatusObject=v.Notification=v.ServerInfo=v.queryType=v.ResultSummary=v.Record=v.isPathSegment=v.PathSegment=v.isPath=v.Path=v.isUnboundRelationship=v.UnboundRelationship=v.isRelationship=v.Relationship=v.isNode=v.Node=v.Time=v.LocalTime=v.LocalDateTime=v.isTime=v.isLocalTime=v.isLocalDateTime=v.isDuration=v.isDateTime=v.isDate=v.Duration=v.DateTime=v.Date=v.Point=v.isPoint=v.internal=v.toString=v.toNumber=v.inSafeRange=v.isInt=v.int=v.Integer=v.error=v.isRetriableError=v.isRetryableError=v.GQLError=v.newGQLError=v.Neo4jError=v.newError=v.authTokenManagers=void 0,v.isUnsupportedType=v.UnsupportedType=v.StandardCase=v.RecordObjectMapping=v.mappingDecorators=v.rule=v.ProtocolVersion=v.vector=v.Vector=v.isVector=v.resolveCertificateProvider=v.clientCertificateProviders=v.notificationFilterMinimumSeverityLevel=v.notificationFilterDisabledClassification=v.notificationFilterDisabledCategory=v.notificationSeverityLevel=v.notificationClassification=v.notificationCategory=v.resultTransformers=v.routing=v.staticAuthTokenManager=v.bookmarkManager=v.auth=v.json=v.driver=v.types=v.Driver=v.Session=v.TransactionPromise=v.ManagedTransaction=v.Transaction=v.Connection=v.Releasable=v.ConnectionProvider=v.EagerResult=void 0,Ma=t,Object.defineProperty(v,"newError",{enumerable:!0,get:function(){return Ma.newError}}),Object.defineProperty(v,"Neo4jError",{enumerable:!0,get:function(){return Ma.Neo4jError}}),Object.defineProperty(v,"newGQLError",{enumerable:!0,get:function(){return Ma.newGQLError}}),Object.defineProperty(v,"GQLError",{enumerable:!0,get:function(){return Ma.GQLError}}),Object.defineProperty(v,"isRetryableError",{enumerable:!0,get:function(){return Ma.isRetryableError}}),Object.defineProperty(v,"isRetriableError",{enumerable:!0,get:function(){return Ma.isRetriableError}}),Na=P(i),v.Integer=Na.default,Object.defineProperty(v,"int",{enumerable:!0,get:function(){return Na.int}}),Object.defineProperty(v,"isInt",{enumerable:!0,get:function(){return Na.isInt}}),Object.defineProperty(v,"inSafeRange",{enumerable:!0,get:function(){return Na.inSafeRange}}),Object.defineProperty(v,"toNumber",{enumerable:!0,get:function(){return Na.toNumber}}),Object.defineProperty(v,"toString",{enumerable:!0,get:function(){return Na.toString}}),ka=u,Object.defineProperty(v,"Date",{enumerable:!0,get:function(){return ka.Date}}),Object.defineProperty(v,"DateTime",{enumerable:!0,get:function(){return ka.DateTime}}),Object.defineProperty(v,"Duration",{enumerable:!0,get:function(){return ka.Duration}}),Object.defineProperty(v,"isDate",{enumerable:!0,get:function(){return ka.isDate}}),Object.defineProperty(v,"isDateTime",{enumerable:!0,get:function(){return ka.isDateTime}}),Object.defineProperty(v,"isDuration",{enumerable:!0,get:function(){return ka.isDuration}}),Object.defineProperty(v,"isLocalDateTime",{enumerable:!0,get:function(){return ka.isLocalDateTime}}),Object.defineProperty(v,"isLocalTime",{enumerable:!0,get:function(){return ka.isLocalTime}}),Object.defineProperty(v,"isTime",{enumerable:!0,get:function(){return ka.isTime}}),Object.defineProperty(v,"LocalDateTime",{enumerable:!0,get:function(){return ka.LocalDateTime}}),Object.defineProperty(v,"LocalTime",{enumerable:!0,get:function(){return ka.LocalTime}}),Object.defineProperty(v,"Time",{enumerable:!0,get:function(){return ka.Time}}),xa=p,Object.defineProperty(v,"Node",{enumerable:!0,get:function(){return xa.Node}}),Object.defineProperty(v,"isNode",{enumerable:!0,get:function(){return xa.isNode}}),Object.defineProperty(v,"Relationship",{enumerable:!0,get:function(){return xa.Relationship}}),Object.defineProperty(v,"isRelationship",{enumerable:!0,get:function(){return xa.isRelationship}}),Object.defineProperty(v,"UnboundRelationship",{enumerable:!0,get:function(){return xa.UnboundRelationship}}),Object.defineProperty(v,"isUnboundRelationship",{enumerable:!0,get:function(){return xa.isUnboundRelationship}}),Object.defineProperty(v,"Path",{enumerable:!0,get:function(){return xa.Path}}),Object.defineProperty(v,"isPath",{enumerable:!0,get:function(){return xa.isPath}}),Object.defineProperty(v,"PathSegment",{enumerable:!0,get:function(){return xa.PathSegment}}),Object.defineProperty(v,"isPathSegment",{enumerable:!0,get:function(){return xa.isPathSegment}}),t=T(Rt),v.Record=t.default,Da=l,Object.defineProperty(v,"isPoint",{enumerable:!0,get:function(){return Da.isPoint}}),Object.defineProperty(v,"Point",{enumerable:!0,get:function(){return Da.Point}}),La=P(h),v.ResultSummary=La.default,Object.defineProperty(v,"queryType",{enumerable:!0,get:function(){return La.queryType}}),Object.defineProperty(v,"ServerInfo",{enumerable:!0,get:function(){return La.ServerInfo}}),Object.defineProperty(v,"Plan",{enumerable:!0,get:function(){return La.Plan}}),Object.defineProperty(v,"ProfiledPlan",{enumerable:!0,get:function(){return La.ProfiledPlan}}),Object.defineProperty(v,"QueryStatistics",{enumerable:!0,get:function(){return La.QueryStatistics}}),Object.defineProperty(v,"Stats",{enumerable:!0,get:function(){return La.Stats}}),Ua=P(Zt),v.GqlStatusObject=Ua.default,Object.defineProperty(v,"Notification",{enumerable:!0,get:function(){return Ua.Notification}}),Object.defineProperty(v,"notificationCategory",{enumerable:!0,get:function(){return Ua.notificationCategory}}),Object.defineProperty(v,"notificationClassification",{enumerable:!0,get:function(){return Ua.notificationClassification}}),Object.defineProperty(v,"notificationSeverityLevel",{enumerable:!0,get:function(){return Ua.notificationSeverityLevel}}),Fa=b,Object.defineProperty(v,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return Fa.notificationFilterDisabledCategory}}),Object.defineProperty(v,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return Fa.notificationFilterDisabledClassification}}),Object.defineProperty(v,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return Fa.notificationFilterMinimumSeverityLevel}}),i=T(G),v.Result=i.default,u=T(uo),v.EagerResult=u.default,Ba=P(F),v.ConnectionProvider=Ba.default,Object.defineProperty(v,"Releasable",{enumerable:!0,get:function(){return Ba.Releasable}}),p=T(S),v.Connection=p.default,Rt=T(C),v.Transaction=Rt.default,l=T(j),v.ManagedTransaction=l.default,h=T(bn),v.TransactionPromise=h.default,Zt=T(po),v.Session=Zt.default,b=P(o),G=b,v.Driver=b.default,v.driver=G,uo=T(w),v.auth=uo.default,Va=Zn,Object.defineProperty(v,"bookmarkManager",{enumerable:!0,get:function(){return Va.bookmarkManager}}),qa=_,Object.defineProperty(v,"authTokenManagers",{enumerable:!0,get:function(){return qa.authTokenManagers}}),Object.defineProperty(v,"staticAuthTokenManager",{enumerable:!0,get:function(){return qa.staticAuthTokenManager}}),Wa=o,Object.defineProperty(v,"routing",{enumerable:!0,get:function(){return Wa.routing}}),F=P(g),v.types=F,S=P(n),v.json=S,C=T(Ar),v.resultTransformers=C.default,za=E,Object.defineProperty(v,"clientCertificateProviders",{enumerable:!0,get:function(){return za.clientCertificateProviders}}),Object.defineProperty(v,"resolveCertificateProvider",{enumerable:!0,get:function(){return za.resolveCertificateProvider}}),j=P(y),v.internal=j,Ha=Wr,Object.defineProperty(v,"ProtocolVersion",{enumerable:!0,get:function(){return Ha.ProtocolVersion}}),Ga=P(a),v.Vector=Ga.default,Object.defineProperty(v,"vector",{enumerable:!0,get:function(){return Ga.vector}}),Object.defineProperty(v,"isVector",{enumerable:!0,get:function(){return Ga.isVector}}),Ya=pe,Object.defineProperty(v,"StandardCase",{enumerable:!0,get:function(){return Ya.StandardCase}}),Ka=fe,Object.defineProperty(v,"RecordObjectMapping",{enumerable:!0,get:function(){return Ka.RecordObjectMapping}}),Za=O,Object.defineProperty(v,"rule",{enumerable:!0,get:function(){return Za.rule}}),T=T(xo),v.mappingDecorators=T.default,Qa=P(m),v.UnsupportedType=Qa.default,Object.defineProperty(v,"isUnsupportedType",{enumerable:!0,get:function(){return Qa.isUnsupportedType}}),P={SERVICE_UNAVAILABLE:Ma.SERVICE_UNAVAILABLE,SESSION_EXPIRED:Ma.SESSION_EXPIRED,PROTOCOL_ERROR:Ma.PROTOCOL_ERROR},v.error=P,P={authTokenManagers:qa.authTokenManagers,newError:Ma.newError,Neo4jError:Ma.Neo4jError,newGQLError:Ma.newGQLError,GQLError:Ma.GQLError,isRetryableError:Ma.isRetryableError,isRetriableError:Ma.isRetriableError,error:P,Integer:Na.default,int:Na.int,isInt:Na.isInt,inSafeRange:Na.inSafeRange,toNumber:Na.toNumber,toString:Na.toString,internal:j,isPoint:Da.isPoint,Point:Da.Point,Date:ka.Date,DateTime:ka.DateTime,Duration:ka.Duration,isDate:ka.isDate,isDateTime:ka.isDateTime,isDuration:ka.isDuration,isLocalDateTime:ka.isLocalDateTime,isLocalTime:ka.isLocalTime,isTime:ka.isTime,LocalDateTime:ka.LocalDateTime,LocalTime:ka.LocalTime,Time:ka.Time,Node:xa.Node,isNode:xa.isNode,Relationship:xa.Relationship,isRelationship:xa.isRelationship,UnboundRelationship:xa.UnboundRelationship,isUnboundRelationship:xa.isUnboundRelationship,Path:xa.Path,isPath:xa.isPath,PathSegment:xa.PathSegment,isPathSegment:xa.isPathSegment,Record:t.default,ResultSummary:La.default,queryType:La.queryType,ServerInfo:La.ServerInfo,Notification:Ua.Notification,GqlStatusObject:Ua.default,Plan:La.Plan,ProfiledPlan:La.ProfiledPlan,QueryStatistics:La.QueryStatistics,Stats:La.Stats,Result:i.default,EagerResult:u.default,Transaction:Rt.default,ManagedTransaction:l.default,TransactionPromise:h.default,Session:Zt.default,Driver:b.default,Connection:p.default,Releasable:Ba.Releasable,types:F,driver:G,json:S,auth:uo.default,bookmarkManager:Va.bookmarkManager,routing:Wa.routing,resultTransformers:C.default,notificationCategory:Ua.notificationCategory,notificationClassification:Ua.notificationClassification,notificationSeverityLevel:Ua.notificationSeverityLevel,notificationFilterDisabledCategory:Fa.notificationFilterDisabledCategory,notificationFilterDisabledClassification:Fa.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:Fa.notificationFilterMinimumSeverityLevel,clientCertificateProviders:za.clientCertificateProviders,resolveCertificateProvider:za.resolveCertificateProvider,ProtocolVersion:Ha.ProtocolVersion,rule:Za.rule,mappingDecorators:T.default,RecordObjectMapping:Ka.RecordObjectMapping,StandardCase:Ya.StandardCase,UnsupportedType:Qa.default,isUnsupportedType:Qa.isUnsupportedType,isVector:Ga.isVector,vector:Ga.vector},v.default=P;bn={},po={},w={},Zn={},_={};Object.defineProperty(_,"__esModule",{value:!0}),_.isFunction=void 0,_.isFunction=function(e){return"function"==typeof e};o={},g={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.createErrorClass=void 0,n.createErrorClass=function(e){return(e=e(function(e){Error.call(e),e.stack=(new Error).stack})).prototype=Object.create(Error.prototype),e.prototype.constructor=e},Object.defineProperty(g,"__esModule",{value:!0}),g.UnsubscriptionError=void 0;Ar=n,g.UnsubscriptionError=Ar.createErrorClass(function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}),E={};Object.defineProperty(E,"__esModule",{value:!0}),E.arrRemove=void 0,E.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var $a=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},es=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ts=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},rs=(Object.defineProperty(o,"__esModule",{value:!0}),o.isSubscription=o.EMPTY_SUBSCRIPTION=o.Subscription=void 0,_),ns=g,os=E,is=(us.prototype.unsubscribe=function(){var t,e,r;if(!this.closed){this.closed=!0;var n=this._parentage;if(n)if(this._parentage=null,Array.isArray(n))try{for(var o=$a(n),i=o.next();!i.done;i=o.next())i.value.remove(this)}catch(e){a={error:e}}finally{try{i&&!i.done&&(u=o.return)&&u.call(o)}finally{if(a)throw a.error}}else n.remove(this);var u=this.initialTeardown;if(rs.isFunction(u))try{u()}catch(e){r=e instanceof ns.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=$a(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{as(l)}catch(e){r=null!=r?r:[],e instanceof ns.UnsubscriptionError?r=ts(ts([],es(r)),es(e.errors)):r.push(e)}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}}if(r)throw new ns.UnsubscriptionError(r)}},us.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)as(e);else{if(e instanceof us){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},us.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},us.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},us.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&os.arrRemove(t,e)},us.prototype.remove=function(e){var t=this._finalizers;t&&os.arrRemove(t,e),e instanceof us&&e._removeParent(this)},us.EMPTY=((y=new us).closed=!0,y),us);function us(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function as(e){rs.isFunction(e)?e():e.unsubscribe()}o.Subscription=is,o.EMPTY_SUBSCRIPTION=is.EMPTY,o.isSubscription=function(e){return e instanceof is||e&&"closed"in e&&rs.isFunction(e.remove)&&rs.isFunction(e.add)&&rs.isFunction(e.unsubscribe)};var ss,cs,ls,Wr={},a=(Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.config=void 0,Wr.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),pe={},fs=(ss=pe,cs=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ls=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(ss,"__esModule",{value:!0}),ss.timeoutProvider=void 0,ss.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=ss.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,ls([e,t],cs(r))):setTimeout.apply(void 0,ls([e,t],cs(r)))},clearTimeout:function(e){var t=ss.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(a,"__esModule",{value:!0}),a.reportUnhandledError=void 0,Wr),ps=pe;a.reportUnhandledError=function(t){ps.timeoutProvider.setTimeout(function(){var e=fs.config.onUnhandledError;if(!e)throw t;e(t)})};fe={};Object.defineProperty(fe,"__esModule",{value:!0}),fe.noop=void 0,fe.noop=function(){};O={};function ds(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(O,"__esModule",{value:!0}),O.createNotification=O.nextNotification=O.errorNotification=O.COMPLETE_NOTIFICATION=void 0,O.COMPLETE_NOTIFICATION=ds("C",void 0,void 0),O.errorNotification=function(e){return ds("E",void 0,e)},O.nextNotification=function(e){return ds("N",e,void 0)},O.createNotification=ds;var hs,bs,ys,_s,vs,ms,gs,Os,ws,Es,Ps,Ts,Ss,js,xo={},Cs=(Object.defineProperty(xo,"__esModule",{value:!0}),xo.captureError=xo.errorContext=void 0,Wr),Is=null;function Rs(e){var t=ys.call(this)||this;return t.isStopped=!1,e?(t.destination=e,vs.isSubscription(e)&&e.add(t)):t.destination=hs.EMPTY_OBSERVER,t}function As(e,t){return Ps.call(e,t)}function Ms(e){this.partialObserver=e}function Ns(e,t,r){var n=Ss.call(this)||this;return r=_s.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&ms.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&As(e.next,t),error:e.error&&As(e.error,t),complete:e.complete&&As(e.complete,t)}):e,n.destination=new Ts(r),n}function ks(e){ms.config.useDeprecatedSynchronousErrorHandling?Es.captureError(e):gs.reportUnhandledError(e)}function xs(e,t){var r=ms.config.onStoppedNotification;r&&ws.timeoutProvider.setTimeout(function(){return r(e,t)})}xo.errorContext=function(e){if(Cs.config.useDeprecatedSynchronousErrorHandling){var t=!Is;if(t&&(Is={errorThrown:!1,error:null}),e(),t){var t=Is,r=t.errorThrown;if(Is=null,r)throw t.error}}else e()},xo.captureError=function(e){Cs.config.useDeprecatedSynchronousErrorHandling&&Is&&(Is.errorThrown=!0,Is.error=e)},hs=Zn,m=r&&r.__extends||(bs=function(e,t){return(bs=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])}))(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}bs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(hs,"__esModule",{value:!0}),hs.EMPTY_OBSERVER=hs.SafeSubscriber=hs.Subscriber=void 0,_s=_,ms=Wr,gs=a,j=fe,Os=O,ws=pe,Es=xo,ys=(vs=o).Subscription,m(Rs,ys),Rs.create=function(e,t,r){return new js(e,t,r)},Rs.prototype.next=function(e){this.isStopped?xs(Os.nextNotification(e),this):this._next(e)},Rs.prototype.error=function(e){this.isStopped?xs(Os.errorNotification(e),this):(this.isStopped=!0,this._error(e))},Rs.prototype.complete=function(){this.isStopped?xs(Os.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},Rs.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,ys.prototype.unsubscribe.call(this),this.destination=null)},Rs.prototype._next=function(e){this.destination.next(e)},Rs.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},Rs.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t=Rs,hs.Subscriber=t,Ps=Function.prototype.bind,Ms.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){ks(e)}},Ms.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){ks(e)}else ks(e)},Ms.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){ks(e)}},Ts=Ms,m(Ns,Ss=t),js=Ns,hs.SafeSubscriber=js,hs.EMPTY_OBSERVER={closed:!0,next:j.noop,error:function(e){throw e},complete:j.noop};i={},Object.defineProperty(i,"__esModule",{value:!0}),i.observable=void 0,i.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",u={},Rt={};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.identity=void 0,Rt.identity=function(e){return e},Object.defineProperty(u,"__esModule",{value:!0}),u.pipeFromArray=u.pipe=void 0;var Ds=Rt;function Ls(t){return 0===t.length?Ds.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}u.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ls(e)},u.pipeFromArray=Ls,Object.defineProperty(w,"__esModule",{value:!0}),w.Observable=void 0;var Us=Zn,Fs=o,l=i,Bs=u,Vs=Wr,qs=_,Ws=xo;function zs(e){e&&(this._subscribe=e)}function Hs(e){return null!=(e=null!=e?e:Vs.config.Promise)?e:Promise}zs.prototype.lift=function(e){var t=new zs;return t.source=this,t.operator=e,t},zs.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof Us.Subscriber||(e=>e&&qs.isFunction(e.next)&&qs.isFunction(e.error)&&qs.isFunction(e.complete))(n)&&Fs.isSubscription(n)?e:new Us.SafeSubscriber(e,t,r);return Ws.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},zs.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},zs.prototype.forEach=function(n,e){var o=this;return new(e=Hs(e))(function(e,t){var r=new Us.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},zs.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},zs.prototype[l.observable]=function(){return this},zs.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Bs.pipeFromArray(e)(this)},zs.prototype.toPromise=function(e){var n=this;return new(e=Hs(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},zs.create=function(e){return new zs(e)},w.Observable=zs;var h={},Zt={},b={},Gs=(Object.defineProperty(b,"__esModule",{value:!0}),b.operate=b.hasLift=void 0,_);function Ys(e){return Gs.isFunction(null==e?void 0:e.lift)}b.hasLift=Ys,b.operate=function(t){return function(e){if(Ys(e))return e.lift(function(e){try{return t(e,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}};var Ks,p={},F=r&&r.__extends||(Ks=function(e,t){return(Ks=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])}))(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}Ks(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),G=(Object.defineProperty(p,"__esModule",{value:!0}),p.OperatorSubscriber=p.createOperatorSubscriber=void 0,Zn);p.createOperatorSubscriber=function(e,t,r,n,o){return new Qs(e,t,r,n,o)};F(Xs,Zs=G.Subscriber),Xs.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,Zs.prototype.unsubscribe.call(this),e)||null==(e=this.onFinalize)||e.call(this)};var Zs,Qs=Xs;function Xs(t,r,e,n,o,i){var u=Zs.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:Zs.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:Zs.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:Zs.prototype._complete,u}p.OperatorSubscriber=Qs,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.refCount=void 0;var Js=b,$s=p;Zt.refCount=function(){return Js.operate(function(r,n){var o=null,e=(r._refCount++,$s.createOperatorSubscriber(n,void 0,void 0,void 0,function(){var e,t;!r||r._refCount<=0||0<--r._refCount?o=null:(e=r._connection,t=o,o=null,!e||t&&e!==t||e.unsubscribe(),n.unsubscribe())}));r.subscribe(e),e.closed||(o=r.connect())})};var ec,S=r&&r.__extends||(ec=function(e,t){return(ec=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])}))(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}ec(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(h,"__esModule",{value:!0}),h.ConnectableObservable=void 0;var tc,rc=o,nc=Zt,oc=p,ic=b,uo=(tc=w.Observable,S(uc,tc),uc.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},uc.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},uc.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},uc.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new rc.Subscription,t=this.getSubject(),e.add(this.source.subscribe(oc.createOperatorSubscriber(t,void 0,function(){r._teardown(),t.complete()},function(e){r._teardown(),t.error(e)},function(){return r._teardown()}))),e.closed&&(this._connection=null,e=rc.Subscription.EMPTY)),e},uc.prototype.refCount=function(){return nc.refCount()(this)},uc);function uc(e,t){var r=tc.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,ic.hasLift(e)&&(r.lift=e.lift),r}h.ConnectableObservable=uo;var ac,sc,cc,lc,fc,C={},T={},v=(ac=T,Object.defineProperty(ac,"__esModule",{value:!0}),ac.performanceTimestampProvider=void 0,ac.performanceTimestampProvider={now:function(){return(ac.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),pc=(sc=v,cc=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},lc=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(sc,"__esModule",{value:!0}),sc.animationFrameProvider=void 0,fc=o,sc.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=sc.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new fc.Subscription(function(){return null==r?void 0:r(o)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=sc.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,lc([],cc(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=sc.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,lc([],cc(e)))},delegate:void 0},Object.defineProperty(C,"__esModule",{value:!0}),C.animationFrames=void 0,w),dc=T,hc=v;function bc(a){return new pc.Observable(function(r){var n=a||dc.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=hc.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&hc.animationFrameProvider.cancelAnimationFrame(i)}})}C.animationFrames=function(e){return e?bc(e):vc};var yc,_c,vc=bc(),P={},Ar={},y=(Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.ObjectUnsubscribedError=void 0,n),O=(Ar.ObjectUnsubscribedError=y.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(yc=function(e,t){return(yc=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])}))(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}yc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),mc=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},gc=(Object.defineProperty(P,"__esModule",{value:!0}),P.AnonymousSubject=P.Subject=void 0,w),Oc=o,wc=Ar,Ec=E,Pc=xo,pe=(_c=gc.Observable,O(Tc,_c),Tc.prototype.lift=function(e){var t=new jc(this,this);return t.operator=e,t},Tc.prototype._throwIfClosed=function(){if(this.closed)throw new wc.ObjectUnsubscribedError},Tc.prototype.next=function(o){var i=this;Pc.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=mc(i.currentObservers),n=r.next();!n.done;n=r.next())n.value.next(o)}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}}})},Tc.prototype.error=function(t){var r=this;Pc.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=t;for(var e=r.observers;e.length;)e.shift().error(t)}})},Tc.prototype.complete=function(){var t=this;Pc.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},Tc.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(Tc.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),Tc.prototype._trySubscribe=function(e){return this._throwIfClosed(),_c.prototype._trySubscribe.call(this,e)},Tc.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},Tc.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?Oc.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new Oc.Subscription(function(){t.currentObservers=null,Ec.arrRemove(o,e)}))},Tc.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},Tc.prototype.asObservable=function(){var e=new gc.Observable;return e.source=this,e},Tc.create=function(e,t){return new jc(e,t)},Tc);function Tc(){var e=_c.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}P.Subject=pe;O(Cc,Sc=pe),Cc.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},Cc.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},Cc.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},Cc.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:Oc.EMPTY_SUBSCRIPTION};var Sc,jc=Cc;function Cc(e,t){var r=Sc.call(this)||this;return r.destination=e,r.source=t,r}P.AnonymousSubject=jc;var Ic,m={},t=r&&r.__extends||(Ic=function(e,t){return(Ic=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])}))(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}Ic(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(m,"__esModule",{value:!0}),m.BehaviorSubject=void 0;Rc=P.Subject,t(Ac,Rc),Object.defineProperty(Ac.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),Ac.prototype._subscribe=function(e){var t=Rc.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},Ac.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},Ac.prototype.next=function(e){Rc.prototype.next.call(this,this._value=e)};var Rc,j=Ac;function Ac(e){var t=Rc.call(this)||this;return t._value=e,t}m.BehaviorSubject=j;var Mc,Nc,l={},F={},G=(Mc=F,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.dateTimestampProvider=void 0,Mc.dateTimestampProvider={now:function(){return(Mc.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(Nc=function(e,t){return(Nc=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])}))(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}Nc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(l,"__esModule",{value:!0}),l.ReplaySubject=void 0;var kc,xc=F,S=(kc=P.Subject,G(Dc,kc),Dc.prototype.next=function(e){var t=this.isStopped,r=this._buffer,n=this._infiniteTimeWindow,o=this._timestampProvider,i=this._windowTime;t||(r.push(e),n)||r.push(o.now()+i),this._trimBuffer(),kc.prototype.next.call(this,e)},Dc.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},Dc.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,o=(n?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!n){for(var i=t.now(),u=0,a=1;a<r.length&&r[a]<=i;a+=2)u=a;u&&r.splice(0,u+1)}},Dc);function Dc(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=xc.dateTimestampProvider);var n=kc.call(this)||this;return n._bufferSize=e,n._windowTime=t,n._timestampProvider=r,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=t===1/0,n._bufferSize=Math.max(1,e),n._windowTime=Math.max(1,t),n}l.ReplaySubject=S;var Lc,uo={},T=r&&r.__extends||(Lc=function(e,t){return(Lc=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])}))(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}Lc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(uo,"__esModule",{value:!0}),uo.AsyncSubject=void 0;Uc=P.Subject,T(Fc,Uc),Fc.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this._hasValue,n=this._value,o=this.thrownError,i=this.isStopped,u=this._isComplete;t?e.error(o):(i||u)&&(r&&e.next(n),e.complete())},Fc.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},Fc.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&Uc.prototype.next.call(this,t),Uc.prototype.complete.call(this))};var Uc,y=Fc;function Fc(){var e=null!==Uc&&Uc.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}uo.AsyncSubject=y;var Bc,xo={},O={},pe={},t={},j=r&&r.__extends||(Bc=function(e,t){return(Bc=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])}))(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}Bc(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;Vc=o.Subscription,j(qc,Vc),qc.prototype.schedule=function(e,t){return this};var Vc,G=qc;function qc(e,t){return Vc.call(this)||this}t.Action=G;var Wc,zc,Hc,Gc,S={},T=(Wc=S,zc=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Hc=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.intervalProvider=void 0,Wc.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Wc.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,Hc([e,t],zc(r))):setInterval.apply(void 0,Hc([e,t],zc(r)))},clearInterval:function(e){var t=Wc.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(Gc=function(e,t){return(Gc=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])}))(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}Gc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(pe,"__esModule",{value:!0}),pe.AsyncAction=void 0;var Yc,Kc=S,Zc=E,y=(Yc=t.Action,T(Qc,Yc),Qc.prototype.schedule=function(e,t){var r;return void 0===t&&(t=0),this.closed||(this.state=e,e=this.id,r=this.scheduler,null!=e&&(this.id=this.recycleAsyncId(r,e,t)),this.pending=!0,this.delay=t,this.id=null!=(e=this.id)?e:this.requestAsyncId(r,this.id,t)),this},Qc.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Kc.intervalProvider.setInterval(e.flush.bind(e,this),r)},Qc.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&Kc.intervalProvider.clearInterval(t)},Qc.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;e=this._execute(e,t);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},Qc.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},Qc.prototype.unsubscribe=function(){var e,t,r;this.closed||(e=this.id,r=(t=this.scheduler).actions,this.work=this.state=this.scheduler=null,this.pending=!1,Zc.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,Yc.prototype.unsubscribe.call(this))},Qc);function Qc(e,t){var r=Yc.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}pe.AsyncAction=y;var Xc,Jc,$c,el,tl,rl,j={},G={},nl=(Object.defineProperty(G,"__esModule",{value:!0}),G.TestTools=G.Immediate=void 0,1),ol={};function il(e){return e in ol&&(delete ol[e],!0)}G.Immediate={setImmediate:function(e){var t=nl++;return ol[t]=!0,(Xc=Xc||Promise.resolve()).then(function(){return il(t)&&e()}),t},clearImmediate:function(e){il(e)}},G.TestTools={pending:function(){return Object.keys(ol).length}},Jc=j,$c=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},el=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.immediateProvider=void 0,tl=G.Immediate.setImmediate,rl=G.Immediate.clearImmediate,Jc.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Jc.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||tl).apply(void 0,el([],$c(e)))},clearImmediate:function(e){var t=Jc.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||rl)(e)},delegate:void 0};var ul,S=r&&r.__extends||(ul=function(e,t){return(ul=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])}))(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}ul(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(O,"__esModule",{value:!0}),O.AsapAction=void 0;var al,sl=j,t=(al=pe.AsyncAction,S(cl,al),cl.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?al.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=sl.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},cl.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return al.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(sl.immediateProvider.clearImmediate(t),e._scheduled===t)&&(e._scheduled=void 0)},cl);function cl(e,t){var r=al.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}O.AsapAction=t;T={},y={},G={},Object.defineProperty(G,"__esModule",{value:!0}),G.Scheduler=void 0,j=F;function ll(e,t){void 0===t&&(t=ll.now),this.schedulerActionCtor=e,this.now=t}ll.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},ll.now=j.dateTimestampProvider.now,G.Scheduler=ll;var fl,pl,S=r&&r.__extends||(fl=function(e,t){return(fl=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])}))(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}fl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),dl=(Object.defineProperty(y,"__esModule",{value:!0}),y.AsyncScheduler=void 0,G),t=(pl=dl.Scheduler,S(hl,pl),hl.prototype.flush=function(e){var t,r=this.actions;if(this._active)r.push(e);else{this._active=!0;do{if(t=e.execute(e.state,e.delay))break}while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}}},hl);function hl(e,t){void 0===t&&(t=dl.Scheduler.now);e=pl.call(this,e,t)||this;return e.actions=[],e._active=!1,e}y.AsyncScheduler=t;var bl,j=r&&r.__extends||(bl=function(e,t){return(bl=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])}))(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}bl(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;yl=y.AsyncScheduler,j(_l,yl),_l.prototype.flush=function(e){this._active=!0;var t,r=this._scheduled,n=(this._scheduled=void 0,this.actions);e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,t){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw t}};var yl,S=_l;function _l(){return null!==yl&&yl.apply(this,arguments)||this}T.AsapScheduler=S,t=xo,Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0,t.asapScheduler=new T.AsapScheduler(O.AsapAction),t.asap=t.asapScheduler;var vl,j={},T=(S=j,Object.defineProperty(S,"__esModule",{value:!0}),S.async=S.asyncScheduler=void 0,S.asyncScheduler=new y.AsyncScheduler(pe.AsyncAction),S.async=S.asyncScheduler,{}),O={},t=r&&r.__extends||(vl=function(e,t){return(vl=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])}))(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}vl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(O,"__esModule",{value:!0}),O.QueueAction=void 0;ml=pe.AsyncAction,t(gl,ml),gl.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?ml.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},gl.prototype.execute=function(e,t){return 0<t||this.closed?ml.prototype.execute.call(this,e,t):this._execute(e,t)},gl.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?ml.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var ml,S=gl;function gl(e,t){var r=ml.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}O.QueueAction=S;var Ol,t={},S=r&&r.__extends||(Ol=function(e,t){return(Ol=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])}))(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}Ol(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;wl=y.AsyncScheduler,S(El,wl);var wl,S=El;function El(){return null!==wl&&wl.apply(this,arguments)||this}t.QueueScheduler=S,S=T,Object.defineProperty(S,"__esModule",{value:!0}),S.queue=S.queueScheduler=void 0,S.queueScheduler=new t.QueueScheduler(O.QueueAction),S.queue=S.queueScheduler;var Pl,t={},O={},S=r&&r.__extends||(Pl=function(e,t){return(Pl=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])}))(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}Pl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(O,"__esModule",{value:!0}),O.AnimationFrameAction=void 0;var Tl,Sl=v,v=(Tl=pe.AsyncAction,S(jl,Tl),jl.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Tl.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Sl.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},jl.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Tl.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&t===e._scheduled&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Sl.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},jl);function jl(e,t){var r=Tl.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}O.AnimationFrameAction=v;var Cl,S={},v=r&&r.__extends||(Cl=function(e,t){return(Cl=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])}))(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}Cl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(S,"__esModule",{value:!0}),S.AnimationFrameScheduler=void 0;Il=y.AsyncScheduler,v(Rl,Il),Rl.prototype.flush=function(e){this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var t,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}};var Il,v=Rl;function Rl(){return null!==Il&&Il.apply(this,arguments)||this}S.AnimationFrameScheduler=v,v=t,Object.defineProperty(v,"__esModule",{value:!0}),v.animationFrame=v.animationFrameScheduler=void 0,v.animationFrameScheduler=new S.AnimationFrameScheduler(O.AnimationFrameAction),v.animationFrame=v.animationFrameScheduler;var Al,Ml,S={},O=r&&r.__extends||(Al=function(e,t){return(Al=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])}))(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}Al(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),v=(Object.defineProperty(S,"__esModule",{value:!0}),S.VirtualAction=S.VirtualTimeScheduler=void 0,pe),Nl=o,pe=(Ml=y.AsyncScheduler,O(kl,Ml),kl.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}},kl.frameTimeFactor=10,kl);function kl(e,t){void 0===t&&(t=1/0);var r=Ml.call(this,e=void 0===e?Dl:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}S.VirtualTimeScheduler=pe;xl=v.AsyncAction,O(Ll,xl),Ll.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return xl.prototype.schedule.call(this,e,t);this.active=!1;var r=new Ll(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return Nl.Subscription.EMPTY},Ll.prototype.requestAsyncId=function(e,t,r){this.delay=e.frame+(r=void 0===r?0:r);r=e.actions;return r.push(this),r.sort(Ll.sortActions),1},Ll.prototype.recycleAsyncId=function(e,t,r){},Ll.prototype._execute=function(e,t){if(!0===this.active)return xl.prototype._execute.call(this,e,t)},Ll.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};var xl,Dl=Ll;function Ll(e,t,r){void 0===r&&(r=e.index+=1);var n=xl.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}S.VirtualAction=Dl;var Ul,Fl,y={},pe={},v=(Ul=pe,Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.empty=Ul.EMPTY=void 0,Fl=w,Ul.EMPTY=new Fl.Observable(function(e){return e.complete()}),Ul.empty=function(e){return e?(t=e,new Fl.Observable(function(e){return t.schedule(function(){return e.complete()})})):Ul.EMPTY;var t},{}),O={},Bl={},Vl=(Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.isScheduler=void 0,_);Bl.isScheduler=function(e){return e&&Vl.isFunction(e.schedule)},Object.defineProperty(O,"__esModule",{value:!0}),O.popNumber=O.popScheduler=O.popResultSelector=void 0;var ql=_,Wl=Bl;function zl(e){return e[e.length-1]}O.popResultSelector=function(e){return ql.isFunction(zl(e))?e.pop():void 0},O.popScheduler=function(e){return Wl.isScheduler(zl(e))?e.pop():void 0},O.popNumber=function(e,t){return"number"==typeof zl(e)?e.pop():t};var Hl={},Gl={},Yl={},I={},Kl={},Zl=(Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.isArrayLike=void 0,Kl.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),Ql=(Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.isPromise=void 0,_);Zl.isPromise=function(e){return Ql.isFunction(null==e?void 0:e.then)};var Xl={},Jl=(Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.isInteropObservable=void 0,i),$l=_;Xl.isInteropObservable=function(e){return $l.isFunction(e[Jl.observable])};var ef={},tf=(Object.defineProperty(ef,"__esModule",{value:!0}),ef.isAsyncIterable=void 0,_);ef.isAsyncIterable=function(e){return Symbol.asyncIterator&&tf.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var rf={};Object.defineProperty(rf,"__esModule",{value:!0}),rf.createInvalidObservableTypeError=void 0,rf.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.")};var nf={},of={};function uf(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(of,"__esModule",{value:!0}),of.iterator=of.getSymbolIterator=void 0,of.getSymbolIterator=uf,of.iterator=uf(),Object.defineProperty(nf,"__esModule",{value:!0}),nf.isIterable=void 0;var af=of,sf=_;nf.isIterable=function(e){return sf.isFunction(null==e?void 0:e[af.iterator])};var cf={},lf=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ff=r&&r.__await||function(e){return this instanceof ff?(this.v=e,this):new ff(e)},pf=r&&r.__asyncGenerator||function(e,t,r){var o,i,u;if(Symbol.asyncIterator)return o=r.apply(e,t||[]),i=[],u={},n("next"),n("throw"),n("return"),u[Symbol.asyncIterator]=function(){return this},u;throw new TypeError("Symbol.asyncIterator is not defined.");function n(n){o[n]&&(u[n]=function(r){return new Promise(function(e,t){1<i.push([n,r,e,t])||a(n,r)})})}function a(e,t){try{(r=o[e](t)).value instanceof ff?Promise.resolve(r.value.v).then(s,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}},df=(Object.defineProperty(cf,"__esModule",{value:!0}),cf.isReadableStreamLike=cf.readableStreamLikeToAsyncGenerator=void 0,_);cf.readableStreamLikeToAsyncGenerator=function(o){return pf(this,arguments,function(){var t,r,n;return lf(this,function(e){switch(e.label){case 0:t=o.getReader(),e.label=1;case 1:e.trys.push([1,,9,10]),e.label=2;case 2:return[4,ff(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,ff(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,ff(n)];case 6:return[4,e.sent()];case 7:return e.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})},cf.isReadableStreamLike=function(e){return df.isFunction(null==e?void 0:e.getReader)};var hf=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},bf=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},yf=r&&r.__asyncValues||function(u){var e,t;if(Symbol.asyncIterator)return(e=u[Symbol.asyncIterator])?e.call(u):(u="function"==typeof _f?_f(u):u[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);throw new TypeError("Symbol.asyncIterator is not defined.");function r(i){t[i]=u[i]&&function(o){return new Promise(function(e,t){var r,n;o=u[i](o),r=e,e=t,n=o.done,t=o.value,Promise.resolve(t).then(function(e){r({value:e,done:n})},e)})}}},_f=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vf=(Object.defineProperty(I,"__esModule",{value:!0}),I.fromReadableStreamLike=I.fromAsyncIterable=I.fromIterable=I.fromPromise=I.fromArrayLike=I.fromInteropObservable=I.innerFrom=void 0,Kl),mf=Zl,gf=w,Of=Xl,wf=ef,Ef=rf,Pf=nf,Tf=cf,Sf=_,jf=a,Cf=i;function If(r){return new gf.Observable(function(e){var t=r[Cf.observable]();if(Sf.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Rf(r){return new gf.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function Af(e){return new gf.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,jf.reportUnhandledError)})}function Mf(u){return new gf.Observable(function(e){var t,r;try{for(var n=_f(u),o=n.next();!o.done;o=n.next()){var i=o.value;if(e.next(i),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}function Nf(e){return new gf.Observable(function(t){!function(r,n){var o,i,u,a;return hf(this,void 0,void 0,function(){var t;return bf(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=yf(r),e.label=1;case 1:return[4,o.next()];case 2:if((i=e.sent()).done)return[3,4];if(t=i.value,n.next(t),n.closed)return[2];e.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return t=e.sent(),u={error:t},[3,11];case 6:return(e.trys.push([6,,9,10]),i&&!i.done&&(a=o.return))?[4,a.call(o)]:[3,8];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}})})}(e,t).catch(function(e){return t.error(e)})})}function kf(e){return Nf(Tf.readableStreamLikeToAsyncGenerator(e))}I.innerFrom=function(e){if(e instanceof gf.Observable)return e;if(null!=e){if(Of.isInteropObservable(e))return If(e);if(vf.isArrayLike(e))return Rf(e);if(mf.isPromise(e))return Af(e);if(wf.isAsyncIterable(e))return Nf(e);if(Pf.isIterable(e))return Mf(e);if(Tf.isReadableStreamLike(e))return kf(e)}throw Ef.createInvalidObservableTypeError(e)},I.fromInteropObservable=If,I.fromArrayLike=Rf,I.fromPromise=Af,I.fromIterable=Mf,I.fromAsyncIterable=Nf,I.fromReadableStreamLike=kf;var a={},xf={};Object.defineProperty(xf,"__esModule",{value:!0}),xf.executeSchedule=void 0,xf.executeSchedule=function(e,t,r,n,o){if(void 0===n&&(n=0),void 0===o&&(o=!1),t=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n),e.add(t),!o)return t},Object.defineProperty(a,"__esModule",{value:!0}),a.observeOn=void 0;var Df=xf,Lf=b,Uf=p;a.observeOn=function(r,n){return void 0===n&&(n=0),Lf.operate(function(e,t){e.subscribe(Uf.createOperatorSubscriber(t,function(e){return Df.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return Df.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return Df.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var Ff={},Bf=(Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.subscribeOn=void 0,b);Ff.subscribeOn=function(r,n){return void 0===n&&(n=0),Bf.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.scheduleObservable=void 0;var Vf=I,qf=a,Wf=Ff;Yl.scheduleObservable=function(e,t){return Vf.innerFrom(e).pipe(Wf.subscribeOn(t),qf.observeOn(t))};var zf={},Hf=(Object.defineProperty(zf,"__esModule",{value:!0}),zf.schedulePromise=void 0,I),Gf=a,Yf=Ff;zf.schedulePromise=function(e,t){return Hf.innerFrom(e).pipe(Yf.subscribeOn(t),Gf.observeOn(t))};var Kf={},Zf=(Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.scheduleArray=void 0,w);Kf.scheduleArray=function(r,n){return new Zf.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var Qf={},Xf=(Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.scheduleIterable=void 0,w),Jf=of,$f=_,ep=xf;Qf.scheduleIterable=function(e,t){return new Xf.Observable(function(n){var o;return ep.executeSchedule(n,t,function(){o=e[Jf.iterator](),ep.executeSchedule(n,t,function(){var e,t,r;try{t=(e=o.next()).value,r=e.done}catch(e){return void n.error(e)}r?n.complete():n.next(t)},0,!0)}),function(){return $f.isFunction(null==o?void 0:o.return)&&o.return()}})};var of={},tp=(Object.defineProperty(of,"__esModule",{value:!0}),of.scheduleAsyncIterable=void 0,w),rp=xf;of.scheduleAsyncIterable=function(r,n){if(r)return new tp.Observable(function(t){rp.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();rp.executeSchedule(t,n,function(){e.next().then(function(e){e.done?t.complete():t.next(e.value)})},0,!0)})});throw new Error("Iterable cannot be null")};var np={},op=(Object.defineProperty(np,"__esModule",{value:!0}),np.scheduleReadableStreamLike=void 0,of),ip=cf;np.scheduleReadableStreamLike=function(e,t){return op.scheduleAsyncIterable(ip.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.scheduled=void 0;var up=Yl,ap=zf,sp=Kf,cp=Qf,lp=of,fp=Xl,pp=Zl,dp=Kl,hp=nf,bp=ef,yp=rf,_p=cf,vp=np;Gl.scheduled=function(e,t){if(null!=e){if(fp.isInteropObservable(e))return up.scheduleObservable(e,t);if(dp.isArrayLike(e))return sp.scheduleArray(e,t);if(pp.isPromise(e))return ap.schedulePromise(e,t);if(bp.isAsyncIterable(e))return lp.scheduleAsyncIterable(e,t);if(hp.isIterable(e))return cp.scheduleIterable(e,t);if(_p.isReadableStreamLike(e))return vp.scheduleReadableStreamLike(e,t)}throw yp.createInvalidObservableTypeError(e)},Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.from=void 0;var mp=Gl,gp=I;Hl.from=function(e,t){return t?mp.scheduled(e,t):gp.innerFrom(e)},Object.defineProperty(v,"__esModule",{value:!0}),v.of=void 0;var Op=O,wp=Hl;v.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Op.popScheduler(e);return wp.from(e,r)};var Ep,Pp,Tp,Sp,Yl={},jp=(Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.throwError=void 0,w),Cp=_;function Ip(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function Rp(e,t){var r,n=e.kind,o=e.value,e=e.error;if("string"!=typeof n)throw new TypeError('Invalid notification, missing "kind"');"N"===n?null!=(r=t.next)&&r.call(t,o):"E"===n?null!=(r=t.error)&&r.call(t,e):null!=(o=t.complete)&&o.call(t)}Yl.throwError=function(e,t){function r(e){return e.error(n())}var n=Cp.isFunction(e)?e:function(){return e};return new jp.Observable(t?function(e){return t.schedule(r,0,e)}:r)},zf=y,Object.defineProperty(zf,"__esModule",{value:!0}),zf.observeNotification=zf.Notification=zf.NotificationKind=void 0,Ep=pe,Pp=v,Tp=Yl,Sp=_,(Kf=zf.NotificationKind||(zf.NotificationKind={})).NEXT="N",Kf.ERROR="E",Kf.COMPLETE="C",Ip.prototype.observe=function(e){return Rp(this,e)},Ip.prototype.do=function(e,t,r){var n=this.kind,o=this.value,i=this.error;return"N"===n?null==e?void 0:e(o):"E"===n?null==t?void 0:t(i):null==r?void 0:r()},Ip.prototype.accept=function(e,t,r){var n;return Sp.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},Ip.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?Pp.of(t):"E"===e?Tp.throwError(function(){return r}):"C"===e?Ep.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},Ip.createNext=function(e){return new Ip("N",e)},Ip.createError=function(e){return new Ip("E",void 0,e)},Ip.createComplete=function(){return Ip.completeNotification},Ip.completeNotification=new Ip("C"),Kf=Ip,zf.Notification=Kf,zf.observeNotification=Rp;var of={},Ap=(Object.defineProperty(of,"__esModule",{value:!0}),of.isObservable=void 0,w),Mp=_;of.isObservable=function(e){return!!e&&(e instanceof Ap.Observable||Mp.isFunction(e.lift)&&Mp.isFunction(e.subscribe))};var Xl={},Zl={},nf=(Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.EmptyError=void 0,n),Np=(Zl.EmptyError=nf.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.lastValueFrom=void 0,Zl);Xl.lastValueFrom=function(o,i){var u="object"==typeof i;return new Promise(function(e,t){var r,n=!1;o.subscribe({next:function(e){r=e,n=!0},error:t,complete:function(){n?e(r):u?e(i.defaultValue):t(new Np.EmptyError)}})})};var ef={},kp=(Object.defineProperty(ef,"__esModule",{value:!0}),ef.firstValueFrom=void 0,Zl),xp=Zn;ef.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new xp.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new kp.EmptyError)}});n.subscribe(r)})};var Dp,Lp,Up,Fp,Bp,Vp,qp,rf={},cf=(Object.defineProperty(rf,"__esModule",{value:!0}),rf.ArgumentOutOfRangeError=void 0,n),np=(rf.ArgumentOutOfRangeError=cf.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),Kf=(Object.defineProperty(np,"__esModule",{value:!0}),np.NotFoundError=void 0,n),zf=(np.NotFoundError=Kf.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),nf=(Object.defineProperty(zf,"__esModule",{value:!0}),zf.SequenceError=void 0,n),cf=(zf.SequenceError=nf.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),Kf={};function Wp(e){throw new Dp.TimeoutError(e)}Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.isValidDate=void 0,Kf.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},Dp=cf,Object.defineProperty(Dp,"__esModule",{value:!0}),Dp.timeout=Dp.TimeoutError=void 0,Lp=j,Up=Kf,Fp=b,Bp=I,Vp=p,qp=xf,Dp.TimeoutError=n.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),Dp.timeout=function(e,t){var a=(e=Up.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?Wp:r,l=void 0===(r=e.scheduler)?null!=t?t:Lp.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return Fp.operate(function(e,t){function r(e){n=qp.executeSchedule(t,l,function(){try{u.unsubscribe(),Bp.innerFrom(c({meta:f,lastValue:o,seen:i})).subscribe(t)}catch(e){t.error(e)}},e)}var n,o=null,i=0,u=e.subscribe(Vp.createOperatorSubscriber(t,function(e){null!=n&&n.unsubscribe(),i++,t.next(o=e),0<s&&r(s)},void 0,void 0,function(){null!=n&&n.closed||null!=n&&n.unsubscribe(),o=null}));i||r(null!=a?"number"==typeof a?a:+a-l.now():s)})};var nf={},n={},zp={},Hp={},Gp=(Object.defineProperty(Hp,"__esModule",{value:!0}),Hp.map=void 0,b),Yp=p;Hp.map=function(n,o){return Gp.operate(function(e,t){var r=0;e.subscribe(Yp.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var Kp=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Zp=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Qp=(Object.defineProperty(zp,"__esModule",{value:!0}),zp.mapOneOrManyArgs=void 0,Hp),Xp=Array.isArray;zp.mapOneOrManyArgs=function(r){return Qp.map(function(e){return t=r,Xp(e=e)?t.apply(void 0,Zp([],Kp(e))):t(e);var t})};var Jp=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},$p=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},ed=(Object.defineProperty(n,"__esModule",{value:!0}),n.bindCallbackInternals=void 0,Bl),td=w,rd=Ff,nd=zp,od=a,id=uo;n.bindCallbackInternals=function r(a,s,n,o){if(n){if(!ed.isScheduler(n))return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s,o).apply(this,e).pipe(nd.mapOneOrManyArgs(n))};o=n}return o?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s).apply(this,e).pipe(rd.subscribeOn(o),od.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new id.AsyncSubject,u=!0;return new td.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,$p($p([],Jp(r)),[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(a){var r=e.shift();if(null!=r)return void i.error(r)}i.next(1<e.length?e:e[0]),o=!0,n&&i.complete()}])),o&&i.complete(),n=!0),e})}},Object.defineProperty(nf,"__esModule",{value:!0}),nf.bindCallback=void 0;var ud=n;nf.bindCallback=function(e,t,r){return ud.bindCallbackInternals(!1,e,t,r)};var ad={},sd=(Object.defineProperty(ad,"__esModule",{value:!0}),ad.bindNodeCallback=void 0,n);ad.bindNodeCallback=function(e,t,r){return sd.bindCallbackInternals(!0,e,t,r)};var n={},cd={},ld=(Object.defineProperty(cd,"__esModule",{value:!0}),cd.argsArgArrayOrObject=void 0,Array.isArray),fd=Object.getPrototypeOf,pd=Object.prototype,dd=Object.keys;cd.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(ld(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&fd(r)===pd)return{args:(r=dd(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var hd={};Object.defineProperty(hd,"__esModule",{value:!0}),hd.createObject=void 0,hd.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(n,"__esModule",{value:!0}),n.combineLatestInit=n.combineLatest=void 0;var bd=w,yd=cd,_d=Hl,vd=Rt,md=zp,gd=O,Od=hd,wd=p,Ed=xf;function Pd(a,s,c){return void 0===c&&(c=vd.identity),function(u){Td(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)(r=>{Td(s,function(){var e=_d.from(a[r],s),t=!1;e.subscribe(wd.createOperatorSubscriber(u,function(e){n[r]=e,t||(t=!0,i--),i||u.next(c(n.slice()))},function(){--o||u.complete()}))},u)})(t)},u)}}function Td(e,t,r){e?Ed.executeSchedule(r,e,t):t()}n.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=gd.popScheduler(e),n=gd.popResultSelector(e),o=yd.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?_d.from([],r):(o=new bd.Observable(Pd(i,r,u?function(e){return Od.createObject(u,e)}:vd.identity)),n?o.pipe(md.mapOneOrManyArgs(n)):o)},n.combineLatestInit=Pd;var Sd={},jd={},Cd={},Id={},Rd={},Ad=(Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.mergeInternals=void 0,I),Md=xf,Nd=p;Rd.mergeInternals=function(e,r,n,o,i,u,a,t){var s=[],c=0,l=0,f=!1,p=function(){!f||s.length||c||r.complete()},d=function(e){return c<o?h(e):s.push(e)},h=function(e){u&&r.next(e),c++;var t=!1;Ad.innerFrom(n(e,l++)).subscribe(Nd.createOperatorSubscriber(r,function(e){null!=i&&i(e),u?d(e):r.next(e)},function(){t=!0},void 0,function(){if(t)try{c--;for(;s.length&&c<o;)(()=>{var e=s.shift();a?Md.executeSchedule(r,a,function(){return h(e)}):h(e)})();p()}catch(e){r.error(e)}}))};return e.subscribe(Nd.createOperatorSubscriber(r,d,function(){f=!0,p()})),function(){null!=t&&t()}},Object.defineProperty(Id,"__esModule",{value:!0}),Id.mergeMap=void 0;var kd=Hp,xd=I,Dd=b,Ld=Rd,Ud=_;Id.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),Ud.isFunction(i)?e(function(r,n){return kd.map(function(e,t){return i(r,e,n,t)})(xd.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),Dd.operate(function(e,t){return Ld.mergeInternals(e,t,o,r)}))},Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.mergeAll=void 0;var Fd=Id,Bd=Rt;Cd.mergeAll=function(e){return Fd.mergeMap(Bd.identity,e=void 0===e?1/0:e)},Object.defineProperty(jd,"__esModule",{value:!0}),jd.concatAll=void 0;var Vd=Cd;jd.concatAll=function(){return Vd.mergeAll(1)},Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.concat=void 0;var qd=jd,Wd=O,zd=Hl;Sd.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return qd.concatAll()(zd.from(e,Wd.popScheduler(e)))};var Hd={},Gd={},Yd=(Object.defineProperty(Gd,"__esModule",{value:!0}),Gd.defer=void 0,w),Kd=I;Gd.defer=function(t){return new Yd.Observable(function(e){Kd.innerFrom(t()).subscribe(e)})},Object.defineProperty(Hd,"__esModule",{value:!0}),Hd.connectable=void 0;var Zd=P,Qd=w,Xd=Gd,Jd={connector:function(){return new Zd.Subject},resetOnDisconnect:!0};Hd.connectable=function(e,t){var r=null,n=(t=void 0===t?Jd:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new Qd.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=Xd.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var $d={},eh=(Object.defineProperty($d,"__esModule",{value:!0}),$d.forkJoin=void 0,w),th=cd,rh=I,nh=O,oh=p,ih=zp,uh=hd;$d.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=nh.popResultSelector(e),u=(n=th.argsArgArrayOrObject(e)).args,a=n.keys,n=new eh.Observable(function(e){var t=u.length;if(t)for(var n=new Array(t),o=t,i=t,r=0;r<t;r++)(t=>{var r=!1;rh.innerFrom(u[t]).subscribe(oh.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?uh.createObject(a,n):n),e.complete())}))})(r);else e.complete()});return r?n.pipe(ih.mapOneOrManyArgs(r)):n};var cd={},ah=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},sh=(Object.defineProperty(cd,"__esModule",{value:!0}),cd.fromEvent=void 0,I),ch=w,lh=Id,fh=Kl,ph=_,dh=zp,hh=["addListener","removeListener"],bh=["addEventListener","removeEventListener"],yh=["on","off"];function _h(r,n){return function(t){return function(e){return r[t](n,e)}}}cd.fromEvent=function t(r,n,o,e){if(ph.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(dh.mapOneOrManyArgs(e));var e=ah((e=r,ph.isFunction(e.addEventListener)&&ph.isFunction(e.removeEventListener)?bh.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,ph.isFunction(e.addListener)&&ph.isFunction(e.removeListener)?hh.map(_h(r,n)):(e=r,ph.isFunction(e.on)&&ph.isFunction(e.off)?yh.map(_h(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&fh.isArrayLike(r))return lh.mergeMap(function(e){return t(e,n,o)})(sh.innerFrom(r));if(i)return new ch.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1<e.length?e:e[0])}return i(e),function(){return u(e)}});throw new TypeError("Invalid event target")};var hd={},vh=(Object.defineProperty(hd,"__esModule",{value:!0}),hd.fromEventPattern=void 0,w),mh=_,gh=zp;hd.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(gh.mapOneOrManyArgs(t)):new vh.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1===e.length?e[0]:e)}var t=n(e);return mh.isFunction(o)?function(){return o(e,t)}:void 0})};var Kl={},Oh=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},wh=(Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.generate=void 0,Rt),Eh=Bl,Ph=Gd,Th=Qf;Kl.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return Oh(this,function(e){switch(e.label){case 0:t=a,e.label=1;case 1:return r&&!r(t)?[3,4]:[4,u(t)];case 2:e.sent(),e.label=3;case 3:return t=n(t),[3,1];case 4:return[2]}})}return 1===arguments.length?(a=e.initialState,r=e.condition,n=e.iterate,u=void 0===(i=e.resultSelector)?wh.identity:i,o=e.scheduler):(a=e,!t||Eh.isScheduler(t)?(u=wh.identity,o=t):u=t),Ph.defer(o?function(){return Th.scheduleIterable(s(),o)}:s)};var Qf={},Sh=(Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.iif=void 0,Gd);Qf.iif=function(e,t,r){return Sh.defer(function(){return e()?t:r})};var jh={},Ch={},Ih=(Object.defineProperty(Ch,"__esModule",{value:!0}),Ch.timer=void 0,w),Rh=j,Ah=Bl,Mh=Kf;Ch.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=Rh.async);var i=-1;return null!=e&&(Ah.isScheduler(e)?o=e:i=e),new Ih.Observable(function(e){var t=Mh.isValidDate(n)?+n-o.now():n,r=0;return o.schedule(function(){e.closed||(e.next(r++),0<=i?this.schedule(void 0,i):e.complete())},t=t<0?0:t)})},Object.defineProperty(jh,"__esModule",{value:!0}),jh.interval=void 0;var Nh=j,kh=Ch;jh.interval=function(e,t){return kh.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?Nh.asyncScheduler:t)};var Bl={},xh=(Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.merge=void 0,Cd),Dh=I,Lh=pe,Uh=O,Fh=Hl;Bl.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Uh.popScheduler(e),n=Uh.popNumber(e,1/0),o=e;return o.length?1===o.length?Dh.innerFrom(o[0]):xh.mergeAll(n)(Fh.from(o,r)):Lh.EMPTY};var Bh,Vh={},qh=(Bh=Vh,Object.defineProperty(Bh,"__esModule",{value:!0}),Bh.never=Bh.NEVER=void 0,Bh.NEVER=new w.Observable(fe.noop),Bh.never=function(){return Bh.NEVER},{}),Wh={},zh=(Object.defineProperty(Wh,"__esModule",{value:!0}),Wh.argsOrArgArray=void 0,Array.isArray);Wh.argsOrArgArray=function(e){return 1===e.length&&zh(e[0])?e[0]:e},Object.defineProperty(qh,"__esModule",{value:!0}),qh.onErrorResumeNext=void 0;var Hh=w,Gh=Wh,Yh=p,Kh=fe,Zh=I;qh.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Gh.argsOrArgArray(e);return new Hh.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=Zh.innerFrom(i[n++])}catch(e){return void o()}var t=new Yh.OperatorSubscriber(r,void 0,Kh.noop,Kh.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var Qh={},Xh=(Object.defineProperty(Qh,"__esModule",{value:!0}),Qh.pairs=void 0,Hl);Qh.pairs=function(e,t){return Xh.from(Object.entries(e),t)};var Jh={},$h={};Object.defineProperty($h,"__esModule",{value:!0}),$h.not=void 0,$h.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var eb={},tb=(Object.defineProperty(eb,"__esModule",{value:!0}),eb.filter=void 0,b),rb=p;eb.filter=function(n,o){return tb.operate(function(e,t){var r=0;e.subscribe(rb.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(Jh,"__esModule",{value:!0}),Jh.partition=void 0;var nb=$h,ob=eb,ib=I;Jh.partition=function(e,t,r){return[ob.filter(t,r)(ib.innerFrom(e)),ob.filter(nb.not(t,r))(ib.innerFrom(e))]};var ub={},ab=(Object.defineProperty(ub,"__esModule",{value:!0}),ub.raceInit=ub.race=void 0,w),sb=I,cb=Wh,lb=p;function fb(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)(r=>{o.push(sb.innerFrom(t[r]).subscribe(lb.createOperatorSubscriber(n,function(e){if(o){for(var t=0;t<o.length;t++)t!==r&&o[t].unsubscribe();o=null}n.next(e)})))})(e)}}ub.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=cb.argsOrArgArray(e)).length?sb.innerFrom(e[0]):new ab.Observable(fb(e))},ub.raceInit=fb;var pb={},db=(Object.defineProperty(pb,"__esModule",{value:!0}),pb.range=void 0,w),hb=pe;pb.range=function(r,e,n){var o;return null==e&&(e=r,r=0),e<=0?hb.EMPTY:(o=e+r,new db.Observable(n?function(e){var t=r;return n.schedule(function(){t<o?(e.next(t++),this.schedule()):e.complete()})}:function(e){for(var t=r;t<o&&!e.closed;)e.next(t++);e.complete()}))};var bb={},yb=(Object.defineProperty(bb,"__esModule",{value:!0}),bb.using=void 0,w),_b=I,vb=pe;bb.using=function(n,o){return new yb.Observable(function(e){var t=n(),r=o(t);return(r?_b.innerFrom(r):vb.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var mb={},gb=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ob=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},wb=(Object.defineProperty(mb,"__esModule",{value:!0}),mb.zip=void 0,w),Eb=I,Pb=Wh,Tb=pe,Sb=p,jb=O;mb.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=jb.popResultSelector(e),u=Pb.argsOrArgArray(e);return u.length?new wb.Observable(function(r){for(var n=u.map(function(){return[]}),o=u.map(function(){return!1}),e=(r.add(function(){n=o=null}),0);!r.closed&&e<u.length;e++)(t=>{Eb.innerFrom(u[t]).subscribe(Sb.createOperatorSubscriber(r,function(e){n[t].push(e),n.every(function(e){return e.length})&&(e=n.map(function(e){return e.shift()}),r.next(i?i.apply(void 0,Ob([],gb(e))):e),n.some(function(e,t){return!e.length&&o[t]}))&&r.complete()},function(){o[t]=!0,n[t].length||r.complete()}))})(e);return function(){n=o=null}}):Tb.EMPTY};var Cb={},Ib=(Object.defineProperty(Cb,"__esModule",{value:!0}),{}),Rb=(Object.defineProperty(Ib,"__esModule",{value:!0}),Ib.audit=void 0,b),Ab=I,Mb=p;Ib.audit=function(s){return Rb.operate(function(e,t){function r(){var e;null!=u&&u.unsubscribe(),u=null,o&&(o=!1,e=i,i=null,t.next(e)),a&&t.complete()}function n(){u=null,a&&t.complete()}var o=!1,i=null,u=null,a=!1;e.subscribe(Mb.createOperatorSubscriber(t,function(e){o=!0,i=e,u||Ab.innerFrom(s(e)).subscribe(u=Mb.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var Nb={},kb=(Object.defineProperty(Nb,"__esModule",{value:!0}),Nb.auditTime=void 0,j),xb=Ib,Db=Ch;Nb.auditTime=function(e,t){return void 0===t&&(t=kb.asyncScheduler),xb.audit(function(){return Db.timer(e,t)})};var Lb={},Ub=(Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.buffer=void 0,b),Fb=fe,Bb=p,Vb=I;Lb.buffer=function(n){return Ub.operate(function(e,t){var r=[];return e.subscribe(Bb.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),Vb.innerFrom(n).subscribe(Bb.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},Fb.noop)),function(){r=null}})};var qb={},Wb=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},zb=(Object.defineProperty(qb,"__esModule",{value:!0}),qb.bufferCount=void 0,b),Hb=p,Gb=E;qb.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,zb.operate(function(e,f){var p=[],d=0;e.subscribe(Hb.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=Wb(p),a=u.next();!a.done;a=u.next())(l=a.value).push(e),h<=l.length&&(i=null!=i?i:[]).push(l)}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}if(i)try{for(var s=Wb(i),c=s.next();!c.done;c=s.next()){var l=c.value;Gb.arrRemove(p,l),f.next(l)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},function(){var t,e;try{for(var r=Wb(p),n=r.next();!n.done;n=r.next()){var o=n.value;f.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}f.complete()},void 0,function(){p=null}))})};var Yb={},Kb=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Zb=(Object.defineProperty(Yb,"__esModule",{value:!0}),Yb.bufferTime=void 0,o),Qb=b,Xb=p,Jb=E,$b=j,ey=O,ty=xf;Yb.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=ey.popScheduler(t))?e:$b.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return Qb.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),Jb.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new Zb.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),ty.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?ty.executeSchedule(r,u,o,a,!0):n=!0,o(),Xb.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=Kb(n),i=o.next();!i.done;i=o.next()){var u=i.value,a=u.buffer;a.push(e),l<=a.length&&c(u)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;null!=s&&s.length;)r.next(s.shift().buffer);null!=t&&t.unsubscribe(),r.complete(),r.unsubscribe()},void 0,function(){return s=null}));e.subscribe(t)})};var ry={},ny=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},oy=(Object.defineProperty(ry,"__esModule",{value:!0}),ry.bufferToggle=void 0,o),iy=b,uy=I,ay=p,sy=fe,cy=E;ry.bufferToggle=function(t,o){return iy.operate(function(e,n){var i=[];uy.innerFrom(t).subscribe(ay.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new oy.Subscription);r.add(uy.innerFrom(o(e)).subscribe(ay.createOperatorSubscriber(n,function(){cy.arrRemove(i,t),n.next(t),r.unsubscribe()},sy.noop)))},sy.noop)),e.subscribe(ay.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=ny(i),o=n.next();!o.done;o=n.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},function(){for(;0<i.length;)n.next(i.shift());n.complete()}))})};var ly={},fy=(Object.defineProperty(ly,"__esModule",{value:!0}),ly.bufferWhen=void 0,b),py=fe,dy=p,hy=I;ly.bufferWhen=function(i){return fy.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),hy.innerFrom(i()).subscribe(n=dy.createOperatorSubscriber(t,o,py.noop))};o(),e.subscribe(dy.createOperatorSubscriber(t,function(e){return null==r?void 0:r.push(e)},function(){r&&t.next(r),t.complete()},void 0,function(){return r=n=null}))})};var by={},yy=(Object.defineProperty(by,"__esModule",{value:!0}),by.catchError=void 0,I),_y=p,vy=b;by.catchError=function u(a){return vy.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(_y.createOperatorSubscriber(r,void 0,void 0,function(e){n=yy.innerFrom(a(e,u(a)(t))),o?(o.unsubscribe(),o=null,n.subscribe(r)):i=!0}));i&&(o.unsubscribe(),o=null,n.subscribe(r))})};var my={},gy={},R={},Oy={},wy={},Ey={},Py=(Object.defineProperty(Ey,"__esModule",{value:!0}),Ey.scanInternals=void 0,p);Ey.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(Py.createOperatorSubscriber(r,function(e){var t=i++;o=n?u(o,e,t):(n=!0,e),s&&r.next(o)},c&&function(){n&&r.next(o),r.complete()}))}},Object.defineProperty(wy,"__esModule",{value:!0}),wy.reduce=void 0;var Ty=Ey,Sy=b;wy.reduce=function(e,t){return Sy.operate(Ty.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(Oy,"__esModule",{value:!0}),Oy.toArray=void 0;function jy(e,t){return e.push(t),e}var Cy=wy,Iy=b;Oy.toArray=function(){return Iy.operate(function(e,t){Cy.reduce(jy,[])(e).subscribe(t)})},Object.defineProperty(R,"__esModule",{value:!0}),R.joinAllInternals=void 0;var Ry=Rt,Ay=zp,My=u,Ny=Id,ky=Oy;R.joinAllInternals=function(t,e){return My.pipe(ky.toArray(),Ny.mergeMap(function(e){return t(e)}),e?Ay.mapOneOrManyArgs(e):Ry.identity)},Object.defineProperty(gy,"__esModule",{value:!0}),gy.combineLatestAll=void 0;var xy=n,Dy=R;gy.combineLatestAll=function(e){return Dy.joinAllInternals(xy.combineLatest,e)},Object.defineProperty(my,"__esModule",{value:!0}),my.combineAll=void 0;my.combineAll=gy.combineLatestAll;var Ly={},Uy={},Fy=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},By=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Vy=(Object.defineProperty(Uy,"__esModule",{value:!0}),Uy.combineLatest=void 0,n),qy=b,Wy=Wh,zy=zp,Hy=u,Gy=O;function Yy(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Gy.popResultSelector(r);return t?Hy.pipe(Yy.apply(void 0,By([],Fy(r))),zy.mapOneOrManyArgs(t)):qy.operate(function(e,t){Vy.combineLatestInit(By([e],Fy(Wy.argsOrArgArray(r))))(t)})}Uy.combineLatest=Yy;var Ky=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Zy=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Qy=(Object.defineProperty(Ly,"__esModule",{value:!0}),Ly.combineLatestWith=void 0,Uy);Ly.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Qy.combineLatest.apply(void 0,Zy([],Ky(e)))};var zp={},Xy=(Object.defineProperty(zp,"__esModule",{value:!0}),zp.concatMap=void 0,Id),Jy=_;zp.concatMap=function(e,t){return Jy.isFunction(t)?Xy.mergeMap(e,t,1):Xy.mergeMap(e,1)};var $y={},e_=(Object.defineProperty($y,"__esModule",{value:!0}),$y.concatMapTo=void 0,zp),t_=_;$y.concatMapTo=function(e,t){return t_.isFunction(t)?e_.concatMap(function(){return e},t):e_.concatMap(function(){return e})};var r_={},n_={},o_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},i_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},u_=(Object.defineProperty(n_,"__esModule",{value:!0}),n_.concat=void 0,b),a_=jd,s_=O,c_=Hl;n_.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=s_.popScheduler(r);return u_.operate(function(e,t){a_.concatAll()(c_.from(i_([e],o_(r)),n)).subscribe(t)})};var l_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},f_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},p_=(Object.defineProperty(r_,"__esModule",{value:!0}),r_.concatWith=void 0,n_);r_.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return p_.concat.apply(void 0,f_([],l_(e)))};var d_={},h_={},b_=(Object.defineProperty(h_,"__esModule",{value:!0}),h_.fromSubscribable=void 0,w);h_.fromSubscribable=function(t){return new b_.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(d_,"__esModule",{value:!0}),d_.connect=void 0;var y_=P,__=I,v_=b,m_=h_,g_={connector:function(){return new y_.Subject}};d_.connect=function(n,e){var o=(e=void 0===e?g_:e).connector;return v_.operate(function(e,t){var r=o();__.innerFrom(n(m_.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var h_={},O_=(Object.defineProperty(h_,"__esModule",{value:!0}),h_.count=void 0,wy);h_.count=function(n){return O_.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var w_={},E_=(Object.defineProperty(w_,"__esModule",{value:!0}),w_.debounce=void 0,b),P_=fe,T_=p,S_=I;w_.debounce=function(u){return E_.operate(function(e,t){function r(){var e;null!=i&&i.unsubscribe(),i=null,n&&(n=!1,e=o,o=null,t.next(e))}var n=!1,o=null,i=null;e.subscribe(T_.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=T_.createOperatorSubscriber(t,r,P_.noop),S_.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var j_={},C_=(Object.defineProperty(j_,"__esModule",{value:!0}),j_.debounceTime=void 0,j),I_=b,R_=p;j_.debounceTime=function(a,s){return void 0===s&&(s=C_.asyncScheduler),I_.operate(function(e,r){var n=null,t=null,o=null,i=function(){var e;n&&(n.unsubscribe(),e=t,t=n=null,r.next(e))};function u(){var e=o+a,t=s.now();t<e?(n=this.schedule(void 0,e-t),r.add(n)):i()}e.subscribe(R_.createOperatorSubscriber(r,function(e){t=e,o=s.now(),n||(n=s.schedule(u,a),r.add(n))},function(){i(),r.complete()},void 0,function(){t=n=null}))})};var A={},A_=(Object.defineProperty(A,"__esModule",{value:!0}),A.defaultIfEmpty=void 0,b),M_=p;A.defaultIfEmpty=function(n){return A_.operate(function(e,t){var r=!1;e.subscribe(M_.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var N_={},k_={},x_={},D_=(Object.defineProperty(x_,"__esModule",{value:!0}),x_.take=void 0,pe),L_=b,U_=p;x_.take=function(n){return n<=0?function(){return D_.EMPTY}:L_.operate(function(e,t){var r=0;e.subscribe(U_.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r)&&t.complete()}))})};var F_={},B_=(Object.defineProperty(F_,"__esModule",{value:!0}),F_.ignoreElements=void 0,b),V_=p,q_=fe;F_.ignoreElements=function(){return B_.operate(function(e,t){e.subscribe(V_.createOperatorSubscriber(t,q_.noop))})};var W_={},z_=(Object.defineProperty(W_,"__esModule",{value:!0}),W_.mapTo=void 0,Hp);W_.mapTo=function(e){return z_.map(function(){return e})},Object.defineProperty(k_,"__esModule",{value:!0}),k_.delayWhen=void 0;var H_=Sd,G_=x_,Y_=F_,K_=W_,Z_=Id,Q_=I;k_.delayWhen=function t(r,n){return n?function(e){return H_.concat(n.pipe(G_.take(1),Y_.ignoreElements()),e.pipe(t(r)))}:Z_.mergeMap(function(e,t){return Q_.innerFrom(r(e,t)).pipe(G_.take(1),K_.mapTo(e))})},Object.defineProperty(N_,"__esModule",{value:!0}),N_.delay=void 0;var X_=j,J_=k_,$_=Ch;N_.delay=function(e,t){var r=$_.timer(e,t=void 0===t?X_.asyncScheduler:t);return J_.delayWhen(function(){return r})};var ev={},tv=(Object.defineProperty(ev,"__esModule",{value:!0}),ev.dematerialize=void 0,y),rv=b,nv=p;ev.dematerialize=function(){return rv.operate(function(e,t){e.subscribe(nv.createOperatorSubscriber(t,function(e){return tv.observeNotification(e,t)}))})};var ov={},iv=(Object.defineProperty(ov,"__esModule",{value:!0}),ov.distinct=void 0,b),uv=p,av=fe,sv=I;ov.distinct=function(o,t){return iv.operate(function(e,r){var n=new Set;e.subscribe(uv.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&sv.innerFrom(t).subscribe(uv.createOperatorSubscriber(r,function(){return n.clear()},av.noop))})};var cv={},lv=(Object.defineProperty(cv,"__esModule",{value:!0}),cv.distinctUntilChanged=void 0,Rt),fv=b,pv=p;function dv(e,t){return e===t}cv.distinctUntilChanged=function(i,u){return void 0===u&&(u=lv.identity),i=null!=i?i:dv,fv.operate(function(e,r){var n,o=!0;e.subscribe(pv.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var hv={},bv=(Object.defineProperty(hv,"__esModule",{value:!0}),hv.distinctUntilKeyChanged=void 0,cv);hv.distinctUntilKeyChanged=function(r,n){return bv.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var yv={},_v={},vv=(Object.defineProperty(_v,"__esModule",{value:!0}),_v.throwIfEmpty=void 0,Zl),mv=b,gv=p;function Ov(){return new vv.EmptyError}_v.throwIfEmpty=function(n){return void 0===n&&(n=Ov),mv.operate(function(e,t){var r=!1;e.subscribe(gv.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(yv,"__esModule",{value:!0}),yv.elementAt=void 0;var wv=rf,Ev=eb,Pv=_v,Tv=A,Sv=x_;yv.elementAt=function(r,t){if(r<0)throw new wv.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(Ev.filter(function(e,t){return t===r}),Sv.take(1),n?Tv.defaultIfEmpty(t):Pv.throwIfEmpty(function(){return new wv.ArgumentOutOfRangeError}))}};var jv={},Cv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Iv=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Rv=(Object.defineProperty(jv,"__esModule",{value:!0}),jv.endWith=void 0,Sd),Av=v;jv.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Rv.concat(e,Av.of.apply(void 0,Iv([],Cv(t))))}};var Mv={},Nv=(Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.every=void 0,b),kv=p;Mv.every=function(o,i){return Nv.operate(function(t,r){var n=0;t.subscribe(kv.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var xv={},Dv={},Lv={},Uv=(Object.defineProperty(Lv,"__esModule",{value:!0}),Lv.exhaustMap=void 0,Hp),Fv=I,Bv=b,Vv=p;Lv.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return Fv.innerFrom(i(r,n)).pipe(Uv.map(function(e,t){return o(r,e,n,t)}))}))}:Bv.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(Vv.createOperatorSubscriber(t,function(e){n||(n=Vv.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),Fv.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.exhaustAll=void 0;var qv=Lv,Wv=Rt;Dv.exhaustAll=function(){return qv.exhaustMap(Wv.identity)},Object.defineProperty(xv,"__esModule",{value:!0}),xv.exhaust=void 0;xv.exhaust=Dv.exhaustAll;var zv={},Hv=(Object.defineProperty(zv,"__esModule",{value:!0}),zv.expand=void 0,b),Gv=Rd;zv.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,Hv.operate(function(e,t){return Gv.mergeInternals(e,t,r,n,void 0,!0,o)})};var Yv={},Kv=(Object.defineProperty(Yv,"__esModule",{value:!0}),Yv.finalize=void 0,b);Yv.finalize=function(r){return Kv.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var Zv={},Qv=(Object.defineProperty(Zv,"__esModule",{value:!0}),Zv.createFind=Zv.find=void 0,b),Xv=p;function Jv(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(Xv.createOperatorSubscriber(n,function(e){var t=o++;i.call(u,e,t,r)&&(n.next(a?t:e),n.complete())},function(){n.next(a?-1:void 0),n.complete()}))}}Zv.find=function(e,t){return Qv.operate(Jv(e,t,"value"))},Zv.createFind=Jv;var $v={},em=(Object.defineProperty($v,"__esModule",{value:!0}),$v.findIndex=void 0,b),tm=Zv;$v.findIndex=function(e,t){return em.operate(tm.createFind(e,t,"index"))};var rm={},nm=(Object.defineProperty(rm,"__esModule",{value:!0}),rm.first=void 0,Zl),om=eb,im=x_,um=A,am=_v,sm=Rt;rm.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?om.filter(function(e,t){return n(e,t,r)}):sm.identity,im.take(1),t?um.defaultIfEmpty(e):am.throwIfEmpty(function(){return new nm.EmptyError}))}};var cm={},lm=(Object.defineProperty(cm,"__esModule",{value:!0}),cm.groupBy=void 0,w),fm=I,pm=P,dm=b,hm=p;cm.groupBy=function(b,t,y,_){return dm.operate(function(e,s){function c(t){return r(function(e){return e.error(t)})}t&&"function"!=typeof t?(y=t.duration,l=t.element,_=t.connector):l=t;var l,f=new Map,r=function(e){f.forEach(e),e(s)},p=0,d=!1,h=new hm.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new pm.Subject),i=n,u=o,(a=new lm.Observable(function(e){p++;var t=u.subscribe(e);return function(){t.unsubscribe(),0==--p&&d&&h.unsubscribe()}})).key=i,t=a,s.next(t),y&&(r=hm.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(fm.innerFrom(y(t)).subscribe(r)))),o.next(l?l(e):e)}catch(e){c(e)}var i,u,a},function(){return r(function(e){return e.complete()})},c,function(){return f.clear()},function(){return d=!0,0===p});e.subscribe(h)})};var bm={},ym=(Object.defineProperty(bm,"__esModule",{value:!0}),bm.isEmpty=void 0,b),_m=p;bm.isEmpty=function(){return ym.operate(function(e,t){e.subscribe(_m.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var vm={},mm={},gm=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Om=(Object.defineProperty(mm,"__esModule",{value:!0}),mm.takeLast=void 0,pe),wm=b,Em=p;mm.takeLast=function(t){return t<=0?function(){return Om.EMPTY}:wm.operate(function(e,i){var u=[];e.subscribe(Em.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=gm(u),n=r.next();!n.done;n=r.next()){var o=n.value;i.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}i.complete()},void 0,function(){u=null}))})},Object.defineProperty(vm,"__esModule",{value:!0}),vm.last=void 0;var Pm=Zl,Tm=eb,Sm=mm,jm=_v,Cm=A,Im=Rt;vm.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?Tm.filter(function(e,t){return n(e,t,r)}):Im.identity,Sm.takeLast(1),t?Cm.defaultIfEmpty(e):jm.throwIfEmpty(function(){return new Pm.EmptyError}))}};var Rm={},Am=(Object.defineProperty(Rm,"__esModule",{value:!0}),Rm.materialize=void 0,y),Mm=b,Nm=p;Rm.materialize=function(){return Mm.operate(function(e,t){e.subscribe(Nm.createOperatorSubscriber(t,function(e){t.next(Am.Notification.createNext(e))},function(){t.next(Am.Notification.createComplete()),t.complete()},function(e){t.next(Am.Notification.createError(e)),t.complete()}))})};var km={},xm=(Object.defineProperty(km,"__esModule",{value:!0}),km.max=void 0,wy),Dm=_;km.max=function(r){return xm.reduce(Dm.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var Lm={},Um=(Object.defineProperty(Lm,"__esModule",{value:!0}),Lm.flatMap=void 0,Id),Um=(Lm.flatMap=Um.mergeMap,{}),Fm=(Object.defineProperty(Um,"__esModule",{value:!0}),Um.mergeMapTo=void 0,Id),Bm=_;Um.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),Bm.isFunction(t)?Fm.mergeMap(function(){return e},t,r):Fm.mergeMap(function(){return e},r="number"==typeof t?t:r)};var Vm={},qm=(Object.defineProperty(Vm,"__esModule",{value:!0}),Vm.mergeScan=void 0,b),Wm=Rd;Vm.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),qm.operate(function(e,t){var r=o;return Wm.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var Rd={},zm={},Hm=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Gm=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Ym=(Object.defineProperty(zm,"__esModule",{value:!0}),zm.merge=void 0,b),Km=Cd,Zm=O,Qm=Hl;zm.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Zm.popScheduler(r),o=Zm.popNumber(r,1/0);return Ym.operate(function(e,t){Km.mergeAll(o)(Qm.from(Gm([e],Hm(r)),n)).subscribe(t)})};var Xm=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Jm=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},$m=(Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.mergeWith=void 0,zm);Rd.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return $m.merge.apply(void 0,Jm([],Xm(e)))};var e0={},t0=(Object.defineProperty(e0,"__esModule",{value:!0}),e0.min=void 0,wy),r0=_;e0.min=function(r){return t0.reduce(r0.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var n0={},o0=(Object.defineProperty(n0,"__esModule",{value:!0}),n0.multicast=void 0,h),i0=_,u0=d_;n0.multicast=function(e,t){var r=i0.isFunction(e)?e:function(){return e};return i0.isFunction(t)?u0.connect(t,{connector:r}):function(e){return new o0.ConnectableObservable(e,r)}};var a0={},s0=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},c0=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},l0=(Object.defineProperty(a0,"__esModule",{value:!0}),a0.onErrorResumeNext=a0.onErrorResumeNextWith=void 0,Wh),f0=qh;function p0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l0.argsOrArgArray(e);return function(e){return f0.onErrorResumeNext.apply(void 0,c0([e],s0(r)))}}a0.onErrorResumeNextWith=p0,a0.onErrorResumeNext=p0;var d0={},h0=(Object.defineProperty(d0,"__esModule",{value:!0}),d0.pairwise=void 0,b),b0=p;d0.pairwise=function(){return h0.operate(function(e,r){var n,o=!1;e.subscribe(b0.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var y0={},_0=(Object.defineProperty(y0,"__esModule",{value:!0}),y0.pluck=void 0,Hp);y0.pluck=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];var i=o.length;if(0===i)throw new Error("list of properties cannot be empty.");return _0.map(function(e){for(var t=e,r=0;r<i;r++){var n=null==t?void 0:t[o[r]];if(void 0===n)return;t=n}return t})};var v0={},m0=(Object.defineProperty(v0,"__esModule",{value:!0}),v0.publish=void 0,P),g0=n0,O0=d_;v0.publish=function(t){return t?function(e){return O0.connect(t)(e)}:function(e){return g0.multicast(new m0.Subject)(e)}};var w0={},E0=(Object.defineProperty(w0,"__esModule",{value:!0}),w0.publishBehavior=void 0,m),P0=h;w0.publishBehavior=function(r){return function(e){var t=new E0.BehaviorSubject(r);return new P0.ConnectableObservable(e,function(){return t})}};var T0={},S0=(Object.defineProperty(T0,"__esModule",{value:!0}),T0.publishLast=void 0,uo),j0=h;T0.publishLast=function(){return function(e){var t=new S0.AsyncSubject;return new j0.ConnectableObservable(e,function(){return t})}};var C0={},I0=(Object.defineProperty(C0,"__esModule",{value:!0}),C0.publishReplay=void 0,l),R0=n0,A0=_;C0.publishReplay=function(t,r,e,n){e&&!A0.isFunction(e)&&(n=e);var o=A0.isFunction(e)?e:void 0;return function(e){return R0.multicast(new I0.ReplaySubject(t,r,n),o)(e)}};var M0={},N0=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},k0=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},x0=(Object.defineProperty(M0,"__esModule",{value:!0}),M0.raceWith=void 0,ub),D0=b,L0=Rt;M0.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?D0.operate(function(e,t){x0.raceInit(k0([e],N0(r)))(t)}):L0.identity};var U0={},F0=(Object.defineProperty(U0,"__esModule",{value:!0}),U0.repeat=void 0,pe),B0=b,V0=p,q0=I,W0=Ch;U0.repeat=function(e){var t,a,s=1/0;return null!=e&&("object"==typeof e?(t=e.count,s=void 0===t?1/0:t,a=e.delay):s=e),s<=0?function(){return F0.EMPTY}:B0.operate(function(t,r){var n,o=0,i=function(){var e,t;null!=n&&n.unsubscribe(),(n=null)!=a?(e="number"==typeof a?W0.timer(a):q0.innerFrom(a(o)),t=V0.createOperatorSubscriber(r,function(){t.unsubscribe(),u()}),e.subscribe(t)):u()},u=function(){var e=!1;n=t.subscribe(V0.createOperatorSubscriber(r,void 0,function(){++o<s?n?i():e=!0:r.complete()})),e&&i()};u()})};var z0={},H0=(Object.defineProperty(z0,"__esModule",{value:!0}),z0.repeatWhen=void 0,I),G0=P,Y0=b,K0=p;z0.repeatWhen=function(l){return Y0.operate(function(e,t){var r,n,o=!1,i=!1,u=!1,a=function(){return u&&i&&(t.complete(),!0)},s=function(){return n||(n=new G0.Subject,H0.innerFrom(l(n)).subscribe(K0.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(K0.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var Z0={},Q0=(Object.defineProperty(Z0,"__esModule",{value:!0}),Z0.retry=void 0,b),X0=p,J0=Rt,$0=Ch,eg=I;Z0.retry=function(e){var t=(e=(e=void 0===e?1/0:e)&&"object"==typeof e?e:{count:e}).count,c=void 0===t?1/0:t,l=e.delay,r=void 0!==(t=e.resetOnSuccess)&&t;return c<=0?J0.identity:Q0.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(X0.createOperatorSubscriber(i,function(e){r&&(a=0),i.next(e)},void 0,function(e){var t,r,n;a++<c?(t=function(){u?(u.unsubscribe(),u=null,s()):o=!0},null!=l?(r="number"==typeof l?$0.timer(l):eg.innerFrom(l(e,a)),n=X0.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var tg={},rg=(Object.defineProperty(tg,"__esModule",{value:!0}),tg.retryWhen=void 0,I),ng=P,og=b,ig=p;tg.retryWhen=function(u){return og.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(ig.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new ng.Subject,rg.innerFrom(u(n)).subscribe(ig.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var ug={},ag=(Object.defineProperty(ug,"__esModule",{value:!0}),ug.sample=void 0,I),sg=b,cg=fe,lg=p;ug.sample=function(o){return sg.operate(function(e,t){var r=!1,n=null;e.subscribe(lg.createOperatorSubscriber(t,function(e){r=!0,n=e})),ag.innerFrom(o).subscribe(lg.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},cg.noop))})};var fg={},pg=(Object.defineProperty(fg,"__esModule",{value:!0}),fg.sampleTime=void 0,j),dg=ug,hg=jh;fg.sampleTime=function(e,t){return dg.sample(hg.interval(e,t=void 0===t?pg.asyncScheduler:t))};var bg={},yg=(Object.defineProperty(bg,"__esModule",{value:!0}),bg.scan=void 0,b),_g=Ey;bg.scan=function(e,t){return yg.operate(_g.scanInternals(e,t,2<=arguments.length,!0))};var Ey={},vg=(Object.defineProperty(Ey,"__esModule",{value:!0}),Ey.sequenceEqual=void 0,b),mg=p,gg=I;function Og(){return{buffer:[],complete:!1}}Ey.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),vg.operate(function(e,t){function r(r,n){var e=mg.createOperatorSubscriber(t,function(e){var t=n.buffer;0===t.length?n.complete?i(!1):r.buffer.push(e):a(e,t.shift())||i(!1)},function(){r.complete=!0,n.complete&&i(0===n.buffer.length),null!=e&&e.unsubscribe()});return e}var n=Og(),o=Og(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),gg.innerFrom(u).subscribe(r(o,n))})};var wg={},Eg=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Pg=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Tg=(Object.defineProperty(wg,"__esModule",{value:!0}),wg.share=void 0,I),Sg=P,jg=Zn,Cg=b;function Ig(e,t){for(var r,n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!0===t)e();else if(!1!==t)return r=new jg.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),Tg.innerFrom(t.apply(void 0,Pg([],Eg(n)))).subscribe(r)}wg.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new Sg.Subject}:t,d=void 0===(t=e.resetOnError)||t,h=void 0===(t=e.resetOnComplete)||t,b=void 0===(t=e.resetOnRefCountZero)||t;return function(e){function n(){var e=o;f(),null!=e&&e.unsubscribe()}var o,i,u,a=0,s=!1,c=!1,l=function(){null!=i&&i.unsubscribe(),i=void 0},f=function(){l(),o=u=void 0,s=c=!1};return Cg.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=Ig(n,b))}),r.subscribe(t),!o&&0<a&&(o=new jg.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=Ig(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=Ig(f,h),r.complete()}}),Tg.innerFrom(e).subscribe(o))})(e)}};var Rg={},Ag=(Object.defineProperty(Rg,"__esModule",{value:!0}),Rg.shareReplay=void 0,l),Mg=wg;Rg.shareReplay=function(e,t,r){var n,o,i=!1;return e&&"object"==typeof e?(n=e.bufferSize,o=void 0===n?1/0:n,t=void 0===(n=e.windowTime)?1/0:n,i=void 0!==(n=e.refCount)&&n,r=e.scheduler):o=null!=e?e:1/0,Mg.share({connector:function(){return new Ag.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var Ng={},kg=(Object.defineProperty(Ng,"__esModule",{value:!0}),Ng.single=void 0,Zl),xg=zf,Dg=np,Lg=b,Ug=p;Ng.single=function(a){return Lg.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(Ug.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new xg.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new Dg.NotFoundError("No matching values"):new kg.EmptyError)}))})};var Fg={},Bg=(Object.defineProperty(Fg,"__esModule",{value:!0}),Fg.skip=void 0,eb);Fg.skip=function(r){return Bg.filter(function(e,t){return r<=t})};var Vg={},qg=(Object.defineProperty(Vg,"__esModule",{value:!0}),Vg.skipLast=void 0,Rt),Wg=b,zg=p;Vg.skipLast=function(u){return u<=0?qg.identity:Wg.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(zg.createOperatorSubscriber(n,function(e){var t,r=i++;r<u?o[r]=e:(t=o[r=r%u],o[r]=e,n.next(t))})),function(){o=null}})};var Hg={},Gg=(Object.defineProperty(Hg,"__esModule",{value:!0}),Hg.skipUntil=void 0,b),Yg=p,Kg=I,Zg=fe;Hg.skipUntil=function(o){return Gg.operate(function(e,t){var r=!1,n=Yg.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},Zg.noop);Kg.innerFrom(o).subscribe(n),e.subscribe(Yg.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var Qg={},Xg=(Object.defineProperty(Qg,"__esModule",{value:!0}),Qg.skipWhile=void 0,b),Jg=p;Qg.skipWhile=function(o){return Xg.operate(function(e,t){var r=!1,n=0;e.subscribe(Jg.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var $g={},eO=(Object.defineProperty($g,"__esModule",{value:!0}),$g.startWith=void 0,Sd),tO=O,rO=b;$g.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=tO.popScheduler(r);return rO.operate(function(e,t){(n?eO.concat(r,e,n):eO.concat(r,e)).subscribe(t)})};var nO={},oO={},iO=(Object.defineProperty(oO,"__esModule",{value:!0}),oO.switchMap=void 0,I),uO=b,aO=p;oO.switchMap=function(s,c){return uO.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(aO.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;iO.innerFrom(s(t,n)).subscribe(u=aO.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(nO,"__esModule",{value:!0}),nO.switchAll=void 0;var sO=oO,cO=Rt;nO.switchAll=function(){return sO.switchMap(cO.identity)};var lO={},fO=(Object.defineProperty(lO,"__esModule",{value:!0}),lO.switchMapTo=void 0,oO),pO=_;lO.switchMapTo=function(e,t){return pO.isFunction(t)?fO.switchMap(function(){return e},t):fO.switchMap(function(){return e})};var dO={},hO=(Object.defineProperty(dO,"__esModule",{value:!0}),dO.switchScan=void 0,oO),bO=b;dO.switchScan=function(n,o){return bO.operate(function(e,t){var r=o;return hO.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var yO={},_O=(Object.defineProperty(yO,"__esModule",{value:!0}),yO.takeUntil=void 0,b),vO=p,mO=I,gO=fe;yO.takeUntil=function(r){return _O.operate(function(e,t){mO.innerFrom(r).subscribe(vO.createOperatorSubscriber(t,function(){return t.complete()},gO.noop)),t.closed||e.subscribe(t)})};var OO={},wO=(Object.defineProperty(OO,"__esModule",{value:!0}),OO.takeWhile=void 0,b),EO=p;OO.takeWhile=function(o,i){return void 0===i&&(i=!1),wO.operate(function(e,r){var n=0;e.subscribe(EO.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var PO={},TO=(Object.defineProperty(PO,"__esModule",{value:!0}),PO.tap=void 0,_),SO=b,jO=p,CO=Rt;PO.tap=function(e,t,r){var o=TO.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?SO.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(jO.createOperatorSubscriber(r,function(e){var t;null!=(t=o.next)&&t.call(o,e),r.next(e)},function(){var e;n=!1,null!=(e=o.complete)&&e.call(o),r.complete()},function(e){var t;n=!1,null!=(t=o.error)&&t.call(o,e),r.error(e)},function(){var e;n&&null!=(e=o.unsubscribe)&&e.call(o),null!=(e=o.finalize)&&e.call(o)}))}):CO.identity};var _={},IO=(Object.defineProperty(_,"__esModule",{value:!0}),_.throttle=void 0,b),RO=p,AO=I;_.throttle=function(h,b){return IO.operate(function(e,t){var r=null!=b?b:{},n=r.leading,o=void 0===n||n,n=r.trailing,i=void 0!==n&&n,u=!1,a=null,s=null,c=!1,l=function(){null!=s&&s.unsubscribe(),s=null,i&&(d(),c)&&t.complete()},f=function(){s=null,c&&t.complete()},p=function(e){return s=AO.innerFrom(h(e)).subscribe(RO.createOperatorSubscriber(t,l,f))},d=function(){var e;u&&(u=!1,e=a,a=null,t.next(e),c||p(e))};e.subscribe(RO.createOperatorSubscriber(t,function(e){u=!0,a=e,s&&!s.closed||(o?d():p(e))},function(){c=!0,i&&u&&s&&!s.closed||t.complete()}))})};var MO={},NO=(Object.defineProperty(MO,"__esModule",{value:!0}),MO.throttleTime=void 0,j),kO=_,xO=Ch;MO.throttleTime=function(e,t,r){var n=xO.timer(e,t=void 0===t?NO.asyncScheduler:t);return kO.throttle(function(){return n},r)};var DO={},LO=(Object.defineProperty(DO,"__esModule",{value:!0}),DO.TimeInterval=DO.timeInterval=void 0,j),UO=b,FO=p;DO.timeInterval=function(i){return void 0===i&&(i=LO.asyncScheduler),UO.operate(function(e,n){var o=i.now();e.subscribe(FO.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new BO(e,r))}))})};var BO=function(e,t){this.value=e,this.interval=t},VO=(DO.TimeInterval=BO,{}),qO=(Object.defineProperty(VO,"__esModule",{value:!0}),VO.timeoutWith=void 0,j),WO=Kf,zO=cf;VO.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:qO.async,WO.isValidDate(e)?n=e:"number"==typeof e&&(o=e),!t)throw new TypeError("No observable provided to switch to");if(e=function(){return t},null==n&&null==o)throw new TypeError("No timeout provided.");return zO.timeout({first:n,each:o,scheduler:r,with:e})};var Kf={},HO=(Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.timestamp=void 0,F),GO=Hp;Kf.timestamp=function(t){return void 0===t&&(t=HO.dateTimestampProvider),GO.map(function(e){return{value:e,timestamp:t.now()}})};var F={},YO=(Object.defineProperty(F,"__esModule",{value:!0}),F.window=void 0,P),KO=b,ZO=p,QO=fe,XO=I;F.window=function(o){return KO.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new YO.Subject;t.next(n.asObservable());return e.subscribe(ZO.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),XO.innerFrom(o).subscribe(ZO.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new YO.Subject)},QO.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var JO={},$O=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ew=(Object.defineProperty(JO,"__esModule",{value:!0}),JO.windowCount=void 0,P),tw=b,rw=p;JO.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return tw.operate(function(e,i){var u=[new ew.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(rw.createOperatorSubscriber(i,function(e){try{for(var t=$O(u),r=t.next();!r.done;r=t.next())r.value.next(e)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=t.return)&&o.call(t)}finally{if(n)throw n.error}}var n,o=a-s+1;0<=o&&o%c==0&&u.shift().complete(),++a%c==0&&(n=new ew.Subject,u.push(n),i.next(n.asObservable()))},function(){for(;0<u.length;)u.shift().complete();i.complete()},function(e){for(;0<u.length;)u.shift().error(e);i.error(e)},function(){u=null}))})};var nw={},ow=(Object.defineProperty(nw,"__esModule",{value:!0}),nw.windowTime=void 0,P),iw=j,uw=o,aw=b,sw=p,cw=E,lw=O,fw=xf;nw.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=lw.popScheduler(t))?e:iw.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return aw.operate(function(e,n){function r(t){s(function(e){e=e.window;return t(e)}),t(n),n.unsubscribe()}var o=[],i=!1,u=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),cw.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new uw.Subscription,n.add(e),t=new ow.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),fw.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?fw.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(sw.createOperatorSubscriber(n,function(t){s(function(e){e.window.next(t),p<=++e.seen&&u(e)})},function(){return r(function(e){return e.complete()})},function(t){return r(function(e){return e.error(t)})})),function(){o=null}})};var xf={},pw=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},dw=(Object.defineProperty(xf,"__esModule",{value:!0}),xf.windowToggle=void 0,P),hw=o,bw=b,yw=I,_w=p,vw=fe,mw=E;xf.windowToggle=function(t,a){return bw.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];yw.innerFrom(t).subscribe(_w.createOperatorSubscriber(o,function(e){var t,r=new dw.Subject,n=(u.push(r),new hw.Subscription);try{t=yw.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(_w.createOperatorSubscriber(o,function(){mw.arrRemove(u,r),r.complete(),n.unsubscribe()},vw.noop,i)))},vw.noop)),e.subscribe(_w.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=pw(n),i=o.next();!i.done;i=o.next())i.value.next(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;0<u.length;)u.shift().complete();o.complete()},i,function(){for(;0<u.length;)u.shift().unsubscribe()}))})};var E={},gw=(Object.defineProperty(E,"__esModule",{value:!0}),E.windowWhen=void 0,P),Ow=b,ww=p,Ew=I;E.windowWhen=function(u){return Ow.operate(function(e,t){var r,n,o=function(e){r.error(e),t.error(e)},i=function(){var e;null!=n&&n.unsubscribe(),null!=r&&r.complete(),r=new gw.Subject,t.next(r.asObservable());try{e=Ew.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=ww.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(ww.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var Pw={},Tw=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Sw=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},jw=(Object.defineProperty(Pw,"__esModule",{value:!0}),Pw.withLatestFrom=void 0,b),Cw=p,Iw=I,Rw=Rt,Aw=fe,Mw=O;Pw.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=Mw.popResultSelector(a);return jw.operate(function(e,r){for(var t=a.length,n=new Array(t),o=a.map(function(){return!1}),i=!1,u=0;u<t;u++)(t=>{Iw.innerFrom(a[t]).subscribe(Cw.createOperatorSubscriber(r,function(e){n[t]=e,!i&&!o[t]&&(o[t]=!0,i=o.every(Rw.identity))&&(o=null)},Aw.noop))})(u);e.subscribe(Cw.createOperatorSubscriber(r,function(e){i&&(e=Sw([e],Tw(n)),r.next(s?s.apply(void 0,Sw([],Tw(e))):e))}))})};var p={},Nw=(Object.defineProperty(p,"__esModule",{value:!0}),p.zipAll=void 0,mb),kw=R;p.zipAll=function(e){return kw.joinAllInternals(Nw.zip,e)};var I={},O={},xw=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Dw=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Lw=(Object.defineProperty(O,"__esModule",{value:!0}),O.zip=void 0,mb),Uw=b;O.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Uw.operate(function(e,t){Lw.zip.apply(void 0,Dw([e],xw(r))).subscribe(t)})};var Fw,Bw,Vw,qw,Ww,zw,Hw,Gw,Yw,Kw,Zw,Qw,Xw,Jw,$w,eE,tE,rE,nE,oE,iE,uE,aE,sE,cE,lE,fE,pE,dE,hE,bE,yE,_E,vE,mE,gE,OE,wE,EE,PE,TE,SE,jE,CE,IE,RE,AE,ME,NE,kE,xE,DE,LE,UE,FE,BE,VE,qE,WE,zE,HE,GE,YE,KE,ZE,QE,XE,JE,$E,eP,tP,rP,nP,oP,iP,uP,aP,sP,cP,lP,fP,pP,dP,hP,bP,yP,_P,vP,mP,gP,OP,wP,EP,PP,TP,SP,jP,CP,IP,RP,AP,MP,NP,kP,xP,DP,LP,UP,FP,BP,VP,qP,WP,zP,HP,GP,YP,KP,ZP,QP,XP,JP,$P,eT,tT,rT,nT,oT,iT,uT,aT,sT,cT,lT,fT,pT,dT,hT,bT,yT,_T,vT,mT,gT,OT,wT,ET,PT,TT,ST,jT,CT,IT,RT,AT,MT,NT,kT,xT,DT,LT,UT,FT,BT,VT,qT,WT,zT,HT=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},GT=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},YT=(Object.defineProperty(I,"__esModule",{value:!0}),I.zipWith=void 0,O);I.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return YT.zip.apply(void 0,GT([],HT(e)))},R=po,Fw=r&&r.__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){e[n=void 0===n?r:n]=t[r]}),b=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Fw(t,e,r)},Object.defineProperty(R,"__esModule",{value:!0}),R.interval=R.iif=R.generate=R.fromEventPattern=R.fromEvent=R.from=R.forkJoin=R.empty=R.defer=R.connectable=R.concat=R.combineLatest=R.bindNodeCallback=R.bindCallback=R.UnsubscriptionError=R.TimeoutError=R.SequenceError=R.ObjectUnsubscribedError=R.NotFoundError=R.EmptyError=R.ArgumentOutOfRangeError=R.firstValueFrom=R.lastValueFrom=R.isObservable=R.identity=R.noop=R.pipe=R.NotificationKind=R.Notification=R.Subscriber=R.Subscription=R.Scheduler=R.VirtualAction=R.VirtualTimeScheduler=R.animationFrameScheduler=R.animationFrame=R.queueScheduler=R.queue=R.asyncScheduler=R.async=R.asapScheduler=R.asap=R.AsyncSubject=R.ReplaySubject=R.BehaviorSubject=R.Subject=R.animationFrames=R.observable=R.ConnectableObservable=R.Observable=void 0,R.filter=R.expand=R.exhaustMap=R.exhaustAll=R.exhaust=R.every=R.endWith=R.elementAt=R.distinctUntilKeyChanged=R.distinctUntilChanged=R.distinct=R.dematerialize=R.delayWhen=R.delay=R.defaultIfEmpty=R.debounceTime=R.debounce=R.count=R.connect=R.concatWith=R.concatMapTo=R.concatMap=R.concatAll=R.combineLatestWith=R.combineLatestAll=R.combineAll=R.catchError=R.bufferWhen=R.bufferToggle=R.bufferTime=R.bufferCount=R.buffer=R.auditTime=R.audit=R.config=R.NEVER=R.EMPTY=R.scheduled=R.zip=R.using=R.timer=R.throwError=R.range=R.race=R.partition=R.pairs=R.onErrorResumeNext=R.of=R.never=R.merge=void 0,R.switchMap=R.switchAll=R.subscribeOn=R.startWith=R.skipWhile=R.skipUntil=R.skipLast=R.skip=R.single=R.shareReplay=R.share=R.sequenceEqual=R.scan=R.sampleTime=R.sample=R.refCount=R.retryWhen=R.retry=R.repeatWhen=R.repeat=R.reduce=R.raceWith=R.publishReplay=R.publishLast=R.publishBehavior=R.publish=R.pluck=R.pairwise=R.onErrorResumeNextWith=R.observeOn=R.multicast=R.min=R.mergeWith=R.mergeScan=R.mergeMapTo=R.mergeMap=R.flatMap=R.mergeAll=R.max=R.materialize=R.mapTo=R.map=R.last=R.isEmpty=R.ignoreElements=R.groupBy=R.first=R.findIndex=R.find=R.finalize=void 0,R.zipWith=R.zipAll=R.withLatestFrom=R.windowWhen=R.windowToggle=R.windowTime=R.windowCount=R.window=R.toArray=R.timestamp=R.timeoutWith=R.timeout=R.timeInterval=R.throwIfEmpty=R.throttleTime=R.throttle=R.tap=R.takeWhile=R.takeUntil=R.takeLast=R.take=R.switchScan=R.switchMapTo=void 0,Bw=w,Object.defineProperty(R,"Observable",{enumerable:!0,get:function(){return Bw.Observable}}),Vw=h,Object.defineProperty(R,"ConnectableObservable",{enumerable:!0,get:function(){return Vw.ConnectableObservable}}),qw=i,Object.defineProperty(R,"observable",{enumerable:!0,get:function(){return qw.observable}}),Ww=C,Object.defineProperty(R,"animationFrames",{enumerable:!0,get:function(){return Ww.animationFrames}}),zw=P,Object.defineProperty(R,"Subject",{enumerable:!0,get:function(){return zw.Subject}}),Hw=m,Object.defineProperty(R,"BehaviorSubject",{enumerable:!0,get:function(){return Hw.BehaviorSubject}}),Gw=l,Object.defineProperty(R,"ReplaySubject",{enumerable:!0,get:function(){return Gw.ReplaySubject}}),Yw=uo,Object.defineProperty(R,"AsyncSubject",{enumerable:!0,get:function(){return Yw.AsyncSubject}}),Kw=xo,Object.defineProperty(R,"asap",{enumerable:!0,get:function(){return Kw.asap}}),Object.defineProperty(R,"asapScheduler",{enumerable:!0,get:function(){return Kw.asapScheduler}}),Zw=j,Object.defineProperty(R,"async",{enumerable:!0,get:function(){return Zw.async}}),Object.defineProperty(R,"asyncScheduler",{enumerable:!0,get:function(){return Zw.asyncScheduler}}),Qw=T,Object.defineProperty(R,"queue",{enumerable:!0,get:function(){return Qw.queue}}),Object.defineProperty(R,"queueScheduler",{enumerable:!0,get:function(){return Qw.queueScheduler}}),Xw=t,Object.defineProperty(R,"animationFrame",{enumerable:!0,get:function(){return Xw.animationFrame}}),Object.defineProperty(R,"animationFrameScheduler",{enumerable:!0,get:function(){return Xw.animationFrameScheduler}}),Jw=S,Object.defineProperty(R,"VirtualTimeScheduler",{enumerable:!0,get:function(){return Jw.VirtualTimeScheduler}}),Object.defineProperty(R,"VirtualAction",{enumerable:!0,get:function(){return Jw.VirtualAction}}),$w=G,Object.defineProperty(R,"Scheduler",{enumerable:!0,get:function(){return $w.Scheduler}}),eE=o,Object.defineProperty(R,"Subscription",{enumerable:!0,get:function(){return eE.Subscription}}),tE=Zn,Object.defineProperty(R,"Subscriber",{enumerable:!0,get:function(){return tE.Subscriber}}),rE=y,Object.defineProperty(R,"Notification",{enumerable:!0,get:function(){return rE.Notification}}),Object.defineProperty(R,"NotificationKind",{enumerable:!0,get:function(){return rE.NotificationKind}}),nE=u,Object.defineProperty(R,"pipe",{enumerable:!0,get:function(){return nE.pipe}}),oE=fe,Object.defineProperty(R,"noop",{enumerable:!0,get:function(){return oE.noop}}),iE=Rt,Object.defineProperty(R,"identity",{enumerable:!0,get:function(){return iE.identity}}),uE=of,Object.defineProperty(R,"isObservable",{enumerable:!0,get:function(){return uE.isObservable}}),aE=Xl,Object.defineProperty(R,"lastValueFrom",{enumerable:!0,get:function(){return aE.lastValueFrom}}),sE=ef,Object.defineProperty(R,"firstValueFrom",{enumerable:!0,get:function(){return sE.firstValueFrom}}),cE=rf,Object.defineProperty(R,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return cE.ArgumentOutOfRangeError}}),lE=Zl,Object.defineProperty(R,"EmptyError",{enumerable:!0,get:function(){return lE.EmptyError}}),fE=np,Object.defineProperty(R,"NotFoundError",{enumerable:!0,get:function(){return fE.NotFoundError}}),pE=Ar,Object.defineProperty(R,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return pE.ObjectUnsubscribedError}}),dE=zf,Object.defineProperty(R,"SequenceError",{enumerable:!0,get:function(){return dE.SequenceError}}),hE=cf,Object.defineProperty(R,"TimeoutError",{enumerable:!0,get:function(){return hE.TimeoutError}}),bE=g,Object.defineProperty(R,"UnsubscriptionError",{enumerable:!0,get:function(){return bE.UnsubscriptionError}}),yE=nf,Object.defineProperty(R,"bindCallback",{enumerable:!0,get:function(){return yE.bindCallback}}),_E=ad,Object.defineProperty(R,"bindNodeCallback",{enumerable:!0,get:function(){return _E.bindNodeCallback}}),vE=n,Object.defineProperty(R,"combineLatest",{enumerable:!0,get:function(){return vE.combineLatest}}),mE=Sd,Object.defineProperty(R,"concat",{enumerable:!0,get:function(){return mE.concat}}),gE=Hd,Object.defineProperty(R,"connectable",{enumerable:!0,get:function(){return gE.connectable}}),OE=Gd,Object.defineProperty(R,"defer",{enumerable:!0,get:function(){return OE.defer}}),wE=pe,Object.defineProperty(R,"empty",{enumerable:!0,get:function(){return wE.empty}}),EE=$d,Object.defineProperty(R,"forkJoin",{enumerable:!0,get:function(){return EE.forkJoin}}),PE=Hl,Object.defineProperty(R,"from",{enumerable:!0,get:function(){return PE.from}}),TE=cd,Object.defineProperty(R,"fromEvent",{enumerable:!0,get:function(){return TE.fromEvent}}),SE=hd,Object.defineProperty(R,"fromEventPattern",{enumerable:!0,get:function(){return SE.fromEventPattern}}),jE=Kl,Object.defineProperty(R,"generate",{enumerable:!0,get:function(){return jE.generate}}),CE=Qf,Object.defineProperty(R,"iif",{enumerable:!0,get:function(){return CE.iif}}),IE=jh,Object.defineProperty(R,"interval",{enumerable:!0,get:function(){return IE.interval}}),RE=Bl,Object.defineProperty(R,"merge",{enumerable:!0,get:function(){return RE.merge}}),AE=Vh,Object.defineProperty(R,"never",{enumerable:!0,get:function(){return AE.never}}),ME=v,Object.defineProperty(R,"of",{enumerable:!0,get:function(){return ME.of}}),NE=qh,Object.defineProperty(R,"onErrorResumeNext",{enumerable:!0,get:function(){return NE.onErrorResumeNext}}),kE=Qh,Object.defineProperty(R,"pairs",{enumerable:!0,get:function(){return kE.pairs}}),xE=Jh,Object.defineProperty(R,"partition",{enumerable:!0,get:function(){return xE.partition}}),DE=ub,Object.defineProperty(R,"race",{enumerable:!0,get:function(){return DE.race}}),LE=pb,Object.defineProperty(R,"range",{enumerable:!0,get:function(){return LE.range}}),UE=Yl,Object.defineProperty(R,"throwError",{enumerable:!0,get:function(){return UE.throwError}}),FE=Ch,Object.defineProperty(R,"timer",{enumerable:!0,get:function(){return FE.timer}}),BE=bb,Object.defineProperty(R,"using",{enumerable:!0,get:function(){return BE.using}}),VE=mb,Object.defineProperty(R,"zip",{enumerable:!0,get:function(){return VE.zip}}),qE=Gl,Object.defineProperty(R,"scheduled",{enumerable:!0,get:function(){return qE.scheduled}}),WE=pe,Object.defineProperty(R,"EMPTY",{enumerable:!0,get:function(){return WE.EMPTY}}),zE=Vh,Object.defineProperty(R,"NEVER",{enumerable:!0,get:function(){return zE.NEVER}}),b(Cb,R),HE=Wr,Object.defineProperty(R,"config",{enumerable:!0,get:function(){return HE.config}}),GE=Ib,Object.defineProperty(R,"audit",{enumerable:!0,get:function(){return GE.audit}}),YE=Nb,Object.defineProperty(R,"auditTime",{enumerable:!0,get:function(){return YE.auditTime}}),KE=Lb,Object.defineProperty(R,"buffer",{enumerable:!0,get:function(){return KE.buffer}}),ZE=qb,Object.defineProperty(R,"bufferCount",{enumerable:!0,get:function(){return ZE.bufferCount}}),QE=Yb,Object.defineProperty(R,"bufferTime",{enumerable:!0,get:function(){return QE.bufferTime}}),XE=ry,Object.defineProperty(R,"bufferToggle",{enumerable:!0,get:function(){return XE.bufferToggle}}),JE=ly,Object.defineProperty(R,"bufferWhen",{enumerable:!0,get:function(){return JE.bufferWhen}}),$E=by,Object.defineProperty(R,"catchError",{enumerable:!0,get:function(){return $E.catchError}}),eP=my,Object.defineProperty(R,"combineAll",{enumerable:!0,get:function(){return eP.combineAll}}),tP=gy,Object.defineProperty(R,"combineLatestAll",{enumerable:!0,get:function(){return tP.combineLatestAll}}),rP=Ly,Object.defineProperty(R,"combineLatestWith",{enumerable:!0,get:function(){return rP.combineLatestWith}}),nP=jd,Object.defineProperty(R,"concatAll",{enumerable:!0,get:function(){return nP.concatAll}}),oP=zp,Object.defineProperty(R,"concatMap",{enumerable:!0,get:function(){return oP.concatMap}}),iP=$y,Object.defineProperty(R,"concatMapTo",{enumerable:!0,get:function(){return iP.concatMapTo}}),uP=r_,Object.defineProperty(R,"concatWith",{enumerable:!0,get:function(){return uP.concatWith}}),aP=d_,Object.defineProperty(R,"connect",{enumerable:!0,get:function(){return aP.connect}}),sP=h_,Object.defineProperty(R,"count",{enumerable:!0,get:function(){return sP.count}}),cP=w_,Object.defineProperty(R,"debounce",{enumerable:!0,get:function(){return cP.debounce}}),lP=j_,Object.defineProperty(R,"debounceTime",{enumerable:!0,get:function(){return lP.debounceTime}}),fP=A,Object.defineProperty(R,"defaultIfEmpty",{enumerable:!0,get:function(){return fP.defaultIfEmpty}}),pP=N_,Object.defineProperty(R,"delay",{enumerable:!0,get:function(){return pP.delay}}),dP=k_,Object.defineProperty(R,"delayWhen",{enumerable:!0,get:function(){return dP.delayWhen}}),hP=ev,Object.defineProperty(R,"dematerialize",{enumerable:!0,get:function(){return hP.dematerialize}}),bP=ov,Object.defineProperty(R,"distinct",{enumerable:!0,get:function(){return bP.distinct}}),yP=cv,Object.defineProperty(R,"distinctUntilChanged",{enumerable:!0,get:function(){return yP.distinctUntilChanged}}),_P=hv,Object.defineProperty(R,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return _P.distinctUntilKeyChanged}}),vP=yv,Object.defineProperty(R,"elementAt",{enumerable:!0,get:function(){return vP.elementAt}}),mP=jv,Object.defineProperty(R,"endWith",{enumerable:!0,get:function(){return mP.endWith}}),gP=Mv,Object.defineProperty(R,"every",{enumerable:!0,get:function(){return gP.every}}),OP=xv,Object.defineProperty(R,"exhaust",{enumerable:!0,get:function(){return OP.exhaust}}),wP=Dv,Object.defineProperty(R,"exhaustAll",{enumerable:!0,get:function(){return wP.exhaustAll}}),EP=Lv,Object.defineProperty(R,"exhaustMap",{enumerable:!0,get:function(){return EP.exhaustMap}}),PP=zv,Object.defineProperty(R,"expand",{enumerable:!0,get:function(){return PP.expand}}),TP=eb,Object.defineProperty(R,"filter",{enumerable:!0,get:function(){return TP.filter}}),SP=Yv,Object.defineProperty(R,"finalize",{enumerable:!0,get:function(){return SP.finalize}}),jP=Zv,Object.defineProperty(R,"find",{enumerable:!0,get:function(){return jP.find}}),CP=$v,Object.defineProperty(R,"findIndex",{enumerable:!0,get:function(){return CP.findIndex}}),IP=rm,Object.defineProperty(R,"first",{enumerable:!0,get:function(){return IP.first}}),RP=cm,Object.defineProperty(R,"groupBy",{enumerable:!0,get:function(){return RP.groupBy}}),AP=F_,Object.defineProperty(R,"ignoreElements",{enumerable:!0,get:function(){return AP.ignoreElements}}),MP=bm,Object.defineProperty(R,"isEmpty",{enumerable:!0,get:function(){return MP.isEmpty}}),NP=vm,Object.defineProperty(R,"last",{enumerable:!0,get:function(){return NP.last}}),kP=Hp,Object.defineProperty(R,"map",{enumerable:!0,get:function(){return kP.map}}),xP=W_,Object.defineProperty(R,"mapTo",{enumerable:!0,get:function(){return xP.mapTo}}),DP=Rm,Object.defineProperty(R,"materialize",{enumerable:!0,get:function(){return DP.materialize}}),LP=km,Object.defineProperty(R,"max",{enumerable:!0,get:function(){return LP.max}}),UP=Cd,Object.defineProperty(R,"mergeAll",{enumerable:!0,get:function(){return UP.mergeAll}}),FP=Lm,Object.defineProperty(R,"flatMap",{enumerable:!0,get:function(){return FP.flatMap}}),BP=Id,Object.defineProperty(R,"mergeMap",{enumerable:!0,get:function(){return BP.mergeMap}}),VP=Um,Object.defineProperty(R,"mergeMapTo",{enumerable:!0,get:function(){return VP.mergeMapTo}}),qP=Vm,Object.defineProperty(R,"mergeScan",{enumerable:!0,get:function(){return qP.mergeScan}}),WP=Rd,Object.defineProperty(R,"mergeWith",{enumerable:!0,get:function(){return WP.mergeWith}}),zP=e0,Object.defineProperty(R,"min",{enumerable:!0,get:function(){return zP.min}}),HP=n0,Object.defineProperty(R,"multicast",{enumerable:!0,get:function(){return HP.multicast}}),GP=a,Object.defineProperty(R,"observeOn",{enumerable:!0,get:function(){return GP.observeOn}}),YP=a0,Object.defineProperty(R,"onErrorResumeNextWith",{enumerable:!0,get:function(){return YP.onErrorResumeNextWith}}),KP=d0,Object.defineProperty(R,"pairwise",{enumerable:!0,get:function(){return KP.pairwise}}),ZP=y0,Object.defineProperty(R,"pluck",{enumerable:!0,get:function(){return ZP.pluck}}),QP=v0,Object.defineProperty(R,"publish",{enumerable:!0,get:function(){return QP.publish}}),XP=w0,Object.defineProperty(R,"publishBehavior",{enumerable:!0,get:function(){return XP.publishBehavior}}),JP=T0,Object.defineProperty(R,"publishLast",{enumerable:!0,get:function(){return JP.publishLast}}),$P=C0,Object.defineProperty(R,"publishReplay",{enumerable:!0,get:function(){return $P.publishReplay}}),eT=M0,Object.defineProperty(R,"raceWith",{enumerable:!0,get:function(){return eT.raceWith}}),tT=wy,Object.defineProperty(R,"reduce",{enumerable:!0,get:function(){return tT.reduce}}),rT=U0,Object.defineProperty(R,"repeat",{enumerable:!0,get:function(){return rT.repeat}}),nT=z0,Object.defineProperty(R,"repeatWhen",{enumerable:!0,get:function(){return nT.repeatWhen}}),oT=Z0,Object.defineProperty(R,"retry",{enumerable:!0,get:function(){return oT.retry}}),iT=tg,Object.defineProperty(R,"retryWhen",{enumerable:!0,get:function(){return iT.retryWhen}}),uT=Zt,Object.defineProperty(R,"refCount",{enumerable:!0,get:function(){return uT.refCount}}),aT=ug,Object.defineProperty(R,"sample",{enumerable:!0,get:function(){return aT.sample}}),sT=fg,Object.defineProperty(R,"sampleTime",{enumerable:!0,get:function(){return sT.sampleTime}}),cT=bg,Object.defineProperty(R,"scan",{enumerable:!0,get:function(){return cT.scan}}),lT=Ey,Object.defineProperty(R,"sequenceEqual",{enumerable:!0,get:function(){return lT.sequenceEqual}}),fT=wg,Object.defineProperty(R,"share",{enumerable:!0,get:function(){return fT.share}}),pT=Rg,Object.defineProperty(R,"shareReplay",{enumerable:!0,get:function(){return pT.shareReplay}}),dT=Ng,Object.defineProperty(R,"single",{enumerable:!0,get:function(){return dT.single}}),hT=Fg,Object.defineProperty(R,"skip",{enumerable:!0,get:function(){return hT.skip}}),bT=Vg,Object.defineProperty(R,"skipLast",{enumerable:!0,get:function(){return bT.skipLast}}),yT=Hg,Object.defineProperty(R,"skipUntil",{enumerable:!0,get:function(){return yT.skipUntil}}),_T=Qg,Object.defineProperty(R,"skipWhile",{enumerable:!0,get:function(){return _T.skipWhile}}),vT=$g,Object.defineProperty(R,"startWith",{enumerable:!0,get:function(){return vT.startWith}}),mT=Ff,Object.defineProperty(R,"subscribeOn",{enumerable:!0,get:function(){return mT.subscribeOn}}),gT=nO,Object.defineProperty(R,"switchAll",{enumerable:!0,get:function(){return gT.switchAll}}),OT=oO,Object.defineProperty(R,"switchMap",{enumerable:!0,get:function(){return OT.switchMap}}),wT=lO,Object.defineProperty(R,"switchMapTo",{enumerable:!0,get:function(){return wT.switchMapTo}}),ET=dO,Object.defineProperty(R,"switchScan",{enumerable:!0,get:function(){return ET.switchScan}}),PT=x_,Object.defineProperty(R,"take",{enumerable:!0,get:function(){return PT.take}}),TT=mm,Object.defineProperty(R,"takeLast",{enumerable:!0,get:function(){return TT.takeLast}}),ST=yO,Object.defineProperty(R,"takeUntil",{enumerable:!0,get:function(){return ST.takeUntil}}),jT=OO,Object.defineProperty(R,"takeWhile",{enumerable:!0,get:function(){return jT.takeWhile}}),CT=PO,Object.defineProperty(R,"tap",{enumerable:!0,get:function(){return CT.tap}}),IT=_,Object.defineProperty(R,"throttle",{enumerable:!0,get:function(){return IT.throttle}}),RT=MO,Object.defineProperty(R,"throttleTime",{enumerable:!0,get:function(){return RT.throttleTime}}),AT=_v,Object.defineProperty(R,"throwIfEmpty",{enumerable:!0,get:function(){return AT.throwIfEmpty}}),MT=DO,Object.defineProperty(R,"timeInterval",{enumerable:!0,get:function(){return MT.timeInterval}}),NT=cf,Object.defineProperty(R,"timeout",{enumerable:!0,get:function(){return NT.timeout}}),kT=VO,Object.defineProperty(R,"timeoutWith",{enumerable:!0,get:function(){return kT.timeoutWith}}),xT=Kf,Object.defineProperty(R,"timestamp",{enumerable:!0,get:function(){return xT.timestamp}}),DT=Oy,Object.defineProperty(R,"toArray",{enumerable:!0,get:function(){return DT.toArray}}),LT=F,Object.defineProperty(R,"window",{enumerable:!0,get:function(){return LT.window}}),UT=JO,Object.defineProperty(R,"windowCount",{enumerable:!0,get:function(){return UT.windowCount}}),FT=nw,Object.defineProperty(R,"windowTime",{enumerable:!0,get:function(){return FT.windowTime}}),BT=xf,Object.defineProperty(R,"windowToggle",{enumerable:!0,get:function(){return BT.windowToggle}}),VT=E,Object.defineProperty(R,"windowWhen",{enumerable:!0,get:function(){return VT.windowWhen}}),qT=Pw,Object.defineProperty(R,"withLatestFrom",{enumerable:!0,get:function(){return qT.withLatestFrom}}),WT=p,Object.defineProperty(R,"zipAll",{enumerable:!0,get:function(){return WT.zipAll}}),zT=I,Object.defineProperty(R,"zipWith",{enumerable:!0,get:function(){return zT.zipWith}});var w={},h={},KT=(Object.defineProperty(h,"__esModule",{value:!0}),h.partition=void 0,$h),ZT=eb;h.partition=function(t,r){return function(e){return[ZT.filter(t,r)(e),ZT.filter(KT.not(t,r))(e)]}};var QT,XT,JT,$T,eS,tS,rS,nS,oS,iS,uS,aS,sS,cS,lS,fS,pS,dS,hS,bS,yS,_S,vS,mS,gS,OS,wS,ES,PS,TS,SS,jS,CS,IS,RS,AS,MS,NS,kS,xS,DS,LS,US,FS,BS,VS,qS,WS,zS,HS,GS,YS,KS,ZS,QS,XS,JS,$S,e1,t1,r1,n1,o1,i1,u1,a1,s1,c1,l1,f1,p1,d1,h1,b1,y1,_1,v1,m1,g1,O1,w1,E1,P1,T1,S1,j1,C1,I1,R1,A1,M1,N1,k1,x1,D1,L1,U1,F1,B1,V1,q1,W1,z1,H1,G1,Y1,K1,Z1,Q1,X1,J1,$1,ej,i={},tj=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},rj=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},nj=(Object.defineProperty(i,"__esModule",{value:!0}),i.race=void 0,Wh),oj=M0;i.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return oj.raceWith.apply(void 0,rj([],tj(nj.argsOrArgArray(e))))},C=w,Object.defineProperty(C,"__esModule",{value:!0}),C.mergeAll=C.merge=C.max=C.materialize=C.mapTo=C.map=C.last=C.isEmpty=C.ignoreElements=C.groupBy=C.first=C.findIndex=C.find=C.finalize=C.filter=C.expand=C.exhaustMap=C.exhaustAll=C.exhaust=C.every=C.endWith=C.elementAt=C.distinctUntilKeyChanged=C.distinctUntilChanged=C.distinct=C.dematerialize=C.delayWhen=C.delay=C.defaultIfEmpty=C.debounceTime=C.debounce=C.count=C.connect=C.concatWith=C.concatMapTo=C.concatMap=C.concatAll=C.concat=C.combineLatestWith=C.combineLatest=C.combineLatestAll=C.combineAll=C.catchError=C.bufferWhen=C.bufferToggle=C.bufferTime=C.bufferCount=C.buffer=C.auditTime=C.audit=void 0,C.timeInterval=C.throwIfEmpty=C.throttleTime=C.throttle=C.tap=C.takeWhile=C.takeUntil=C.takeLast=C.take=C.switchScan=C.switchMapTo=C.switchMap=C.switchAll=C.subscribeOn=C.startWith=C.skipWhile=C.skipUntil=C.skipLast=C.skip=C.single=C.shareReplay=C.share=C.sequenceEqual=C.scan=C.sampleTime=C.sample=C.refCount=C.retryWhen=C.retry=C.repeatWhen=C.repeat=C.reduce=C.raceWith=C.race=C.publishReplay=C.publishLast=C.publishBehavior=C.publish=C.pluck=C.partition=C.pairwise=C.onErrorResumeNext=C.observeOn=C.multicast=C.min=C.mergeWith=C.mergeScan=C.mergeMapTo=C.mergeMap=C.flatMap=void 0,C.zipWith=C.zipAll=C.zip=C.withLatestFrom=C.windowWhen=C.windowToggle=C.windowTime=C.windowCount=C.window=C.toArray=C.timestamp=C.timeoutWith=C.timeout=void 0,QT=Ib,Object.defineProperty(C,"audit",{enumerable:!0,get:function(){return QT.audit}}),XT=Nb,Object.defineProperty(C,"auditTime",{enumerable:!0,get:function(){return XT.auditTime}}),JT=Lb,Object.defineProperty(C,"buffer",{enumerable:!0,get:function(){return JT.buffer}}),$T=qb,Object.defineProperty(C,"bufferCount",{enumerable:!0,get:function(){return $T.bufferCount}}),eS=Yb,Object.defineProperty(C,"bufferTime",{enumerable:!0,get:function(){return eS.bufferTime}}),tS=ry,Object.defineProperty(C,"bufferToggle",{enumerable:!0,get:function(){return tS.bufferToggle}}),rS=ly,Object.defineProperty(C,"bufferWhen",{enumerable:!0,get:function(){return rS.bufferWhen}}),nS=by,Object.defineProperty(C,"catchError",{enumerable:!0,get:function(){return nS.catchError}}),oS=my,Object.defineProperty(C,"combineAll",{enumerable:!0,get:function(){return oS.combineAll}}),iS=gy,Object.defineProperty(C,"combineLatestAll",{enumerable:!0,get:function(){return iS.combineLatestAll}}),uS=Uy,Object.defineProperty(C,"combineLatest",{enumerable:!0,get:function(){return uS.combineLatest}}),aS=Ly,Object.defineProperty(C,"combineLatestWith",{enumerable:!0,get:function(){return aS.combineLatestWith}}),sS=n_,Object.defineProperty(C,"concat",{enumerable:!0,get:function(){return sS.concat}}),cS=jd,Object.defineProperty(C,"concatAll",{enumerable:!0,get:function(){return cS.concatAll}}),lS=zp,Object.defineProperty(C,"concatMap",{enumerable:!0,get:function(){return lS.concatMap}}),fS=$y,Object.defineProperty(C,"concatMapTo",{enumerable:!0,get:function(){return fS.concatMapTo}}),pS=r_,Object.defineProperty(C,"concatWith",{enumerable:!0,get:function(){return pS.concatWith}}),dS=d_,Object.defineProperty(C,"connect",{enumerable:!0,get:function(){return dS.connect}}),hS=h_,Object.defineProperty(C,"count",{enumerable:!0,get:function(){return hS.count}}),bS=w_,Object.defineProperty(C,"debounce",{enumerable:!0,get:function(){return bS.debounce}}),yS=j_,Object.defineProperty(C,"debounceTime",{enumerable:!0,get:function(){return yS.debounceTime}}),_S=A,Object.defineProperty(C,"defaultIfEmpty",{enumerable:!0,get:function(){return _S.defaultIfEmpty}}),vS=N_,Object.defineProperty(C,"delay",{enumerable:!0,get:function(){return vS.delay}}),mS=k_,Object.defineProperty(C,"delayWhen",{enumerable:!0,get:function(){return mS.delayWhen}}),gS=ev,Object.defineProperty(C,"dematerialize",{enumerable:!0,get:function(){return gS.dematerialize}}),OS=ov,Object.defineProperty(C,"distinct",{enumerable:!0,get:function(){return OS.distinct}}),wS=cv,Object.defineProperty(C,"distinctUntilChanged",{enumerable:!0,get:function(){return wS.distinctUntilChanged}}),ES=hv,Object.defineProperty(C,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return ES.distinctUntilKeyChanged}}),PS=yv,Object.defineProperty(C,"elementAt",{enumerable:!0,get:function(){return PS.elementAt}}),TS=jv,Object.defineProperty(C,"endWith",{enumerable:!0,get:function(){return TS.endWith}}),SS=Mv,Object.defineProperty(C,"every",{enumerable:!0,get:function(){return SS.every}}),jS=xv,Object.defineProperty(C,"exhaust",{enumerable:!0,get:function(){return jS.exhaust}}),CS=Dv,Object.defineProperty(C,"exhaustAll",{enumerable:!0,get:function(){return CS.exhaustAll}}),IS=Lv,Object.defineProperty(C,"exhaustMap",{enumerable:!0,get:function(){return IS.exhaustMap}}),RS=zv,Object.defineProperty(C,"expand",{enumerable:!0,get:function(){return RS.expand}}),AS=eb,Object.defineProperty(C,"filter",{enumerable:!0,get:function(){return AS.filter}}),MS=Yv,Object.defineProperty(C,"finalize",{enumerable:!0,get:function(){return MS.finalize}}),NS=Zv,Object.defineProperty(C,"find",{enumerable:!0,get:function(){return NS.find}}),kS=$v,Object.defineProperty(C,"findIndex",{enumerable:!0,get:function(){return kS.findIndex}}),xS=rm,Object.defineProperty(C,"first",{enumerable:!0,get:function(){return xS.first}}),DS=cm,Object.defineProperty(C,"groupBy",{enumerable:!0,get:function(){return DS.groupBy}}),LS=F_,Object.defineProperty(C,"ignoreElements",{enumerable:!0,get:function(){return LS.ignoreElements}}),US=bm,Object.defineProperty(C,"isEmpty",{enumerable:!0,get:function(){return US.isEmpty}}),FS=vm,Object.defineProperty(C,"last",{enumerable:!0,get:function(){return FS.last}}),BS=Hp,Object.defineProperty(C,"map",{enumerable:!0,get:function(){return BS.map}}),VS=W_,Object.defineProperty(C,"mapTo",{enumerable:!0,get:function(){return VS.mapTo}}),qS=Rm,Object.defineProperty(C,"materialize",{enumerable:!0,get:function(){return qS.materialize}}),WS=km,Object.defineProperty(C,"max",{enumerable:!0,get:function(){return WS.max}}),zS=zm,Object.defineProperty(C,"merge",{enumerable:!0,get:function(){return zS.merge}}),HS=Cd,Object.defineProperty(C,"mergeAll",{enumerable:!0,get:function(){return HS.mergeAll}}),GS=Lm,Object.defineProperty(C,"flatMap",{enumerable:!0,get:function(){return GS.flatMap}}),YS=Id,Object.defineProperty(C,"mergeMap",{enumerable:!0,get:function(){return YS.mergeMap}}),KS=Um,Object.defineProperty(C,"mergeMapTo",{enumerable:!0,get:function(){return KS.mergeMapTo}}),ZS=Vm,Object.defineProperty(C,"mergeScan",{enumerable:!0,get:function(){return ZS.mergeScan}}),QS=Rd,Object.defineProperty(C,"mergeWith",{enumerable:!0,get:function(){return QS.mergeWith}}),XS=e0,Object.defineProperty(C,"min",{enumerable:!0,get:function(){return XS.min}}),JS=n0,Object.defineProperty(C,"multicast",{enumerable:!0,get:function(){return JS.multicast}}),$S=a,Object.defineProperty(C,"observeOn",{enumerable:!0,get:function(){return $S.observeOn}}),e1=a0,Object.defineProperty(C,"onErrorResumeNext",{enumerable:!0,get:function(){return e1.onErrorResumeNext}}),t1=d0,Object.defineProperty(C,"pairwise",{enumerable:!0,get:function(){return t1.pairwise}}),r1=h,Object.defineProperty(C,"partition",{enumerable:!0,get:function(){return r1.partition}}),n1=y0,Object.defineProperty(C,"pluck",{enumerable:!0,get:function(){return n1.pluck}}),o1=v0,Object.defineProperty(C,"publish",{enumerable:!0,get:function(){return o1.publish}}),i1=w0,Object.defineProperty(C,"publishBehavior",{enumerable:!0,get:function(){return i1.publishBehavior}}),u1=T0,Object.defineProperty(C,"publishLast",{enumerable:!0,get:function(){return u1.publishLast}}),a1=C0,Object.defineProperty(C,"publishReplay",{enumerable:!0,get:function(){return a1.publishReplay}}),s1=i,Object.defineProperty(C,"race",{enumerable:!0,get:function(){return s1.race}}),c1=M0,Object.defineProperty(C,"raceWith",{enumerable:!0,get:function(){return c1.raceWith}}),l1=wy,Object.defineProperty(C,"reduce",{enumerable:!0,get:function(){return l1.reduce}}),f1=U0,Object.defineProperty(C,"repeat",{enumerable:!0,get:function(){return f1.repeat}}),p1=z0,Object.defineProperty(C,"repeatWhen",{enumerable:!0,get:function(){return p1.repeatWhen}}),d1=Z0,Object.defineProperty(C,"retry",{enumerable:!0,get:function(){return d1.retry}}),h1=tg,Object.defineProperty(C,"retryWhen",{enumerable:!0,get:function(){return h1.retryWhen}}),b1=Zt,Object.defineProperty(C,"refCount",{enumerable:!0,get:function(){return b1.refCount}}),y1=ug,Object.defineProperty(C,"sample",{enumerable:!0,get:function(){return y1.sample}}),_1=fg,Object.defineProperty(C,"sampleTime",{enumerable:!0,get:function(){return _1.sampleTime}}),v1=bg,Object.defineProperty(C,"scan",{enumerable:!0,get:function(){return v1.scan}}),m1=Ey,Object.defineProperty(C,"sequenceEqual",{enumerable:!0,get:function(){return m1.sequenceEqual}}),g1=wg,Object.defineProperty(C,"share",{enumerable:!0,get:function(){return g1.share}}),O1=Rg,Object.defineProperty(C,"shareReplay",{enumerable:!0,get:function(){return O1.shareReplay}}),w1=Ng,Object.defineProperty(C,"single",{enumerable:!0,get:function(){return w1.single}}),E1=Fg,Object.defineProperty(C,"skip",{enumerable:!0,get:function(){return E1.skip}}),P1=Vg,Object.defineProperty(C,"skipLast",{enumerable:!0,get:function(){return P1.skipLast}}),T1=Hg,Object.defineProperty(C,"skipUntil",{enumerable:!0,get:function(){return T1.skipUntil}}),S1=Qg,Object.defineProperty(C,"skipWhile",{enumerable:!0,get:function(){return S1.skipWhile}}),j1=$g,Object.defineProperty(C,"startWith",{enumerable:!0,get:function(){return j1.startWith}}),C1=Ff,Object.defineProperty(C,"subscribeOn",{enumerable:!0,get:function(){return C1.subscribeOn}}),I1=nO,Object.defineProperty(C,"switchAll",{enumerable:!0,get:function(){return I1.switchAll}}),R1=oO,Object.defineProperty(C,"switchMap",{enumerable:!0,get:function(){return R1.switchMap}}),A1=lO,Object.defineProperty(C,"switchMapTo",{enumerable:!0,get:function(){return A1.switchMapTo}}),M1=dO,Object.defineProperty(C,"switchScan",{enumerable:!0,get:function(){return M1.switchScan}}),N1=x_,Object.defineProperty(C,"take",{enumerable:!0,get:function(){return N1.take}}),k1=mm,Object.defineProperty(C,"takeLast",{enumerable:!0,get:function(){return k1.takeLast}}),x1=yO,Object.defineProperty(C,"takeUntil",{enumerable:!0,get:function(){return x1.takeUntil}}),D1=OO,Object.defineProperty(C,"takeWhile",{enumerable:!0,get:function(){return D1.takeWhile}}),L1=PO,Object.defineProperty(C,"tap",{enumerable:!0,get:function(){return L1.tap}}),U1=_,Object.defineProperty(C,"throttle",{enumerable:!0,get:function(){return U1.throttle}}),F1=MO,Object.defineProperty(C,"throttleTime",{enumerable:!0,get:function(){return F1.throttleTime}}),B1=_v,Object.defineProperty(C,"throwIfEmpty",{enumerable:!0,get:function(){return B1.throwIfEmpty}}),V1=DO,Object.defineProperty(C,"timeInterval",{enumerable:!0,get:function(){return V1.timeInterval}}),q1=cf,Object.defineProperty(C,"timeout",{enumerable:!0,get:function(){return q1.timeout}}),W1=VO,Object.defineProperty(C,"timeoutWith",{enumerable:!0,get:function(){return W1.timeoutWith}}),z1=Kf,Object.defineProperty(C,"timestamp",{enumerable:!0,get:function(){return z1.timestamp}}),H1=Oy,Object.defineProperty(C,"toArray",{enumerable:!0,get:function(){return H1.toArray}}),G1=F,Object.defineProperty(C,"window",{enumerable:!0,get:function(){return G1.window}}),Y1=JO,Object.defineProperty(C,"windowCount",{enumerable:!0,get:function(){return Y1.windowCount}}),K1=nw,Object.defineProperty(C,"windowTime",{enumerable:!0,get:function(){return K1.windowTime}}),Z1=xf,Object.defineProperty(C,"windowToggle",{enumerable:!0,get:function(){return Z1.windowToggle}}),Q1=E,Object.defineProperty(C,"windowWhen",{enumerable:!0,get:function(){return Q1.windowWhen}}),X1=Pw,Object.defineProperty(C,"withLatestFrom",{enumerable:!0,get:function(){return X1.withLatestFrom}}),J1=O,Object.defineProperty(C,"zip",{enumerable:!0,get:function(){return J1.zip}}),$1=p,Object.defineProperty(C,"zipAll",{enumerable:!0,get:function(){return $1.zipAll}}),ej=I,Object.defineProperty(C,"zipWith",{enumerable:!0,get:function(){return ej.zipWith}});var P={},ij=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},uj=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},aj=(Object.defineProperty(P,"__esModule",{value:!0}),e),sj=po,cj=w,lj=0,fj=1,pj=2;function dj(e,t){e=e.pipe((0,cj.publishReplay)(1),(0,cj.refCount)());this._result=e,this._keys=e.pipe((0,cj.mergeMap)(function(e){return(0,sj.from)(e.keys())}),(0,cj.publishReplay)(1),(0,cj.refCount)()),this._records=void 0,this._controls=new hj,this._summary=new sj.ReplaySubject,this._state=t||lj}dj.prototype.keys=function(){return this._keys},dj.prototype.records=function(){var r=this,e=this._result.pipe((0,cj.mergeMap)(function(t){return new sj.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},dj.prototype.consume=function(){var r=this;return this._result.pipe((0,cj.mergeMap)(function(t){return new sj.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},dj.prototype.pause=function(){this._controls.pause()},dj.prototype.resume=function(){return this._controls.resume()},dj.prototype.push=function(){return this._controls.push()},dj.prototype._startStreaming=function(e){var e=void 0===e?{}:e,t=e.result,r=e.recordsObserver,r=void 0===r?null:r,e=e.summaryObserver,e=void 0===e?null:e,n=[];return e&&n.push(this._summary.subscribe(e)),this._state<fj?(this._state=fj,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,aj.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},dj.prototype._toObservable=function(){var n=this;return new sj.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new dj((t=e,new sj.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},dj.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new hj);var a=new sj.Subject,s=function(n){return ij(e,void 0,void 0,function(){var t,r;return uj(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),u.pushing=!0,[4,n];case 1:return t=e.sent(),r=t.done,t=t.value,r?(a.complete(),i.complete()):(a.next(t),u.paused||s(o.next()).catch(function(){})),[3,4];case 2:return r=e.sent(),a.error(r),i.error(r),[3,4];case 3:return u.pushing=!1,[7];case 4:return[2]}})})};function t(t){return ij(this,void 0,void 0,function(){return uj(this,function(e){switch(e.label){case 0:return[4,s(o.next(t))];case 1:return e.sent(),[2]}})})}return(u.pusher=t)(),a}(n[Symbol.asyncIterator](),{complete:function(){return ij(t,void 0,void 0,function(){var t,r;return uj(this,function(e){switch(e.label){case 0:return this._state=pj,r=(t=this._summary).next,[4,n.summary()];case 1:return r.apply(t,[e.sent()]),this._summary.complete(),[2]}})})},error:function(e){t._state=pj,t._summary.error(e)}},this._controls)),this._records},P.default=dj;bj.prototype.pause=function(){this._paused=!0},Object.defineProperty(bj.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(bj.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),bj.prototype.resume=function(){return ij(this,void 0,void 0,function(){var t;return uj(this,function(e){switch(e.label){case 0:return t=this._paused,this._paused=!1,!t||this._pushing?[3,2]:[4,this._push()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},bj.prototype.push=function(){return ij(this,void 0,void 0,function(){return uj(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(bj.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var hj=bj;function bj(e){void 0===e&&(e=function(){return ij(t,void 0,void 0,function(){return uj(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var m={},l=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},yj=(Object.defineProperty(m,"__esModule",{value:!0}),po),_j=l(P);function vj(e){this._txc=e}l(e),vj.prototype.run=function(e,r){var n=this;return new _j.default(new yj.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},vj.prototype.commit=function(){var e=this;return new yj.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},vj.prototype.rollback=function(){var e=this;return new yj.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},vj.prototype.isOpen=function(){return this._txc.isOpen()},vj.prototype.close=function(){var e=this;return new yj.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},m.default=vj;uo={},xo=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function mj(e){e=e.run;this._run=e}Object.defineProperty(uo,"__esModule",{value:!0}),xo(P),xo(m),mj.fromTransaction=function(e){return new mj({run:e.run.bind(e)})},mj.prototype.run=function(e,t){return this._run(e,t)},uo.default=mj;var j={},gj=(Object.defineProperty(j,"__esModule",{value:!0}),e),Oj=po,wj=w,Ej=(gj.internal.logger.Logger,gj.error.SERVICE_UNAVAILABLE);function Pj(e){var e=void 0===e?{}:e,t=e.maxRetryTimeout,r=e.initialDelay,r=void 0===r?1e3:r,n=e.delayMultiplier,n=void 0===n?2:n,o=e.delayJitter,o=void 0===o?.2:o,e=e.logger,e=void 0===e?null:e;this._maxRetryTimeout=Tj(void 0===t?3e4:t,3e4),this._initialDelay=Tj(r,1e3),this._delayMultiplier=Tj(n,2),this._delayJitter=Tj(o,.2),this._logger=e}function Tj(e,t){return e||0===e?e:t}Pj.prototype.retry=function(e){var a=this;return e.pipe((0,wj.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,wj.mergeMap)(function(e){var t,r;return(0,gj.isRetryableError)(e)?(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout?((t=(0,gj.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),Ej)).seenErrors=n,(0,Oj.throwError)(function(){return t})):(r=a._computeNextDelay(u),u*=a._delayMultiplier,i++,a._logger&&a._logger.warn("Transaction failed and will be retried in ".concat(r)),(0,Oj.of)(1).pipe((0,wj.delay)(r)))):(0,Oj.throwError)(function(){return e})}))}))},Pj.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},j.default=Pj;var T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sj=(Object.defineProperty(bn,"__esModule",{value:!0}),po),jj=w,Cj=T(P),t=e,Ij=T(m),Rj=T(uo),Aj=T(j),S=t.internal.constants,Mj=S.ACCESS_MODE_READ,Nj=S.ACCESS_MODE_WRITE,kj=S.TELEMETRY_APIS,xj=t.internal.txConfig.TxConfig;function Dj(e){var e=void 0===e?{}:e,t=e.session,r=e.config,e=e.log;this._session=t,this._retryLogic=(e=>(e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null,new Aj.default({maxRetryTimeout:e})))(r),this._log=e}Dj.prototype.run=function(e,r,n){var o=this;return new Cj.default(new Sj.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},Dj.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:kj.UNMANAGED_TRANSACTION})},Dj.prototype.executeRead=function(e,t){return this._executeInTransaction(Mj,e,t)},Dj.prototype.executeWrite=function(e,t){return this._executeInTransaction(Nj,e,t)},Dj.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new Rj.default({run:e.run.bind(e)})})},Dj.prototype.close=function(){var e=this;return new Sj.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},Dj.prototype[Symbol.asyncDispose]=function(){return this.close()},Dj.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},Dj.prototype._beginTransaction=function(e,t,r){var n=this,o=xj.empty();return t&&(o=new xj(t,this._log)),new Sj.Observable(function(t){try{n._session._beginTransaction(e,o,r).then(function(e){t.next(new Ij.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},Dj.prototype._runTransaction=function(e,r,t,n){var o=this,i=(void 0===n&&(n=function(e){return e}),xj.empty()),u=(t&&(i=new xj(t)),{apiTelemetryConfig:{api:kj.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}});return this._retryLogic.retry((0,Sj.of)(1).pipe((0,jj.mergeMap)(function(){return o._beginTransaction(e,i,u.apiTelemetryConfig)}),(0,jj.mergeMap)(function(t){return(0,Sj.defer)(function(){try{return r(n(t))}catch(e){return(0,Sj.throwError)(function(){return e})}}).pipe((0,jj.catchError)(function(e){return t.rollback().pipe((0,jj.concatWith)((0,Sj.throwError)(function(){return e})))}),(0,jj.concatWith)(t.commit()))})))},bn.default=Dj;var Lj,Uj,G=r&&r.__extends||(Lj=function(e,t){return(Lj=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])}))(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}Lj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zn=(Object.defineProperty(U,"__esModule",{value:!0}),U.WRITE=U.READ=U.Driver=void 0,e),Fj=o(bn),Bj=Zn.internal.constants.FETCH_ALL,y=Zn.driver.READ,Vj=Zn.driver.WRITE,u=(U.READ=y,U.WRITE=Vj,G(qj,Uj=Zn.Driver),qj.prototype.rxSession=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.database,n=e.bookmarkManager,o=e.notificationFilter,i=e.disableAutoCommitRetries;return new Fj.default({session:this._newSession({defaultAccessMode:void 0===t?Vj:t,bookmarkOrBookmarks:e.bookmarks,database:void 0===r?"":r,impersonatedUser:e.impersonatedUser,auth:e.auth,reactive:!1,fetchSize:((e,t)=>{if(0<(e=parseInt(e,10))||e===Bj)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(Bj," for ALL. However fetchSize = ").concat(e));return t})(e.fetchSize,this._config.fetchSize),bookmarkManager:n,notificationFilter:o,log:this._log,disableAutoCommitRetries:i}),config:this._config,log:this._log})},qj);function qj(){return null!==Uj&&Uj.apply(this,arguments)||this}U.Driver=u,U.default=u;fe={},Object.defineProperty(fe,"__esModule",{value:!0}),fe.default="6.1.0",Rt={},of={},Xl={};function Wj(){}Object.defineProperty(Xl,"__esModule",{value:!0}),Wj.prototype.selectReader=function(e){throw new Error("Abstract function")},Wj.prototype.selectWriter=function(e){throw new Error("Abstract function")},Xl.default=Wj;ef={},rf={};function zj(e){this._offset=e||0}Object.defineProperty(rf,"__esModule",{value:!0}),zj.prototype.next=function(e){var t;return 0===e?-1:(t=this._offset,this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),t%e)},rf.default=zj;var Hj,Gj,Zl=r&&r.__extends||(Hj=function(e,t){return(Hj=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])}))(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}Hj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),np=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Yj=(Object.defineProperty(ef,"__esModule",{value:!0}),np(rf)),Ar=np(Xl),zf=(Gj=Ar.default,Zl(Kj,Gj),Kj.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},Kj.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},Kj.prototype._select=function(e,t){var r=e.length;if(0===r)return null;var n=t.next(r),o=n,i=null,u=Number.MAX_SAFE_INTEGER;do{var a=e[o],s=this._connectionPool.activeResourceCount(a)}while(s<u&&(i=a,u=s),o===r-1?o=0:o++,o!==n);return i},Kj);function Kj(e){var t=Gj.call(this)||this;return t._readersIndex=new Yj.default,t._writersIndex=new Yj.default,t._connectionPool=e,t}ef.default=zf;g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(of,"__esModule",{value:!0}),of.LeastConnectedLoadBalancingStrategy=of.LoadBalancingStrategy=void 0,nf=g(Xl),of.LoadBalancingStrategy=nf.default,ad=g(ef),of.LeastConnectedLoadBalancingStrategy=ad.default,of.default=ad.default,n={},Sd={},Hd={},Gd={},$d={},Hl={},cd={},hd={byteLength:function(e){var e=tC(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};hd.toByteArray=function(e){var t,r,n=tC(e),o=n[0],n=n[1],i=new Xj(((e,t)=>3*(e+t)/4-t)(o,n)),u=0,a=0<n?o-4:o;for(r=0;r<a;r+=4)t=Qj[e.charCodeAt(r)]<<18|Qj[e.charCodeAt(r+1)]<<12|Qj[e.charCodeAt(r+2)]<<6|Qj[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=Qj[e.charCodeAt(r)]<<2|Qj[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=Qj[e.charCodeAt(r)]<<10|Qj[e.charCodeAt(r+1)]<<4|Qj[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},hd.fromByteArray=function(e){for(var t,r=e.length,n=r%3,o=[],i=0,u=r-n;i<u;i+=16383)o.push(((e,t,r)=>{for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push((e=>Zj[e>>18&63]+Zj[e>>12&63]+Zj[e>>6&63]+Zj[63&e])(n));return o.join("")})(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(Zj[t>>2]+Zj[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(Zj[t>>10]+Zj[t>>4&63]+Zj[t<<2&63]+"="));return o.join("")};for(var Zj=[],Qj=[],Xj="undefined"!=typeof Uint8Array?Uint8Array:Array,Jj="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$j=0,eC=Jj.length;$j<eC;++$j)Zj[$j]=Jj[$j],Qj[Jj.charCodeAt($j)]=$j;function tC(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");e=e.indexOf("="),t=(e=-1===e?t:e)===t?0:4-e%4;return[e,t]}Qj["-".charCodeAt(0)]=62,Qj["_".charCodeAt(0)]=63;Kl={read:function(e,t,r,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,c=s>>1,l=-7,f=r?o-1:0,p=r?-1:1,o=e[t+f];for(f+=p,i=o&(1<<-l)-1,o>>=-l,l+=a;0<l;i=256*i+e[t+f],f+=p,l-=8);for(u=i&(1<<-l)-1,i>>=-l,l+=n;0<l;u=256*u+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===s)return u?NaN:1/0*(o?-1:1);u+=Math.pow(2,n),i-=c}return(o?-1:1)*u*Math.pow(2,i-n)},write:function(e,t,r,n,o,i){var u,a,s=8*i-o-1,c=(1<<s)-1,l=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-u))<1&&(u--,n*=2),2<=(t+=1<=u+l?f/n:f*Math.pow(2,1-l))*n&&(u++,n/=2),c<=u+l?(a=0,u=c):1<=u+l?(a=(t*n-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));8<=o;e[r+p]=255&a,p+=d,a/=256,o-=8);for(u=u<<o|a,s+=o;0<s;e[r+p]=255&u,p+=d,u/=256,s-=8);e[r+p-d]|=128*i}};{var rC=cd;let b=hd,i=Kl,t=(Qf="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,rC.Buffer=M,rC.SlowBuffer=function(e){+e!=e&&(e=0);return M.alloc(+e)},rC.INSPECT_MAX_BYTES=50,2147483647);function nC(e){if(e>t)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,M.prototype),e}function M(e,t,r){if("number"!=typeof e)return oC(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return uC(e)}function oC(n,o,e){if("string"==typeof n){var i=n;var u=o;if(!M.isEncoding(u="string"==typeof u&&""!==u?u:"utf8"))throw new TypeError("Unknown encoding: "+u);let e=0|lC(i,u),t=nC(e),r=t.write(i,u);return t=r!==e?t.slice(0,r):t}if(ArrayBuffer.isView(n))return NC(i=n,Uint8Array)?sC((u=new Uint8Array(i)).buffer,u.byteOffset,u.byteLength):aC(i);if(null!=n){if(NC(n,ArrayBuffer)||n&&NC(n.buffer,ArrayBuffer))return sC(n,o,e);if("undefined"!=typeof SharedArrayBuffer&&(NC(n,SharedArrayBuffer)||n&&NC(n.buffer,SharedArrayBuffer)))return sC(n,o,e);if("number"==typeof n)throw new TypeError('The "value" argument must not be of type number. Received type number');var t=n.valueOf&&n.valueOf();if(null!=t&&t!==n)return M.from(t,o,e);t=(e=>{var t,r;return M.isBuffer(e)?(t=0|cC(e.length),0!==(r=nC(t)).length&&e.copy(r,0,0,t),r):void 0!==e.length?"number"!=typeof e.length||kC(e.length)?nC(0):aC(e):"Buffer"===e.type&&Array.isArray(e.data)?aC(e.data):void 0})(n);if(t)return t;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof n[Symbol.toPrimitive])return M.from(n[Symbol.toPrimitive]("string"),o,e)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}function iC(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 uC(e){return iC(e),nC(e<0?0:0|cC(e))}function aC(t){var r=t.length<0?0:0|cC(t.length),n=nC(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function sC(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');let 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,M.prototype),n}function cC(e){if(e>=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");return 0|e}function lC(e,t){if(M.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||NC(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return RC(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return AC(e).length;default:if(o)return n?-1:RC(e).length;t=(""+t).toLowerCase(),o=!0}}function fC(e,n,o){let t=!1;if((n=void 0===n||n<0?0:n)>this.length)return"";if((o=void 0===o||o>this.length?this.length:o)<=0)return"";if((o>>>=0)<=(n>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":{var r=this;var i=n;var u=o;var a=r.length;(!u||u<0||a<u)&&(u=a);let t="";for(let e=i=!i||i<0?0:i;e<u;++e)t+=y[r[e]];return t;return}case"utf8":case"utf-8":return _C(this,n,o);case"ascii":{var s=this;a=n;var c=o;let t="";c=Math.min(s.length,c);for(let e=a;e<c;++e)t+=String.fromCharCode(127&s[e]);return t;return}case"latin1":case"binary":{var l=this;i=n;var f=o;let t="";f=Math.min(l.length,f);for(let e=i;e<f;++e)t+=String.fromCharCode(l[e]);return t;return}case"base64":return p=this,h=o,0===(d=n)&&h===p.length?b.fromByteArray(p):b.fromByteArray(p.slice(d,h));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":{p=this;d=n;h=o;let t=p.slice(d,h),r="";for(let e=0;e<t.length-1;e+=2)r+=String.fromCharCode(t[e]+256*t[e+1]);return r;return}default:if(t)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),t=!0}var p,d,h}function pC(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function dC(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=kC(r=+r)?o?0:e.length-1:r)<0&&(r=e.length+r),e.length<=r){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=M.from(t,n)),M.isBuffer(t))return 0===t.length?-1:hC(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):hC(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function hC(r,n,t,e,o){let i=1,u=r.length,a=n.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(r.length<2||n.length<2)return-1;i=2,u/=2,a/=2,t/=2}function s(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}let c;if(o){let e=-1;for(c=t;c<u;c++)if(s(r,c)===s(n,-1===e?0:c-e)){if(-1===e&&(e=c),c-e+1===a)return e*i}else-1!==e&&(c-=c-e),e=-1}else for(t+a>u&&(t=u-a),c=t;0<=c;c--){let t=!0;for(let e=0;e<a;e++)if(s(r,c+e)!==s(n,e)){t=!1;break}if(t)return c}return-1}function bC(e,t,r,n){return MC((t=>{var r=[];for(let e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r})(t),e,r,n)}function yC(e,t,r,n){return MC(((t,r)=>{let n,o,i=[];for(let e=0;e<t.length&&!((r-=2)<0);++e)n=t.charCodeAt(e),o=n>>8,i.push(n%256),i.push(o);return i})(t,e.length-r),e,r,n)}function _C(u,e,t){t=Math.min(u.length,t);var r=[];let a=e;for(;a<t;){var s=u[a];let o=null,i=239<s?4:223<s?3:191<s?2:1;if(a+i<=t){let e,t,r,n;switch(i){case 1:s<128&&(o=s);break;case 2:128==(192&(e=u[a+1]))&&127<(n=(31&s)<<6|63&e)&&(o=n);break;case 3:e=u[a+1],t=u[a+2],128==(192&e)&&128==(192&t)&&2047<(n=(15&s)<<12|(63&e)<<6|63&t)&&(n<55296||57343<n)&&(o=n);break;case 4:e=u[a+1],t=u[a+2],r=u[a+3],128==(192&e)&&128==(192&t)&&128==(192&r)&&65535<(n=(15&s)<<18|(63&e)<<12|(63&t)<<6|63&r)&&n<1114112&&(o=n)}}null===o?(o=65533,i=1):65535<o&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}{var n=r,o=n.length;if(o<=c)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=c));return e}}rC.kMaxLength=t,(M.TYPED_ARRAY_SUPPORT=(()=>{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}})())||"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(M.prototype,"parent",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.buffer}}),Object.defineProperty(M.prototype,"offset",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.byteOffset}}),M.poolSize=8192,M.from=oC,Object.setPrototypeOf(M.prototype,Uint8Array.prototype),Object.setPrototypeOf(M,Uint8Array),M.alloc=function(e,t,r){return t=t,r=r,iC(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?nC(e).fill(t,r):nC(e).fill(t):nC(e)},M.allocUnsafe=uC,M.allocUnsafeSlow=uC,M.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==M.prototype},M.compare=function(r,n){if(NC(r,Uint8Array)&&(r=M.from(r,r.offset,r.byteLength)),NC(n,Uint8Array)&&(n=M.from(n,n.offset,n.byteLength)),!M.isBuffer(r)||!M.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;let o=r.length,i=n.length;for(let e=0,t=Math.min(o,i);e<t;++e)if(r[e]!==n[e]){o=r[e],i=n[e];break}return o<i?-1:i<o?1:0},M.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}},M.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return M.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=M.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(NC(e,Uint8Array))o+e.length>n.length?(e=M.isBuffer(e)?e:M.from(e)).copy(n,o):Uint8Array.prototype.set.call(n,e,o);else{if(!M.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},M.byteLength=lC,M.prototype._isBuffer=!0,M.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)pC(this,e,e+1);return this},M.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)pC(this,e,e+3),pC(this,e+1,e+2);return this},M.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)pC(this,e,e+7),pC(this,e+1,e+6),pC(this,e+2,e+5),pC(this,e+3,e+4);return this},M.prototype.toLocaleString=M.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?_C(this,0,e):fC.apply(this,arguments)},M.prototype.equals=function(e){if(M.isBuffer(e))return this===e||0===M.compare(this,e);throw new TypeError("Argument must be a Buffer")},M.prototype.inspect=function(){let e="";var t=rC.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},Qf&&(M.prototype[Qf]=M.prototype.inspect),M.prototype.compare=function(e,t,r,n,o){if(NC(e,Uint8Array)&&(e=M.from(e,e.offset,e.byteLength)),!M.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=t)return 0;if(o<=n)return-1;if(r<=t)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),u=(r>>>=0)-(t>>>=0);var a=Math.min(i,u),s=this.slice(n,o),c=e.slice(t,r);for(let e=0;e<a;++e)if(s[e]!==c[e]){i=s[e],u=c[e];break}return i<u?-1:u<i?1:0},M.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},M.prototype.indexOf=function(e,t,r){return dC(this,e,t,r,!0)},M.prototype.lastIndexOf=function(e,t,r){return dC(this,e,t,r,!1)},M.prototype.write=function(t,r,n,e){if(void 0===r)e="utf8",n=this.length,r=0;else if(void 0===n&&"string"==typeof r)e=r,n=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(n)?(n>>>=0,void 0===e&&(e="utf8")):(e=n,n=void 0)}var o,i,u,a=this.length-r;if((void 0===n||a<n)&&(n=a),0<t.length&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");e=e||"utf8";let s=!1;for(;;)switch(e){case"hex":{var c=this;var l=t;var f=r;var p=n;f=Number(f)||0;var d=c.length-f;(!p||d<(p=Number(p)))&&(p=d),(d=l.length)/2<p&&(p=d/2);let e;for(e=0;e<p;++e){var h=parseInt(l.substr(2*e,2),16);if(kC(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,MC(RC(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return bC(this,t,r,n);case"base64":return i=this,u=r,o=n,MC(AC(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return yC(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),s=!0}},M.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let c=4096;function vC(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function mC(e,t,r,n,o,i){if(!M.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<t||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function gC(e,t,r,n,o){jC(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r++]=n,e[r++]=n>>=8,e[r++]=n>>=8,e[r++]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,e[r++]=o>>=8,e[r++]=o>>=8,e[r++]=o>>=8,r}function OC(e,t,r,n,o){jC(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r+7]=n,e[r+6]=n>>=8,e[r+5]=n>>=8,e[r+4]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,e[r+2]=o>>=8,e[r+1]=o>>=8,e[r]=o>>=8,r+8}function wC(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function EC(e,t,r,n,o){return t=+t,r>>>=0,o||wC(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function PC(e,t,r,n,o){return t=+t,r>>>=0,o||wC(e,0,r,8),i.write(e,t,r,n,52,8),r+8}M.prototype.slice=function(e,t){var r=this.length,r=((e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e),this.subarray(e,t));return Object.setPrototypeOf(r,M.prototype),r},M.prototype.readUintLE=M.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||vC(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},M.prototype.readUintBE=M.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||vC(e,t,this.length);let n=this[e+--t],o=1;for(;0<t&&(o*=256);)n+=this[e+--t]*o;return n},M.prototype.readUint8=M.prototype.readUInt8=function(e,t){return e>>>=0,t||vC(e,1,this.length),this[e]},M.prototype.readUint16LE=M.prototype.readUInt16LE=function(e,t){return e>>>=0,t||vC(e,2,this.length),this[e]|this[e+1]<<8},M.prototype.readUint16BE=M.prototype.readUInt16BE=function(e,t){return e>>>=0,t||vC(e,2,this.length),this[e]<<8|this[e+1]},M.prototype.readUint32LE=M.prototype.readUInt32LE=function(e,t){return e>>>=0,t||vC(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},M.prototype.readUint32BE=M.prototype.readUInt32BE=function(e,t){return e>>>=0,t||vC(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},M.prototype.readBigUInt64LE=xC(function(e){CC(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||IC(e,this.length-8),t+256*this[++e]+65536*this[++e]+this[++e]*2**24),e=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(t)+(BigInt(e)<<BigInt(32))}),M.prototype.readBigUInt64BE=xC(function(e){CC(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||IC(e,this.length-8),t*2**24+65536*this[++e]+256*this[++e]+this[++e]),e=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(t)<<BigInt(32))+BigInt(e)}),M.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||vC(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},M.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||vC(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;0<n&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},M.prototype.readInt8=function(e,t){return e>>>=0,t||vC(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},M.prototype.readInt16LE=function(e,t){e>>>=0,t||vC(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},M.prototype.readInt16BE=function(e,t){e>>>=0,t||vC(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},M.prototype.readInt32LE=function(e,t){return e>>>=0,t||vC(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},M.prototype.readInt32BE=function(e,t){return e>>>=0,t||vC(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},M.prototype.readBigInt64LE=xC(function(e){CC(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||IC(e,this.length-8),this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24));return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),M.prototype.readBigInt64BE=xC(function(e){CC(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||IC(e,this.length-8),(t<<24)+65536*this[++e]+256*this[++e]+this[++e]);return(BigInt(t)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),M.prototype.readFloatLE=function(e,t){return e>>>=0,t||vC(e,4,this.length),i.read(this,e,!0,23,4)},M.prototype.readFloatBE=function(e,t){return e>>>=0,t||vC(e,4,this.length),i.read(this,e,!1,23,4)},M.prototype.readDoubleLE=function(e,t){return e>>>=0,t||vC(e,8,this.length),i.read(this,e,!0,52,8)},M.prototype.readDoubleBE=function(e,t){return e>>>=0,t||vC(e,8,this.length),i.read(this,e,!1,52,8)},M.prototype.writeUintLE=M.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||mC(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},M.prototype.writeUintBE=M.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||mC(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;0<=--o&&(i*=256);)this[t+o]=e/i&255;return t+r},M.prototype.writeUint8=M.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||mC(this,e,t,1,255,0),this[t]=255&e,t+1},M.prototype.writeUint16LE=M.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||mC(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},M.prototype.writeUint16BE=M.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||mC(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},M.prototype.writeUint32LE=M.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||mC(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},M.prototype.writeUint32BE=M.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||mC(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},M.prototype.writeBigUInt64LE=xC(function(e,t=0){return gC(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),M.prototype.writeBigUInt64BE=xC(function(e,t=0){return OC(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),M.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||mC(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=0,i=1,u=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===u&&0!==this[t+o-1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},M.prototype.writeIntBE=function(e,t,r,n){e=+e,t>>>=0,n||mC(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=r-1,i=1,u=0;for(this[t+o]=255&e;0<=--o&&(i*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},M.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||mC(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},M.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||mC(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},M.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||mC(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},M.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||mC(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},M.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||mC(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},M.prototype.writeBigInt64LE=xC(function(e,t=0){return gC(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),M.prototype.writeBigInt64BE=xC(function(e,t=0){return OC(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),M.prototype.writeFloatLE=function(e,t,r){return EC(this,e,t,!0,r)},M.prototype.writeFloatBE=function(e,t,r){return EC(this,e,t,!1,r)},M.prototype.writeDoubleLE=function(e,t,r){return PC(this,e,t,!0,r)},M.prototype.writeDoubleBE=function(e,t,r){return PC(this,e,t,!1,r)},M.prototype.copy=function(e,t,r,n){if(!M.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),(n=0<n&&n<r?r:n)===r)return 0;if(0===e.length||0===this.length)return 0;if((t=t||0)<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);var o=(n=e.length-t<n-r?e.length-t+r: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),o},M.prototype.fill=function(t,r,n,o){if("string"==typeof t){if("string"==typeof r?(o=r,r=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!M.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var e;1===t.length&&(e=t.charCodeAt(0),"utf8"===o&&e<128||"latin1"===o)&&(t=e)}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(!(n<=r)){r>>>=0,n=void 0===n?this.length:n>>>0;let e;if("number"==typeof(t=t||0))for(e=r;e<n;++e)this[e]=t;else{var i=M.isBuffer(t)?t:M.from(t,o),u=i.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(e=0;e<n-r;++e)this[e+r]=i[e%u]}}return this};let a={};function TC(e,t,r){a[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=this.name+` [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return this.name+` [${e}]: `+this.message}}}function SC(e){let t="",r=e.length;for(var n="-"===e[0]?1:0;r>=4+n;r-=3)t="_"+e.slice(r-3,r)+t;return""+e.slice(0,r)+t}function jC(t,r,n,e,o,i){if(n<t||t<r){var u="bigint"==typeof r?"n":"";let e;throw e=3<i?0===r||r===BigInt(0)?`>= 0${u} and < 2${u} ** `+8*(i+1)+u:`>= -(2${u} ** ${8*(i+1)-1}${u}) and < 2 ** `+(8*(i+1)-1)+u:`>= ${r}${u} and <= `+n+u,new a.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,CC(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||IC(u,r.length-(n+1))}function CC(e,t){if("number"!=typeof e)throw new a.ERR_INVALID_ARG_TYPE(t,"number",e)}function IC(e,t,r){if(Math.floor(e)!==e)throw CC(e,r),new a.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new a.ERR_BUFFER_OUT_OF_BOUNDS;throw new a.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}TC("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),TC("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),TC("ERR_OUT_OF_RANGE",function(e,t,r){e=`The value of "${e}" is out of range.`;let n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=SC(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=SC(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);let r=/[^+/0-9A-Za-z-_]/g;function RC(t,r){r=r||1/0;let n;var o=t.length;let i=null;var u=[];for(let e=0;e<o;++e){if(55295<(n=t.charCodeAt(e))&&n<57344){if(!i){if(56319<n){-1<(r-=3)&&u.push(239,191,189);continue}if(e+1===o){-1<(r-=3)&&u.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(r-=3)&&u.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(r-=3)&&u.push(239,191,189);if(i=null,n<128){if(--r<0)break;u.push(n)}else if(n<2048){if((r-=2)<0)break;u.push(n>>6|192,63&n|128)}else if(n<65536){if((r-=3)<0)break;u.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;u.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return u}function AC(e){return b.toByteArray((e=>{if((e=(e=e.split("=")[0]).trim().replace(r,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e})(e))}function MC(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function NC(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function kC(e){return e!=e}let y=(()=>{var r="0123456789abcdef",n=new Array(256);for(let t=0;t<16;++t){var o=16*t;for(let e=0;e<16;++e)n[o+e]=r[t]+r[e]}return n})();function xC(e){return"undefined"==typeof BigInt?DC:e}function DC(){throw new Error("BigInt not supported")}}var LC,jh={},Bl={},v=r&&r.__extends||(LC=function(e,t){return(LC=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])}))(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}LC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),qh=(Object.defineProperty(Bl,"__esModule",{value:!0}),N.prototype.getUInt8=function(e){throw new Error("Not implemented")},N.prototype.getInt8=function(e){throw new Error("Not implemented")},N.prototype.getFloat64=function(e){throw new Error("Not implemented")},N.prototype.getVarInt=function(e){throw new Error("Not implemented")},N.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},N.prototype.putInt8=function(e,t){throw new Error("Not implemented")},N.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},N.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},N.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},N.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},N.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},N.prototype.getInt64=function(e){return this.getInt8(e)<<56|this.getUInt8(e+1)<<48|this.getUInt8(e+2)<<40|this.getUInt8(e+3)<<32|this.getUInt8(e+4)<<24|this.getUInt8(e+5)<<16|this.getUInt8(e+6)<<8|this.getUInt8(e+7)},N.prototype.getSlice=function(e,t){return new FC(e,t,this)},N.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},N.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},N.prototype.putInt32=function(e,t){this.putInt8(e,t>>24),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},N.prototype.putUInt32=function(e,t){this.putUInt8(e,t>>24&255),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},N.prototype.putInt64=function(e,t){this.putInt8(e,t>>48),this.putUInt8(e+1,t>>42&255),this.putUInt8(e+2,t>>36&255),this.putUInt8(e+3,t>>30&255),this.putUInt8(e+4,t>>24&255),this.putUInt8(e+5,t>>16&255),this.putUInt8(e+6,t>>8&255),this.putUInt8(e+7,255&t)},N.prototype.putVarInt=function(e,t){for(var r=0;1<t;){var n=t%128;128<=t&&(n+=128),t/=128,this.putUInt8(e+r,n),r+=1}return r},N.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},N.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},N.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},N.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},N.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},N.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},N.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},N.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},N.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},N.prototype.readVarInt=function(){var e=this.getVarInt(this.position);return this._updatePos(e.length),e.value},N.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},N.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},N.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},N.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},N.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},N.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},N.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},N.prototype.writeVarInt=function(e){e=this.putVarInt(this.position,e);this._updatePos(e)},N.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},N.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},N.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},N.prototype.remaining=function(){return this.length-this.position},N.prototype.hasRemaining=function(){return 0<this.remaining()},N.prototype.reset=function(){this.position=0},N.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},N.prototype.toHex=function(){for(var e="",t=0;t<this.length;t++){var r=this.getUInt8(t).toString(16);e+=r=1===r.length?"0"+r:r,t!==this.length-1&&(e+=" ")}return e},N);function N(e){this.position=0,this.length=e}Bl.default=qh;v(BC,UC=qh),BC.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},BC.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},BC.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},BC.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},BC.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},BC.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var UC,FC=BC;function BC(e,t,r){t=UC.call(this,t)||this;return t._start=e,t._inner=r,t}var VC,qC,Qh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Jh=(Object.defineProperty(jh,"__esModule",{value:!0}),jh.BaseBuffer=void 0,Qh(Bl)),ub=(jh.BaseBuffer=Jh.default,jh.default=Jh.default,r&&r.__extends||(VC=function(e,t){return(VC=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])}))(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}VC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),pb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},WC=(Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.alloc=function(e){return new zC(e)},pb(cd)),Yl=pb(jh),zC=(qC=Yl.default,ub(HC,qC),HC.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},HC.prototype.getInt8=function(e){return this._buffer.readInt8(e)},HC.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},HC.prototype.getVarInt=function(e){for(var t=0,r=this._buffer.readInt8(e+t),n=r%128;1<=r/128;)n+=(r=this._buffer.readInt8(e+(t+=1)))%128;return{length:t+1,value:n}},HC.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},HC.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},HC.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},HC.prototype.putBytes=function(e,t){var r;t instanceof HC?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):qC.prototype.putBytes.call(this,e,t)},HC.prototype.getSlice=function(e,t){return new HC(this._buffer.slice(e,e+t))},HC);function HC(e){var t=this,e=(e=e)instanceof WC.default.Buffer?e:"number"==typeof e&&"function"==typeof WC.default.Buffer.alloc?WC.default.Buffer.alloc(e):new WC.default.Buffer(e);return(t=qC.call(this,e.length)||this)._buffer=e,t}Hl.default=zC;var Ch=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},GC=(Object.defineProperty($d,"__esModule",{value:!0}),Ch(Hl)),YC=e,bb=YC.internal.util,KC=bb.ENCRYPTION_OFF,ZC=bb.ENCRYPTION_ON;function QC(e,t,r){void 0===t&&(t=XC),void 0===r&&(r=function(e){return new WebSocket(e)});var n,o=this,t=(this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null,((e,t)=>{var r=(e=>!0===e.encrypted||e.encrypted===ZC)(e),n=(e=>!1===e.encrypted||e.encrypted===KC)(e),e=e.trust,t=(e=>(e="function"==typeof e?e():"")&&0<=e.toLowerCase().indexOf("https"))(t),o=r,i=n,u=t;if(null!==u&&(o&&!u?console.warn("Neo4j driver is configured to use secure WebSocket on a HTTP web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to not use encryption."):i&&u&&console.warn("Neo4j driver is configured to use insecure WebSocket on a HTTPS web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to use encryption.")),!n){if(t)return{scheme:"wss",error:null};if(r)return e&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==e?{scheme:null,error:(0,YC.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+e+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+KC+'"` in the driver configuration.')}:{scheme:"wss",error:null}}return{scheme:"ws",error:null}})(e,t)),i=t.scheme,t=t.error;t?this._error=t:(this._ws=((t,r,n)=>{var o=t+"://"+r.asHostPort();try{return n(o)}catch(e){if(((e,t)=>"SyntaxError"===e.name&&(e=>"["===e.charAt(0)&&-1!==e.indexOf("]"))(t.asHostPort()))(e,r))return o=((e,t)=>{var r=t.host().replace(/:/g,"-").replace("%","s")+".ipv6-literal.net";return"".concat(e,"://").concat(r,":").concat(t.port())})(t,r),n(o);throw e}})(i,e.address,r),this._ws.binaryType="arraybuffer",(n=this)._ws.onclose=function(e){e&&!e.wasClean&&n._handleConnectionError(),n._open=!1},this._ws.onopen=function(){n._clearConnectionTimeout();var e=n._pending;n._pending=null;for(var t=0;t<e.length;t++)n.write(e[t])},this._ws.onmessage=function(e){o._resetTimeout(),n.onmessage&&(e=new GC.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function XC(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}QC.prototype._handleConnectionError=function(){this._connectionTimeoutFired?(this._error=(0,YC.newError)("Failed to establish connection in ".concat(this._config.connectionTimeout,"ms"),this._config.connectionErrorCode),this.onerror&&this.onerror(this._error)):this._open&&!this._timedout&&(this._error=(0,YC.newError)("WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket `readyState` is: "+this._ws.readyState,this._config.connectionErrorCode),this.onerror)&&this.onerror(this._error)},QC.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof GC.default))throw(0,YC.newError)("Don't know how to send buffer: "+e);try{this._ws.send(e._buffer)}catch(e){if(1===this._ws.readyState)throw(0,YC.newError)("unexpected failure to write.",void 0,e);this._handleConnectionError()}}},QC.prototype.close=function(){var r=this;return null===this._closingPromise&&(this._closingPromise=new Promise(function(e,t){r._clearConnectionTimeout(),r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._ws.onclose=function(){e()},r._ws.close()):e()})),this._closingPromise},QC.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},QC.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},QC.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},QC.prototype._resetTimeout=function(){var e=this;this._receiveTimeoutStarted&&(null!==this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=setTimeout(function(){e._receiveTimeoutId=null,e._timedout=!0,e.stopReceiveTimeout(),e._error=(0,YC.newError)("Connection lost. Server didn't respond in ".concat(e._receiveTimeout,"ms"),e._config.connectionErrorCode),e.close(),e.onerror&&e.onerror(e._error)},this._receiveTimeout))},QC.prototype._setupConnectionTimeout=function(){var e,t=this,r=this._config.connectionTimeout;return r?(e=this._ws,setTimeout(function(){1!==e.readyState&&(t._connectionTimeoutFired=!0,e.close())},r)):null},QC.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},$d.default=QC;var JC,mb={},Gl=r&&r.__extends||(JC=function(e,t){return(JC=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])}))(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}JC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(mb,"__esModule",{value:!0});var $C,pe=e.internal.resolver.BaseHostNameResolver,Vh=(Gl(eI,$C=pe),eI.prototype.resolve=function(e){return this._resolveToItself(e)},eI);function eI(){return null!==$C&&$C.apply(this,arguments)||this}mb.default=Vh;var tI,b={},rI=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},nI=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Cb=(Object.defineProperty(b,"__esModule",{value:!0}),b.default={load:function(t){return rI(this,void 0,void 0,function(){return nI(this,function(e){return[2,t]})})}},r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}}),Wr=(Object.defineProperty(Gd,"__esModule",{value:!0}),Gd.ClientCertificatesLoader=Gd.HostNameResolver=Gd.Channel=void 0,Cb($d)),R=Cb(mb),$h=Cb(b),Wh=(Gd.Channel=Wr.default,Gd.HostNameResolver=R.default,Gd.ClientCertificatesLoader=$h.default,{}),Ib={},Nb=r&&r.__extends||(tI=function(e,t){return(tI=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])}))(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}tI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Ib,"__esModule",{value:!0});var oI,iI=Hl,Lb=(oI=jh.BaseBuffer,Nb(uI,oI),uI.prototype.getUInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getUInt8(e);e-=r.length}},uI.prototype.getInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getInt8(e);e-=r.length}},uI.prototype.getFloat64=function(e){for(var t=(0,iI.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},uI);function uI(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=oI.call(this,r)||this)._buffers=e,t}Ib.default=Lb;var aI,sI,qb=r&&r.__extends||(aI=function(e,t){return(aI=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])}))(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}aI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Yb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ry=(Object.defineProperty(Wh,"__esModule",{value:!0}),Wh.Dechunker=Wh.Chunker=void 0,Yb(Bl)),cI=Hl,lI=Yb(Ib),ly=(sI=ry.default,qb(fI,sI),fI.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},fI.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},fI.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},fI.prototype.putBytes=function(e,t){for(;0<t.remaining();)this._ensure(1),this._buffer.remaining()>t.remaining()?this._buffer.writeBytes(t):this._buffer.writeBytes(t.readSlice(this._buffer.remaining()));return this},fI.prototype.flush=function(){var e;return 0<this._buffer.position&&(this._closeChunkIfOpen(),e=this._buffer,this._buffer=null,this._ch.write(e.getSlice(0,e.position)),this._buffer=(0,cI.alloc)(this._bufferSize),this._chunkOpen=!1),this},fI.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},fI.prototype._ensure=function(e){e=this._chunkOpen?e:e+2;this._buffer.remaining()<e&&this.flush(),this._chunkOpen||(this._currentChunkStart=this._buffer.position,this._buffer.position=this._buffer.position+2,this._chunkOpen=!0)},fI.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},fI);function fI(e,t){var r=sI.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,cI.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function pI(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}Wh.Chunker=ly,pI.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},pI.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},pI.prototype.IN_CHUNK=function(e){return this._chunkSize<=e.remaining()?(this._currentMessage.push(e.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=e.remaining(),this._currentMessage.push(e.readSlice(e.remaining())),this.IN_CHUNK)},pI.prototype.CLOSED=function(e){},pI.prototype._onHeader=function(e){if(0!==e)return this._chunkSize=e,this.IN_CHUNK;var t=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:t=this._currentMessage[0];break;default:t=new lI.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},pI.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},Wh.Dechunker=pI;var by={},dI=(Object.defineProperty(by,"__esModule",{value:!0}),e),my=dI.internal.util,gy=my.ENCRYPTION_OFF,hI=dI.error.SERVICE_UNAVAILABLE,bI=[null,void 0,!0,!1,my.ENCRYPTION_ON,gy],yI=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];by.default=function(e,t,r,n){this.address=e,this.encrypted=(e=>{if(e=e.encrypted,-1!==bI.indexOf(e))return e;throw(0,dI.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(bI))})(t),this.trust=(e=>{if(e=e.trust,-1!==yI.indexOf(e))return e;throw(0,dI.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(yI))})(t),this.trustedCertificates=t.trustedCertificates||[],this.connectionErrorCode=r||hI,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=n};var _I,vI,Uy={},Ly={},n_={exports:{}};function mI(e,t){for(var r in e)t[r]=e[r]}function gI(e,t,r){return vI(e,t,r)}zp=(jd=n_).exports,(vI=(_I=cd).Buffer).from&&vI.alloc&&vI.allocUnsafe&&vI.allocUnsafeSlow?jd.exports=_I:(mI(_I,zp),zp.Buffer=gI),gI.prototype=Object.create(vI.prototype),mI(vI,gI),gI.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return vI(e,t,r)},gI.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=vI(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},gI.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return vI(e)},gI.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return _I.SlowBuffer(e)};var OI=n_.exports.Buffer,wI=OI.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function EI(e){var t=(e=>{if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}})(e);if("string"==typeof t||OI.isEncoding!==wI&&wI(e))return t||e;throw new Error("Unknown encoding: "+e)}function PI(e){var t;switch(this.encoding=EI(e),this.encoding){case"utf16le":this.text=jI,this.end=CI,t=4;break;case"utf8":this.fillLast=SI,t=4;break;case"base64":this.text=II,this.end=RI,t=3;break;default:return this.write=AI,void(this.end=MI)}this.lastNeed=0,this.lastTotal=0,this.lastChar=OI.allocUnsafe(t)}function TI(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function SI(e){var t,r=this.lastTotal-this.lastNeed,n=(t=this,128!=(192&(n=e)[0])?(t.lastNeed=0,"�"):1<t.lastNeed&&1<n.length?128!=(192&n[1])?(t.lastNeed=1,"�"):2<t.lastNeed&&2<n.length&&128!=(192&n[2])?(t.lastNeed=2,"�"):void 0:void 0);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,r,0,e.length),void(this.lastNeed-=e.length))}function jI(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);t=e.toString("utf16le",t);if(t){var r=t.charCodeAt(t.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}function CI(e){var t,e=e&&e.length?this.write(e):"";return this.lastNeed?(t=this.lastTotal-this.lastNeed,e+this.lastChar.toString("utf16le",0,t)):e}function II(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function RI(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function AI(e){return e.toString(this.encoding)}function MI(e){return e&&e.length?this.write(e):""}(Ly.StringDecoder=PI).prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},PI.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},PI.prototype.text=function(e,t){var r=((e,t,r)=>{var n=t.length-1;if(!(n<r)){var o=TI(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(!(--n<r||-2===o)){if(0<=(o=TI(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(!(--n<r||-2===o)&&0<=(o=TI(t[n])))return 0<o&&(2===o?o=0:e.lastNeed=o-3),o}}return 0})(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;r=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},PI.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var NI,kI,xI,DI,LI,$y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},UI=(Object.defineProperty(Uy,"__esModule",{value:!0}),$y(Hl)),FI=e,BI=$y(cd),VI=new Ly.StringDecoder("utf8");Uy.default={encode:function(e){return new UI.default((e=e,"function"==typeof BI.default.Buffer.from?BI.default.Buffer.from(e,"utf8"):new BI.default.Buffer(e,"utf8")))},decode:function(e,t){if(Object.prototype.hasOwnProperty.call(e,"_buffer"))return n=t,a=(r=e).position,n=a+n,r.position=Math.min(n,r.length),r._buffer.toString("utf8",a,n);var o,i,u,r,n,a;if(Object.prototype.hasOwnProperty.call(e,"_buffers"))return o=function(e){return VI.write(e._buffer)},r=function(){return VI.end()},i=t,u=(a=e).position,a._updatePos(Math.min(t,a.length-u)),a._buffers.reduce(function(e,t){var r,n;return i<=0?e:u>=t.length?(u-=t.length,""):(t._updatePos(u-t.position),r=Math.min(t.length-u,i),n=t.readSlice(r),t._updatePos(r),i=Math.max(i-n.length,0),u=0,e+o(n))},"")+r();throw(0,FI.newError)("Don't know how to decode strings from '".concat(e,"'"))}},r_=Hd,NI=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),d_=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||NI(t,e,r)},kI=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(r_,"__esModule",{value:!0}),r_.utf8=r_.alloc=r_.ChannelConfig=void 0,d_(Gd,r_),d_(Wh,r_),xI=by,Object.defineProperty(r_,"ChannelConfig",{enumerable:!0,get:function(){return kI(xI).default}}),DI=Hl,Object.defineProperty(r_,"alloc",{enumerable:!0,get:function(){return DI.alloc}}),LI=Uy,Object.defineProperty(r_,"utf8",{enumerable:!0,get:function(){return kI(LI).default}}),Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.default=function(f,e){return function(t,o){var i=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(i),t._error&&e(t._error),t.onmessage=function(t){try{var e=((e,t)=>{if(72!==(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]||84!==e[1]||84!==e[2]||80!==e[3])return new WI.ProtocolVersion(e[3],e[2]);throw t.error("Handshake failed since server responded with HTTP."),(0,WI.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)")})(t,o);r({protocolVersion:e,capabilites:0,buffer:t,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write((e=>{if(4<e.length)throw(0,WI.newError)("It should not have more than 4 versions of the protocol");var o=(0,qI.alloc)(20);return o.writeInt32(zI),e.forEach(function(e){var t,r,n;e instanceof Array?(r=(n=e[0]).major,t=e[1].minor,o.writeInt32((n=n.minor)-t<<16|n<<8|r)):(r=e.major,o.writeInt32((n=e.minor)<<8|r))}),o.reset(),o})([YI(255,1),[YI(5,8),YI(5,0)],[YI(4,4),YI(4,2)],YI(3,0)]))})}(f,e).then(function(e){if(e.protocolVersion.isEqualTo(new WI.ProtocolVersion(255,1))){for(var n=f,o=e.buffer,t=o.readVarInt(),r=[],i=0;i<t;i++){var u=[o.readUInt8(),o.readUInt8(),o.readUInt8(),o.readUInt8()];r=r.concat((e=>{for(var t=[],r=e[3],n=e[2],o=0;o<=e[1];o++)t.push({major:r,minor:n-o});return t})(u))}o.readVarInt();var a=GI,s=0,c=0;for(r.sort(function(e,t){return Number(e.major)!==Number(t.major)?Number(t.major)-Number(e.major):Number(t.minor)-Number(e.minor)}),i=0;i<r.length;i++){var l=r[i];if(HI.includes(l.major+"."+l.minor)){s=l.major,c=l.minor;break}}return new Promise(function(e,t){try{var r=(0,qI.alloc)(5);r.writeInt32(c<<8|s),r.writeVarInt(a),n.write(r),e({protocolVersion:new WI.ProtocolVersion(s,c),capabilites:a,consumeRemainingBuffer:function(e){o.hasRemaining()&&e(o.readSlice(o.remaining()))}})}catch(e){t(e)}})}return e})};var qI=Hd,WI=e,zI=1616949271,HI=["6.0","5.8","5.7","5.6","5.4","5.3","5.2","5.1","5.0","4.4","4.3","4.2","3.0"],GI=0;function YI(e,t){return{major:e,minor:t}}var KI,h_={},w_={},j_={},A={},N_={},k_=r&&r.__extends||(KI=function(e,t){return(KI=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])}))(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}KI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ev=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ov=(Object.defineProperty(N_,"__esModule",{value:!0}),ev(e),ZI.ofRecord=function(e){return null===e?ZI.ofNull():new nR(e)},ZI.ofMessageResponse=function(e){return null===e?ZI.ofNull():new XI(e)},ZI.ofNull=function(){return new eR},Object.defineProperty(ZI.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(ZI.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(ZI.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(ZI.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),ZI);function ZI(){}N_.default=ov;k_(JI,QI=ov),Object.defineProperty(JI.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(JI.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(JI.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(JI.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var QI,XI=JI;function JI(e){var t=QI.call(this)||this;return t._response=e,t}k_(tR,$I=ov),Object.defineProperty(tR.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var $I,eR=tR;function tR(){return null!==$I&&$I.apply(this,arguments)||this}k_(oR,rR=ov),Object.defineProperty(oR.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(oR.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(oR.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(oR.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var rR,nR=oR;function oR(e){var t=rR.call(this)||this;return t._record=e,t}var cv={},hv={},iR=(Object.defineProperty(hv,"__esModule",{value:!0}),hv.identity=function(e){return e},hv.reuseOngoingRequest=function(o,i){void 0===i&&(i=null);var u=new Map;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r,n=iR.json.stringify(e);return u.has(n)?u.get(n):(r=o.apply(i,e),u.set(n,r),r.finally(function(){u.delete(n)}))}},e);var yv={},uR=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(yv,"__esModule",{value:!0}),yv.equals=function(e,t){var r,n;if(e!==t){if(null===e||null===t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;try{for(var u=uR(o),a=u.next();!a.done;a=u.next()){var s=a.value;if(e[s]!==t[s])return!1}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}return!0};var aR,sR,cR=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),lR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jv=r&&r.__importStar||(aR=function(e){return(aR=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=aR(e),n=0;n<r.length;n++)"default"!==r[n]&&cR(t,e,r[n]);return lR(t,e),t}),Mv=(Object.defineProperty(cv,"__esModule",{value:!0}),cv.object=cv.functional=void 0,cv.functional=jv(hv),cv.object=jv(yv),r&&r.__extends||(sR=function(e,t){return(sR=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])}))(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}sR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),xv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fR=(Object.defineProperty(A,"__esModule",{value:!0}),A.TelemetryObserver=A.ProcedureRouteObserver=A.RouteObserver=A.CompletedObserver=A.FailedObserver=A.ResetObserver=A.LogoffObserver=A.LoginObserver=A.ResultStreamObserver=A.StreamObserver=void 0,e),pR=xv(N_),dR=cv,hR=fR.internal.constants.FETCH_ALL,bR=fR.error.PROTOCOL_ERROR,Dv=(yR.prototype.onNext=function(e){},yR.prototype.onError=function(e){},yR.prototype.onCompleted=function(e){},yR);function yR(){}A.StreamObserver=Dv;Mv(vR,_R=Dv),vR.prototype.pause=function(){this._paused=!0},vR.prototype.resume=function(){this._paused=!1,this._setupAutoPull(),this._state.pull(this)},vR.prototype.onNext=function(e){this._haveRecordStreamed=!0;var t=new fR.Record(this._fieldKeys,e,this._fieldLookup);this._observers.some(function(e){return e.onNext})?this._observers.forEach(function(e){e.onNext&&e.onNext(t)}):(this._queuedRecords.push(t),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},vR.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},vR.prototype.onError=function(e,t){this._state.onError(this,e,t)},vR.prototype.cancel=function(){this._state.discard(this)},vR.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(xR.STREAMING)},vR.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(xR.SUCCEEDED)},vR.prototype.subscribe=function(e){if(this._head&&e.onKeys&&e.onKeys(this._head),0<this._queuedRecords.length&&e.onNext)for(var t=0;t<this._queuedRecords.length;t++)e.onNext(this._queuedRecords[t]),this._queuedRecords.length-t-1<=this._lowRecordWatermark&&(this._autoPull=!0,this._state===xR.READY)&&this._handleStreaming();this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error,this._runError),this._observers.push(e),this._state===xR.READY&&this._handleStreaming()},vR.prototype.unsubscribeAll=function(){this._observers=[]},vR.prototype._handleHasMore=function(e){this._setState(xR.READY),this._handleStreaming(),delete e.has_more},vR.prototype._handlePullSuccess=function(e){var t,r=this,n=this._enrichMetadata(Object.assign(this._server?{server:this._server}:{},this._meta,{stream_summary:{have_records_streamed:this._haveRecordStreamed,pulled:this._pulled,has_keys:0<this._fieldKeys.length}},e));[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(xR.SUCCEEDED),e=null,t=function(){r._tail=n,r._observers.some(function(e){return e.onCompleted})&&r._observers.forEach(function(e){e.onCompleted&&e.onCompleted(n)}),r._afterComplete&&r._afterComplete(n)},(e=this._beforeComplete?this._beforeComplete(n):e)?Promise.resolve(e).then(t):t()):this.onError((0,fR.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),bR))},vR.prototype._handleRunSuccess=function(e,t){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&0<e.fields.length){this._fieldKeys=e.fields;for(var n=0;n<e.fields.length;n++)this._fieldLookup[e.fields[n]]=n}null!==e.db&&void 0!==this._onDb&&this._onDb(e.db),null!=e.fields&&delete e.fields,null!=e.qid&&(this._queryId=e.qid,delete e.qid),this._storeMetadataForCompletion(e);var o=null,i=(this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys)),function(){r._head=r._fieldKeys,r._observers.some(function(e){return e.onKeys})&&r._observers.forEach(function(e){e.onKeys&&e.onKeys(r._fieldKeys)}),r._afterKeys&&r._afterKeys(r._fieldKeys),t()});o?Promise.resolve(o).then(i):i()}},vR.prototype._handleError=function(t,r){function e(){n._observers.some(function(e){return e.onError})&&n._observers.forEach(function(e){e.onError&&e.onError(t,r)}),n._afterError&&n._afterError(t)}var n=this,o=(this._setState(xR.FAILED),this._error=t,this._runError=r,null);this._beforeError&&(o=this._beforeError(t));o?Promise.resolve(o).then(e):e()},vR.prototype._handleStreaming=function(){!this._head||!this._observers.some(function(e){return e.onNext||e.onCompleted})&&!this._discard||this._paused||!this._discard&&!this._autoPull||this._more()},vR.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):(this._pulled=!0,this._moreFunction(this._queryId,this._fetchSize,this)),this._setState(xR.STREAMING)},vR.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},vR.prototype._setState=function(e){this._state=e},vR.prototype._setupAutoPull=function(){this._autoPull=!0};var _R,Lv=vR;function vR(e){var e=void 0===e?{}:e,t=e.reactive,t=void 0!==t&&t,r=e.moreFunction,n=e.discardFunction,o=e.fetchSize,o=void 0===o?hR:o,i=e.beforeError,u=e.afterError,a=e.beforeKeys,s=e.afterKeys,c=e.beforeComplete,l=e.afterComplete,f=e.server,p=e.highRecordWatermark,p=void 0===p?Number.MAX_VALUE:p,d=e.lowRecordWatermark,d=void 0===d?Number.MAX_VALUE:d,h=e.enrichMetadata,e=e.onDb,b=_R.call(this)||this;return b._fieldKeys=null,b._fieldLookup=null,b._head=null,b._queuedRecords=[],b._tail=null,b._error=null,b._runError=!1,b._observers=[],b._meta={},b._server=f,b._beforeError=i,b._afterError=u,b._beforeKeys=a,b._afterKeys=s,b._beforeComplete=c,b._afterComplete=l,b._enrichMetadata=h||dR.functional.identity,b._queryId=null,b._moreFunction=r,b._discardFunction=n,b._discard=!1,b._fetchSize=o,b._lowRecordWatermark=d,b._highRecordWatermark=p,b._setState(t?xR.READY:xR.READY_STREAMING),b._setupAutoPull(),b._paused=!1,b._pulled=!t,b._haveRecordStreamed=!1,b._onDb=e,b}A.ResultStreamObserver=Lv;Mv(gR,mR=Dv),gR.prototype.onNext=function(e){this.onError((0,fR.newError)("Received RECORD when initializing "+fR.json.stringify(e)))},gR.prototype.onError=function(e){this._onError&&this._onError(e)},gR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var mR,zv=gR;function gR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=mR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.LoginObserver=zv;Mv(wR,OR=Dv),wR.prototype.onNext=function(e){this.onError((0,fR.newError)("Received RECORD when logging off "+fR.json.stringify(e)))},wR.prototype.onError=function(e){this._onError&&this._onError(e)},wR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var OR,eb=wR;function wR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=OR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.LogoffObserver=eb;Mv(PR,ER=Dv),PR.prototype.onNext=function(e){this.onError((0,fR.newError)("Received RECORD when resetting: received record is: "+fR.json.stringify(e),bR))},PR.prototype.onError=function(e){e.code===bR&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},PR.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var ER,Yv=PR;function PR(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=ER.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}A.ResetObserver=Yv;Mv(SR,TR=Lv),SR.prototype.onNext=function(e){this.onError((0,fR.newError)("Received RECORD when sending telemetry "+fR.json.stringify(e),bR))},SR.prototype.onError=function(e){this._onError&&this._onError(e)},SR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var TR,Zv=SR;function SR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=TR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.TelemetryObserver=Zv;Mv(CR,jR=Lv);var jR,$v=CR;function CR(e){var t=e.error,e=jR.call(this,{beforeError:e.onError})||this;return e.onError(t),e}A.FailedObserver=$v;Mv(RR,IR=Lv);var IR,rm=RR;function RR(){var e=IR.call(this)||this;return IR.prototype.markCompleted.call(e),e}A.CompletedObserver=rm;Mv(MR,AR=Dv),MR.prototype.onNext=function(e){this._records.push(e)},MR.prototype.onError=function(e){e.code===bR&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},MR.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,fR.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+fR.json.stringify(this._records),bR)):this._onCompleted&&this._onCompleted(pR.default.ofRecord(this._records[0]))};var AR,cm=MR;function MR(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=AR.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}A.ProcedureRouteObserver=cm;Mv(kR,NR=Dv),kR.prototype.onNext=function(e){this.onError((0,fR.newError)("Received RECORD when resetting: received record is: "+fR.json.stringify(e),bR))},kR.prototype.onError=function(e){e.code===bR&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},kR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(pR.default.ofMessageResponse(e))};var NR,F_=kR;function kR(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=NR.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}A.RouteObserver=F_;var xR={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(xR.STREAMING)})},onError:function(e,t,r){e._handleError(t,null==r||r)},name:function(){return"READY_STREAMING"},pull:function(){},discard:function(e){e._discard=!0}},READY:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){return e._handleStreaming()})},onError:function(e,t,r){e._handleError(t,null==r||r)},name:function(){return"READY"},pull:function(e){return e._more()},discard:function(e){e._discard=!0,null!=e._fieldKeys&&e._more()}},STREAMING:{onSuccess:function(e,t){t.has_more?e._handleHasMore(t):e._handlePullSuccess(t)},onError:function(e,t,r){e._handleError(t,null!=r&&r)},name:function(){return"STREAMING"},pull:function(){},discard:function(e){e._discard=!0}},FAILED:{onSuccess:function(e){},onError:function(e){},name:function(){return"FAILED"},pull:function(){},discard:function(){}},SUCCEEDED:{onError:function(e){},name:function(){return"SUCCEEDED"},pull:function(){},discard:function(){}}},DR=(Object.defineProperty(j_,"__esModule",{value:!0}),j_.assertDatabaseIsEmpty=function(e,t,r){void 0===t&&(t=function(){});if(e)throw e=(0,DR.newError)("Driver is connected to the database that does not support multiple databases. Please upgrade to neo4j 4.0.0 or later in order to use this functionality"),t(e.message),r.onError(e),e},j_.assertTxConfigIsEmpty=function(e,t,r){void 0===t&&(t=function(){});if(e&&!e.isEmpty())throw e=(0,DR.newError)("Driver is connected to the database that does not support transaction configuration. Please upgrade to neo4j 3.5.0 or later in order to use this functionality"),t(e.message),r.onError(e),e},j_.assertImpersonatedUserIsEmpty=function(e,t,r){void 0===t&&(t=function(){});if(e)throw e=(0,DR.newError)("Driver is connected to the database that does not support user impersonation. Please upgrade to neo4j 4.4.0 or later in order to use this functionality. "+"Trying to impersonate ".concat(e,".")),t(e.message),r.onError(e),e},j_.assertNotificationFilterIsEmpty=function(e,t,r){void 0===t&&(t=function(){});if(void 0!==e)throw e=(0,DR.newError)("Driver is connected to a database that does not support user notification filters. Please upgrade to Neo4j 5.7.0 or later in order to use this functionality. "+"Trying to set notifications to ".concat(DR.json.stringify(e),".")),t(e.message),r.onError(e),e},e);var bm={},vm={},Hp={},LR=(Object.defineProperty(Hp,"__esModule",{value:!0}),Hp.Structure=void 0,Hp.verifyStructSize=function(e,t,r){if(t!==r)throw(0,LR.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),UR)},e),UR=LR.error.PROTOCOL_ERROR,W_=(Object.defineProperty(FR.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),FR.prototype.toString=function(){for(var e="",t=0;t<this.fields.length;t++)0<t&&(e+=", "),e+=this.fields[t];return"Structure("+this.signature+", ["+e+"])"},FR);function FR(e,t){this.signature=e,this.fields=t}Hp.Structure=W_,Hp.default=W_,Object.defineProperty(vm,"__esModule",{value:!0}),vm.Unpacker=vm.Packer=void 0;var BR=Hd,VR=cv,qR=Hp,WR=e,zR=WR.error.PROTOCOL_ERROR;function HR(e){this._ch=e,this._byteArraysSupported=!0}function GR(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}HR.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=VR.functional.identity);try{o=i(o)}catch(e){return function(){throw e}}if(null===o)return function(){return u._ch.writeUInt8(192)};if(!0===o)return function(){return u._ch.writeUInt8(195)};if(!1===o)return function(){return u._ch.writeUInt8(194)};if("number"==typeof o)return function(){return u.packFloat(o)};if("string"==typeof o)return function(){return u.packString(o)};if("bigint"==typeof o)return function(){return u.packInteger((0,WR.int)(o))};if((0,WR.isInt)(o))return function(){return u.packInteger(o)};if(o instanceof Int8Array)return function(){return u.packBytes(o)};if(o instanceof Array)return function(){u.packListHeader(o.length);for(var e=0;e<o.length;e++)u.packable(void 0===o[e]?null:o[e],i)()};if(null!=(e=o)&&"function"==typeof e[Symbol.iterator])return this.packableIterable(o,i);if(o instanceof qR.Structure){for(var t=[],r=0;r<o.fields.length;r++)t[r]=this.packable(o.fields[r],i);return function(){return u.packStruct(o.signature,t)}}return"object"==typeof o?function(){for(var e=Object.keys(o),t=0,r=0;r<e.length;r++)void 0!==o[e[r]]&&t++;u.packMapHeader(t);for(r=0;r<e.length;r++){var n=e[r];void 0!==o[n]&&(u.packString(n),u.packable(o[n],i)())}}:this._nonPackableValue("Unable to pack the given value: ".concat(o))},HR.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,WR.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},HR.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},HR.prototype.packInteger=function(e){var t=e.high,r=e.low;e.greaterThanOrEqual(-16)&&e.lessThan(128)?this._ch.writeInt8(r):e.greaterThanOrEqual(-128)&&e.lessThan(-16)?(this._ch.writeUInt8(200),this._ch.writeInt8(r)):e.greaterThanOrEqual(-32768)&&e.lessThan(32768)?(this._ch.writeUInt8(201),this._ch.writeInt16(r)):(e.greaterThanOrEqual(-2147483648)&&e.lessThan(2147483648)?this._ch.writeUInt8(202):(this._ch.writeUInt8(203),this._ch.writeInt32(t)),this._ch.writeInt32(r))},HR.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},HR.prototype.packString=function(e){var e=BR.utf8.encode(e),t=e.length;if(t<16)this._ch.writeUInt8(128|t);else if(t<256)this._ch.writeUInt8(208),this._ch.writeUInt8(t);else{if(t<65536)this._ch.writeUInt8(209),this._ch.writeUInt8(t/256>>0);else{if(!(t<4294967296))throw(0,WR.newError)("UTF-8 strings of size "+t+" are not supported");this._ch.writeUInt8(210),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256)}this._ch.writeUInt8(t%256)}this._ch.writeBytes(e)},HR.prototype.packListHeader=function(e){if(e<16)this._ch.writeUInt8(144|e);else if(e<256)this._ch.writeUInt8(212),this._ch.writeUInt8(e);else{if(e<65536)this._ch.writeUInt8(213);else{if(!(e<4294967296))throw(0,WR.newError)("Lists of size "+e+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256)}this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},HR.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,WR.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(e.length);for(var t=0;t<e.length;t++)this._ch.writeInt8(e[t])},HR.prototype.packBytesHeader=function(e){if(e<256)this._ch.writeUInt8(204),this._ch.writeUInt8(e);else{if(e<65536)this._ch.writeUInt8(205);else{if(!(e<4294967296))throw(0,WR.newError)("Byte arrays of size "+e+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256)}this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},HR.prototype.packMapHeader=function(e){if(e<16)this._ch.writeUInt8(160|e);else if(e<256)this._ch.writeUInt8(216),this._ch.writeUInt8(e);else{if(e<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(e/256>>0);else{if(!(e<4294967296))throw(0,WR.newError)("Maps of size "+e+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256)}this._ch.writeUInt8(e%256)}},HR.prototype.packStructHeader=function(e,t){if(e<16)this._ch.writeUInt8(176|e),this._ch.writeUInt8(t);else if(e<256)this._ch.writeUInt8(220),this._ch.writeUInt8(e),this._ch.writeUInt8(t);else{if(!(e<65536))throw(0,WR.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},HR.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},HR.prototype._nonPackableValue=function(e){return function(){throw(0,WR.newError)(e,zR)}},vm.Packer=HR,GR.prototype.unpack=function(e,t){void 0===t&&(t=VR.functional.identity);var r=e.readUInt8(),n=240&r,o=15&r;if(192===r)return null;var i=this._unpackBoolean(r);if(null!==i)return i;i=this._unpackNumberOrInteger(r,e);if(null!==i){if((0,WR.isInt)(i)){if(this._useBigInt)return i.toBigInt();if(this._disableLosslessIntegers)return i.toNumberOrInfinity()}return i}i=this._unpackString(r,n,o,e);if(null!==i)return i;i=this._unpackList(r,n,o,e,t);if(null!==i)return i;i=this._unpackByteArray(r,e);if(null!==i)return i;i=this._unpackMap(r,n,o,e,t);if(null!==i)return i;i=this._unpackStruct(r,n,o,e,t);if(null!==i)return i;throw(0,WR.newError)("Unknown packed value with marker "+r.toString(16))},GR.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,WR.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},GR.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},GR.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},GR.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,WR.int)(e):240<=e&&e<256?(0,WR.int)(e-256):200===e?(0,WR.int)(t.readInt8()):201===e?(0,WR.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,WR.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new WR.Integer(e,r)):null},GR.prototype._unpackString=function(e,t,r,n){return 128===t?BR.utf8.decode(n,r):208===e?BR.utf8.decode(n,n.readUInt8()):209===e?BR.utf8.decode(n,n.readUInt16()):210===e?BR.utf8.decode(n,n.readUInt32()):null},GR.prototype._unpackList=function(e,t,r,n,o){return 144===t?this._unpackListWithSize(r,n,o):212===e?this._unpackListWithSize(n.readUInt8(),n,o):213===e?this._unpackListWithSize(n.readUInt16(),n,o):214===e?this._unpackListWithSize(n.readUInt32(),n,o):null},GR.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},GR.prototype._unpackByteArray=function(e,t){return 204===e?this._unpackByteArrayWithSize(t.readUInt8(),t):205===e?this._unpackByteArrayWithSize(t.readUInt16(),t):206===e?this._unpackByteArrayWithSize(t.readUInt32(),t):null},GR.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},GR.prototype._unpackMap=function(e,t,r,n,o){return 160===t?this._unpackMapWithSize(r,n,o):216===e?this._unpackMapWithSize(n.readUInt8(),n,o):217===e?this._unpackMapWithSize(n.readUInt16(),n,o):218===e?this._unpackMapWithSize(n.readUInt32(),n,o):null},GR.prototype._unpackMapWithSize=function(e,t,r){for(var n={},o=0;o<e;o++)n[this.unpack(t,r)]=this.unpack(t,r);return n},GR.prototype._unpackStruct=function(e,t,r,n,o){return 176===t?this._unpackStructWithSize(r,n,o):220===e?this._unpackStructWithSize(n.readUInt8(),n,o):221===e?this._unpackStructWithSize(n.readUInt16(),n,o):null},GR.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new qR.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},vm.Unpacker=GR;var YR,KR,ZR,Rm={},km=r&&r.__extends||(YR=function(e,t){return(YR=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])}))(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}YR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),QR=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),XR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),zm=r&&r.__importStar||(KR=function(e){return(KR=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=KR(e),n=0;n<r.length;n++)"default"!==r[n]&&QR(t,e,r[n]);return XR(t,e),t}),Cd=(Object.defineProperty(Rm,"__esModule",{value:!0}),Rm.Unpacker=Rm.Packer=void 0,zm(vm)),Lm=(ZR=Cd.Packer,km(JR,ZR),JR.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},JR);function JR(){return null!==ZR&&ZR.apply(this,arguments)||this}Rm.Packer=Lm;$R=Cd.Unpacker,km(eA,$R);var $R,Id=eA;function eA(e,t){return $R.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}Rm.Unpacker=Id;var tA,rA=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),nA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Um=r&&r.__importStar||(tA=function(e){return(tA=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=tA(e),n=0;n<r.length;n++)"default"!==r[n]&&rA(t,e,r[n]);return nA(t,e),t}),Vm=(Object.defineProperty(bm,"__esModule",{value:!0}),bm.structure=bm.v2=bm.v1=void 0,Um(vm)),Rd=(bm.v1=Vm,Um(Rm)),e0=(bm.v2=Rd,Um(Hp)),n0=(bm.structure=e0,bm.default=Rd,{}),oA=(Object.defineProperty(n0,"__esModule",{value:!0}),n0.SIGNATURES=void 0,e),a=oA.internal.constants,iA=a.ACCESS_MODE_READ,uA=a.FETCH_ALL,aA=oA.internal.util.assertString,a0=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,TELEMETRY:84,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),d0=(n0.SIGNATURES=a0,k.init=function(e,t){return new k(1,[e,t],function(){return"INIT ".concat(e," {...}")})},k.run=function(e,t){return new k(16,[e,t],function(){return"RUN ".concat(e," ").concat(oA.json.stringify(t))})},k.pullAll=function(){return pA},k.reset=function(){return dA},k.hello=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);t=Object.assign({user_agent:e},t);return r&&(t.routing=r),n&&(t.patch_bolt=n),new k(1,[t],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},k.hello5x1=function(e,t){var r={user_agent:e};return(t=void 0===t?null:t)&&(r.routing=t),new k(1,[r],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},k.hello5x2=function(e,t,r){void 0===r&&(r=null);var n={user_agent:e};return lA(n,t=void 0===t?null:t),r&&(n.routing=r),new k(1,[n],function(){return"HELLO ".concat(oA.json.stringify(n))})},k.hello5x3=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),lA(o,r),n&&(o.routing=n),new k(1,[o],function(){return"HELLO ".concat(oA.json.stringify(o))})},k.hello5x5=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),fA(o,r),n&&(o.routing=n),new k(1,[o],function(){return"HELLO ".concat(oA.json.stringify(o))})},k.logon=function(e){return new k(106,[e],function(){return"LOGON { ... }"})},k.logoff=function(){return new k(107,[],function(){return"LOGOFF"})},k.begin=function(e){var e=void 0===e?{}:e,t=sA(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new k(17,[t],function(){return"BEGIN ".concat(oA.json.stringify(t))})},k.begin5x5=function(e){var e=void 0===e?{}:e,t=sA(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter,{appendNotificationFilter:fA});return new k(17,[t],function(){return"BEGIN ".concat(oA.json.stringify(t))})},k.commit=function(){return hA},k.rollback=function(){return bA},k.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=sA(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new k(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(oA.json.stringify(t)," ").concat(oA.json.stringify(n))})},k.runWithMetadata5x5=function(e,t,r){var r=void 0===r?{}:r,n=sA(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter,{appendNotificationFilter:fA});return new k(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(oA.json.stringify(t)," ").concat(oA.json.stringify(n))})},k.goodbye=function(){return yA},k.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=cA(null==t?-1:t,(void 0===e?uA:e)||uA);return new k(63,[r],function(){return"PULL ".concat(oA.json.stringify(r))})},k.discard=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=cA(null==t?-1:t,(void 0===e?uA:e)||uA);return new k(47,[r],function(){return"DISCARD ".concat(oA.json.stringify(r))})},k.telemetry=function(e){var e=e.api,t=(0,oA.int)(e);return new k(84,[t],function(){return"TELEMETRY ".concat(t.toString())})},k.route=function(e,t,r){return new k(102,[e=void 0===e?{}:e,t=void 0===t?[]:t,r=void 0===r?null:r],function(){return"ROUTE ".concat(oA.json.stringify(e)," ").concat(oA.json.stringify(t)," ").concat(r)})},k.routeV4x4=function(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]);var n={};return(r=void 0===r?{}:r).databaseName&&(n.db=r.databaseName),r.impersonatedUser&&(n.imp_user=r.impersonatedUser),new k(102,[e,t,n],function(){return"ROUTE ".concat(oA.json.stringify(e)," ").concat(oA.json.stringify(t)," ").concat(oA.json.stringify(n))})},k);function k(e,t,r){this.signature=e,this.fields=t,this.toString=r}function sA(e,t,r,n,o,i,u){void 0===u&&(u={});var a={};return e.isEmpty()||(a.bookmarks=e.values()),null!==t.timeout&&(a.tx_timeout=t.timeout),t.metadata&&(a.tx_metadata=t.metadata),r&&(a.db=aA(r,"database")),o&&(a.imp_user=aA(o,"impersonatedUser")),n===iA&&(a.mode="r"),(null!=(e=u.appendNotificationFilter)?e:lA)(a,i),a}function cA(e,t){t={n:(0,oA.int)(t)};return-1!==e&&(t.qid=(0,oA.int)(e)),t}function lA(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_categories=t.disabledCategories),t.disabledClassifications)&&(e.notifications_disabled_categories=t.disabledClassifications)}function fA(e,t){t&&(t.minimumSeverityLevel&&(e.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(e.notifications_disabled_classifications=t.disabledCategories),t.disabledClassifications)&&(e.notifications_disabled_classifications=t.disabledClassifications)}var pA=new(n0.default=d0)(63,[],function(){return"PULL_ALL"}),dA=new d0(15,[],function(){return"RESET"}),hA=new d0(18,[],function(){return"COMMIT"}),bA=new d0(19,[],function(){return"ROLLBACK"}),yA=new d0(2,[],function(){return"GOODBYE"}),h={},y0={},_A=(Object.defineProperty(y0,"__esModule",{value:!0}),y0.TypeTransformer=void 0,bm),vA=e.internal.objectUtil;function mA(e){this._transformers=e,this._transformersPerSignature=new Map(e.map(function(e){return[e.signature,e]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}function gA(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;this.signature=t,this.isTypeInstance=e,this.fromStructure=r,this.toStructure=n,Object.freeze(this)}mA.prototype.fromStructure=function(e){try{return e instanceof _A.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return vA.createBrokenObject(e)}},mA.prototype.toStructure=function(t){var e=typeof t;return("object"==e||"function"==e||"symbol"==e)&&null!==t&&void 0!==(e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)}))?e.toStructure(t):t},y0.default=mA,gA.prototype.extendsWith=function(e){return new gA({signature:e.signature||this.signature,fromStructure:e.fromStructure||this.fromStructure,toStructure:e.toStructure||this.toStructure,isTypeInstance:e.isTypeInstance||this.isTypeInstance})},y0.TypeTransformer=gA;var OA=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},wA=(Object.defineProperty(h,"__esModule",{value:!0}),e),EA=bm,PA=y0,TA=wA.error.PROTOCOL_ERROR;h.default={createNodeTransformer:function(){return new PA.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof wA.Node},toStructure:function(e){throw(0,wA.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),TA)},fromStructure:function(e){EA.structure.verifyStructSize("Node",3,e.size);var e=OA(e.fields,3),t=e[0];return new wA.Node(t,e[1],e[2])}})},createRelationshipTransformer:function(){return new PA.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof wA.Relationship},toStructure:function(e){throw(0,wA.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),TA)},fromStructure:function(e){EA.structure.verifyStructSize("Relationship",5,e.size);var e=OA(e.fields,5),t=e[0];return new wA.Relationship(t,e[1],e[2],e[3],e[4])}})},createUnboundRelationshipTransformer:function(){return new PA.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof wA.UnboundRelationship},toStructure:function(e){throw(0,wA.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),TA)},fromStructure:function(e){EA.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=OA(e.fields,3),t=e[0];return new wA.UnboundRelationship(t,e[1],e[2])}})},createPathTransformer:function(){return new PA.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof wA.Path},toStructure:function(e){throw(0,wA.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),TA)},fromStructure:function(e){EA.structure.verifyStructSize("Path",3,e.size);for(var e=OA(e.fields,3),t=e[0],r=e[1],n=e[2],o=[],i=t[0],u=0;u<n.length;u+=2){var a=t[n[u+1]],s=(0,wA.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof wA.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof wA.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new wA.PathSegment(i,c,a)),i=a}return new wA.Path(t[0],t[t.length-1],o)}})},createVectorTransformer:function(){return new PA.TypeTransformer({signature:86,isTypeInstance:function(e){return e instanceof wA.Vector},toStructure:function(e){throw(0,wA.newError)("Sending vector types require server and driver to be communicating with Bolt protocol 6.0 or later. Please update your database version.")},fromStructure:function(e){throw(0,wA.newError)("Server tried to send Vector object, but server and driver are communicating on a version of the Bolt protocol that does not support vectors.")}})}};var SA,jA=r&&r.__assign||function(){return(jA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},CA=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),IA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),v0=r&&r.__importStar||(SA=function(e){return(SA=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=SA(e),n=0;n<r.length;n++)"default"!==r[n]&&CA(t,e,r[n]);return IA(t,e),t}),w0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},RA=(Object.defineProperty(w_,"__esModule",{value:!0}),j_),AA=bm,MA=v0(n0),NA=A,kA=e,xA=w0(h),DA=w0(y0),LA=kA.internal.bookmarks.Bookmarks,T0=kA.internal.constants,UA=T0.ACCESS_MODE_WRITE,FA=T0.BOLT_PROTOCOL_V1,BA=(kA.internal.logger.Logger,kA.internal.txConfig.TxConfig),VA=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),C0=(Object.defineProperty(qA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new DA.default(Object.values(xA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(qA.prototype,"version",{get:function(){return FA},enumerable:!1,configurable:!0}),Object.defineProperty(qA.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(qA.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(qA.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),qA.prototype.packer=function(){return this._packer},qA.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},qA.prototype.unpacker=function(){return this._unpacker},qA.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},qA.prototype.transformMetadata=function(e){return e},qA.prototype.enrichErrorMetadata=function(e){return jA(jA({},e),{diagnostic_record:null!==e.diagnostic_record?jA(jA({},VA),e.diagnostic_record):null})},qA.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new NA.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,RA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(MA.default.init(r,n),e,!0),e},qA.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,t=new NA.LogoffObserver({onCompleted:t,onError:e.onError}),e=(0,kA.newError)("Driver is connected to a database that does not support logoff. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(e.message),t.onError(e),e},qA.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=new NA.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}}),i=(0,kA.newError)("Driver is connected to a database that does not support logon. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(i.message),e.onError(i),i},qA.prototype.prepareToClose=function(){},qA.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete;return this.run("BEGIN",t?t.asBeginTransactionParameters():{},{bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e,flush:!1})},qA.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("COMMIT",{},{bookmarks:LA.empty(),txConfig:BA.empty(),mode:UA,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},qA.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("ROLLBACK",{},{bookmarks:LA.empty(),txConfig:BA.empty(),mode:UA,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},qA.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=(r.bookmarks,r.txConfig),o=r.database,i=r.impersonatedUser,u=r.notificationFilter,a=r.flush,a=void 0===a||a,s=r.highRecordWatermark,s=void 0===s?Number.MAX_VALUE:s,c=r.lowRecordWatermark,c=void 0===c?Number.MAX_VALUE:c,r=new NA.ResultStreamObserver({server:this._server,beforeKeys:r.beforeKeys,afterKeys:r.afterKeys,beforeError:r.beforeError,afterError:r.afterError,beforeComplete:r.beforeComplete,afterComplete:r.afterComplete,highRecordWatermark:s,lowRecordWatermark:c});return(0,RA.assertTxConfigIsEmpty)(n,this._onProtocolError,r),(0,RA.assertDatabaseIsEmpty)(o,this._onProtocolError,r),(0,RA.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,r),(0,RA.assertNotificationFilterIsEmpty)(u,this._onProtocolError,r),this.write(MA.default.run(e,t),r,!1),this.write(MA.default.pullAll(),r,a),r},Object.defineProperty(qA.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),qA.prototype.reset=function(e){var e=void 0===e?{}:e,t=e.onError,t=new NA.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e.onComplete});return this.write(MA.default.reset(),t,!0),t},qA.prototype.telemetry=function(e,t){e.api;e=void 0===t?{}:t,e.onError,t=e.onCompleted,e=new NA.CompletedObserver;return t&&t(),e},qA.prototype._createPacker=function(e){return new AA.v1.Packer(e)},qA.prototype._createUnpacker=function(e,t){return new AA.v1.Unpacker(e,t)},qA.prototype.write=function(e,t,r){this._lastMessageSignature=e.signature;var n=new AA.structure.Structure(e.signature,e.fields);this.packable(n)(),this.queueObserverIfProtocolIsNotBroken(t)&&(this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._chunker.messageBoundary(),r)&&this._chunker.flush()},qA.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===MA.SIGNATURES.HELLO||this._lastMessageSignature===MA.SIGNATURES.LOGON},qA.prototype.isLastMessageReset=function(){return this._lastMessageSignature===MA.SIGNATURES.RESET},qA.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},qA.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},qA.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},qA.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},qA.prototype.isBroken=function(){return!!this._fatalError},qA.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError,!1)},qA.prototype.resetFailure=function(){this._responseHandler._resetFailure()},qA.prototype._onLoginCompleted=function(e,t,r){this._initialized=!0,this._authToken=t,e&&(t=e.server,this._server.version||(this._server.version=t)),r&&r(e)},qA.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},qA);function qA(e,t,r,n,o,i){var r=void 0===r?{}:r,u=r.disableLosslessIntegers,r=r.useBigInt;void 0===n&&(n=function(){return null}),this._server=e||{},this._chunker=t,this._packer=this._createPacker(t),this._unpacker=this._createUnpacker(u,r),this._responseHandler=n(this),this._log=o,this._onProtocolError=i,this._fatalError=null,this._lastMessageSignature=null,this._config={disableLosslessIntegers:u,useBigInt:r}}w_.default=C0;var i={},M0={},wy={},WA=(Object.defineProperty(wy,"__esModule",{value:!0}),wy.epochDayToDate=JA,wy.nanoOfDayToLocalTime=$A,wy.epochSecondAndNanoToLocalDateTime=function(e,t){var r=QA(e,ZA),e=XA(e,ZA).multiply(KA).add(t),t=JA(r),r=$A(e);return new WA.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)},e),U0=WA.internal.temporalUtil,zA=U0.DAYS_0000_TO_1970,HA=U0.DAYS_PER_400_YEAR_CYCLE,GA=U0.NANOS_PER_HOUR,YA=U0.NANOS_PER_MINUTE,KA=U0.NANOS_PER_SECOND,ZA=U0.SECONDS_PER_DAY,QA=U0.floorDiv,XA=U0.floorMod;function JA(e){var e=(e=(0,WA.int)(e)).add(zA).subtract(60),t=(0,WA.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(HA).subtract(1)).multiply(400),e=e.add(r.multiply(-HA))),e.multiply(400).add(591).div(HA)),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400))),e=(n.lessThan(0)&&(r=r.subtract(1),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400)))),r=r.add(t),n),t=e.multiply(5).add(2).div(153),n=t.add(2).modulo(12).add(1),e=e.subtract(t.multiply(306).add(5).div(10)).add(1),r=r.add(t.div(10));return new WA.Date(r,n,e)}function $A(e){var t=(e=(0,WA.int)(e)).div(GA),r=(e=e.subtract(t.multiply(GA))).div(YA),n=(e=e.subtract(r.multiply(YA))).div(KA),e=e.subtract(n.multiply(KA));return new WA.LocalTime(t,r,n,e)}var eM=r&&r.__assign||function(){return(eM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},tM=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},z0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rM=(Object.defineProperty(M0,"__esModule",{value:!0}),e),nM=bm,oM=y0,iM=wy,Z0=z0(h),tg=rM.internal.temporalUtil,uM=tg.dateToEpochDay,aM=tg.localDateTimeToEpochSecond,sM=tg.localTimeToNanoOfDay;function cM(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,rM.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}M0.default=eM(eM({},Z0.default),{createPoint2DTransformer:function(){return new oM.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,rM.isPoint)(e)&&null==e.z},toStructure:function(e){return new nM.structure.Structure(88,[(0,rM.int)(e.srid),e.x,e.y])},fromStructure:function(e){nM.structure.verifyStructSize("Point2D",3,e.size);var e=tM(e.fields,3),t=e[0];return new rM.Point(t,e[1],e[2],void 0)}})},createPoint3DTransformer:function(){return new oM.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,rM.isPoint)(e)&&null!=e.z},toStructure:function(e){return new nM.structure.Structure(89,[(0,rM.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){nM.structure.verifyStructSize("Point3D",4,e.size);var e=tM(e.fields,4),t=e[0];return new rM.Point(t,e[1],e[2],e[3])}})},createDurationTransformer:function(){return new oM.TypeTransformer({signature:69,isTypeInstance:rM.isDuration,toStructure:function(e){var t=(0,rM.int)(e.months),r=(0,rM.int)(e.days),n=(0,rM.int)(e.seconds),e=(0,rM.int)(e.nanoseconds);return new nM.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){nM.structure.verifyStructSize("Duration",4,e.size);var e=tM(e.fields,4),t=e[0];return new rM.Duration(t,e[1],e[2],e[3])}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new oM.TypeTransformer({signature:116,isTypeInstance:rM.isLocalTime,toStructure:function(e){e=sM(e.hour,e.minute,e.second,e.nanosecond);return new nM.structure.Structure(116,[e])},fromStructure:function(e){nM.structure.verifyStructSize("LocalTime",1,e.size);e=tM(e.fields,1)[0];return cM((0,iM.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new oM.TypeTransformer({signature:84,isTypeInstance:rM.isTime,toStructure:function(e){var t=sM(e.hour,e.minute,e.second,e.nanosecond),e=(0,rM.int)(e.timeZoneOffsetSeconds);return new nM.structure.Structure(84,[t,e])},fromStructure:function(e){nM.structure.verifyStructSize("Time",2,e.size);var e=tM(e.fields,2),t=e[0],e=e[1],t=(0,iM.nanoOfDayToLocalTime)(t);return cM(new rM.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new oM.TypeTransformer({signature:68,isTypeInstance:rM.isDate,toStructure:function(e){e=uM(e.year,e.month,e.day);return new nM.structure.Structure(68,[e])},fromStructure:function(e){nM.structure.verifyStructSize("Date",1,e.size);e=tM(e.fields,1)[0];return cM((0,iM.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new oM.TypeTransformer({signature:100,isTypeInstance:rM.isLocalDateTime,toStructure:function(e){var t=aM(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,rM.int)(e.nanosecond);return new nM.structure.Structure(100,[t,e])},fromStructure:function(e){nM.structure.verifyStructSize("LocalDateTime",2,e.size);var e=tM(e.fields,2),t=e[0];return cM((0,iM.epochSecondAndNanoToLocalDateTime)(t,e[1]),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new oM.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,rM.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=aM(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,rM.int)(e.nanosecond),e=e.timeZoneId;return new nM.structure.Structure(102,[t,r,e])},fromStructure:function(e){nM.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=tM(e.fields,3),t=e[0],r=e[2],t=(0,iM.epochSecondAndNanoToLocalDateTime)(t,e[1]);return cM(new rM.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,null,r),n,o)}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new oM.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,rM.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=aM(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,rM.int)(e.nanosecond),e=(0,rM.int)(e.timeZoneOffsetSeconds);return new nM.structure.Structure(70,[t,r,e])},fromStructure:function(e){nM.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=tM(e.fields,3),t=e[0],r=e[2],t=(0,iM.epochSecondAndNanoToLocalDateTime)(t,e[1]);return cM(new rM.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,r,null),n,o)}})}});var lM,fM,Zt=r&&r.__extends||(lM=function(e,t){return(lM=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])}))(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}lM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ug=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fg=(Object.defineProperty(i,"__esModule",{value:!0}),ug(w_)),pM=ug(bm),bg=e,dM=ug(M0),hM=ug(y0),bM=bg.internal.constants.BOLT_PROTOCOL_V2,Ey=(fM=fg.default,Zt(yM,fM),yM.prototype._createPacker=function(e){return new pM.default.Packer(e)},yM.prototype._createUnpacker=function(e,t){return new pM.default.Unpacker(e,t)},Object.defineProperty(yM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new hM.default(Object.values(dM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(yM.prototype,"version",{get:function(){return bM},enumerable:!1,configurable:!0}),yM);function yM(){return null!==fM&&fM.apply(this,arguments)||this}i.default=Ey;var _M,vM,wg={},Rg={},mM=r&&r.__assign||function(){return(mM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ng=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fg=(Object.defineProperty(Rg,"__esModule",{value:!0}),Ng(M0)),Vg=(Rg.default=mM({},Fg.default),r&&r.__extends||(_M=function(e,t){return(_M=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])}))(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}_M(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),gM=r&&r.__assign||function(){return(gM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Hg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qg=(Object.defineProperty(wg,"__esModule",{value:!0}),Hg(i)),OM=Hg(n0),wM=j_,EM=A,PM=Hg(Rg),TM=Hg(y0),SM=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),jM=e.internal.txConfig.TxConfig,CM="context",IM="CALL dbms.cluster.routing.getRoutingTable($".concat(CM,")"),RM=new EM.StreamObserver,$g=(vM=Qg.default,Vg(AM,vM),Object.defineProperty(AM.prototype,"version",{get:function(){return SM},enumerable:!1,configurable:!0}),Object.defineProperty(AM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new TM.default(Object.values(PM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),AM.prototype.transformMetadata=function(e){return"t_first"in e&&(e.result_available_after=e.t_first,delete e.t_first),"t_last"in e&&(e.result_consumed_after=e.t_last,delete e.t_last),e},AM.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new EM.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,wM.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(OM.default.hello(r,n),e,!0),e},AM.prototype.prepareToClose=function(){this.write(OM.default.goodbye(),RM,!0)},AM.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,e=new EM.ResultStreamObserver({server:this._server,beforeError:e.beforeError,afterError:e.afterError,beforeComplete:e.beforeComplete,afterComplete:e.afterComplete});return e.prepareToHandleSingleResponse(),(0,wM.assertDatabaseIsEmpty)(n,this._onProtocolError,e),(0,wM.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,e),(0,wM.assertNotificationFilterIsEmpty)(i,this._onProtocolError,e),this.write(OM.default.begin({bookmarks:t,txConfig:r,mode:u}),e,!0),e},AM.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,t=new EM.ResultStreamObserver({server:this._server,beforeError:t,afterError:e.afterError,beforeComplete:e.beforeComplete,afterComplete:e.afterComplete});return t.prepareToHandleSingleResponse(),this.write(OM.default.commit(),t,!0),t},AM.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,t=new EM.ResultStreamObserver({server:this._server,beforeError:t,afterError:e.afterError,beforeComplete:e.beforeComplete,afterComplete:e.afterComplete});return t.prepareToHandleSingleResponse(),this.write(OM.default.rollback(),t,!0),t},AM.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.flush,c=void 0===c||c,l=r.highRecordWatermark,l=void 0===l?Number.MAX_VALUE:l,f=r.lowRecordWatermark,f=void 0===f?Number.MAX_VALUE:f,r=new EM.ResultStreamObserver({server:this._server,beforeKeys:r.beforeKeys,afterKeys:r.afterKeys,beforeError:r.beforeError,afterError:r.afterError,beforeComplete:r.beforeComplete,afterComplete:r.afterComplete,highRecordWatermark:l,lowRecordWatermark:f});return(0,wM.assertDatabaseIsEmpty)(i,this._onProtocolError,r),(0,wM.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,r),(0,wM.assertNotificationFilterIsEmpty)(a,this._onProtocolError,r),this.write(OM.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),r,!1),this.write(OM.default.pullAll(),r,c),r},AM.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,r=this.run(IM,((t={})[CM]=void 0===r?{}:r,t),gM(gM({},n),{txConfig:jM.empty()}));return new EM.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},AM);function AM(){return null!==vM&&vM.apply(this,arguments)||this}wg.default=$g;var MM,NM,Ff={},nO={},kM=r&&r.__assign||function(){return(kM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},oO=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lO=(Object.defineProperty(nO,"__esModule",{value:!0}),oO(Rg)),dO=(nO.default=kM({},lO.default),r&&r.__extends||(MM=function(e,t){return(MM=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])}))(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}MM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),xM=r&&r.__assign||function(){return(xM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},x_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mm=(Object.defineProperty(Ff,"__esModule",{value:!0}),x_(wg)),DM=x_(n0),LM=j_,UM=A,FM=x_(nO),BM=x_(y0),yO=(e.internal.bookmarks.Bookmarks,e.internal.constants),VM=yO.BOLT_PROTOCOL_V4_0,qM=yO.FETCH_ALL,WM=e.internal.txConfig.TxConfig,zM="context",HM="database",GM="CALL dbms.routing.getRoutingTable($".concat(zM,", $").concat(HM,")"),OO=(NM=mm.default,dO(YM,NM),Object.defineProperty(YM.prototype,"version",{get:function(){return VM},enumerable:!1,configurable:!0}),Object.defineProperty(YM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new BM.default(Object.values(FM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),YM.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,e=new UM.ResultStreamObserver({server:this._server,beforeError:e.beforeError,afterError:e.afterError,beforeComplete:e.beforeComplete,afterComplete:e.afterComplete});return e.prepareToHandleSingleResponse(),(0,LM.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,e),(0,LM.assertNotificationFilterIsEmpty)(i,this._onProtocolError,e),this.write(DM.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),e,!0),e},YM.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?qM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new UM.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,LM.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,LM.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(DM.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(DM.default.pull({n:_}),c,b),c},YM.prototype._requestMore=function(e,t,r){this.write(DM.default.pull({stmtId:e,n:t}),r,!0)},YM.prototype._requestDiscard=function(e,t){this.write(DM.default.discard({stmtId:e}),t,!0)},YM.prototype._noOp=function(){},YM.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.databaseName,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,r=this.run(GM,((t={})[zM]=void 0===r?{}:r,t[HM]=n,t),xM(xM({},o),{txConfig:WM.empty()}));return new UM.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},YM);function YM(){return null!==NM&&NM.apply(this,arguments)||this}Ff.default=OO;var KM,ZM,PO={},_={},QM=r&&r.__assign||function(){return(QM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},MO=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_v=(Object.defineProperty(_,"__esModule",{value:!0}),MO(nO)),DO=(_.default=QM({},_v.default),r&&r.__extends||(KM=function(e,t){return(KM=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])}))(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}KM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),cf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},VO=(Object.defineProperty(PO,"__esModule",{value:!0}),cf(Ff)),XM=cf(n0),JM=A,Kf=e,$M=j_,eN=cf(_),tN=cf(y0),rN=Kf.internal.constants.BOLT_PROTOCOL_V4_1,Oy=(ZM=VO.default,DO(nN,ZM),Object.defineProperty(nN.prototype,"version",{get:function(){return rN},enumerable:!1,configurable:!0}),Object.defineProperty(nN.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new tN.default(Object.values(eN.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),nN.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new JM.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,$M.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(XM.default.hello(r,n,this._serversideRouting),e,!0),e},nN);function nN(e,t,r,n,o,i,u){e=ZM.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}PO.default=Oy;var oN,iN,F={},JO={},uN=r&&r.__assign||function(){return(uN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},nw=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},xf=(Object.defineProperty(JO,"__esModule",{value:!0}),nw(_)),E=(JO.default=uN({},xf.default),r&&r.__extends||(oN=function(e,t){return(oN=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])}))(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}oN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Pw=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},O=(Object.defineProperty(F,"__esModule",{value:!0}),Pw(PO)),p=e,aN=Pw(JO),sN=Pw(y0),cN=p.internal.constants.BOLT_PROTOCOL_V4_2,I=(iN=O.default,E(lN,iN),Object.defineProperty(lN.prototype,"version",{get:function(){return cN},enumerable:!1,configurable:!0}),Object.defineProperty(lN.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new sN.default(Object.values(aN.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),lN);function lN(){return null!==iN&&iN.apply(this,arguments)||this}F.default=I;var C={},l={},fN=r&&r.__assign||function(){return(fN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},xo=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},po=(Object.defineProperty(l,"__esModule",{value:!0}),xo(JO)),w=(l.default=fN({},po.default),{}),T={},pN=r&&r.__assign||function(){return(pN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},j=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},S=(Object.defineProperty(T,"__esModule",{value:!0}),j(l)),dN=(T.default=pN({},S.default),r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}),t=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hN=(Object.defineProperty(w,"__esModule",{value:!0}),bm),bN=e,yN=t(T),_N=wy,vN=hv,mN=bN.internal.temporalUtil.localDateTimeToEpochSecond;var gN=new Map;function ON(e,t,r){e=e,gN.has(e)||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),gN.set(e,n));var n=gN.get(e),e=(0,bN.int)(t).multiply(1e3).add((0,bN.int)(r).div(1e6)).toNumber(),r=n.formatToParts(e).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:vN.identity:"hour"===t.type?e.hour=(0,bN.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,bN.int)(t.value)),e},{}),e=(r.year=r.adjustEra(r.year),mN(r.year,r.month,r.day,r.hour,r.minute,r.second,r.nanosecond));return r.timeZoneOffsetSeconds=e.subtract(t),r.hour=r.hour.modulo(24),r}function wN(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,bN.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}w.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return yN.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){hN.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=dN(e.fields,3),t=e[0],r=e[1],e=e[2],t=ON(e,t,r);return wN(new bN.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,bN.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=mN(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=null!=e.timeZoneOffsetSeconds?e.timeZoneOffsetSeconds:(r=e.timeZoneId,n=ON(r,i=t,o=e.nanosecond),n=mN(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=ON(r,i,o),mN(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i)),n=(null==e.timeZoneOffsetSeconds&&u.warn('DateTime objects without "timeZoneOffsetSeconds" property are prune to bugs related to ambiguous times. For instance, 2022-10-30T2:30:00[Europe/Berlin] could be GMT+1 or GMT+2.'),t.subtract(r)),o=(0,bN.int)(e.nanosecond),i=e.timeZoneId;return new hN.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return yN.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=mN(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,bN.int)(e.nanosecond),e=(0,bN.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new hN.structure.Structure(73,[t,r,e])},fromStructure:function(e){hN.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=dN(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,bN.int)(t).add(e),t=(0,_N.epochSecondAndNanoToLocalDateTime)(t,r);return wN(new bN.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var EN,PN,o=r&&r.__extends||(EN=function(e,t){return(EN=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])}))(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}EN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),TN=r&&r.__assign||function(){return(TN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},G=(Object.defineProperty(C,"__esModule",{value:!0}),y(F)),SN=y(n0),jN=A,CN=j_,IN=y(l),RN=y(w),AN=y(y0),MN=e.internal.bookmarks.Bookmarks,NN=e.internal.constants.BOLT_PROTOCOL_V4_3,Zn=(PN=G.default,o(kN,PN),Object.defineProperty(kN.prototype,"version",{get:function(){return NN},enumerable:!1,configurable:!0}),Object.defineProperty(kN.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new AN.default(Object.values(IN.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),kN.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.sessionContext,n=void 0===n?{}:n,e=new jN.RouteObserver({onProtocolError:this._onProtocolError,onError:e.onError,onCompleted:e.onCompleted}),n=n.bookmarks||MN.empty();return this.write(SN.default.route(t,n.values(),r),e,!0),e},kN.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new jN.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return void 0!==e.patch_bolt&&t._applyPatches(e.patch_bolt),t._onLoginCompleted(e,n,u)}});return(0,CN.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(SN.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},kN.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},kN.prototype._applyUtcPatch=function(){var t=this;this._transformer=new AN.default(Object.values(TN(TN({},IN.default),RN.default)).map(function(e){return e(t._config,t._log)}))},kN);function kN(){return null!==PN&&PN.apply(this,arguments)||this}C.default=Zn;var xN,DN,u={},rf=r&&r.__extends||(xN=function(e,t){return(xN=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])}))(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}xN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),LN=r&&r.__assign||function(){return(LN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},np=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ar=(Object.defineProperty(u,"__esModule",{value:!0}),np(C)),Zl=e,UN=np(n0),FN=A,BN=j_,VN=np(T),qN=np(w),WN=np(y0),zf=Zl.internal.constants,zN=zf.BOLT_PROTOCOL_V4_4,HN=zf.FETCH_ALL,GN=Zl.internal.bookmarks.Bookmarks,Xl=(DN=Ar.default,rf(YN,DN),Object.defineProperty(YN.prototype,"version",{get:function(){return zN},enumerable:!1,configurable:!0}),Object.defineProperty(YN.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new WN.default(Object.values(VN.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),YN.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.impersonatedUser,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,e=new FN.RouteObserver({onProtocolError:this._onProtocolError,onError:e.onError,onCompleted:e.onCompleted}),o=o.bookmarks||GN.empty();return this.write(UN.default.routeV4x4(t,o.values(),{databaseName:r,impersonatedUser:n}),e,!0),e},YN.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?HN:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new FN.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,BN.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(UN.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(UN.default.pull({n:_}),c,b),c},YN.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,e=new FN.ResultStreamObserver({server:this._server,beforeError:e.beforeError,afterError:e.afterError,beforeComplete:e.beforeComplete,afterComplete:e.afterComplete});return e.prepareToHandleSingleResponse(),(0,BN.assertNotificationFilterIsEmpty)(u,this._onProtocolError,e),this.write(UN.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),e,!0),e},YN.prototype._applyUtcPatch=function(){var t=this;this._transformer=new WN.default(Object.values(LN(LN({},VN.default),qN.default)).map(function(e){return e(t._config,t._log)}))},YN);function YN(){return null!==DN&&DN.apply(this,arguments)||this}u.default=Xl;var nf={},g={},KN=r&&r.__assign||function(){return(KN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ZN=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ef=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},QN=(Object.defineProperty(g,"__esModule",{value:!0}),bm),XN=e,JN=ef(T),ad=ef(w);g.default=KN(KN(KN({},JN.default),ad.default),{createNodeTransformer:function(e){return JN.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){QN.structure.verifyStructSize("Node",4,e.size);var e=ZN(e.fields,4),t=e[0];return new XN.Node(t,e[1],e[2],e[3])}})},createRelationshipTransformer:function(e){return JN.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){QN.structure.verifyStructSize("Relationship",8,e.size);var e=ZN(e.fields,8),t=e[0];return new XN.Relationship(t,e[1],e[2],e[3],e[4],e[5],e[6],e[7])}})},createUnboundRelationshipTransformer:function(e){return JN.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){QN.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=ZN(e.fields,4),t=e[0];return new XN.UnboundRelationship(t,e[1],e[2],e[3])}})}});var $N,e2,hd=r&&r.__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])}))(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)}),Kl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qf=(Object.defineProperty(nf,"__esModule",{value:!0}),Kl(u)),t2=j_,r2=Kl(g),n2=Kl(y0),o2=Kl(n0),i2=A,u2=e.internal.constants.BOLT_PROTOCOL_V5_0,v=(e2=Qf.default,hd(a2,e2),Object.defineProperty(a2.prototype,"version",{get:function(){return u2},enumerable:!1,configurable:!0}),Object.defineProperty(a2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new n2.default(Object.values(r2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),a2.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new i2.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,t2.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(o2.default.hello(r,n,this._serversideRouting),e,!0),e},a2);function a2(){return null!==e2&&e2.apply(this,arguments)||this}nf.default=v;var s2,c2,qh={},Qh={},l2=r&&r.__assign||function(){return(l2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Jh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},pb=(Object.defineProperty(Qh,"__esModule",{value:!0}),Jh(g)),Yl=(Qh.default=l2({},pb.default),r&&r.__extends||(s2=function(e,t){return(s2=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])}))(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}s2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),f2=r&&r.__assign||function(){return(f2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ub=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ch=(Object.defineProperty(qh,"__esModule",{value:!0}),ub(nf)),p2=j_,d2=ub(Qh),h2=ub(y0),b2=ub(n0),y2=A,_2=e.internal.constants.BOLT_PROTOCOL_V5_1,bb=(c2=Ch.default,Yl(v2,c2),Object.defineProperty(v2.prototype,"version",{get:function(){return _2},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new h2.default(Object.values(d2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),v2.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new y2.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,p2.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(b2.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(f2(f2({},e),a.metadata))},onError:i,flush:!0})},v2.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=e.flush,i=new y2.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(b2.default.logon(r),i,e),i},v2.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.flush,t=new y2.LogoffObserver({onCompleted:t,onError:e.onError});return this.write(b2.default.logoff(),t,r),t},v2);function v2(){return null!==c2&&c2.apply(this,arguments)||this}qh.default=bb;var m2,g2,Gl={},pe={},O2=r&&r.__assign||function(){return(O2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Vh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$d=(Object.defineProperty(pe,"__esModule",{value:!0}),Vh(Qh)),mb=(pe.default=O2({},$d.default),r&&r.__extends||(m2=function(e,t){return(m2=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])}))(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}m2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),w2=r&&r.__assign||function(){return(w2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Cb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},b=(Object.defineProperty(Gl,"__esModule",{value:!0}),Cb(qh)),E2=Cb(pe),P2=Cb(y0),T2=Cb(n0),S2=A,Wr=e.internal.constants,j2=Wr.BOLT_PROTOCOL_V5_2,C2=Wr.FETCH_ALL,R=(g2=b.default,mb(I2,g2),Object.defineProperty(I2.prototype,"version",{get:function(){return j2},enumerable:!1,configurable:!0}),Object.defineProperty(I2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new P2.default(Object.values(E2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(I2.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),I2.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new S2.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write(T2.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(w2(w2({},e),a.metadata))},onError:i,flush:!0})},I2.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,e=new S2.ResultStreamObserver({server:this._server,beforeError:e.beforeError,afterError:e.afterError,beforeComplete:e.beforeComplete,afterComplete:e.afterComplete});return e.prepareToHandleSingleResponse(),this.write(T2.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),e,!0),e},I2.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?C2:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new S2.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=y;return this.write(T2.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(T2.default.pull({n:_}),c,b),c},I2);function I2(){return null!==g2&&g2.apply(this,arguments)||this}Gl.default=R;var R2,A2,$h={},Nb={},M2=r&&r.__assign||function(){return(M2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Lb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Bl=(Object.defineProperty(Nb,"__esModule",{value:!0}),Lb(pe)),Yb=(Nb.default=M2({},Bl.default),r&&r.__extends||(R2=function(e,t){return(R2=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])}))(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}R2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),N2=r&&r.__assign||function(){return(N2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ib=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ry=(Object.defineProperty($h,"__esModule",{value:!0}),Ib(Gl)),k2=Ib(Nb),x2=Ib(y0),D2=Ib(n0),L2=A,U2=e.internal.constants.BOLT_PROTOCOL_V5_3,qb=(A2=ry.default,Yb(F2,A2),Object.defineProperty(F2.prototype,"version",{get:function(){return U2},enumerable:!1,configurable:!0}),Object.defineProperty(F2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new x2.default(Object.values(k2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),F2.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new L2.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(D2.default.hello5x3(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(N2(N2({},e),s.metadata))},onError:u,flush:!0})},F2);function F2(){return null!==A2&&A2.apply(this,arguments)||this}$h.default=qb;var B2,V2,ly={},my={},q2=r&&r.__assign||function(){return(q2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},gy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},jd=(Object.defineProperty(my,"__esModule",{value:!0}),gy(Nb)),zp=(my.default=q2({},jd.default),r&&r.__extends||(B2=function(e,t){return(B2=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])}))(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}B2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),n_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$y=(Object.defineProperty(ly,"__esModule",{value:!0}),n_($h)),W2=n_(my),z2=n_(n0),H2=A,G2=n_(y0),Y2=e.internal.constants.BOLT_PROTOCOL_V5_4,cd=(V2=$y.default,zp(K2,V2),Object.defineProperty(K2.prototype,"version",{get:function(){return Y2},enumerable:!1,configurable:!0}),Object.defineProperty(K2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new G2.default(Object.values(W2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),K2.prototype.telemetry=function(e,t){var e=e.api,t=void 0===t?{}:t,r=t.onError,t=new H2.TelemetryObserver({onCompleted:t.onCompleted,onError:r});return this.write(z2.default.telemetry({api:e}),t,!1),t},K2);function K2(){return null!==V2&&V2.apply(this,arguments)||this}ly.default=cd;var Z2,Q2,Ly={},Gd={},X2=r&&r.__assign||function(){return(X2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},d_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Wh=(Object.defineProperty(Gd,"__esModule",{value:!0}),d_(my)),by=(Gd.default=X2({},Wh.default),r&&r.__extends||(Z2=function(e,t){return(Z2=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])}))(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}Z2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),J2=r&&r.__assign||function(){return(J2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Hl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Uy=(Object.defineProperty(Ly,"__esModule",{value:!0}),Hl(ly)),$2=Hl(Gd),ek=Hl(y0),tk=Hl(n0),rk=A,r_=e.internal.constants,nk=r_.BOLT_PROTOCOL_V5_5,ok=r_.FETCH_ALL,ik=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),ev=(Q2=Uy.default,by(uk,Q2),Object.defineProperty(uk.prototype,"version",{get:function(){return nk},enumerable:!1,configurable:!0}),Object.defineProperty(uk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new ek.default(Object.values($2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),uk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new rk.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(tk.default.hello5x5(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(J2(J2({},e),s.metadata))},onError:u,flush:!0})},uk.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,e=new rk.ResultStreamObserver({server:this._server,beforeError:e.beforeError,afterError:e.afterError,beforeComplete:e.beforeComplete,afterComplete:e.afterComplete});return e.prepareToHandleSingleResponse(),this.write(tk.default.begin5x5({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),e,!0),e},uk.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?ok:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new rk.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r,enrichMetadata:this._enrichMetadata}),l=y;return this.write(tk.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(tk.default.pull({n:_}),c,b),c},uk.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return J2(J2({},e),{description:null!=e.neo4j_code?e.status_description:e.description,diagnostic_record:null!==e.diagnostic_record?J2(J2({},ik),e.diagnostic_record):null})})),e},uk);function uk(){return null!==Q2&&Q2.apply(this,arguments)||this}Ly.default=ev;var ak,sk,k_={},ov={},ck=r&&r.__assign||function(){return(ck=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},jv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},yv=(Object.defineProperty(ov,"__esModule",{value:!0}),jv(Gd)),xv=(ov.default=ck({},yv.default),r&&r.__extends||(ak=function(e,t){return(ak=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])}))(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}ak(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),lk=r&&r.__assign||function(){return(lk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},zv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},eb=(Object.defineProperty(k_,"__esModule",{value:!0}),zv(Ly)),fk=zv(ov),pk=zv(y0),dk=e.internal.constants.BOLT_PROTOCOL_V5_6,hk=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),Yv=(sk=eb.default,xv(bk,sk),Object.defineProperty(bk.prototype,"version",{get:function(){return dk},enumerable:!1,configurable:!0}),Object.defineProperty(bk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new pk.default(Object.values(fk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),bk.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return lk(lk({},e),{diagnostic_record:null!==e.diagnostic_record?lk(lk({},hk),e.diagnostic_record):null})})),e},bk);function bk(){return null!==sk&&sk.apply(this,arguments)||this}k_.default=Yv;var yk,_k,Zv={},$v={},vk=r&&r.__assign||function(){return(vk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Lv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rm=(Object.defineProperty($v,"__esModule",{value:!0}),Lv(ov)),cm=($v.default=vk({},rm.default),r&&r.__extends||(yk=function(e,t){return(yk=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])}))(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}yk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),mk=r&&r.__assign||function(){return(mk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Mv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Dv=(Object.defineProperty(Zv,"__esModule",{value:!0}),Mv(k_)),gk=Mv($v),Ok=Mv(y0),wk=e.internal.constants.BOLT_PROTOCOL_V5_7,Ek=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),F_=(_k=Dv.default,cm(Pk,_k),Object.defineProperty(Pk.prototype,"version",{get:function(){return wk},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Ok.default(Object.values(gk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Pk.prototype.enrichErrorMetadata=function(e){return mk(mk({},e),{cause:null!=e.cause?this.enrichErrorMetadata(e.cause):null,code:e.neo4j_code,diagnostic_record:null!==e.diagnostic_record?mk(mk({},Ek),e.diagnostic_record):null})},Pk);function Pk(){return null!==_k&&_k.apply(this,arguments)||this}Zv.default=F_;var Tk,Sk,W_={},zm={},jk=r&&r.__assign||function(){return(jk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Lm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cd=(Object.defineProperty(zm,"__esModule",{value:!0}),Lm($v)),km=(zm.default=jk({},Cd.default),r&&r.__extends||(Tk=function(e,t){return(Tk=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])}))(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}Tk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Id=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},vm=(Object.defineProperty(W_,"__esModule",{value:!0}),Id(Zv)),Ck=Id(zm),Ik=Id(y0),Rk=Id(n0),Ak=A,Vm=e.internal.constants,Mk=Vm.BOLT_PROTOCOL_V5_8,Nk=Vm.FETCH_ALL,Rm=(Sk=vm.default,km(kk,Sk),Object.defineProperty(kk.prototype,"version",{get:function(){return Mk},enumerable:!1,configurable:!0}),Object.defineProperty(kk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Ik.default(Object.values(Ck.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),kk.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?Nk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,m=r.lowRecordWatermark,m=void 0===m?Number.MAX_VALUE:m,r=r.onDb,c=new Ak.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:m,enrichMetadata:this._enrichMetadata,onDb:r}),l=y;return this.write(Rk.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(Rk.default.pull({n:_}),c,b),c},kk);function kk(){return null!==Sk&&Sk.apply(this,arguments)||this}W_.default=Rm;var Um={},Hp={},xk=r&&r.__assign||function(){return(xk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},e0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Rd=(Object.defineProperty(Hp,"__esModule",{value:!0}),e0(zm)),Dk=y0,Lk=bm,Uk=e,Fk=198,Bk=193,Vk=200,qk=201,Wk=202,zk=203,Hk={INT8:Vk,INT16:qk,INT32:Wk,INT64:zk,FLOAT32:Fk,FLOAT64:Bk};function Gk(e,t){(r=new DataView(new ArrayBuffer(2))).setInt16(0,1e3,!0);var r,n=1e3===new Int16Array(r.buffer)[0];if(n){var o=new DataView(new ArrayBuffer(t.byteLength)),i=new DataView(t),u=void 0,a=void 0,s=void 0;switch(e){case Vk:s=1,u=o.setInt8.bind(o),a=i.getInt8.bind(i);break;case qk:s=2,u=o.setInt16.bind(o),a=i.getInt16.bind(i);break;case Wk:s=4,u=o.setInt32.bind(o),a=i.getInt32.bind(i);break;case zk:s=8,u=o.setBigInt64.bind(o),a=i.getBigInt64.bind(i);break;case Fk:s=4,u=o.setInt32.bind(o),a=i.getInt32.bind(i);break;case Bk:s=8,u=o.setBigInt64.bind(o),a=i.getBigInt64.bind(i);break;default:throw(0,Uk.newError)("Vector is of unsupported type ".concat(e))}for(var c=0;c<t.byteLength;c+=s)u(c,a(c,n));return o.buffer}return t}Hp.default=xk(xk({},Rd.default),{createVectorTransformer:function(){return new Dk.TypeTransformer({signature:86,isTypeInstance:function(e){return(0,Uk.isVector)(e)},toStructure:function(e){var t=Hk[e.getType()];if(void 0===t)throw(0,Uk.newError)("Vector object has unknown type: ".concat(e.getType()));e=Gk(t,e.asTypedArray().buffer);return new Lk.structure.Structure(86,[Int8Array.from([t]),new Int8Array(e)])},fromStructure:function(e){var t=Uint8Array.from(e.fields[0])[0],r=Gk(t,e.fields[1].buffer);switch(t){case Vk:return new Uk.Vector(new Int8Array(r));case qk:return new Uk.Vector(new Int16Array(r));case Wk:return new Uk.Vector(new Int32Array(r));case zk:return new Uk.Vector(new BigInt64Array(r));case Fk:return new Uk.Vector(new Float32Array(r));case Bk:return new Uk.Vector(new Float64Array(r));default:throw(0,Uk.newError)("Received Vector structure with unsupported type marker: ".concat(t))}}})},createUnsupportedTypeTransformer:function(){return new Dk.TypeTransformer({signature:63,isTypeInstance:function(e){return(0,Uk.isUnsupportedType)(e)},toStructure:function(e){throw(0,Uk.newError)("UnsupportedType object can not be transmitted")},fromStructure:function(e){return new Uk.UnsupportedType(e.fields[0],e.fields[1],e.fields[2],e.fields[3].message)}})}});var Yk,Kk,a=r&&r.__extends||(Yk=function(e,t){return(Yk=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])}))(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}Yk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},d0=(Object.defineProperty(Um,"__esModule",{value:!0}),a0(W_)),Zk=a0(Hp),Qk=a0(y0),Xk=e.internal.constants.BOLT_PROTOCOL_V6_0,v0=(Kk=d0.default,a(Jk,Kk),Object.defineProperty(Jk.prototype,"version",{get:function(){return Xk},enumerable:!1,configurable:!0}),Object.defineProperty(Jk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Qk.default(Object.values(Zk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Jk);function Jk(){return null!==Kk&&Kk.apply(this,arguments)||this}Um.default=v0;var w0={},$k=(Object.defineProperty(w0,"__esModule",{value:!0}),e);function ex(){}function tx(e){return e}var rx={onNext:ex,onCompleted:ex,onError:ex};function nx(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.enrichErrorMetadata,n=e.log,e=e.observer;this._pendingObservers=[],this._log=n,this._transformMetadata=t||tx,this._enrichErrorMetadata=r||tx,this._observer=Object.assign({onObserversCountChange:ex,onError:ex,onFailure:ex,onErrorApplyTransformation:tx},e)}Object.defineProperty(nx.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),nx.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat($k.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat($k.json.stringify(e)));try{var r=this._transformMetadata(t);this._currentObserver.onCompleted(r)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat($k.json.stringify(e)));try{this._currentFailure=this._handleErrorPayload(this._enrichErrorMetadata(t)),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure,!1)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED ".concat($k.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure,!1):this._currentObserver.onError&&this._currentObserver.onError((0,$k.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,$k.newError)("Unknown Bolt protocol message: "+e))}},nx.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(nx.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),nx.prototype._queueObserver=function(e){return(e=e||rx).onCompleted=e.onCompleted||ex,e.onError=e.onError||ex,e.onNext=e.onNext||ex,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},nx.prototype._notifyErrorToObservers=function(e){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(e);0<this._pendingObservers.length;){var t=this._pendingObservers.shift();t&&t.onError&&t.onError(e,!1)}},nx.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},nx.prototype._resetFailure=function(){this._currentFailure=null},nx.prototype._handleErrorPayload=function(e){var t=(e=>"Neo.TransientError.Transaction.Terminated"===e?"Neo.ClientError.Transaction.Terminated":"Neo.TransientError.Transaction.LockClientStopped"===e?"Neo.ClientError.Transaction.LockClientStopped":e)(e.code),r=null!=e.cause?this._handleErrorCause(e.cause):void 0,t=(0,$k.newError)(e.message,t,r,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},nx.prototype._handleErrorCause=function(e){var t=null!=e.cause?this._handleErrorCause(e.cause):void 0,t=(0,$k.newGQLError)(e.message,t,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},w0.default=nx;var ox,T0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ix=(Object.defineProperty(h_,"__esModule",{value:!0}),h_.default=function(e){var e=void 0===e?{}:e,t=e.version,r=e.chunker,n=e.dechunker,o=e.channel,i=e.disableLosslessIntegers,u=e.useBigInt,a=e.serversideRouting,s=e.log,c=e.observer;return((e,t,r,n,o,i,u,a)=>{if(!(e instanceof ix.ProtocolVersion)||null==e)throw(0,ix.newError)("Unknown Bolt protocol version: "+e);switch(!0){case e.isEqualTo({major:1,minor:0}):return new ux.default(t,r,n,i,a,u);case e.isEqualTo({major:2,minor:0}):return new ax.default(t,r,n,i,a,u);case e.isEqualTo({major:3,minor:0}):return new sx.default(t,r,n,i,a,u);case e.isEqualTo({major:4,minor:0}):return new cx.default(t,r,n,i,a,u);case e.isEqualTo({major:4,minor:1}):return new lx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:4,minor:2}):return new fx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:4,minor:3}):return new px.default(t,r,n,i,a,u,o);case e.isEqualTo({major:4,minor:4}):return new dx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:0}):return new hx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:1}):return new bx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:2}):return new yx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:3}):return new _x.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:4}):return new vx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:5}):return new mx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:6}):return new gx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:7}):return new Ox.default(t,r,n,i,a,u,o);case e.isEqualTo({major:5,minor:8}):return new wx.default(t,r,n,i,a,u,o);case e.isEqualTo({major:6,minor:0}):return new Ex.default(t,r,n,i,a,u,o);default:throw(0,ix.newError)("Unknown Bolt protocol version: "+e)}})(t,e.server,r,{disableLosslessIntegers:i,useBigInt:u},a,function(t){var r=new Px.default({transformMetadata:t.transformMetadata.bind(t),enrichErrorMetadata:t.enrichErrorMetadata.bind(t),log:s,observer:c});return o.onerror=c.onError.bind(c),o.onmessage=function(e){return n.write(e)},n.onmessage=function(e){try{r.handleResponse(t.unpack(e))}catch(e){return c.onError(e)}},r},c.onProtocolError.bind(c),s)},e),ux=T0(w_),ax=T0(i),sx=T0(wg),cx=T0(Ff),lx=T0(PO),fx=T0(F),px=T0(C),dx=T0(u),hx=T0(nf),bx=T0(qh),yx=T0(Gl),_x=T0($h),vx=T0(ly),mx=T0(Ly),gx=T0(k_),Ox=T0(Zv),wx=T0(W_),Ex=T0(Um),Px=T0(w0);C0=n,ox=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),U0=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||ox(t,e,r)},z0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(C0,"__esModule",{value:!0}),C0.RawRoutingTable=C0.BoltProtocol=void 0,h=z0(Sd),tg=z0(h_),Z0=z0(C),z0=z0(N_),U0(A,C0),C0.BoltProtocol=Z0.default,C0.RawRoutingTable=z0.default,C0.default={handshake:h.default,create:tg.default};var Tx,ug={},bg={},fg=r&&r.__extends||(Tx=function(e,t){return(Tx=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])}))(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}Tx(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(bg,"__esModule",{value:!0});fg(jx,Sx=e.ConnectionProvider),jx.prototype.acquireConnection=function(e){e=void 0===e?{}:e,e.accessMode,e=this._connection;return this._connection=null,Promise.resolve(e)};var Sx,Zt=jx;function jx(e){var t=Sx.call(this)||this;return t._connection=e,t}bg.default=Zt;var Cx,Ey={},Ng={},M0={},Fg=r&&r.__extends||(Cx=function(e,t){return(Cx=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])}))(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}Cx(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(M0,"__esModule",{value:!0});Fg(Rx,Ix=e.Connection),Object.defineProperty(Rx.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Rx.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Rx.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Rx.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Rx.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Rx.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Rx.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(Rx.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Rx.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Rx.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Rx.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},Rx.prototype.write=function(e,t,r){throw new Error("not implemented")},Rx.prototype.close=function(){throw new Error("not implemented")},Rx.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e};var Ix,Hg=Rx;function Rx(e){var t=Ix.call(this)||this;return t._errorHandler=e,t}M0.default=Hg;var Ax,Qg={},Vg=r&&r.__extends||(Ax=function(e,t){return(Ax=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])}))(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}Ax(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Mx=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Nx=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},$g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kx=(Object.defineProperty(Qg,"__esModule",{value:!0}),Qg.createChannelConnection=function(i,u,a,s,e,c,l,t){void 0===c&&(c=null);void 0===t&&(t=function(e){return new kx.Channel(e)});var e=new kx.ChannelConfig(i,u,a.errorCode(),e),f=t(e);return Dx.default.handshake(f,s).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new kx.Chunker(f),o=new kx.Dechunker,t=new Vx(f,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return Dx.default.create({version:r,channel:f,chunker:n,dechunker:o,disableLosslessIntegers:u.disableLosslessIntegers,useBigInt:u.useBigInt,serversideRouting:c,server:t.server,log:t.logger,observer:{onObserversCountChange:t._handleOngoingRequestsNumberChange.bind(t),onError:t._handleFatalError.bind(t),onFailure:t._resetOnFailure.bind(t),onProtocolError:t._handleProtocolError.bind(t),onErrorApplyTransformation:function(e){return t.handleAndTransformError(e,t._address)}}})},u.telemetryDisabled,l);return e(function(e){return o.write(e)}),t}).catch(function(e){return f.close().then(function(){throw e})})},Hd),xx=e,oO=$g(M0),Dx=$g(n),Lx=xx.error.PROTOCOL_ERROR,Ux=xx.internal.logger.Logger,Fx=0;Bx=oO.default,Vg(qx,Bx),qx.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},qx.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},qx.prototype._sendTelemetryIfEnabled=function(e){this._telemetryDisabledConnection||this._telemetryDisabledDriverConfig||null==e||null==e.apiTelemetryConfig||this._protocol.telemetry({api:e.apiTelemetryConfig.api},{onCompleted:e.apiTelemetryConfig.onTelemetrySuccess,onError:e.beforeError})},qx.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},qx.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},qx.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(qx.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(qx.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(qx.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(qx.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(qx.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(qx.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),qx.prototype.connect=function(t,n,o,i){return Mx(this,void 0,void 0,function(){var r=this;return Nx(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,xx.newError)("Connection does not support re-auth");return this._authToken=o,this._protocol.initialized?[3,2]:[4,this._initialize(t,n,o)];case 1:return[2,e.sent()];case 2:return i?[4,new Promise(function(e,t){r._protocol.logoff({onError:t}),r._protocol.logon({authToken:o,onError:t,onComplete:function(){return e(r)},flush:!0})})]:[3,4];case 3:return[2,e.sent()];case 4:return this._protocol.logoff(),this._protocol.logon({authToken:o,flush:!0}),[2,this]}})})},qx.prototype._initialize=function(e,n,o){var i=this,u=this;return new Promise(function(r,t){i._protocol.initialize({userAgent:e,boltAgent:n,authToken:o,notificationFilter:i._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,i.version&&!t||(i.version=t),i.databaseId||(i.databaseId=e.connection_id),e.hints&&(null!=(t=e.hints["connection.recv_timeout_seconds"])&&(t=(0,xx.toNumber)(t),Number.isInteger(t)&&0<t?i._ch.setupReceiveTimeout(1e3*t):i._log.info("Server located at ".concat(i._address," supplied an invalid connection receive timeout value (").concat(t,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")),!0===e.hints["telemetry.enabled"]&&(i._telemetryDisabledConnection=!1),i.SSREnabledHint=e.hints["ssr.enabled"]),i._ssrCallback(null!=(t=i.SSREnabledHint)&&t,"OPEN")),r(u)}})})},qx.prototype.protocol=function(){return this._protocol},Object.defineProperty(qx.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(qx.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(qx.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(qx.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),qx.prototype._handleFatalError=function(e){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||e,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(xx.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},qx.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},qx.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},qx.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},qx.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},qx.prototype.resetAndFlush=function(){var r=this;return new Promise(function(e,t){r._reset({onError:function(e){r._isBroken?t(e):(e=r._handleProtocolError("Received FAILURE as a response for RESET: ".concat(e)),t(e))},onComplete:function(){e()}})})},qx.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},qx.prototype._reset=function(t){var e,r=this;this._reseting?this._protocol.isLastMessageReset()?this._resetObservers.push(t):this._protocol.reset({onError:function(e){t.onError(e)},onComplete:function(){t.onComplete()}}):(this._resetObservers.push(t),this._reseting=!0,e=function(e){r._reseting=!1;var t=r._resetObservers;r._resetObservers=[],t.forEach(e)},this._protocol.reset({onError:function(t){e(function(e){return e.onError(t)})},onComplete:function(){e(function(e){return e.onComplete()})}}))},qx.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},qx.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},qx.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},qx.prototype.close=function(){return Mx(this,void 0,void 0,function(){var t;return Nx(this,function(e){switch(e.label){case 0:return this._ssrCallback(null!=(t=this.SSREnabledHint)&&t,"CLOSE"),this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return e.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},qx.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},qx.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,xx.newError)(e,Lx);return this._handleFatalError(e),e};var Bx,Vx=qx;function qx(e,t,r,n,o,i,u,a,s,c,l){void 0===o&&(o=!1),void 0===i&&(i=null),void 0===l&&(l=function(e){});var f,p,t=Bx.call(this,t)||this;return t._authToken=null,t._idle=!1,t._reseting=!1,t._resetObservers=[],t._id=Fx++,t._address=r,t._server={address:r.asHostPort()},t._creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(f=t,new Ux((p=n)._level,function(e,t){return p._loggerFunction(e,"".concat(f," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._telemetryDisabledDriverConfig=!0===c,t._telemetryDisabledConnection=!0,t._ssrCallback=l,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}Qg.default=Vx;var Wx,zx,Rg={},lO=r&&r.__extends||(Wx=function(e,t){return(Wx=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])}))(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}Wx(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),x_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},yO=(Object.defineProperty(Rg,"__esModule",{value:!0}),x_(M0)),mm=(zx=yO.default,lO(Hx,zx),Hx.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},Hx.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},Hx.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},Hx.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},Hx.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(Hx.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(Hx.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(Hx.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(Hx.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(Hx.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(Hx.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(Hx.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(Hx.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(Hx.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),Hx.prototype.isOpen=function(){return this._delegate.isOpen()},Hx.prototype.protocol=function(){return this._delegate.protocol()},Hx.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},Hx.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},Hx.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},Hx.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},Hx.prototype.close=function(){return this._delegate.close()},Hx.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},Hx);function Hx(e,t){var r=zx.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}Rg.default=mm;dO={};Object.defineProperty(dO,"__esModule",{value:!0});var Gx,Yx,Kx,Zx,Qx=e.error.SERVICE_UNAVAILABLE,Xx=e.error.SESSION_EXPIRED;function Jx(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||$x,this._handleWriteFailure=r||$x,this._handleSecurityError=n||$x}function $x(e){return e}Jx.create=function(e){return new Jx(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleSecurityError)},Jx.prototype.errorCode=function(){return this._errorCode},Jx.prototype.handleAndTransformError=function(e,t,r){var n;return null!=(n=e)&&null!=n.code&&n.code.startsWith("Neo.ClientError.Security.")?this._handleSecurityError(e,t,r):(e=>e&&(e.code===Xx||e.code===Qx||"Neo.TransientError.General.DatabaseUnavailable"===e.code))(e)?this._handleUnavailability(e,t,r):(e=>e&&("Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code))(e)?this._handleWriteFailure(e,t,r):e},dO.default=Jx,OO=Ng,Yx=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Kx=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),MO=r&&r.__importStar||(Gx=function(e){return(Gx=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=Gx(e),n=0;n<r.length;n++)"default"!==r[n]&&Yx(t,e,r[n]);return Kx(t,e),t}),nO=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(OO,"__esModule",{value:!0}),OO.createChannelConnection=OO.ConnectionErrorHandler=OO.DelegateConnection=OO.ChannelConnection=OO.Connection=void 0,_v=nO(M0),OO.Connection=_v.default,Zx=MO(Qg),OO.ChannelConnection=Zx.default,Object.defineProperty(OO,"createChannelConnection",{enumerable:!0,get:function(){return Zx.createChannelConnection}}),MO=nO(Rg),OO.DelegateConnection=MO.default,MO=nO(dO),OO.ConnectionErrorHandler=MO.default,OO.default=_v.default;var cf={},eD=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},tD=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},rD=(Object.defineProperty(cf,"__esModule",{value:!0}),e),nD=cv;function oD(e){var t=e.authTokenManager,r=e.userAgent,e=e.boltAgent;this._authTokenManager=t||(0,rD.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=e}oD.prototype.authenticate=function(e){return eD(this,arguments,void 0,function(e){var t,r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return tD(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!nD.object.equals(r.authToken,n)&&!0!==o||!0===u),null==r.authToken||t?[4,r.connect(this._userAgent,this._boltAgent,n,i||!1)]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,r];case 3:return[4,this._authTokenManager.getToken()];case 4:return t=e.sent(),nD.object.equals(t,r.authToken)?[3,6]:[4,r.connect(this._userAgent,this._boltAgent,t,!1)];case 5:return[2,e.sent()];case 6:return[2,r]}})})},oD.prototype.handleError=function(e){var t=e.connection,e=e.code;return!!(t&&e&&e.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,e)},cf.default=oD;var Kf={},iD=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},uD=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};function aD(e){e=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=e}Object.defineProperty(Kf,"__esModule",{value:!0}),aD.prototype.check=function(r){return iD(this,void 0,void 0,function(){var t;return uD(this,function(e){switch(e.label){case 0:return this._isCheckDisabled||this._isNewlyCreatedConnection(r)?[2,!0]:(t=Date.now()-r.idleTimestamp,0===this._connectionLivenessCheckTimeout||t>this._connectionLivenessCheckTimeout?[4,r.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,!0]}})})},Object.defineProperty(aD.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),aD.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},Kf.default=aD;var VO={},sD=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},cD=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},lD=(Object.defineProperty(VO,"__esModule",{value:!0}),Hd);function fD(e){var t=e.clientCertificateProvider,e=e.loader;this._clientCertificateProvider=t,this._loader=e||lD.ClientCertificatesLoader,this._clientCertificate=null}fD.prototype.getClientCertificate=function(){return sD(this,void 0,void 0,function(){var t,r,n=this;return cD(this,function(e){switch(e.label){case 0:return(t=null!=this._clientCertificateProvider)?(r=null==this._clientCertificate)?[3,2]:[4,this._clientCertificateProvider.hasUpdate()]:[3,3];case 1:r=e.sent(),e.label=2;case 2:t=r,e.label=3;case 3:return t&&(this._clientCertificate=Promise.resolve(this._clientCertificateProvider.getClientCertificate()).then(this._loader.load).then(function(e){return n._clientCertificate=e,n._clientCertificate}).catch(function(e){throw n._clientCertificate=null,e})),[2,this._clientCertificate]}})})},VO.default=fD;var pD,dD,DO=r&&r.__extends||(pD=function(e,t){return(pD=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])}))(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}pD(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),hD=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},bD=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},yD=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},_D=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Oy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},vD=(Object.defineProperty(Ey,"__esModule",{value:!0}),Ng),mD=e,gD=Oy(cf),OD=cv,wD=Oy(Kf),ED=Oy(VO),PD=mD.error.SERVICE_UNAVAILABLE,TD=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],nw=mD.internal.pool,SD=nw.Pool,jD=nw.PoolConfig,_=(dD=mD.ConnectionProvider,DO(CD,dD),CD.prototype._createConnectionErrorHandler=function(){return new vD.ConnectionErrorHandler(PD)},CD.prototype._getClientCertificate=function(){return hD(this,void 0,void 0,function(){return bD(this,function(e){return[2,this._config.clientCertificate.getClientCertificate()]})})},CD.prototype._createConnection=function(e,r,n){var o=this,i=e.auth;return this._createChannelConnection(r).then(function(t){return t.release=function(){return t.idleTimestamp=Date.now(),n(r,t)},o._openConnections[t.id]=t,o._authenticationProvider.authenticate({connection:t,auth:i}).catch(function(e){throw o._destroyConnection(t),e})})},CD.prototype._validateConnectionOnAcquire=function(e,t){return hD(this,arguments,void 0,function(e,t){var r,n=e.auth,o=e.skipReAuth;return bD(this,function(e){switch(e.label){case 0:if(!this._validateConnection(t))return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(t)];case 2:return e.sent(),[3,4];case 3:return r=e.sent(),this._log.debug("The connection ".concat(t.id," is not alive because of an error ").concat(r.code," '").concat(r.message,"'")),[2,!1];case 4:return e.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:t,auth:n,skipReAuth:o})];case 5:return e.sent(),[2,!0];case 6:return r=e.sent(),this._log.debug("The connection ".concat(t.id," is not valid because of an error ").concat(r.code," '").concat(r.message,"'")),[2,!1];case 7:return[2]}})})},CD.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},CD.prototype._validateConnection=function(e){return!(!e.isOpen()||this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},CD.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},CD.prototype._verifyConnectivityAndGetServerVersion=function(e){return hD(this,arguments,void 0,function(e){var t,r,n=e.address;return bD(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new mD.ServerInfo(t.server,t.protocol().version),e.label=2;case 2:return e.trys.push([2,,5,7]),t.protocol().isLastMessageLogon()?[3,4]:[4,t.resetAndFlush()];case 3:e.sent(),e.label=4;case 4:return[3,7];case 5:return[4,t.release()];case 6:return e.sent(),[7];case 7:return[2,r]}})})},CD.prototype._verifyAuthentication=function(e){return hD(this,arguments,void 0,function(e){var t,r,n,o,i,u=e.getAddress,a=e.auth;return bD(this,function(e){switch(e.label){case 0:t=[],e.label=1;case 1:return e.trys.push([1,8,9,11]),[4,u()];case 2:return r=e.sent(),[4,this._connectionPool.acquire({auth:a,skipReAuth:!0},r)];case 3:if(n=e.sent(),t.push(n),o=!n.protocol().isLastMessageLogon(),n.supportsReAuth)return o&&n.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:n,auth:a,waitReAuth:!0,forceReAuth:!0})]:[3,5];throw(0,mD.newError)("Driver is connected to a database that does not support user switch.");case 4:return e.sent(),[3,7];case 5:return!o||n.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:a},r,{requireNew:!0})];case 6:(i=e.sent())._sticky=!0,t.push(i),e.label=7;case 7:return[2,!0];case 8:if(i=e.sent(),TD.includes(i.code))return[2,!1];throw i;case 9:return[4,Promise.all(t.map(function(e){return e.release()}))];case 10:return e.sent(),[7];case 11:return[2]}})})},CD.prototype._verifyStickyConnection=function(e){return hD(this,arguments,void 0,function(e){var t,r,n=e.auth,o=e.connection;return bD(this,function(e){switch(e.label){case 0:return(t=OD.object.equals(n,o.authToken),r=!t,o._sticky=t&&!o.supportsReAuth,r||o._sticky)?[4,o.release()]:[3,2];case 1:throw e.sent(),(0,mD.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},CD.prototype.close=function(){return hD(this,void 0,void 0,function(){return bD(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.close()];case 1:return e.sent(),[4,Promise.all(Object.values(this._openConnections).map(function(e){return e.close()}))];case 2:return e.sent(),[2]}})})},CD._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},CD._removeIdleObserverOnConnection=function(e){e._unsetIdle()},CD.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0,e.retryable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),e},CD);function CD(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,e=void 0===e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(SD.bind.apply(SD,_D([void 0],yD(e),!1)))}:e,s=(void 0===t&&(t=null),dD.call(this)||this);return s._id=r,s._config=n,s._log=o,s._clientCertificateHolder=new ED.default({clientCertificateProvider:s._config.clientCertificate}),s._authenticationProvider=new gD.default({authTokenManager:a,userAgent:i,boltAgent:u}),s._livenessCheckProvider=new wD.default({connectionLivenessCheckTimeout:n.connectionLivenessCheckTimeout}),s._userAgent=i,s._boltAgent=u,s._createChannelConnection=t||function(n){return hD(s,void 0,void 0,function(){var t,r;return bD(this,function(e){switch(e.label){case 0:return t=vD.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent()]))]}})})},s._connectionPool=e({create:s._createConnection.bind(s),destroy:s._destroyConnection.bind(s),validateOnAcquire:s._validateConnectionOnAcquire.bind(s),validateOnRelease:s._validateConnectionOnRelease.bind(s),installIdleObserver:CD._installIdleObserverOnConnection.bind(s),removeIdleObserver:CD._removeIdleObserverOnConnection.bind(s),config:jD.fromDriverConfig(n),log:s._log}),s._openConnections={},s}Ey.default=_;var ID,RD,xf={},Pw=r&&r.__extends||(ID=function(e,t){return(ID=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])}))(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}ID(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),AD=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},MD=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},p=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},O=(Object.defineProperty(xf,"__esModule",{value:!0}),p(Ey)),ND=Ng,E=e.internal.constants,kD=E.BOLT_PROTOCOL_V3,xD=E.BOLT_PROTOCOL_V4_0,DD=E.BOLT_PROTOCOL_V4_4,LD=E.BOLT_PROTOCOL_V5_1,UD=e.error.SERVICE_UNAVAILABLE,I=(RD=O.default,Pw(FD,RD),FD.prototype.acquireConnection=function(){return AD(this,arguments,void 0,function(e){var t,r,n=this,e=void 0===e?{}:e,o=(e.accessMode,e.database),i=e.auth,u=e.forceReAuth;return MD(this,function(e){switch(e.label){case 0:return t=ND.ConnectionErrorHandler.create({errorCode:UD,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r,o)}}),[4,this._connectionPool.acquire({auth:i,forceReAuth:u},this._address)];case 1:return(r=e.sent(),i)?[4,this._verifyStickyConnection({auth:i,connection:r,address:this._address})]:[3,3];case 2:return e.sent(),[2,r];case 3:return[2,new ND.DelegateConnection(r,t)]}})})},FD.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),RD.prototype._handleSecurityError.call(this,e,t,r)},FD.prototype._hasProtocolVersion=function(n){return AD(this,void 0,void 0,function(){var t,r;return MD(this,function(e){switch(e.label){case 0:return[4,this._createChannelConnection(this._address)];case 1:return t=e.sent(),r=t.protocol()?t.protocol().version:null,[4,t.close()];case 2:return e.sent(),r?[2,n(r)]:[2,!1]}})})},FD.prototype.supportsMultiDb=function(){return AD(this,void 0,void 0,function(){return MD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(xD)})];case 1:return[2,e.sent()]}})})},FD.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},FD.prototype.supportsTransactionConfig=function(){return AD(this,void 0,void 0,function(){return MD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(kD)})];case 1:return[2,e.sent()]}})})},FD.prototype.supportsUserImpersonation=function(){return AD(this,void 0,void 0,function(){return MD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(DD)})];case 1:return[2,e.sent()]}})})},FD.prototype.supportsSessionAuth=function(){return AD(this,void 0,void 0,function(){return MD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(LD)})];case 1:return[2,e.sent()]}})})},FD.prototype.verifyAuthentication=function(e){return AD(this,arguments,void 0,function(e){var t=this,r=e.auth;return MD(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},FD.prototype.verifyConnectivityAndGetServerInfo=function(){return AD(this,void 0,void 0,function(){return MD(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},FD);function FD(e){var t=e.id,r=e.address,t=RD.call(this,{id:t,config:e.config,log:e.log,userAgent:e.userAgent,boltAgent:e.boltAgent,authTokenManager:e.authTokenManager,newPool:e.newPool})||this;return t._address=r,t}xf.default=I;var xo={},JO={},po={},j={},BD=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},VD=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},qD=(Object.defineProperty(j,"__esModule",{value:!0}),j.createValidRoutingTable=QD,e),S=qD.internal.constants,WD=S.ACCESS_MODE_WRITE,zD=S.ACCESS_MODE_READ,HD=qD.internal.serverAddress.ServerAddress,GD=qD.error.PROTOCOL_ERROR,YD=(KD.fromRawRoutingTable=QD,KD.prototype.forget=function(e){this.readers=ZD(this.readers,e),this.writers=ZD(this.writers,e)},KD.prototype.forgetRouter=function(e){this.routers=ZD(this.routers,e)},KD.prototype.forgetWriter=function(e){this.writers=ZD(this.writers,e)},KD.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===zD&&0===this.readers.length||e===WD&&0===this.writers.length},KD.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},KD.prototype.allServers=function(){return VD(VD(VD([],BD(this.routers),!1),BD(this.readers),!1),BD(this.writers),!1)},KD.prototype.toString=function(){return"RoutingTable["+"database=".concat(this.databaseName,", ")+"expirationTime=".concat(this.expirationTime,", ")+"currentTime=".concat(Date.now(),", ")+"routers=[".concat(this.routers,"], ")+"readers=[".concat(this.readers,"], ")+"writers=[".concat(this.writers,"]]")},KD);function KD(e){var e=void 0===e?{}:e,t=e.database,r=e.routers,n=e.readers,o=e.writers,i=e.expirationTime,e=e.ttl;this.database=t||null,this.databaseName=t||"default database",this.routers=r||[],this.readers=n||[],this.writers=o||[],this.expirationTime=i||(0,qD.int)(0),this.ttl=e}function ZD(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function QD(e,t,r){var n=r.ttl,o=((t,r)=>{try{var e=(0,qD.int)(Date.now()),n=(0,qD.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?qD.Integer.MAX_VALUE:n}catch(e){throw(0,qD.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(qD.json.stringify(t),"\nError message: ").concat(e.message),GD)}})(r,t),i=((t,r)=>{try{var n=[],o=[],i=[];return t.servers.forEach(function(e){var t=e.role,e=e.addresses;"ROUTE"===t?n=JD(e).map(function(e){return HD.fromUrl(e)}):"WRITE"===t?i=JD(e).map(function(e){return HD.fromUrl(e)}):"READ"===t&&(o=JD(e).map(function(e){return HD.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,qD.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(qD.json.stringify(t.servers),"\nError message: ").concat(e.message),GD)}})(r,t),u=i.routers,a=i.readers,i=i.writers;return XD(u,"routers",t),XD(a,"readers",t),new YD({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function XD(e,t,r){if(0===e.length)throw(0,qD.newError)("Received no "+t+" from router "+r,GD)}function JD(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}j.default=YD;var t=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$D=(Object.defineProperty(po,"__esModule",{value:!0}),t(j));function eL(e){this._routingContext=e}eL.prototype.lookupRoutingTableOnRouter=function(t,r,n,o){var i=this;return t._acquireConnection(function(e){return i._requestRawRoutingTable(e,t,r,n,o).then(function(e){return e.isNull?null:$D.default.fromRawRoutingTable(r,n,e)})})},eL.prototype._requestRawRoutingTable=function(r,n,o,e,i){var u=this;return new Promise(function(e,t){r.protocol().requestRoutingInformation({routingContext:u._routingContext,databaseName:o,impersonatedUser:i,sessionContext:{bookmarks:n._lastBookmarks,mode:n._mode,database:n._database,afterComplete:n._onComplete},onCompleted:e,onError:t})})},po.default=eL;var tL,rL,nL,wy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hv=(Object.defineProperty(JO,"__esModule",{value:!0}),JO.RoutingTable=JO.Rediscovery=void 0,wy(po)),l=(JO.Rediscovery=hv.default,wy(j)),y=(JO.RoutingTable=l.default,JO.default=hv.default,r&&r.__extends||(tL=function(e,t){return(tL=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])}))(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}tL(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),oL=r&&r.__assign||function(){return(oL=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},iL=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),uL=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),G=r&&r.__importStar||(rL=function(e){return(rL=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=rL(e),n=0;n<r.length;n++)"default"!==r[n]&&iL(t,e,r[n]);return uL(t,e),t}),aL=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},sL=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},cL=r&&r.__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{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},lL=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},o=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fL=(Object.defineProperty(xo,"__esModule",{value:!0}),e),pL=G(JO),dL=Hd,hL=o(bg),Zn=o(Ey),bL=of,yL=Ng,_L=cv,vL=fL.error.SERVICE_UNAVAILABLE,mL=fL.error.SESSION_EXPIRED,gL=fL.internal.bookmarks.Bookmarks,np=fL.internal.constants,OL=np.ACCESS_MODE_READ,wL=np.ACCESS_MODE_WRITE,EL=np.BOLT_PROTOCOL_V3,PL=np.BOLT_PROTOCOL_V4_0,TL=np.BOLT_PROTOCOL_V4_4,SL=np.BOLT_PROTOCOL_V5_1,jL=null,CL=(0,fL.int)(3e4),zf=(nL=Zn.default,y(IL,nL),IL.prototype._createConnectionErrorHandler=function(){return new yL.ConnectionErrorHandler(mL)},IL.prototype._handleUnavailability=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forget(t,r||jL),e},IL.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),nL.prototype._handleSecurityError.call(this,e,t,r,n)},IL.prototype._handleWriteFailure=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forgetWriter(t,r||jL),(0,fL.newError)("No longer possible to write to server at "+t,mL,e)},IL.prototype.acquireConnection=function(){return aL(this,arguments,void 0,function(e){var n,t,r,o,i=this,e=void 0===e?{}:e,u=e.accessMode,a=e.database,s=e.bookmarks,c=e.impersonatedUser,l=e.onDatabaseNameResolved,f=e.auth,p=e.homeDb;return sL(this,function(e){switch(e.label){case 0:return(n={database:a||jL},t=new yL.ConnectionErrorHandler(mL,function(e,t){return i._handleUnavailability(e,t,n.database)},function(e,t){return i._handleWriteFailure(e,t,null!=p?p:n.database)},function(e,t,r){return i._handleSecurityError(e,t,r,n.database)}),this._startTime=(new Date).getTime(),this.SSREnabled()&&void 0!==p&&""===a)?!(r=this._routingTableRegistry.get(p,function(){return new pL.RoutingTable({database:p})}))||r.isStaleFor(u)?[3,2]:[4,this._getConnectionFromRoutingTable(r,f,u,t)]:[3,2];case 1:if(r=e.sent(),this.SSREnabled())return[2,r];r.release(),e.label=2;case 2:return[4,this._freshRoutingTable({accessMode:u,database:n.database,bookmarks:s,impersonatedUser:c,auth:f,onDatabaseNameResolved:function(e){n.database=n.database||e,l&&l(e)}})];case 3:return o=e.sent(),[2,this._getConnectionFromRoutingTable(o,f,u,t)]}})})},IL.prototype._getConnectionFromRoutingTable=function(i,u,a,s){return aL(this,void 0,void 0,function(){var t,r,n,o;return sL(this,function(e){switch(e.label){case 0:if(a===OL)r=this._loadBalancingStrategy.selectReader(i.readers),t="read";else{if(a!==wL)throw(0,fL.newError)("Illegal mode "+a);r=this._loadBalancingStrategy.selectWriter(i.writers),t="write"}if(!r)throw(0,fL.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(i),mL);e.label=1;case 1:return e.trys.push([1,5,,6]),[4,this._connectionPool.acquire({auth:u,startTime:this._startTime},r)];case 2:return(n=e.sent(),u)?[4,this._verifyStickyConnection({auth:u,connection:n,address:r})]:[3,4];case 3:return e.sent(),[2,n];case 4:return[2,new yL.DelegateConnection(n,s)];case 5:throw o=e.sent(),s.handleAndTransformError(o,r);case 6:return[2]}})})},IL.prototype._hasProtocolVersion=function(u){return aL(this,void 0,void 0,function(){var t,r,n,o,i;return sL(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:t=e.sent(),n=0,e.label=2;case 2:if(!(n<t.length))return[3,8];e.label=3;case 3:return e.trys.push([3,6,,7]),[4,this._createChannelConnection(t[n])];case 4:return i=e.sent(),o=i.protocol()?i.protocol().version:null,[4,i.close()];case 5:return e.sent(),o?[2,u(o)]:[2,!1];case 6:return i=e.sent(),r=i,[3,7];case 7:return n++,[3,2];case 8:if(r)throw r;return[2,!1]}})})},IL.prototype.supportsMultiDb=function(){return aL(this,void 0,void 0,function(){return sL(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(PL)})];case 1:return[2,e.sent()]}})})},IL.prototype.supportsTransactionConfig=function(){return aL(this,void 0,void 0,function(){return sL(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(EL)})];case 1:return[2,e.sent()]}})})},IL.prototype.supportsUserImpersonation=function(){return aL(this,void 0,void 0,function(){return sL(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(TL)})];case 1:return[2,e.sent()]}})})},IL.prototype.supportsSessionAuth=function(){return aL(this,void 0,void 0,function(){return sL(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return e.isGreaterOrEqualTo(SL)})];case 1:return[2,e.sent()]}})})},IL.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},IL.prototype.verifyAuthentication=function(e){return aL(this,arguments,void 0,function(e){var t=this,n=e.database,o=e.accessMode,i=e.auth;return sL(this,function(e){return this._startTime=(new Date).getTime(),[2,this._verifyAuthentication({auth:i,getAddress:function(){return aL(t,void 0,void 0,function(){var t,r;return sL(this,function(e){switch(e.label){case 0:return t={database:n||jL},[4,this._freshRoutingTable({accessMode:o,database:t.database,auth:i,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:if(r=e.sent(),0===(r=o===wL?r.writers:r.readers).length)throw(0,fL.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),vL);return[2,r[0]]}})})}})]})})},IL.prototype.verifyConnectivityAndGetServerInfo=function(e){return aL(this,arguments,void 0,function(e){var t,r,n,o,i,u,a,s,c,l=e.database,f=e.accessMode;return sL(this,function(e){switch(e.label){case 0:return t={database:l||jL},this._startTime=(new Date).getTime(),[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===wL?r.writers:r.readers,n=(0,fL.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),vL),e.label=2;case 2:e.trys.push([2,9,10,11]),o=cL(r),i=o.next(),e.label=3;case 3:if(i.done)return[3,8];u=i.value,e.label=4;case 4:return e.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:u})];case 5:return[2,e.sent()];case 6:return a=e.sent(),n=a,[3,7];case 7:return i=o.next(),[3,3];case 8:return[3,11];case 9:return a=e.sent(),s={error:a},[3,11];case 10:try{i&&!i.done&&(c=o.return)&&c.call(o)}finally{if(s)throw s.error}return[7];case 11:throw n}})})},IL.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},IL.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},IL.prototype._freshRoutingTable=function(e){var e=void 0===e?{}:e,t=e.accessMode,r=e.database,n=e.bookmarks,o=e.impersonatedUser,i=e.onDatabaseNameResolved,e=e.auth,u=this._routingTableRegistry.get(r,function(){return new pL.RoutingTable({database:r})});return u.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(u)),this._refreshRoutingTable(u,n,o,e).then(function(e){return i(e.database),e})):u},IL.prototype._refreshRoutingTable=function(e,t,r,n){var o=e.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(o,e,t,r,n):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(o,e,t,r,n)},IL.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return aL(this,void 0,void 0,function(){var t,r,n,o,i;return sL(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,l)];case 1:return(t=lL.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],r)?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(u,a,s,c,l)];case 3:o=lL.apply(void 0,[e.sent(),2]),i=o[0],r=i,n=o[1]||n,e.label=4;case 4:return[4,this._applyRoutingTableIfPossible(a,r,n)];case 5:return[2,e.sent()]}})})},IL.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return aL(this,void 0,void 0,function(){var t,r,n;return sL(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,s)];case 1:return r=lL.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a,s)];case 2:n=lL.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,r)];case 4:return[2,e.sent()]}})})},IL.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return aL(this,void 0,void 0,function(){var t,r;return sL(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=lL.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,IL._forgetRouter(o,n,r),[2,[null,t]])}})})},IL.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return aL(this,void 0,void 0,function(){var t;return sL(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(n)];case 1:return t=e.sent(),t=t.filter(function(e){return r.indexOf(e)<0}),[4,this._fetchRoutingTable(t,o,i,u,a)];case 2:return[2,e.sent()]}})})},IL.prototype._resolveSeedRouter=function(n){return aL(this,void 0,void 0,function(){var t,r=this;return sL(this,function(e){switch(e.label){case 0:return[4,this._hostNameResolver.resolve(n)];case 1:return t=e.sent(),[4,Promise.all(t.map(function(e){return r._dnsResolver.resolve(e)}))];case 2:return t=e.sent(),[2,[].concat.apply([],t)]}})})},IL.prototype._fetchRoutingTable=function(s,c,l,f,p){return aL(this,void 0,void 0,function(){var t=this;return sL(this,function(e){return[2,s.reduce(function(i,u,a){return aL(t,void 0,void 0,function(){var t,r,n,o;return sL(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=lL.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(IL._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=lL.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],!r)return[3,8];e.label=3;case 3:return e.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(r,c.database,u,f)];case 4:return[2,[e.sent(),null]];case 5:return o=e.sent(),[2,this._handleRediscoveryError(o,u)];case 6:return r.close(),[7];case 7:return[3,9];case 8:return[2,[null,n]];case 9:return[2]}})})},Promise.resolve([null,null]))]})})},IL.prototype._createSessionForRediscovery=function(o,i,u,a){return aL(this,void 0,void 0,function(){var t,r,n=this;return sL(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:a,startTime:this._startTime},o)];case 1:return(t=e.sent(),a)?[4,this._verifyStickyConnection({auth:a,connection:t,address:o})]:[3,3];case 2:e.sent(),e.label=3;case 3:return r=yL.ConnectionErrorHandler.create({errorCode:mL,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r)}}),r=t._sticky?new yL.DelegateConnection(t):new yL.DelegateConnection(t,r),r=new hL.default(r),t.protocol().version.isLessThan({major:4,minor:0})?[2,[new fL.Session({mode:wL,bookmarks:gL.empty(),connectionProvider:r}),null]]:[2,[new fL.Session({mode:OL,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},IL.prototype._handleRediscoveryError=function(e,t){if(["Neo.ClientError.Database.DatabaseNotFound","Neo.ClientError.Transaction.InvalidBookmark","Neo.ClientError.Transaction.InvalidBookmarkMixture","Neo.ClientError.Statement.ArgumentError","Neo.ClientError.Request.Invalid","Neo.ClientError.Statement.TypeError","N/A"].includes(e.code)||null!=(n=(r=e).code)&&n.startsWith("Neo.ClientError.Security.")&&!["Neo.ClientError.Security.AuthorizationExpired"].includes(r.code))throw e;if("Neo.ClientError.Procedure.ProcedureNotFound"===e.code)throw(0,fL.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),vL,e);var r,n;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},IL.prototype._applyRoutingTableIfPossible=function(t,r,n){return aL(this,void 0,void 0,function(){return sL(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r)];throw(0,fL.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),vL,n);case 1:return e.sent(),[2,r]}})})},IL.prototype._updateRoutingTable=function(t){return aL(this,void 0,void 0,function(){return sL(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.keepAll(t.allServers())];case 1:return e.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(t),this._log.info("Updated routing table ".concat(t)),[2]}})})},IL._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},IL.prototype._channelSsrCallback=function(e,t){if("OPEN"===t)!0===e?this._withSSR=this._withSSR+1:this._withoutSSR=this._withoutSSR+1;else{if("CLOSE"!==t)throw(0,fL.newError)("Channel SSR Callback invoked with action other than 'OPEN' or 'CLOSE'");!0===e?this._withSSR=this._withSSR-1:this._withoutSSR=this._withoutSSR-1}},IL.prototype.SSREnabled=function(){return 0<this._withSSR&&0===this._withoutSSR},IL);function IL(e){var t=e.id,r=e.address,n=e.routingContext,o=e.hostNameResolver,i=e.log,u=e.routingTablePurgeDelay,a=nL.call(this,{id:t,config:e.config,log:i,userAgent:e.userAgent,boltAgent:e.boltAgent,authTokenManager:e.authTokenManager,newPool:e.newPool},function(n){return aL(a,void 0,void 0,function(){var t,r;return sL(this,function(e){switch(e.label){case 0:return t=yL.createChannelConnection,r=[n,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,t.apply(void 0,r.concat([e.sent(),this._routingContext,this._channelSsrCallback.bind(this)]))]}})})})||this;return a._routingContext=oL(oL({},n),{address:r.toString()}),a._seedRouter=r,a._rediscovery=new pL.default(a._routingContext),a._loadBalancingStrategy=new bL.LeastConnectedLoadBalancingStrategy(a._connectionPool),a._startTime=0,a._hostNameResolver=o,a._dnsResolver=new dL.HostNameResolver,a._log=i,a._useSeedRouter=!0,a._routingTableRegistry=new ZL(u?(0,fL.int)(u):CL),a._refreshRoutingTable=_L.functional.reuseOngoingRequest(a._refreshRoutingTable,a),a._withSSR=0,a._withoutSSR=0,a}xo.default=zf;QL.prototype.register=function(e){return this._tables.set(e.database,e),this},QL.prototype.apply=function(e,t){var t=void 0===t?{}:t,r=t.applyWhenExists,t=t.applyWhenDontExists,t=void 0===t?function(){}:t;return this._tables.has(e)?r(this._tables.get(e)):"string"==typeof e||null===e?t():this._forEach(r),this},QL.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},QL.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},QL.prototype._forEach=function(e){var t,r;try{for(var n=cL(this._tables),o=n.next();!o.done;o=n.next())e(lL(o.value,2)[1])}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},QL.prototype._remove=function(e){return this._tables.delete(e),this},QL.prototype._removeIf=function(e){var t,r;try{for(var n=cL(this._tables),o=n.next();!o.done;o=n.next()){var i=lL(o.value,2),u=i[0];e(i[1])&&this._remove(u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this};var RL,AL,ML,NL,kL,xL,DL,LL,UL,FL,BL,VL,x,qL,WL,zL,HL,GL,YL,KL,ZL=QL;function QL(e){this._tables=new Map,this._routingTablePurgeDelay=e}function XL(e,t,r){void 0===r&&(r={}),zL(e,"Bolt URL");var n,o=YL.parseDatabaseUrl(e),i=!1,u=!1;switch(o.scheme){case"bolt":break;case"bolt+s":u=!0,n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":u=!0,n="TRUST_ALL_CERTIFICATES";break;case"neo4j":i=!0;break;case"neo4j+s":n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",i=u=!0;break;case"neo4j+ssc":n="TRUST_ALL_CERTIFICATES",i=u=!0;break;default:throw new Error("Unknown scheme: ".concat(o.scheme))}if(u){if("encrypted"in r||"trust"in r)throw new Error("Encryption/trust can only be configured either through URL or config, not both");r.encrypted=WL,r.trust=n,r.clientCertificate=(0,x.resolveCertificateProvider)(r.clientCertificate)}var a,s="object"==typeof(a=t=t)&&null!=a&&"getToken"in a&&"handleSecurityException"in a&&"function"==typeof a.getToken&&"function"==typeof a.handleSecurityException?t:((a=(a=t)||{}).scheme=a.scheme||"none",(0,x.staticAuthTokenManager)({authToken:a})),c=(r.userAgent=r.userAgent||KL,r.boltAgent=x.internal.boltAgent.fromVersion(VL.default),GL.fromUrl(o.hostAndPort)),t={address:c,typename:i?"Routing":"Direct",routing:i};return new BL.Driver(t,r,(()=>{if(i)return function(e,t,r,n){return new qL.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:s,address:c,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if(HL(o.query))return function(e,t,r){return new qL.DirectConnectionProvider({id:e,config:t,log:r,authTokenManager:s,address:c,userAgent:t.userAgent,boltAgent:t.boltAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))})())}function JL(r,n){return UL(this,void 0,void 0,function(){var t;return FL(this,function(e){switch(e.label){case 0:t=XL(r,{scheme:"none",principal:"",credentials:""},n),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,t.getNegotiatedProtocolVersion()];case 2:return e.sent(),[2,!0];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})}return Zl=ug,RL=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.RoutingConnectionProvider=Zl.DirectConnectionProvider=Zl.PooledConnectionProvider=Zl.SingleConnectionProvider=void 0,AL=bg,Object.defineProperty(Zl,"SingleConnectionProvider",{enumerable:!0,get:function(){return RL(AL).default}}),ML=Ey,Object.defineProperty(Zl,"PooledConnectionProvider",{enumerable:!0,get:function(){return RL(ML).default}}),NL=xf,Object.defineProperty(Zl,"DirectConnectionProvider",{enumerable:!0,get:function(){return RL(NL).default}}),kL=xo,Object.defineProperty(Zl,"RoutingConnectionProvider",{enumerable:!0,get:function(){return RL(kL).default}}),Ar=Rt,DL=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),LL=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),rf=r&&r.__importStar||(xL=function(e){return(xL=Object.getOwnPropertyNames||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=xL(e),n=0;n<r.length;n++)"default"!==r[n]&&DL(t,e,r[n]);return LL(t,e),t}),Xl=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||DL(t,e,r)},Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.packstream=Ar.channel=Ar.buf=Ar.bolt=Ar.loadBalancing=void 0,Ar.loadBalancing=rf(of),Ar.bolt=rf(n),Ar.buf=rf(jh),Ar.channel=rf(Hd),Ar.packstream=rf(bm),Xl(ug,Ar),T=L,UL=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},FL=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ef=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(T,"__esModule",{value:!0}),T.UnboundRelationship=T.Relationship=T.Node=T.Record=T.ServerInfo=T.GqlStatusObject=T.Notification=T.QueryStatistics=T.ProfiledPlan=T.Plan=T.ResultSummary=T.RxResult=T.RxManagedTransaction=T.RxTransaction=T.RxSession=T.EagerResult=T.Result=T.ManagedTransaction=T.Transaction=T.Session=T.Driver=T.temporal=T.spatial=T.graph=T.error=T.routing=T.session=T.types=T.logging=T.auth=T.isRetryableError=T.isRetriableError=T.Neo4jError=T.integer=T.isUnsupportedType=T.isUnboundRelationship=T.isRelationship=T.isPathSegment=T.isPath=T.isNode=T.isDateTime=T.isLocalDateTime=T.isDate=T.isTime=T.isLocalTime=T.isDuration=T.isPoint=T.isInt=T.int=T.authTokenManagers=void 0,T.ProtocolVersion=T.StandardCase=T.RecordObjectMapping=T.mappingDecorators=T.rule=T.Rules=T.Rule=T.Vector=T.vector=T.isVector=T.clientCertificateProviders=T.notificationFilterMinimumSeverityLevel=T.notificationFilterDisabledClassification=T.notificationFilterDisabledCategory=T.notificationSeverityLevel=T.notificationClassification=T.notificationCategory=T.resultTransformers=T.bookmarkManager=T.DateTime=T.LocalDateTime=T.Date=T.Time=T.LocalTime=T.Duration=T.Integer=T.Point=T.PathSegment=T.Path=void 0,T.driver=XL,T.hasReachableServer=JL,BL=U,Object.defineProperty(T,"Driver",{enumerable:!0,get:function(){return BL.Driver}}),VL=ef(fe),x=e,Object.defineProperty(T,"authTokenManagers",{enumerable:!0,get:function(){return x.authTokenManagers}}),Object.defineProperty(T,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(T,"isRetriableError",{enumerable:!0,get:function(){return x.isRetriableError}}),Object.defineProperty(T,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(T,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(T,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(T,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(T,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(T,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(T,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(T,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(T,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(T,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(T,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(T,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(T,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(T,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(T,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(T,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(T,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(T,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(T,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(T,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(T,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(T,"isUnsupportedType",{enumerable:!0,get:function(){return x.isUnsupportedType}}),Object.defineProperty(T,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(T,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(T,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(T,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(T,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(T,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(T,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(T,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(T,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(T,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(T,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(T,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(T,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(T,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(T,"GqlStatusObject",{enumerable:!0,get:function(){return x.GqlStatusObject}}),Object.defineProperty(T,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(T,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(T,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(T,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(T,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(T,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(T,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(T,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(T,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(T,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(T,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(T,"notificationClassification",{enumerable:!0,get:function(){return x.notificationClassification}}),Object.defineProperty(T,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(T,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(T,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return x.notificationFilterDisabledClassification}}),Object.defineProperty(T,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(T,"clientCertificateProviders",{enumerable:!0,get:function(){return x.clientCertificateProviders}}),Object.defineProperty(T,"isVector",{enumerable:!0,get:function(){return x.isVector}}),Object.defineProperty(T,"Vector",{enumerable:!0,get:function(){return x.Vector}}),Object.defineProperty(T,"vector",{enumerable:!0,get:function(){return x.vector}}),Object.defineProperty(T,"Rule",{enumerable:!0,get:function(){return x.Rule}}),Object.defineProperty(T,"Rules",{enumerable:!0,get:function(){return x.Rules}}),Object.defineProperty(T,"rule",{enumerable:!0,get:function(){return x.rule}}),Object.defineProperty(T,"mappingDecorators",{enumerable:!0,get:function(){return x.mappingDecorators}}),Object.defineProperty(T,"RecordObjectMapping",{enumerable:!0,get:function(){return x.RecordObjectMapping}}),Object.defineProperty(T,"StandardCase",{enumerable:!0,get:function(){return x.StandardCase}}),Object.defineProperty(T,"ProtocolVersion",{enumerable:!0,get:function(){return x.ProtocolVersion}}),qL=Rt,w=ef(bn),T.RxSession=w.default,ad=ef(m),T.RxTransaction=ad.default,Kl=ef(uo),T.RxManagedTransaction=Kl.default,ef=ef(P),T.RxResult=ef.default,Qf=x.internal.util,WL=Qf.ENCRYPTION_ON,zL=Qf.assertString,HL=Qf.isEmptyObjectOrNull,GL=x.internal.serverAddress.ServerAddress,YL=x.internal.urlUtil,KL="neo4j-javascript/"+VL.default,T.logging=Qf={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},hd={Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,PathSegment:x.PathSegment,Path:x.Path,Result:x.Result,EagerResult:x.EagerResult,ResultSummary:x.ResultSummary,Record:x.Record,Point:x.Point,Date:x.Date,DateTime:x.DateTime,Duration:x.Duration,LocalDateTime:x.LocalDateTime,LocalTime:x.LocalTime,Time:x.Time,Integer:x.Integer,Vector:x.Vector,Rule:x.Rule,Rules:x.Rules,ProtocolVersion:x.ProtocolVersion},T.types=hd,v={READ:BL.READ,WRITE:BL.WRITE},T.session=v,Jh={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},T.integer=Jh,g={isPoint:x.isPoint},T.spatial=g,pb={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},T.temporal=pb,j_={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},Jh={authTokenManagers:x.authTokenManagers,driver:XL,hasReachableServer:JL,int:x.int,isInt:x.isInt,isPoint:x.isPoint,isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime,isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship,isUnsupportedType:x.isUnsupportedType,integer:Jh,Neo4jError:x.Neo4jError,isRetriableError:x.isRetriableError,isRetryableError:x.isRetryableError,auth:x.auth,logging:Qf,types:hd,session:v,routing:x.routing,error:x.error,graph:T.graph=j_,spatial:g,temporal:pb,Driver:BL.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:w.default,RxTransaction:ad.default,RxManagedTransaction:Kl.default,RxResult:ef.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,GqlStatusObject:x.GqlStatusObject,ServerInfo:x.ServerInfo,Record:x.Record,Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,Path:x.Path,PathSegment:x.PathSegment,Point:x.Point,Integer:x.Integer,Duration:x.Duration,LocalTime:x.LocalTime,Time:x.Time,Date:x.Date,LocalDateTime:x.LocalDateTime,DateTime:x.DateTime,bookmarkManager:x.bookmarkManager,resultTransformers:x.resultTransformers,notificationCategory:x.notificationCategory,notificationSeverityLevel:x.notificationSeverityLevel,notificationFilterDisabledCategory:x.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:x.notificationFilterMinimumSeverityLevel,clientCertificateProviders:x.clientCertificateProviders,isVector:x.isVector,vector:x.vector,Vector:x.Vector,rule:x.rule,mappingDecorators:x.mappingDecorators,RecordObjectMapping:x.RecordObjectMapping,StandardCase:x.StandardCase,ProtocolVersion:x.ProtocolVersion},T.default=Jh,D(L)});
|