neo4j-driver 5.28.2 → 6.0.0-alpha01

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.
@@ -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 U={},L={},e={},t={},n={},o={},F=(Object.defineProperty(o,"__esModule",{value:!0}),o.getBrokenObjectReason=o.isBrokenObject=o.createBrokenObject=void 0,"__isBrokenObject__"),B="__reason__";o.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===F||(t===B?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})},o.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[F]},o.getBrokenObjectReason=function(e){return e[B]},Object.defineProperty(n,"__esModule",{value:!0}),n.stringify=void 0;var W=o;n.stringify=function(e,t){return JSON.stringify(e,function(e,r){return(0,W.isBrokenObject)(r)?{__isBrokenObject__:!0,__reason__:(0,W.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,z,V={},i=(i=V,Object.defineProperty(i,"__esModule",{value:!0}),i.rawPolyfilledDiagnosticRecord=void 0,i.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(i.rawPolyfilledDiagnosticRecord),r&&r.__extends||(q=function(e,t){return(q=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}q(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),H=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]}),G=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&H(t,e,r);return G(t,e),t},K=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.GQLError=t.Neo4jError=t.isRetriableError=t.newGQLError=t.newError=void 0,Y(n)),Z=V,Y={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"},Q=(Object.freeze(Y),Object.values(Y)),X="ServiceUnavailable",J=(t.SERVICE_UNAVAILABLE=X,"SessionExpired"),$=(t.SESSION_EXPIRED=J,t.PROTOCOL_ERROR="ProtocolError",z=Error,i(ee,z),Object.defineProperty(ee.prototype,"diagnosticRecordAsJsonString",{get:function(){return K.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),ee);function ee(e,t,r,n,o){var i=this;return(i=z.call(this,e,null!=o?{cause:o}:void 0)||this).constructor=ee,i.__proto__=ee.prototype,i.cause=null!=o?o:void 0,i.gqlStatus=t,i.gqlStatusDescription=r,i.diagnosticRecord=n,i.classification=void 0!==(e=i.diagnosticRecord)&&void 0!==e._classification&&Q.includes(e._classification)?null==e?void 0:e._classification:"UNKNOWN",i.rawClassification=null!=(o=null==n?void 0:n._classification)?o:void 0,i.name="GQLError",i}t.GQLError=$;i(ne,te=$),ne.isRetriable=function(e){return null!=e&&e instanceof ne&&e.retriable};var te,re=ne;function ne(e,t,r,n,o,i){e=te.call(this,e,r,n,o,i)||this;return e.constructor=ne,e.__proto__=ne.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===X||r===J||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=re,t.newError=function(e,t,r,n,o,i){return new re(e,null!=t?t:"N/A",null!=n?n:"50N42",null!=o?o:"error: general processing exception - unexpected error. "+e,null!=i?i:Z.rawPolyfilledDiagnosticRecord,r)},t.newGQLError=function(e,t,r,n,o){return new $(e,null!=r?r:"50N42",null!=n?n:"error: general processing exception - unexpected error. "+e,null!=o?o:Z.rawPolyfilledDiagnosticRecord,t)};Y=re.isRetriable;t.isRetriableError=Y;var i={},oe=(Object.defineProperty(i,"__esModule",{value:!0}),i.toString=i.toNumber=i.inSafeRange=i.isInt=i.int=void 0,t),ie=new Map,Y=(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*pe+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(pe)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(pe)+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(he)&&e.lessThan(he))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,oe.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=ie.get(e)))return t;var t=new d(e,e<0?-1:0);return-128<=e&&e<128&&ie.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<=-de?d.MIN_VALUE:de<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%pe|0,e/pe|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,oe.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,oe.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,oe.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,oe.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(Y.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var a,ue,ae,se,ce,le,fe,pe=4294967296,de=pe*pe/2,he=Y.fromInt(1<<24),u=Y.fromValue,u=(i.int=u,Y.isInteger),u=(i.isInt=u,Y.inSafeRange),u=(i.inSafeRange=u,Y.toNumber),u=(i.toNumber=u,Y.toString),u=(i.toString=u,i.default=Y,{}),Y={},s={},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]}),ye=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&be(t,e,r);return ye(t,e),t},_e=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.")},ve=(Object.defineProperty(s,"__esModule",{value:!0}),s.ENCRYPTION_OFF=s.ENCRYPTION_ON=s.equals=s.validateQueryAndParameters=s.toNumber=s.assertValidDate=s.assertNumberOrInteger=s.assertNumber=s.assertString=s.assertObject=s.isString=s.isObject=s.isEmptyObjectOrNull=void 0,c(i)),me=n;s.ENCRYPTION_ON="ENCRYPTION_ON";function ge(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function Oe(e,t){if(we(e))return e;throw new TypeError((0,me.stringify)(t)+" expected to be string but was: "+(0,me.stringify)(e))}function we(e){return"[object String]"===Object.prototype.toString.call(e)}function Ee(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,se.int)(e),this._maxInteger=(0,se.int)(t)}function Pe(e,t,r){e=(0,se.int)(e),t=(0,se.int)(t),r=(0,se.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,se.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 Se(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 Te(e,t){return(0,ce.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))}function je(e,t,r){if((0,le.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,ce.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function Ce(e,t){e=(0,se.int)(e),t=(0,se.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function Re(e,t){return e=(0,se.int)(e),t=(0,se.int)(t),e.subtract(Ce(e,t).multiply(t))}function Ie(e){return(e=(0,se.int)(e)).equals(0)?"":"."+Ae(e,9)}function Ae(e,t,r){var n=(e=(0,se.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}s.ENCRYPTION_OFF="ENCRYPTION_OFF",s.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!ge(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},s.isObject=ge,s.validateQueryAndParameters=function(e,t,r){var n="",t=null!=t?t:{},r=null!=(r=null==r?void 0:r.skipAsserts)&&r;if("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){e=n;if(Oe(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!ge(r))throw e=null!=r.constructor?" "+r.constructor.name:"",new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(e," ").concat(JSON.stringify(r)))}return{validatedQuery:n,params:t}},s.assertObject=function(e,t){if(ge(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,me.stringify)(e))},s.assertString=Oe,s.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,me.stringify)(e));return e},s.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,ve.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,me.stringify)(e))},s.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},s.isString=we,s.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)return!1;var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;try{for(var a=_e(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},s.toNumber=function(e){return e instanceof ve.default?e.toNumber():"bigint"==typeof e?(0,ve.int)(e).toNumber():e},a=Y,ue=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]}),ae=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ue(t,e,r);return ae(t,e),t},Object.defineProperty(a,"__esModule",{value:!0}),a.floorMod=a.floorDiv=a.assertValidZoneId=a.assertValidNanosecond=a.assertValidSecond=a.assertValidMinute=a.assertValidHour=a.assertValidDay=a.assertValidMonth=a.assertValidYear=a.timeZoneOffsetInSeconds=a.totalNanoseconds=a.newDate=a.toStandardDate=a.isoStringToStandardDate=a.dateToIsoString=a.timeZoneOffsetToIsoString=a.timeToIsoString=a.durationToIsoString=a.dateToEpochDay=a.localDateTimeToEpochSecond=a.localTimeToNanoOfDay=a.normalizeNanosecondsForDuration=a.normalizeSecondsForDuration=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,se=c(i),ce=t,le=s,Ee.prototype.contains=function(e){var t;return(0,se.isInt)(e)&&e instanceof se.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,se.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},Ee.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},c=Ee,a.YEAR_RANGE=new c(-999999999,999999999),a.MONTH_OF_YEAR_RANGE=new c(1,12),a.DAY_OF_MONTH_RANGE=new c(1,31),a.HOUR_OF_DAY_RANGE=new c(0,23),a.MINUTE_OF_HOUR_RANGE=new c(0,59),a.SECOND_OF_MINUTE_RANGE=new c(0,59),a.NANOSECOND_OF_SECOND_RANGE=new c(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,a.normalizeSecondsForDuration=function(e,t){return(0,se.int)(e).add(Ce(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return Re(e,a.NANOS_PER_SECOND)},a.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,se.int)(e),t=(0,se.int)(t),r=(0,se.int)(r),n=(0,se.int)(n),(e=(e=(e=e.multiply(a.NANOS_PER_HOUR)).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){return e=Pe(e,t,r),t=function(e,t,r){e=(0,se.int)(e),t=(0,se.int)(t),r=(0,se.int)(r);e=e.multiply(a.SECONDS_PER_HOUR);return(e=e.add(t.multiply(a.SECONDS_PER_MINUTE))).add(r)}(n,o,i),e.multiply(a.SECONDS_PER_DAY).add(t)},a.dateToEpochDay=Pe,a.durationToIsoString=function(e,t,r,n){return e=Ae(e),t=Ae(t),r=function(e,t){e=(0,se.int)(e),t=(0,se.int)(t);var r,n=e.isNegative(),o=t.greaterThan(0);e=n&&o?e.equals(-1)?"-0":e.add(1).toString():e.toString();o&&(r=Ie((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),"P".concat(e,"M").concat(t,"DT").concat(r,"S")},a.timeToIsoString=function(e,t,r,n){return e=Ae(e,2),t=Ae(t,2),r=Ae(r,2),n=Ie(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},a.timeZoneOffsetToIsoString=function(e){if((e=(0,se.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=Ae((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=Ae(e.div(a.SECONDS_PER_MINUTE).modulo(a.MINUTES_PER_HOUR),2);return null!=(e=(e=e.modulo(a.SECONDS_PER_MINUTE)).equals(0)?null:Ae(e,2))?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},a.dateToIsoString=function(e,t,r){return e=function(e){e=(0,se.int)(e);if(e.isNegative()||e.greaterThan(9999))return Ae(e,6,{usePositiveSign:!0});return Ae(e,4)}(e),t=Ae(t,2),r=Ae(r,2),"".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){return t=null!=t?t:0,e=e.getMilliseconds()*a.NANOS_PER_MILLISECOND,t instanceof se.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},a.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()+Se(e.getUTCMonth(),e.getUTCFullYear())-e.getUTCDate():e.getDate()-(e.getUTCDate()+Se(e.getMonth(),e.getFullYear()));return n*a.SECONDS_PER_HOUR+r*a.SECONDS_PER_MINUTE+t+e*a.SECONDS_PER_DAY},a.assertValidYear=function(e){return je(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return je(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return je(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return je(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return je(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return je(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return je(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},fe=new Map,a.assertValidZoneId=function(t,r){var e=fe.get(r);if(!0!==e){if(!1===e)throw Te(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),fe.set(r,!0)}catch(e){throw fe.set(r,!1),Te(r,t)}}},a.floorDiv=Ce,a.floorMod=Re;var ke=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]}),Me=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ke(t,e,r);return Me(t,e),t},Ne=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},l=(Object.defineProperty(u,"__esModule",{value:!0}),u.isDateTime=u.DateTime=u.isLocalDateTime=u.LocalDateTime=u.isDate=u.Date=u.isTime=u.Time=u.isLocalTime=u.LocalTime=u.isDuration=u.Duration=void 0,c(Y)),xe=s,De=t,Ue=c(i),c={value:!0,enumerable:!1,configurable:!1,writable:!1},Le="__isDuration__",Fe="__isLocalTime__",Be="__isTime__",We="__isDate__",qe="__isLocalDateTime__",ze="__isDateTime__",f=(Ve.prototype.toString=function(){return l.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},Ve);function Ve(e,t,r,n){this.months=(0,xe.assertNumberOrInteger)(e,"Months"),this.days=(0,xe.assertNumberOrInteger)(t,"Days"),(0,xe.assertNumberOrInteger)(r,"Seconds"),(0,xe.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=l.normalizeSecondsForDuration(r,n),this.nanoseconds=l.normalizeNanosecondsForDuration(n),Object.freeze(this)}u.Duration=f,Object.defineProperty(f.prototype,Le,c),u.isDuration=function(e){return Qe(e,Le)};He.fromStandardDate=function(e,t){Je(e,t);t=l.totalNanoseconds(e,t);return new He(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof Ue.default?t.toInt():"bigint"==typeof t?(0,Ue.int)(t).toInt():t)},He.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};f=He;function He(e,t,r,n){this.hour=l.assertValidHour(e),this.minute=l.assertValidMinute(t),this.second=l.assertValidSecond(r),this.nanosecond=l.assertValidNanosecond(n),Object.freeze(this)}u.LocalTime=f,Object.defineProperty(f.prototype,Fe,c),u.isLocalTime=function(e){return Qe(e,Fe)};Ge.fromStandardDate=function(e,t){return Je(e,t),new Ge(e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ue.toNumber)(l.totalNanoseconds(e,t)),l.timeZoneOffsetInSeconds(e))},Ge.prototype.toString=function(){return l.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+l.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};f=Ge;function Ge(e,t,r,n,o){this.hour=l.assertValidHour(e),this.minute=l.assertValidMinute(t),this.second=l.assertValidSecond(r),this.nanosecond=l.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,xe.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}u.Time=f,Object.defineProperty(f.prototype,Be,c),u.isTime=function(e){return Qe(e,Be)};Ye.fromStandardDate=function(e){return Je(e),new Ye(e.getFullYear(),e.getMonth()+1,e.getDate())},Ye.prototype.toStandardDate=function(){return l.isoStringToStandardDate(this.toString())},Ye.prototype.toString=function(){return l.dateToIsoString(this.year,this.month,this.day)};f=Ye;function Ye(e,t,r){this.year=l.assertValidYear(e),this.month=l.assertValidMonth(t),this.day=l.assertValidDay(r),Object.freeze(this)}u.Date=f,Object.defineProperty(f.prototype,We,c),u.isDate=function(e){return Qe(e,We)};Ke.fromStandardDate=function(e,t){return Je(e,t),new Ke(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ue.toNumber)(l.totalNanoseconds(e,t)))},Ke.prototype.toStandardDate=function(){return l.isoStringToStandardDate(this.toString())},Ke.prototype.toString=function(){return Xe(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};f=Ke;function Ke(e,t,r,n,o,i,u){this.year=l.assertValidYear(e),this.month=l.assertValidMonth(t),this.day=l.assertValidDay(r),this.hour=l.assertValidHour(n),this.minute=l.assertValidMinute(o),this.second=l.assertValidSecond(i),this.nanosecond=l.assertValidNanosecond(u),Object.freeze(this)}u.LocalDateTime=f,Object.defineProperty(f.prototype,qe,c),u.isLocalDateTime=function(e){return Qe(e,qe)};Ze.fromStandardDate=function(e,t){return Je(e,t),new Ze(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ue.toNumber)(l.totalNanoseconds(e,t)),l.timeZoneOffsetInSeconds(e),null)},Ze.prototype.toStandardDate=function(){return l.toStandardDate(this._toUTC())},Ze.prototype.toString=function(){var e;return Xe(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?l.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},Ze.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=l.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,Ue.int)(e).multiply(1e3).add((0,Ue.int)(this.nanosecond).div(1e6)).toNumber()};f=Ze;function Ze(e,t,r,n,o,i,u,a,s){this.year=l.assertValidYear(e),this.month=l.assertValidMonth(t),this.day=l.assertValidDay(r),this.hour=l.assertValidHour(n),this.minute=l.assertValidMinute(o),this.second=l.assertValidSecond(i),this.nanosecond=l.assertValidNanosecond(u);e=Ne(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,De.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,xe.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,xe.assertString)(t,"Time zone ID"),l.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 Qe(e,t){return null!=e&&!0===e[t]}function Xe(e,t,r,n,o,i,u){return l.dateToIsoString(e,t,r)+"T"+l.timeToIsoString(n,o,i,u)}function Je(e,t){(0,xe.assertValidDate)(e,"Standard date"),null!=t&&(0,xe.assertNumberOrInteger)(t,"Nanosecond")}u.DateTime=f,Object.defineProperty(f.prototype,ze,c),u.isDateTime=function(e){return Qe(e,ze)};var f={},$e=(Object.defineProperty(f,"__esModule",{value:!0}),f.isPathSegment=f.PathSegment=f.isPath=f.Path=f.isUnboundRelationship=f.UnboundRelationship=f.isRelationship=f.Relationship=f.isNode=f.Node=void 0,n),c={value:!0,enumerable:!1,configurable:!1,writable:!1},et="__isNode__",tt="__isRelationship__",rt="__isUnboundRelationship__",nt="__isPath__",ot="__isPathSegment__";function it(e,t){return null!=e&&!0===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,$e.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var ut=at;function at(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=dt(n,function(){return e.toString()})}f.Node=ut,Object.defineProperty(ut.prototype,et,c),f.isNode=function(e){return it(e,et)};ct.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,$e.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var st=ct;function ct(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=dt(i,function(){return e.toString()}),this.startNodeElementId=dt(u,function(){return t.toString()}),this.endNodeElementId=dt(a,function(){return r.toString()})}f.Relationship=st,Object.defineProperty(st.prototype,tt,c),f.isRelationship=function(e){return it(e,tt)};lt.prototype.bind=function(e,t){return new st(this.identity,e,t,this.type,this.properties,this.elementId)},lt.prototype.bindTo=function(e,t){return new st(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},lt.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,$e.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};ut=lt;function lt(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=dt(n,function(){return e.toString()})}f.UnboundRelationship=ut,Object.defineProperty(ut.prototype,rt,c),f.isUnboundRelationship=function(e){return it(e,rt)};function ft(e,t,r){this.start=e,this.relationship=t,this.end=r}f.PathSegment=ft,Object.defineProperty(ft.prototype,ot,c),f.isPathSegment=function(e){return it(e,ot)};function pt(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function dt(e,t){return null==e?t():e}f.Path=pt,Object.defineProperty(pt.prototype,nt,c),f.isPath=function(e){return it(e,nt)};var ut={},ht=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},bt=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.")},yt=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=(Object.defineProperty(ut,"__esModule",{value:!0}),t);function vt(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)}vt.prototype.forEach=function(e){var t,r;try{for(var n=bt(this.entries()),o=n.next();!o.done;o=n.next()){var i=yt(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}}},vt.prototype.map=function(e){var t,r,n=[];try{for(var o=bt(this.entries()),i=o.next();!i.done;i=o.next()){var u=yt(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},vt.prototype.entries=function(){var t;return ht(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]}})},vt.prototype.values=function(){var t;return ht(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]}})},vt.prototype[Symbol.iterator]=function(){var t;return ht(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]}})},vt.prototype.toObject=function(){var t,e,r={};try{for(var n=bt(this.entries()),o=n.next();!o.done;o=n.next()){var i=yt(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},vt.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,_t.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,_t.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]},vt.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},ut.default=vt;var c={},mt=(Object.defineProperty(c,"__esModule",{value:!0}),c.isPoint=c.Point=void 0,s),gt="__isPoint__",p=(Ot.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(wt(this.srid),", x=").concat(wt(this.x),", y=").concat(wt(this.y),"}"):"Point{srid=".concat(wt(this.srid),", x=").concat(wt(this.x),", y=").concat(wt(this.y),", z=").concat(wt(this.z),"}")},Ot);function Ot(e,t,r,n){this.srid=(0,mt.assertNumberOrInteger)(e,"SRID"),this.x=(0,mt.assertNumber)(t,"X coordinate"),this.y=(0,mt.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,mt.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function wt(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}c.Point=p,Object.defineProperty(p.prototype,gt,{value:!0,enumerable:!1,configurable:!1,writable:!1}),c.isPoint=function(e){return null!=e&&!0===e[gt]};var p={},h={},Et={},b=(Object.defineProperty(Et,"__esModule",{value:!0}),Et.FailedObserver=Et.CompletedObserver=void 0,Pt.prototype.subscribe=function(e){Tt(e,e.onKeys,[]),Tt(e,e.onCompleted,{})},Pt.prototype.cancel=function(){},Pt.prototype.pause=function(){},Pt.prototype.resume=function(){},Pt.prototype.prepareToHandleSingleResponse=function(){},Pt.prototype.markCompleted=function(){},Pt.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},Pt);function Pt(){}function St(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function Tt(e,t,r){null!=t&&t.bind(e)(r)}Et.CompletedObserver=b,St.prototype.subscribe=function(e){Tt(e,e.onError,this._error),this._observers.push(e)},St.prototype.onError=function(t){Tt(this,this._beforeError,t),this._observers.forEach(function(e){return Tt(e,e.onError,t)})},St.prototype.cancel=function(){},St.prototype.pause=function(){},St.prototype.resume=function(){},St.prototype.markCompleted=function(){},St.prototype.prepareToHandleSingleResponse=function(){},Et.FailedObserver=St;var b={},jt=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]}),Ct=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&jt(t,e,r);return Ct(t,e),t},Rt=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},It=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))},At=(Object.defineProperty(b,"__esModule",{value:!0}),b.Bookmarks=void 0,y(s)),y=(kt.empty=function(){return Mt},kt.prototype.isEmpty=function(){return 0===this._values.length},kt.prototype.values=function(){return this._values},kt.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},kt.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},kt);function kt(e){this._values=function(e){if(null==e||""===e)return[];if(At.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(!At.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return It([],Rt(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var Mt=new(b.Bookmarks=y)(null);var Nt,xt,y={},_=(Object.defineProperty(y,"__esModule",{value:!0}),y.TELEMETRY_APIS=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,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",y.BOLT_PROTOCOL_V1=1,y.BOLT_PROTOCOL_V2=2,y.BOLT_PROTOCOL_V3=3,y.BOLT_PROTOCOL_V4_0=4,y.BOLT_PROTOCOL_V4_1=4.1,y.BOLT_PROTOCOL_V4_2=4.2,y.BOLT_PROTOCOL_V4_3=4.3,y.BOLT_PROTOCOL_V4_4=4.4,y.BOLT_PROTOCOL_V5_0=5,y.BOLT_PROTOCOL_V5_1=5.1,y.BOLT_PROTOCOL_V5_2=5.2,y.BOLT_PROTOCOL_V5_3=5.3,y.BOLT_PROTOCOL_V5_4=5.4,y.BOLT_PROTOCOL_V5_5=5.5,y.BOLT_PROTOCOL_V5_6=5.6,y.BOLT_PROTOCOL_V5_7=5.7,y.BOLT_PROTOCOL_V5_8=5.8,y.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),v={},m=r&&r.__extends||(Nt=function(e,t){return(Nt=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}Nt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Dt=(Object.defineProperty(v,"__esModule",{value:!0}),v.Logger=void 0,t),Ut="error",Lt="warn",Ft="info",Bt="debug",Wt=((qt={})[Ut]=0,qt[Lt]=1,qt[Ft]=2,qt[Bt]=3,qt),qt=(zt.create=function(e){return null!=(null==e?void 0:e.logging)?new zt(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=Wt[e];if(null!=t||0===t)return e;throw(0,Dt.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(Wt).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,Dt.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},zt.noOp=function(){return Ht},zt.prototype.isErrorEnabled=function(){return Gt(this._level,Ut)},zt.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(Ut,e)},zt.prototype.isWarnEnabled=function(){return Gt(this._level,Lt)},zt.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(Lt,e)},zt.prototype.isInfoEnabled=function(){return Gt(this._level,Ft)},zt.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(Ft,e)},zt.prototype.isDebugEnabled=function(){return Gt(this._level,Bt)},zt.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(Bt,e)},zt);function zt(e,t){this._level=e,this._loggerFunction=t}function Vt(){return xt.call(this,Ft,function(e,t){})||this}v.Logger=qt,m(Vt,xt=qt),Vt.prototype.isErrorEnabled=function(){return!1},Vt.prototype.error=function(e){},Vt.prototype.isWarnEnabled=function(){return!1},Vt.prototype.warn=function(e){},Vt.prototype.isInfoEnabled=function(){return!1},Vt.prototype.info=function(e){},Vt.prototype.isDebugEnabled=function(){return!1},Vt.prototype.debug=function(e){};var Ht=new Vt;function Gt(e,t){return Wt[e]>=Wt[t]}var Yt,m=r&&r.__extends||(Yt=function(e,t){return(Yt=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}Yt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Kt=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())})},Zt=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},Qt=(Object.defineProperty(_,"__esModule",{value:!0}),_.EMPTY_CONNECTION_HOLDER=_.ReadOnlyConnectionHolder=_.ConnectionHolder=void 0,t),Xt=s,Jt=y,$t=b,er=v,qt=(tr.prototype.mode=function(){return this._mode},tr.prototype.database=function(){return this._database},tr.prototype.setDatabase=function(e){this._database=e},tr.prototype.bookmarks=function(){return this._bookmarks},tr.prototype.connectionProvider=function(){return this._connectionProvider},tr.prototype.referenceCount=function(){return this._referenceCount},tr.prototype.initializeConnection=function(e){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider,e),this._referenceCount++,!0)},tr.prototype._createConnectionPromise=function(o,i){return Kt(this,void 0,void 0,function(){var t,r,n;return Zt(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()]}})})},tr.prototype._getBookmarks=function(){return Kt(this,void 0,void 0,function(){return Zt(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},tr.prototype.getConnection=function(){return this._connectionPromise},tr.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},tr.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},tr.prototype.log=function(){return this._log},tr.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(ur).then(function(){return e.release().then(function(){return null})}):e.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},tr.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},tr);function tr(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:Jt.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=r?(0,Xt.assertString)(r,"database"):"",this._bookmarks=null!=n?n:$t.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($t.Bookmarks.empty())}}_.ConnectionHolder=qt;m(or,rr=qt),or.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},or.prototype.getConnection=function(){return this._connectionHolder.getConnection()},or.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},or.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var rr,nr,g=or;function or(e){var t=rr.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 ir(){return nr.call(this,{log:er.Logger.create({})})||this}_.ReadOnlyConnectionHolder=g,_.default=g,m(ir,nr=qt),ir.prototype.mode=function(){},ir.prototype.database=function(){},ir.prototype.initializeConnection=function(){return!0},ir.prototype.getConnection=function(){return Kt(this,void 0,void 0,function(){return Zt(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,Qt.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},ir.prototype.releaseConnection=function(){return Kt(this,void 0,void 0,function(){return Zt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},ir.prototype.close=function(){return Kt(this,void 0,void 0,function(){return Zt(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};g=new ir;function ur(e){return null}_.EMPTY_CONNECTION_HOLDER=g;var m={},ar=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]}),sr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),qt=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ar(t,e,r);return sr(t,e),t},cr=(Object.defineProperty(m,"__esModule",{value:!0}),m.TxConfig=void 0,qt(s)),lr=t,fr=i,g=(pr.empty=function(){return dr},pr.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},pr);function pr(e,t){var r;null!=(r=e)&&cr.assertObject(r,"Transaction config"),this.timeout=function(e,t){if(cr.isObject(e)&&null!=e.timeout){cr.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,fr.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(cr.isObject(e)&&null!=e.metadata){e=e.metadata;if(cr.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var dr=new(m.TxConfig=g)({});var qt={},hr=r&&r.__assign||function(){return(hr=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)},br=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())})},yr=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},_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},vr=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))},mr=(Object.defineProperty(qt,"__esModule",{value:!0}),qt.TransactionExecutor=void 0,t),gr=y;function Or(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,vr([e,t],_r(r),!1))}function wr(e){return clearTimeout(e)}function Er(e,t,r,n,o){void 0===o&&(o={setTimeout:Or,clearTimeout:wr}),this._maxRetryTimeMs=Pr(e,3e4),this._initialRetryDelayMs=Pr(t,1e3),this._multiplier=Pr(r,2),this._jitterFactor=Pr(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=gr.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}function Pr(e,t){return null!=e?e:t}Er.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)})},Er.prototype.close=function(){var t=this;this._inFlightTimeoutIds.forEach(function(e){return t._clearTimeout(e)}),this._inFlightTimeoutIds=[]},Er.prototype._retryTransactionPromise=function(o,i,e,r,u,a,s){var c=this;return Date.now()-r>this._maxRetryTimeMs||!(0,mr.isRetriableError)(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)})},Er.prototype._executeTransactionInsidePromise=function(u,a,s,c,l,f){return br(this,void 0,void 0,function(){var t,r,n,o,i=this;return yr(this,function(e){switch(e.label){case 0:return(e.trys.push([0,4,,5]),r=u(null!=(null==f?void 0:f.apiTransactionConfig)?hr({},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]}})})},Er.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},Er.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},Er.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},Er.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},Er.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,mr.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,mr.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,mr.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,mr.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},qt.TransactionExecutor=Er;var g={},Sr=r&&r.__assign||function(){return(Sr=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)},Tr=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},jr=(Object.defineProperty(g,"__esModule",{value:!0}),g.Url=g.formatIPv6Address=g.formatIPv4Address=g.defaultPortForScheme=g.parseDatabaseUrl=void 0,s),Cr=7687,Rr=7474,Ir=7473,Ar=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function kr(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function Mr(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 Nr(e){return"http"===e?Rr:"https"===e?Ir:Cr}g.Url=Ar,g.parseDatabaseUrl=function(e){(0,jr.assertString)(e,"URL");var t,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]),Tr((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=Sr(Sr({},n),t(r[0]))).path=r[1]+r[2]):n.path=e;return n}((n=(n=(n=e).trim()).includes("://")?{schemeMissing:!1,url:n}:{schemeMissing:!0,url:"none://".concat(n)}).url),n=n.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),o=function(e){if(null!=e)return e.trim();throw new Error("Unable to extract host from null or undefined URL")}(r.host),i=function(e){if(""!==e&&null!=e)return e.includes(":")?Mr(e):e;throw new Error("Illegal host ".concat(e))}(o),u=function(e,t){e="string"==typeof e?parseInt(e,10):e;return null==e||isNaN(e)?Nr(t):e}(r.port,n),i="".concat(i,":").concat(u),r=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=kr(e[0],"key",r),e=kr(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!=(t=r.query)?t:"string"==typeof(t=r.resourceName)?Tr(t.split("?"),2)[1]:null,e);return new Ar(n,o,u,i,r)},g.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},g.formatIPv6Address=function(e,t){return e=Mr(e),"".concat(e,":").concat(t)},g.defaultPortForScheme=Nr;var O={},xr=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]}),Dr=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&xr(t,e,r);return Dr(t,e),t},Ur=(Object.defineProperty(O,"__esModule",{value:!0}),O.ServerAddress=void 0,s),Lr=w(g);function Fr(e,t,r,n){this._host=(0,Ur.assertString)(e,"host"),this._resolved=null!=t?(0,Ur.assertString)(t,"resolved"):null,this._port=(0,Ur.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Fr.prototype.host=function(){return this._host},Fr.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Fr.prototype.port=function(){return this._port},Fr.prototype.resolveWith=function(e){return new Fr(this._host,e,this._port,this._hostPort)},Fr.prototype.asHostPort=function(){return this._hostPort},Fr.prototype.asKey=function(){return this._hostPort},Fr.prototype.toString=function(){return this._stringValue},Fr.fromUrl=function(e){e=Lr.parseDatabaseUrl(e);return new Fr(e.host,null,e.port,e.hostAndPort)},O.ServerAddress=Fr;var w={},E={};function Br(){}Object.defineProperty(E,"__esModule",{value:!0}),Br.prototype.resolve=function(){throw new Error("Abstract function")},Br.prototype._resolveToItself=function(e){return Promise.resolve([e])},E.default=Br;var Wr={},qr=(Object.defineProperty(Wr,"__esModule",{value:!0}),O);function zr(e){return Promise.resolve([e])}function Vr(e){this._resolverFunction=null!=e?e:zr}Vr.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 qr.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))})},Wr.default=Vr;var Hr,P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},E=(Object.defineProperty(w,"__esModule",{value:!0}),w.ConfiguredCustomResolver=w.BaseHostNameResolver=void 0,P(E)),E=(w.BaseHostNameResolver=E.default,P(Wr)),P=(w.ConfiguredCustomResolver=E.default,{}),E={};Object.defineProperty(E,"__esModule",{value:!0}),E.fromVersion=void 0,E.fromVersion=function(e,t){var r=null!=(t=(t=void 0===t?function(){return{get userAgent(){}}}: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}},T=P,Hr=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]}),S=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Hr(t,e,r)},Object.defineProperty(T,"__esModule",{value:!0}),S(E,T);var S={},E={},T=(Object.defineProperty(E,"__esModule",{value:!0}),E.DEFAULT_ACQUISITION_TIMEOUT=E.DEFAULT_MAX_SIZE=void 0,E.DEFAULT_MAX_SIZE=100,E.DEFAULT_ACQUISITION_TIMEOUT=6e4,Gr.defaultConfig=function(){return new Gr(100,6e4)},Gr.fromDriverConfig=function(e){return new Gr(Kr(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,Kr(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},Gr);function Gr(e,t){this.maxSize=Yr(e,100),this.acquisitionTimeout=Yr(t,6e4)}function Yr(e,t){return Kr(e)?e:t}function Kr(e){return 0===e||null!=e}E.default=T;var T={},Zr=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())})},Qr=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},Xr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Jr=(Object.defineProperty(T,"__esModule",{value:!0}),Xr(E)),$r=t,en=v,Xr=(tn.prototype.acquire=function(a,s,c){return Zr(this,void 0,void 0,function(){var o,i,u=this;return Qr(this,function(e){switch(e.label){case 0:return o=s.asKey(),i=this._acquireRequests,null==i[o]&&(i[o]=[]),[4,new Promise(function(e,t){var r=setTimeout(function(){var e,t=i[o];null!=t&&(i[o]=t.filter(function(e){return e!==n})),n.isCompleted()||(t=u.activeResourceCount(s),e=u.has(s)?u._pools[o].length:0,n.reject((0,$r.newError)("Connection acquisition timed out in ".concat(u._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},u._acquisitionTimeout),n=("object"==typeof r&&r.unref(),new on(o,a,c,e,t,r,u._log));i[o].push(n),u._processPendingAcquireRequests(s)})];case 1:return[2,e.sent()]}})})},tn.prototype.purge=function(t){return Zr(this,void 0,void 0,function(){return Qr(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t.asKey())];case 1:return[2,e.sent()]}})})},tn.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},tn.prototype.close=function(){return Zr(this,void 0,void 0,function(){var r=this;return Qr(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(t){return Zr(r,void 0,void 0,function(){return Qr(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()]}})})},tn.prototype.keepAll=function(o){return Zr(this,void 0,void 0,function(){var t,r,n=this;return Qr(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 Zr(n,void 0,void 0,function(){return Qr(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()]}})})},tn.prototype.has=function(e){return e.asKey()in this._pools},tn.prototype.activeResourceCount=function(e){return null!=(e=this._activeResourceCounts[e.asKey()])?e:0},tn.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return null==t&&(t=new ln,this._pools[e]=t,this._pendingCreates[e]=0),t},tn.prototype._acquire=function(c,l,f){return Zr(this,void 0,void 0,function(){var t,n,r,o,i,u,a,s=this;return Qr(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,$r.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(),nn(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 nn(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 Zr(s,void 0,void 0,function(){return Qr(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}]}})})},tn.prototype._release=function(n,o,i){return Zr(this,void 0,void 0,function(){var t,r=this;return Qr(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 nn(t,this._activeResourceCounts),this._processPendingAcquireRequests(n),[7];case 10:return[2]}})})},tn.prototype._purgeKey=function(o){return Zr(this,void 0,void 0,function(){var t,r,n;return Qr(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]}})})},tn.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])},tn);function tn(e){var t=e.create,t=void 0===t?function(e,t,r){return Zr(s,void 0,void 0,function(){return Qr(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 Zr(s,void 0,void 0,function(){return Qr(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?Jr.default.defaultConfig():a,e=e.log,e=void 0===e?en.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 nn(e,t){var r=(null!=(r=t[e])?r:0)-1;0<r?t[e]=r:delete t[e]}Object.defineProperty(un.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(un.prototype,"requireNew",{get:function(){var e;return null!=(e=this._config.requireNew)&&e},enumerable:!1,configurable:!0}),un.prototype.isCompleted=function(){return this._completed},un.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))},un.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var on=un;function un(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 an,sn,cn,ln=fn;function fn(){this._active=!0,this._elements=[],this._elementsInUse=new Set}T.default=Xr,Xr=S,an=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]}),sn=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&an(t,e,r);return sn(t,e),t},j=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.DEFAULT_MAX_SIZE=Xr.DEFAULT_ACQUISITION_TIMEOUT=Xr.PoolConfig=Xr.Pool=void 0,cn=hn(E),Xr.PoolConfig=cn.default,Object.defineProperty(Xr,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return cn.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(Xr,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return cn.DEFAULT_MAX_SIZE}}),hn=j(T),Xr.Pool=hn.default,Xr.default=hn.default;var pn=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}),E=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&pn(t,e,r);return dn(t,e),t},j=(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,E(s)),T=(h.util=j,E(Y)),Xr=(h.temporalUtil=T,E(Et)),hn=(h.observer=Xr,E(b)),j=(h.bookmarks=hn,E(y)),Y=(h.constants=j,E(_)),T=(h.connectionHolder=Y,E(m)),Xr=(h.txConfig=T,E(qt)),hn=(h.transactionExecutor=Xr,E(v)),j=(h.logger=hn,E(g)),Y=(h.urlUtil=j,E(O)),T=(h.serverAddress=Y,E(w)),Xr=(h.resolver=T,E(o)),hn=(h.objectUtil=Xr,E(P)),g=(h.boltAgent=hn,E(S)),j=(h.pool=g,{}),bn=r&&r.__assign||function(){return(bn=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]}),_n=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&yn(t,e,r);return _n(t,e),t},vn=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},mn=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))},gn=(Object.defineProperty(j,"__esModule",{value:!0}),j.buildNotificationsFromMetadata=j.buildGqlStatusObjectFromMetadata=j.polyfillNotification=j.polyfillGqlStatusObject=j.GqlStatusObject=j.Notification=j.notificationClassification=j.notificationCategory=j.notificationSeverityLevel=void 0,O(n)),On=h,wn=V,En={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"}},Pn={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},Sn=(j.notificationSeverityLevel=Pn,Object.freeze(Pn),Object.values(Pn)),Y={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",SCHEMA:"SCHEMA",UNKNOWN:"UNKNOWN"},Tn=(j.notificationCategory=Y,Object.freeze(Y),Object.values(Y)),jn=Y,Cn=(j.notificationClassification=jn,function(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=Dn(e.position),this.severityLevel=Un(e.severity),this.rawSeverityLevel=e.severity,this.category=Ln(e.category),this.rawCategory=e.category}),Rn=(j.Notification=Cn,Object.defineProperty(In.prototype,"diagnosticRecordAsJsonString",{get:function(){return gn.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),In);function In(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?Dn(this.diagnosticRecord._position):void 0,this.severity=Un(this.diagnosticRecord._severity),this.rawSeverity=this.diagnosticRecord._severity,this.classification=Ln(this.diagnosticRecord._classification),this.rawClassification=this.diagnosticRecord._classification,this.isNotification=null!=e.neo4j_code,Object.freeze(this)}function An(e){var t;if(null!=e.neo4j_code)return new Cn({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 kn(e){var t=e.severity===Pn.WARNING?En.WARNING:En.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:bn({},wn.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 Rn(r)}j.GqlStatusObject=Rn,j.polyfillNotification=An,j.polyfillGqlStatusObject=kn;var Mn={SUCCESS:new Rn({gql_status:"00000",status_description:"note: successful completion",diagnostic_record:wn.rawPolyfilledDiagnosticRecord}),NO_DATA:new Rn({gql_status:"02000",status_description:"note: no data",diagnostic_record:wn.rawPolyfilledDiagnosticRecord}),NO_DATA_UNKNOWN_SUBCONDITION:new Rn(bn(bn({},En.NO_DATA),{diagnostic_record:wn.rawPolyfilledDiagnosticRecord})),OMITTED_RESULT:new Rn({gql_status:"00001",status_description:"note: successful completion - omitted result",diagnostic_record:wn.rawPolyfilledDiagnosticRecord})};Object.freeze(Mn),j.buildGqlStatusObjectFromMetadata=function(e){if(null!=e.statuses)return e.statuses.map(function(e){return new Rn(e)});var t=!0===(null==(t=e.stream_summary)?void 0:t.have_records_streamed)?Mn.SUCCESS:!1===(null==t?void 0:t.has_keys)?Mn.OMITTED_RESULT:!0===(null==t?void 0:t.pulled)?Mn.NO_DATA:Mn.NO_DATA_UNKNOWN_SUBCONDITION;return mn([t],vn(null!=(e=null==(t=e.notifications)?void 0:t.map(kn))?e:[]),!1).sort(function(e,t){return xn(e)-xn(t)})};var Nn=Object.freeze({"02":0,"01":1,"00":2});function xn(e){var e=null==(e=e.gqlStatus)?void 0:e.slice(0,2);return null!=(e=Nn[e])?e:9999}function Dn(e){return null==e?{}:{offset:On.util.toNumber(e.offset),line:On.util.toNumber(e.line),column:On.util.toNumber(e.column)}}function Un(e){return Sn.includes(e)?e:Pn.UNKNOWN}function Ln(e){return Tn.includes(e)?e:jn.UNKNOWN}j.buildNotificationsFromMetadata=function(e){return null!=e.notifications?e.notifications.map(function(e){return new Cn(e)}):null!=e.statuses?e.statuses.map(An).filter(function(e){return null!=e}):[]},j.default=Cn,Object.defineProperty(p,"__esModule",{value:!0}),p.Stats=p.QueryStatistics=p.ProfiledPlan=p.Plan=p.ServerInfo=p.queryType=void 0;var Fn=h,Bn=j,w=(Wn.prototype.hasPlan=function(){return this.plan instanceof qn},Wn.prototype.hasProfile=function(){return this.profile instanceof zn},Wn);function Wn(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new Hn(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new qn(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new zn(r.profile),this.notifications=(0,Bn.buildNotificationsFromMetadata)(r),this.gqlStatusObjects=(0,Bn.buildGqlStatusObjectFromMetadata)(r),this.server=new Yn(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 qn=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)}):[]},zn=(p.Plan=qn,Vn.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},Vn);function Vn(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=Kn("dbHits",e),this.rows=Kn("rows",e),this.pageCacheMisses=Kn("pageCacheMisses",e),this.pageCacheHits=Kn("pageCacheHits",e),this.pageCacheHitRatio=Kn("pageCacheHitRatio",e),this.time=Kn("time",e),this.children=null!=e.children?e.children.map(function(e){return new Vn(e)}):[]}p.ProfiledPlan=zn;p.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},Gn.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)},Gn.prototype.updates=function(){return this._stats},Gn.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},Gn.prototype.systemUpdates=function(){return this._systemUpdates};var Hn=Gn;function Gn(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]=Fn.util.toNumber(r[e]):"systemUpdates"===t?n._systemUpdates=Fn.util.toNumber(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}p.QueryStatistics=Hn;var Yn=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Kn(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?(t=t[e],Fn.util.toNumber(t)):r}p.ServerInfo=Yn;function Zn(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}function Qn(e){console.log("Uncaught error when processing result: "+e)}function Xn(e){}function Jn(e){}p.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},p.default=w;var $n,T={},o=(Object.defineProperty(T,"__esModule",{value:!0}),T.notificationFilterDisabledClassification=T.notificationFilterDisabledCategory=T.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),Xr=(T.notificationFilterMinimumSeverityLevel=o,Object.freeze(o),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"}),P=(T.notificationFilterDisabledCategory=Xr,Object.freeze(Xr),Xr),hn=(T.notificationFilterDisabledClassification=P,T.default=Zn,{}),eo=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())})},to=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ro=(Object.defineProperty(hn,"__esModule",{value:!0}),E(p)),no=h,oo=t,io=no.connectionHolder.EMPTY_CONNECTION_HOLDER;function uo(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[$n]="Result",this._stack=null==(i=new Error("")).stack?null:i.stack.replace(/^Error(\n\r)*/,""),this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=n?n:io,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}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 e=this;return null==this._p&&(this._p=new Promise(function(t,r){var n=[];e.subscribe({onNext:function(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,oo.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return eo(n,void 0,void 0,function(){var t;return to(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,oo.newError)("InvalidState: Result stream finished without Summary",oo.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 eo(n,void 0,void 0,function(){var t;return to(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 eo(n,void 0,void 0,function(){var t;return to(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 eo(n,void 0,void 0,function(){return to(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:Xn,i=null!=(e=n.onError)?e:Qn,r=null!=(e=n.onKeys)?e:Jn;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=no.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 ro.default(r,n,t,e)})},uo.prototype._createQueuedResultObserver=function(n){var e=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(){var r;return eo(this,void 0,void 0,function(){var t;return to(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,oo.newError)("Unexpected empty buffer",oo.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},t={onNext:function(e){t._push({done:!1,value:e})},onCompleted:function(e){t._push({done:!0,value:e})},onError:function(e){t._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 eo(e,void 0,void 0,function(){var t;return to(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 eo(e,void 0,void 0,function(){var t,r;return to(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 t},$n=Symbol.toStringTag,hn.default=uo;S={};Object.defineProperty(S,"__esModule",{value:!0});S.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};g={},Object.defineProperty(g,"__esModule",{value:!0}),g.Releasable=void 0,ao.prototype.release=function(){throw new Error("Not implemented")},O=ao;function ao(){}function so(){}g.Releasable=O,so.prototype.acquireConnection=function(e){throw Error("Not implemented")},so.prototype.supportsMultiDb=function(){throw Error("Not implemented")},so.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},so.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},so.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},so.prototype.SSREnabled=function(){return!1},so.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},so.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},so.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},so.prototype.close=function(){throw Error("Not implemented")},g.default=so;V={};function co(){}Object.defineProperty(V,"__esModule",{value:!0}),co.prototype.beginTransaction=function(e){throw new Error("Not implemented")},co.prototype.run=function(e,t,r){throw new Error("Not implemented")},co.prototype.commitTransaction=function(e){throw new Error("Not implemented")},co.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},co.prototype.resetAndFlush=function(){throw new Error("Not implemented")},co.prototype.isOpen=function(){throw new Error("Not implemented")},co.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},co.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},V.default=co;var Y={},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={next:e(0),throw:e(1),return:e(2)};return"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}}}},w=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},po=(Object.defineProperty(Y,"__esModule",{value:!0}),s),ho=_,bo=b,yo=m,_o=Et,vo=t,mo=w(hn);function go(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=Oo.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._lowRecordWatermak=c,this._highRecordWatermark=s,this._bookmarks=bo.Bookmarks.empty(),this._notificationFilter=l,this._apiTelemetryConfig=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){f._acceptActive=e})}go.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return lo(t,void 0,void 0,function(){var t,r=this;return fo(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,vo.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},go.prototype.run=function(e,t){e=(0,po.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._lowRecordWatermak,preparationJob:this._activePromise});return this._results.push(t),t},go.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)}})})},go.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)}})})},go.prototype.isOpen=function(){return this._state===Oo.ACTIVE},go.prototype.close=function(){return lo(this,void 0,void 0,function(){return fo(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]}})})},go.prototype[Symbol.asyncDispose]=function(){return this.close()},go.prototype._onErrorCallback=function(t){return this._state===Oo.FAILED?Promise.resolve(null):(this._state=Oo.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())},go.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new bo.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:bo.Bookmarks.empty(),null==e?void 0:e.db)};var Oo={ACTIVE:{commit:function(e){return{result:wo(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:Oo.SUCCEEDED}},rollback:function(e){return{result:wo(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:Oo.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 Eo(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.run(t,r,{bookmarks:bo.Bookmarks.empty(),txConfig:yo.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,vo.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:Eo(new _o.FailedObserver({error:(0,vo.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:Oo.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:Eo(new _o.CompletedObserver,"ROLLBACK",{},t,0,0),state:Oo.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Eo(new _o.FailedObserver({error:(0,vo.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:Eo(new _o.FailedObserver({error:(0,vo.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},ho.EMPTY_CONNECTION_HOLDER,0,0),state:Oo.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:Eo(new _o.FailedObserver({error:(0,vo.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},ho.EMPTY_CONNECTION_HOLDER,0,0),state:Oo.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Eo(new _o.FailedObserver({error:(0,vo.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:Eo(new _o.FailedObserver({error:(0,vo.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:Oo.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:Eo(new _o.FailedObserver({error:(0,vo.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:Oo.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,Eo(new _o.FailedObserver({error:(0,vo.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function wo(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,vo.newError)("No connection available")})}).catch(function(e){return new _o.FailedObserver({error:e,onError:n})});return new mo.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function Eo(e,t,r,n,o,i){return void 0===n&&(n=ho.EMPTY_CONNECTION_HOLDER),new mo.default(Promise.resolve(e),t,r,new ho.ReadOnlyConnectionHolder(null!=n?n:ho.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}Y.default=go;o={};function Po(e){e=e.run;this._run=e}Object.defineProperty(o,"__esModule",{value:!0}),Po.fromTransaction=function(e){return new Po({run:e.run.bind(e)})},Po.prototype.run=function(e,t){return this._run(e,t)},o.default=Po;var So,To,jo,Xr={},P=r&&r.__extends||(So=function(e,t){return(So=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}So(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Co=r&&r.__assign||function(){return(Co=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)},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},O=(Object.defineProperty(Xr,"__esModule",{value:!0}),E(Y)),w=(jo=O.default,P(Ro,jo),Ro.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},Ro.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},Ro.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},Ro.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},Ro.prototype._toTransaction=function(){return Co(Co({},this),{run:jo.prototype.run.bind(this),commit:jo.prototype.commit.bind(this),rollback:jo.prototype.rollback.bind(this),close:jo.prototype.close.bind(this),isOpen:jo.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},Ro.prototype._begin=function(e,t){return jo.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this),onDB:this._onDbCallback})},Ro.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},Ro.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},Ro);function Ro(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=jo.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[To]="TransactionPromise",t._onDbCallback=e,t}To=Symbol.toStringTag,Xr.default=w;var E={},O={},Io=(Object.defineProperty(O,"__esModule",{value:!0}),O.cacheKey=void 0,n);O.cacheKey=function(e,t){return null!=t?"basic:"+t:void 0===e?"DEFAULT":"basic"===e.scheme?"basic:"+(null!=(t=e.principal)?t:""):"kerberos"===e.scheme?"kerberos:"+e.credentials:"bearer"===e.scheme?"bearer:"+e.credentials:"none"===e.scheme?"none":(0,Io.stringify)(e,{sortedElements:!0})};var Ao=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},Mo=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},No=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))},P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},xo=(Object.defineProperty(E,"__esModule",{value:!0}),Et),Do=s,Uo=y,Lo=t,Fo=P(hn),Bo=_,Wo=qt,qo=b,zo=m,Vo=P(Xr),Ho=P(o),Go=O;function Yo(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 Bo.ConnectionHolder({mode:Uo.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 Bo.ConnectionHolder({mode:Uo.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:qo.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Wo.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}Yo.prototype.run=function(e,t,r){var o=this,e=(0,Do.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new zo.TxConfig(r,this._log):zo.TxConfig.empty(),t=this._run(i,u,function(n){return Ao(o,void 0,void 0,function(){var t,r=this;return ko(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:Uo.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},Yo.prototype._run=function(e,t,r){var r=this._acquireAndConsumeConnection(r),n=r.connectionHolder,r=r.resultPromise.catch(function(e){return Promise.resolve(new xo.FailedObserver({error:e}))}),o={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new Fo.default(r,e,t,n,o)},Yo.prototype._acquireConnection=function(e){var r=this,e=this._acquireAndConsumeConnection(e),n=e.connectionHolder;return e.resultPromise.then(function(t){return Ao(r,void 0,void 0,function(){return ko(this,function(e){switch(e.label){case 0:return[4,n.releaseConnection()];case 1:return e.sent(),[2,t]}})})})},Yo.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,Lo.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,Lo.newError)("Cannot run query in a closed session."));return{connectionHolder:e,resultPromise:r}},Yo.prototype.beginTransaction=function(e){var t=zo.TxConfig.empty();return null!=e&&(t=new zo.TxConfig(e,this._log)),this._beginTransaction(this._mode,t,{api:Uo.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},Yo.prototype._beginTransaction=function(e,t,r){var n=this;if(!this._open)throw(0,Lo.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,Lo.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=Yo._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(this._databaseGuess),this._hasTx=!0,e=new Vo.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},Yo.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,Lo.newError)("You cannot run more transactions on a closed session.")},Yo.prototype._transactionClosed=function(){this._hasTx=!1},Yo.prototype.lastBookmark=function(){return this.lastBookmarks()},Yo.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},Yo.prototype._bookmarks=function(){var r;return Ao(this,void 0,void 0,function(){var t;return ko(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new qo.Bookmarks(No(No([],Mo(t),!1),Mo(this._configuredBookmarks),!1))]}})})},Yo.prototype.readTransaction=function(e,t){t=new zo.TxConfig(t,this._log);return this._runTransaction(Uo.ACCESS_MODE_READ,t,e)},Yo.prototype.writeTransaction=function(e,t){t=new zo.TxConfig(t,this._log);return this._runTransaction(Uo.ACCESS_MODE_WRITE,t,e)},Yo.prototype._runTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e)},Yo.prototype.executeRead=function(e,t){t=new zo.TxConfig(t,this._log);return this._executeInTransaction(Uo.ACCESS_MODE_READ,t,e)},Yo.prototype.executeWrite=function(e,t){t=new zo.TxConfig(t,this._log);return this._executeInTransaction(Uo.ACCESS_MODE_WRITE,t,e)},Yo.prototype._executeInTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e,Ho.default.fromTransaction)},Yo.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,Go.cacheKey)(this._auth,this._impersonatedUser),e)))},Yo.prototype._getConnectionAcquistionBookmarks=function(){var r;return Ao(this,void 0,void 0,function(){var t;return ko(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new qo.Bookmarks(No(No([],Mo(this._configuredBookmarks),!1),Mo(t),!1))]}})})},Yo.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=qo.Bookmarks.empty())},Yo.prototype.close=function(){return Ao(this,void 0,void 0,function(){return ko(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]}})})},Yo.prototype[Symbol.asyncDispose]=function(){return this.close()},Yo.prototype._connectionHolderWithMode=function(e){if(e===Uo.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===Uo.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,Lo.newError)("Unknown access mode: "+e)},Yo.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new qo.Bookmarks(e.bookmark),t,e.db)},Yo.prototype._calculateWatermaks=function(){return this._fetchSize===Uo.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},Yo.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},Yo._validateSessionMode=function(e){e=null!=e?e:Uo.ACCESS_MODE_WRITE;if(e!==Uo.ACCESS_MODE_READ&&e!==Uo.ACCESS_MODE_WRITE)throw(0,Lo.newError)("Illegal session mode "+e);return e},E.default=Yo;var w={},Et={},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())})},Zo=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},Qo=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.")},Xo=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},Jo=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(Et,"__esModule",{value:!0}),Et.bookmarkManager=void 0,$o.prototype.updateBookmarks=function(e,t){return Ko(this,void 0,void 0,function(){return Zo(this,function(e){throw new Error("Not implemented")})})},$o.prototype.getBookmarks=function(){return Ko(this,void 0,void 0,function(){return Zo(this,function(e){throw new Error("Not implemented")})})},$o);function $o(){throw new Error("Not implemented")}Et.default=_,Et.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new ei(t,e.bookmarksSupplier,e.bookmarksConsumer)};ti.prototype.updateBookmarks=function(f,p){return Ko(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return Zo(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=Qo(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=Qo(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(Jo([],Xo(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},ti.prototype.getBookmarks=function(){var s;return Ko(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return Zo(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:r=null!=(s=e.sent())?s:[];try{for(n=Qo(r),o=n.next();!o.done;o=n.next())i=o.value,t.add(i)}catch(e){u={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(u)throw u.error}}e.label=2;case 2:return[2,Jo([],Xo(t),!1)]}})})};var ei=ti;function ti(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var qt={},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={next:e(0),throw:e(1),return:e(2)};return"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}}}},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},oi=(Object.defineProperty(qt,"__esModule",{value:!0}),m(S)),ii=t;function ui(){}ui.prototype.eagerResultTransformer=function(){return ai},ui.prototype.eager=function(){return ai},ui.prototype.mappedResultTransformer=function(e){return si(e)},ui.prototype.mapped=function(e){return si(e)},ui.prototype.first=function(){return ci},ui.prototype.summary=function(){return li};P=new ui;function ai(o){return ri(this,void 0,void 0,function(){var t,r,n;return ni(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 oi.default(n,r,t)]}})})}function si(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,ii.newError)("Requires a map or/and a collect functions.");return function(o){return ri(e,void 0,void 0,function(){return ni(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 ci(o){return ri(this,void 0,void 0,function(){var t,r,n;return ni(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 li(t){return ri(this,void 0,void 0,function(){return ni(this,function(e){switch(e.label){case 0:return[4,t.summary()];case 1:return[2,e.sent()]}})})}Object.freeze(P),qt.default=P;var _={},fi=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())})},pi=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},di=(Object.defineProperty(_,"__esModule",{value:!0}),y);function hi(e){this._createSession=e}hi.prototype.execute=function(o,i,u){return fi(this,void 0,void 0,function(){var t,r,n=this;return pi(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 fi(n,void 0,void 0,function(){return pi(this,function(e){switch(e.label){case 0:return[4,t.close()];case 1:return[2,e.sent()]}})})}),t._configureTransactionExecutor(!0,di.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 fi(n,void 0,void 0,function(){var t;return pi(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=hi;m={};function bi(e){this.maxSize=e,this.pruneCount=Math.max(Math.round(.01*e*Math.log(e)),1),this.map=new Map}Object.defineProperty(m,"__esModule",{value:!0}),bi.prototype.set=function(e,t){this.map.set(e,{database:t,lastUsed:Date.now()}),this._pruneCache()},bi.prototype.get=function(e){e=this.map.get(e);if(void 0!==e)return e.lastUsed=Date.now(),e.database},bi.prototype.delete=function(e){this.map.delete(e)},bi.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])},m.default=bi;function yi(){this.routing=Ui.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)},vi=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())})},mi=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={next:e(0),throw:e(1),return:e(2)};return"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}},gi=(Object.defineProperty(w,"__esModule",{value:!0}),w.QueryConfig=w.SessionConfig=w.routing=w.WRITE=w.READ=w.Driver=void 0,b),Oi=P(Wr),wi=y,Ei=v,Pi=P(E),Si=s,Ti=Et,ji=P(qt),Ci=P(_),Ri=t,Ii=P(m),Ai=O,ki=36e5,Mi=1e3,Ni=wi.ACCESS_MODE_READ,xi=(w.READ=Ni,wi.ACCESS_MODE_WRITE),Di=(w.WRITE=xi,0),Ui=(w.SessionConfig=function(){this.defaultAccessMode=xi,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=(w.routing=Ui,Object.freeze(Ui),w.QueryConfig=yi,Object.defineProperty(Li.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Li.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),vi(this,void 0,void 0,function(){var t,r,n;return mi(this,function(e){switch(e.label){case 0:if(t=null===u.bookmarkManager?void 0:null!=(a=u.bookmarkManager)?a:this.executeQueryBookmarkManager,r=null!=(a=u.resultTransformer)?a:ji.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:Ui.WRITE)!==Ui.READ&&n!==Ui.WRITE)throw(0,Ri.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser,transactionConfig:u.transactionConfig,auth:u.auth,signal:u.signal},o,i)];case 1:return[2,e.sent()]}})})},Li.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:Ni})},Li.prototype.verifyAuthentication=function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return vi(this,void 0,void 0,function(){return mi(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:Ni})];case 1:return[2,e.sent()]}})})},Li.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:Ni})},Li.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Li.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Li.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Li.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},Li.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Li.prototype.isEncrypted=function(){return this._isEncrypted()},Li.prototype._supportsRouting=function(){return this._meta.routing},Li.prototype._isEncrypted=function(){return this._config.encrypted===Si.ENCRYPTION_ON||!0===this._config.encrypted},Li.prototype._getTrust=function(){return this._config.trust},Li.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?xi:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:Bi(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,auth:e})},Li.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Li.prototype[Symbol.asyncDispose]=function(){return this.close()},Li.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Li.prototype._homeDatabaseCallback=function(e,t){this.homeDatabaseCache.set(e,t)},Li.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=Pi.default._validateSessionMode(t),c=this._getOrCreateConnectionProvider(),l=this.homeDatabaseCache.get((0,Ai.cacheKey)(e,i)),f=this._homeDatabaseCallback.bind(this),r=null!=r?new gi.Bookmarks(r):gi.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})},Li.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new Oi.default(e.resolver)))),this._connectionProvider},Li);function Li(e,t,r,n,o){void 0===n&&(n=function(e){return new Pi.default(e)}),void 0===o&&(o=function(e){return new Ci.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=Fi(i.maxConnectionLifetime,ki),i.maxConnectionPoolSize=Fi(i.maxConnectionPoolSize,wi.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=Fi(i.connectionAcquisitionTimeout,wi.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=Bi(i.fetchSize,Mi),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?wi.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=Ei.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=Di++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,Ti.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this.homeDatabaseCache=new Ii.default(1e4),this._afterConstruction()}function Fi(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function Bi(e,t){e=parseInt(e,10);if(0<e||e===wi.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(wi.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}w.Driver=b,w.default=b;var Wr={},Wi=(Object.defineProperty(Wr,"__esModule",{value:!0}),t),qi=n;function zi(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Wr.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(zi(t)&&(n.credentials=t),zi(r)&&(n.realm=r),zi(o)){try{(0,qi.stringify)(o)}catch(e){throw(0,Wi.newError)("Circular references in custom auth token parameters",void 0,e)}n.parameters=o}return n}};var y={},Vi=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={next:e(0),throw:e(1),return:e(2)};return"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}},Gi=(Object.defineProperty(y,"__esModule",{value:!0}),y.staticAuthTokenManager=y.authTokenManagers=y.AuthTokenAndExpiration=void 0,v(Wr)),Yi=h;function Ki(){}function Zi(){}Ki.prototype.getToken=function(){throw new Error("Not Implemented")},Ki.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},y.default=Ki,y.AuthTokenAndExpiration=function(){this.token=Gi.default.none(),this.expiration=void 0},Zi.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 Ji(e,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},Zi.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 Ji(function(){return Vi(t,void 0,void 0,function(){var t;return Hi(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"])};s=new Zi;y.authTokenManagers=s,Object.freeze(s),y.staticAuthTokenManager=function(e){return e=e.authToken,new eu(e)};Xi.prototype.subscribe=function(e){this._subscribers.push(e)},Xi.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},Xi.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var Qi=Xi;function Xi(e){this._subscribers=e=void 0===e?[]:e}$i.prototype.getToken=function(){var t;return Vi(this,void 0,void 0,function(){return Hi(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]}})})},$i.prototype.handleSecurityException=function(e,t){return!!this._handledSecurityCodes.includes(t)&&(Yi.util.equals(e,null==(t=this._currentAuthData)?void 0:t.token)&&this._scheduleRefreshAuthToken(),!0)},$i.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new Qi,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)},$i.prototype._refreshAuthToken=function(){return Vi(this,void 0,void 0,function(){var r=this;return Hi(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 Ji=$i;function $i(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}tu.prototype.getToken=function(){return this._authToken},tu.prototype.handleSecurityException=function(e,t){return!1};var eu=tu;function tu(e){this._authToken=e}function ru(){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 nu,ou,_={},P=r&&r.__extends||(nu=function(e,t){return(nu=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}nu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),m=(Object.defineProperty(_,"__esModule",{value:!0}),_.InternalConfig=_.Config=void 0,_.Config=ru,P(iu,ou=ru),iu);function iu(){return null!==ou&&ou.apply(this,arguments)||this}_.InternalConfig=m;var uu,O={},b=r&&r.__extends||(uu=function(e,t){return(uu=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}uu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),au=r&&r.__assign||function(){return(au=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)},su=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]}),cu=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&su(t,e,r);return cu(t,e),t},lu=(Object.defineProperty(O,"__esModule",{value:!0}),O.resolveCertificateProvider=O.clientCertificateProviders=O.RotatingClientCertificateProvider=O.ClientCertificateProvider=void 0,v(n)),s=(O.default=function(){this.certfile="",this.keyfile="",this.password=void 0},fu.prototype.hasUpdate=function(){throw new Error("Not Implemented")},fu.prototype.getClientCertificate=function(){throw new Error("Not Implemented")},fu);function fu(){}O.ClientCertificateProvider=s;b(du,pu=s),du.prototype.updateCertificate=function(e){throw new Error("Not implemented")};var pu,P=du;function du(){return null!==pu&&pu.apply(this,arguments)||this}function hu(){}O.RotatingClientCertificateProvider=P,hu.prototype.rotating=function(e){e=e.initialCertificate;if(null==e||!bu(e))throw new TypeError("initialCertificate should be ClientCertificate, but got ".concat(lu.stringify(e)));e=au({},e);return new Nu(e)};m=new hu;function bu(e){return null!=e&&"object"==typeof e&&"certfile"in e&&(yu(r=e.certfile)||_u(r,yu))&&"keyfile"in e&&(t(r=e.keyfile)||_u(r,t))&&vu("password",e);function t(e){return"string"==typeof e||null!=e&&"object"==typeof e&&"path"in e&&"string"==typeof e.path&&vu("password",e)}var r}function yu(e){return"string"==typeof e}function _u(e,t,r){return void 0===r&&(r=!1),Array.isArray(e)&&(r||0<e.length)&&e.filter(t).length===e.length}function vu(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}O.clientCertificateProviders=m,Object.freeze(m),O.resolveCertificateProvider=function(e){if(null!=e){if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;var t;if(bu(e))return t=au({},e),{getClientCertificate:function(){return t},hasUpdate:function(){return!1}};throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(lu.stringify(e)))}};xu.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},xu.prototype.getClientCertificate=function(){return this._certificate},xu.prototype.updateCertificate=function(e){if(!bu(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(lu.stringify(e)));this._certificate=au({},e),this._updated=!0};var mu,gu,Ou,wu,Eu,Pu,Su,Tu,ju,Cu,Ru,Iu,Au,ku,Mu,Nu=xu;function xu(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}v=e,mu=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}),b=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&mu(t,e,r);return gu(t,e),t},s=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(v,"__esModule",{value:!0}),v.EagerResult=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.GQLError=v.newGQLError=v.Neo4jError=v.newError=v.authTokenManagers=void 0,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=void 0,Ou=t,Object.defineProperty(v,"newError",{enumerable:!0,get:function(){return Ou.newError}}),Object.defineProperty(v,"Neo4jError",{enumerable:!0,get:function(){return Ou.Neo4jError}}),Object.defineProperty(v,"newGQLError",{enumerable:!0,get:function(){return Ou.newGQLError}}),Object.defineProperty(v,"GQLError",{enumerable:!0,get:function(){return Ou.GQLError}}),Object.defineProperty(v,"isRetriableError",{enumerable:!0,get:function(){return Ou.isRetriableError}}),wu=b(i),v.Integer=wu.default,Object.defineProperty(v,"int",{enumerable:!0,get:function(){return wu.int}}),Object.defineProperty(v,"isInt",{enumerable:!0,get:function(){return wu.isInt}}),Object.defineProperty(v,"inSafeRange",{enumerable:!0,get:function(){return wu.inSafeRange}}),Object.defineProperty(v,"toNumber",{enumerable:!0,get:function(){return wu.toNumber}}),Object.defineProperty(v,"toString",{enumerable:!0,get:function(){return wu.toString}}),Eu=u,Object.defineProperty(v,"Date",{enumerable:!0,get:function(){return Eu.Date}}),Object.defineProperty(v,"DateTime",{enumerable:!0,get:function(){return Eu.DateTime}}),Object.defineProperty(v,"Duration",{enumerable:!0,get:function(){return Eu.Duration}}),Object.defineProperty(v,"isDate",{enumerable:!0,get:function(){return Eu.isDate}}),Object.defineProperty(v,"isDateTime",{enumerable:!0,get:function(){return Eu.isDateTime}}),Object.defineProperty(v,"isDuration",{enumerable:!0,get:function(){return Eu.isDuration}}),Object.defineProperty(v,"isLocalDateTime",{enumerable:!0,get:function(){return Eu.isLocalDateTime}}),Object.defineProperty(v,"isLocalTime",{enumerable:!0,get:function(){return Eu.isLocalTime}}),Object.defineProperty(v,"isTime",{enumerable:!0,get:function(){return Eu.isTime}}),Object.defineProperty(v,"LocalDateTime",{enumerable:!0,get:function(){return Eu.LocalDateTime}}),Object.defineProperty(v,"LocalTime",{enumerable:!0,get:function(){return Eu.LocalTime}}),Object.defineProperty(v,"Time",{enumerable:!0,get:function(){return Eu.Time}}),Pu=f,Object.defineProperty(v,"Node",{enumerable:!0,get:function(){return Pu.Node}}),Object.defineProperty(v,"isNode",{enumerable:!0,get:function(){return Pu.isNode}}),Object.defineProperty(v,"Relationship",{enumerable:!0,get:function(){return Pu.Relationship}}),Object.defineProperty(v,"isRelationship",{enumerable:!0,get:function(){return Pu.isRelationship}}),Object.defineProperty(v,"UnboundRelationship",{enumerable:!0,get:function(){return Pu.UnboundRelationship}}),Object.defineProperty(v,"isUnboundRelationship",{enumerable:!0,get:function(){return Pu.isUnboundRelationship}}),Object.defineProperty(v,"Path",{enumerable:!0,get:function(){return Pu.Path}}),Object.defineProperty(v,"isPath",{enumerable:!0,get:function(){return Pu.isPath}}),Object.defineProperty(v,"PathSegment",{enumerable:!0,get:function(){return Pu.PathSegment}}),Object.defineProperty(v,"isPathSegment",{enumerable:!0,get:function(){return Pu.isPathSegment}}),P=s(ut),v.Record=P.default,Su=c,Object.defineProperty(v,"isPoint",{enumerable:!0,get:function(){return Su.isPoint}}),Object.defineProperty(v,"Point",{enumerable:!0,get:function(){return Su.Point}}),Tu=b(p),v.ResultSummary=Tu.default,Object.defineProperty(v,"queryType",{enumerable:!0,get:function(){return Tu.queryType}}),Object.defineProperty(v,"ServerInfo",{enumerable:!0,get:function(){return Tu.ServerInfo}}),Object.defineProperty(v,"Plan",{enumerable:!0,get:function(){return Tu.Plan}}),Object.defineProperty(v,"ProfiledPlan",{enumerable:!0,get:function(){return Tu.ProfiledPlan}}),Object.defineProperty(v,"QueryStatistics",{enumerable:!0,get:function(){return Tu.QueryStatistics}}),Object.defineProperty(v,"Stats",{enumerable:!0,get:function(){return Tu.Stats}}),ju=b(j),v.Notification=ju.default,Object.defineProperty(v,"GqlStatusObject",{enumerable:!0,get:function(){return ju.GqlStatusObject}}),Object.defineProperty(v,"notificationCategory",{enumerable:!0,get:function(){return ju.notificationCategory}}),Object.defineProperty(v,"notificationClassification",{enumerable:!0,get:function(){return ju.notificationClassification}}),Object.defineProperty(v,"notificationSeverityLevel",{enumerable:!0,get:function(){return ju.notificationSeverityLevel}}),Cu=T,Object.defineProperty(v,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return Cu.notificationFilterDisabledCategory}}),Object.defineProperty(v,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return Cu.notificationFilterDisabledClassification}}),Object.defineProperty(v,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return Cu.notificationFilterMinimumSeverityLevel}}),m=s(hn),v.Result=m.default,t=s(S),v.EagerResult=t.default,Ru=b(g),v.ConnectionProvider=Ru.default,Object.defineProperty(v,"Releasable",{enumerable:!0,get:function(){return Ru.Releasable}}),i=s(V),v.Connection=i.default,u=s(Y),v.Transaction=u.default,f=s(o),v.ManagedTransaction=f.default,ut=s(Xr),v.TransactionPromise=ut.default,c=s(E),v.Session=c.default,p=b(w),j=p,v.Driver=p.default,v.driver=j,T=s(Wr),v.auth=T.default,Iu=Et,Object.defineProperty(v,"bookmarkManager",{enumerable:!0,get:function(){return Iu.bookmarkManager}}),Au=y,Object.defineProperty(v,"authTokenManagers",{enumerable:!0,get:function(){return Au.authTokenManagers}}),Object.defineProperty(v,"staticAuthTokenManager",{enumerable:!0,get:function(){return Au.staticAuthTokenManager}}),ku=w,Object.defineProperty(v,"routing",{enumerable:!0,get:function(){return ku.routing}}),hn=b(_),v.types=hn,S=b(n),v.json=S,s=s(qt),v.resultTransformers=s.default,Mu=O,Object.defineProperty(v,"clientCertificateProviders",{enumerable:!0,get:function(){return Mu.clientCertificateProviders}}),Object.defineProperty(v,"resolveCertificateProvider",{enumerable:!0,get:function(){return Mu.resolveCertificateProvider}}),b=b(h),v.internal=b,g={SERVICE_UNAVAILABLE:Ou.SERVICE_UNAVAILABLE,SESSION_EXPIRED:Ou.SESSION_EXPIRED,PROTOCOL_ERROR:Ou.PROTOCOL_ERROR},v.error=g,g={authTokenManagers:Au.authTokenManagers,newError:Ou.newError,Neo4jError:Ou.Neo4jError,newGQLError:Ou.newGQLError,GQLError:Ou.GQLError,isRetriableError:Ou.isRetriableError,error:g,Integer:wu.default,int:wu.int,isInt:wu.isInt,inSafeRange:wu.inSafeRange,toNumber:wu.toNumber,toString:wu.toString,internal:b,isPoint:Su.isPoint,Point:Su.Point,Date:Eu.Date,DateTime:Eu.DateTime,Duration:Eu.Duration,isDate:Eu.isDate,isDateTime:Eu.isDateTime,isDuration:Eu.isDuration,isLocalDateTime:Eu.isLocalDateTime,isLocalTime:Eu.isLocalTime,isTime:Eu.isTime,LocalDateTime:Eu.LocalDateTime,LocalTime:Eu.LocalTime,Time:Eu.Time,Node:Pu.Node,isNode:Pu.isNode,Relationship:Pu.Relationship,isRelationship:Pu.isRelationship,UnboundRelationship:Pu.UnboundRelationship,isUnboundRelationship:Pu.isUnboundRelationship,Path:Pu.Path,isPath:Pu.isPath,PathSegment:Pu.PathSegment,isPathSegment:Pu.isPathSegment,Record:P.default,ResultSummary:Tu.default,queryType:Tu.queryType,ServerInfo:Tu.ServerInfo,Notification:ju.default,GqlStatusObject:ju.GqlStatusObject,Plan:Tu.Plan,ProfiledPlan:Tu.ProfiledPlan,QueryStatistics:Tu.QueryStatistics,Stats:Tu.Stats,Result:m.default,EagerResult:t.default,Transaction:u.default,ManagedTransaction:f.default,TransactionPromise:ut.default,Session:c.default,Driver:p.default,Connection:i.default,Releasable:Ru.Releasable,types:hn,driver:j,json:S,auth:T.default,bookmarkManager:Iu.bookmarkManager,routing:ku.routing,resultTransformers:s.default,notificationCategory:ju.notificationCategory,notificationClassification:ju.notificationClassification,notificationSeverityLevel:ju.notificationSeverityLevel,notificationFilterDisabledCategory:Cu.notificationFilterDisabledCategory,notificationFilterDisabledClassification:Cu.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:Cu.notificationFilterMinimumSeverityLevel,clientCertificateProviders:Mu.clientCertificateProviders,resolveCertificateProvider:Mu.resolveCertificateProvider},v.default=g;V={},Y={},o={},Xr={},E={};Object.defineProperty(E,"__esModule",{value:!0}),E.isFunction=void 0,E.isFunction=function(e){return"function"==typeof e};Wr={},Et={},y={};Object.defineProperty(y,"__esModule",{value:!0}),y.createErrorClass=void 0,y.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(Et,"__esModule",{value:!0}),Et.UnsubscriptionError=void 0;w=y,Et.UnsubscriptionError=w.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}}),_={};Object.defineProperty(_,"__esModule",{value:!0}),_.arrRemove=void 0,_.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var Du=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.")},Uu=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},Lu=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},Fu=(Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.isSubscription=Wr.EMPTY_SUBSCRIPTION=Wr.Subscription=void 0,E),Bu=Et,Wu=_,qu=(zu.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=Du(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(Fu.isFunction(u))try{u()}catch(e){r=e instanceof Bu.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=Du(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{Vu(l)}catch(e){r=null!=r?r:[],e instanceof Bu.UnsubscriptionError?r=Lu(Lu([],Uu(r)),Uu(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 Bu.UnsubscriptionError(r)}},zu.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Vu(e);else{if(e instanceof zu){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},zu.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},zu.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},zu.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Wu.arrRemove(t,e)},zu.prototype.remove=function(e){var t=this._finalizers;t&&Wu.arrRemove(t,e),e instanceof zu&&e._removeParent(this)},zu.EMPTY=((n=new zu).closed=!0,n),zu);function zu(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function Vu(e){Fu.isFunction(e)?e():e.unsubscribe()}Wr.Subscription=qu,Wr.EMPTY_SUBSCRIPTION=qu.EMPTY,Wr.isSubscription=function(e){return e instanceof qu||e&&"closed"in e&&Fu.isFunction(e.remove)&&Fu.isFunction(e.add)&&Fu.isFunction(e.unsubscribe)};var Hu,Gu,Yu,qt={},O=(Object.defineProperty(qt,"__esModule",{value:!0}),qt.config=void 0,qt.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),h={},Ku=(Hu=h,Gu=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},Yu=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(Hu,"__esModule",{value:!0}),Hu.timeoutProvider=void 0,Hu.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Hu.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,Yu([e,t],Gu(r))):setTimeout.apply(void 0,Yu([e,t],Gu(r)))},clearTimeout:function(e){var t=Hu.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(O,"__esModule",{value:!0}),O.reportUnhandledError=void 0,qt),Zu=h;O.reportUnhandledError=function(t){Zu.timeoutProvider.setTimeout(function(){var e=Ku.config.onUnhandledError;if(!e)throw t;e(t)})};b={};Object.defineProperty(b,"__esModule",{value:!0}),b.noop=void 0,b.noop=function(){};P={};function Qu(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(P,"__esModule",{value:!0}),P.createNotification=P.nextNotification=P.errorNotification=P.COMPLETE_NOTIFICATION=void 0,P.COMPLETE_NOTIFICATION=Qu("C",void 0,void 0),P.errorNotification=function(e){return Qu("E",void 0,e)},P.nextNotification=function(e){return Qu("N",e,void 0)},P.createNotification=Qu;var Xu,Ju,$u,ea,ta,ra,na,oa,ia,ua,aa,sa,ca,la,m={},fa=(Object.defineProperty(m,"__esModule",{value:!0}),m.captureError=m.errorContext=void 0,qt),pa=null;function da(e){var t=$u.call(this)||this;return t.isStopped=!1,e?(t.destination=e,ta.isSubscription(e)&&e.add(t)):t.destination=Xu.EMPTY_OBSERVER,t}function ha(e,t){return aa.call(e,t)}function ba(e){this.partialObserver=e}function ya(e,t,r){var n=ca.call(this)||this;return r=ea.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&ra.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&ha(e.next,t),error:e.error&&ha(e.error,t),complete:e.complete&&ha(e.complete,t)}):e,n.destination=new sa(r),n}function _a(e){ra.config.useDeprecatedSynchronousErrorHandling?ua.captureError(e):na.reportUnhandledError(e)}function va(e,t){var r=ra.config.onStoppedNotification;r&&ia.timeoutProvider.setTimeout(function(){return r(e,t)})}m.errorContext=function(e){if(fa.config.useDeprecatedSynchronousErrorHandling){var t=!pa;if(t&&(pa={errorThrown:!1,error:null}),e(),t){var t=pa,r=t.errorThrown,t=t.error;if(pa=null,r)throw t}}else e()},m.captureError=function(e){fa.config.useDeprecatedSynchronousErrorHandling&&pa&&(pa.errorThrown=!0,pa.error=e)},Xu=Xr,t=r&&r.__extends||(Ju=function(e,t){return(Ju=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}Ju(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.EMPTY_OBSERVER=Xu.SafeSubscriber=Xu.Subscriber=void 0,ea=E,ra=qt,na=O,u=b,oa=P,ia=h,ua=m,$u=(ta=Wr).Subscription,t(da,$u),da.create=function(e,t,r){return new la(e,t,r)},da.prototype.next=function(e){this.isStopped?va(oa.nextNotification(e),this):this._next(e)},da.prototype.error=function(e){this.isStopped?va(oa.errorNotification(e),this):(this.isStopped=!0,this._error(e))},da.prototype.complete=function(){this.isStopped?va(oa.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},da.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,$u.prototype.unsubscribe.call(this),this.destination=null)},da.prototype._next=function(e){this.destination.next(e)},da.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},da.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},f=da,Xu.Subscriber=f,aa=Function.prototype.bind,ba.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){_a(e)}},ba.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){_a(e)}else _a(e)},ba.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){_a(e)}},sa=ba,t(ya,ca=f),la=ya,Xu.SafeSubscriber=la,Xu.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop};ut={},Object.defineProperty(ut,"__esModule",{value:!0}),ut.observable=void 0,ut.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",c={},p={};Object.defineProperty(p,"__esModule",{value:!0}),p.identity=void 0,p.identity=function(e){return e},Object.defineProperty(c,"__esModule",{value:!0}),c.pipeFromArray=c.pipe=void 0;var ma=p;function ga(t){return 0===t.length?ma.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}c.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ga(e)},c.pipeFromArray=ga,Object.defineProperty(o,"__esModule",{value:!0}),o.Observable=void 0;var Oa=Xr,wa=Wr,i=ut,Ea=c,Pa=qt,Sa=E,Ta=m;function ja(e){e&&(this._subscribe=e)}function Ca(e){return null!=(e=null!=e?e:Pa.config.Promise)?e:Promise}ja.prototype.lift=function(e){var t=new ja;return t.source=this,t.operator=e,t},ja.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof Oa.Subscriber||function(e){return e&&Sa.isFunction(e.next)&&Sa.isFunction(e.error)&&Sa.isFunction(e.complete)}(n)&&wa.isSubscription(n)?e:new Oa.SafeSubscriber(e,t,r);return Ta.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},ja.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},ja.prototype.forEach=function(n,e){var o=this;return new(e=Ca(e))(function(e,t){var r=new Oa.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},ja.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},ja.prototype[i.observable]=function(){return this},ja.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ea.pipeFromArray(e)(this)},ja.prototype.toPromise=function(e){var n=this;return new(e=Ca(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},ja.create=function(e){return new ja(e)},o.Observable=ja;var hn={},j={},S={},Ra=(Object.defineProperty(S,"__esModule",{value:!0}),S.operate=S.hasLift=void 0,E);function Ia(e){return Ra.isFunction(null==e?void 0:e.lift)}S.hasLift=Ia,S.operate=function(t){return function(e){if(Ia(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 Aa,T={},s=r&&r.__extends||(Aa=function(e,t){return(Aa=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}Aa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),v=(Object.defineProperty(T,"__esModule",{value:!0}),T.OperatorSubscriber=T.createOperatorSubscriber=void 0,Xr);T.createOperatorSubscriber=function(e,t,r,n,o){return new Ma(e,t,r,n,o)};s(Na,ka=v.Subscriber),Na.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,ka.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var ka,Ma=Na;function Na(t,r,e,n,o,i){var u=ka.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:ka.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:ka.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:ka.prototype._complete,u}T.OperatorSubscriber=Ma,Object.defineProperty(j,"__esModule",{value:!0}),j.refCount=void 0;var xa=S,Da=T;j.refCount=function(){return xa.operate(function(r,n){var o=null,e=(r._refCount++,Da.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 Ua,g=r&&r.__extends||(Ua=function(e,t){return(Ua=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}Ua(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(hn,"__esModule",{value:!0}),hn.ConnectableObservable=void 0;var La,Fa=Wr,Ba=j,Wa=T,qa=S,w=(La=o.Observable,g(za,La),za.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},za.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},za.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},za.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new Fa.Subscription,t=this.getSubject(),e.add(this.source.subscribe(Wa.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=Fa.Subscription.EMPTY)),e},za.prototype.refCount=function(){return Ba.refCount()(this)},za);function za(e,t){var r=La.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,qa.hasLift(e)&&(r.lift=e.lift),r}hn.ConnectableObservable=w;var Va,Ha,Ga,Ya,Ka,n={},P={},h=(Va=P,Object.defineProperty(Va,"__esModule",{value:!0}),Va.performanceTimestampProvider=void 0,Va.performanceTimestampProvider={now:function(){return(Va.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),Za=(Ha=h,Ga=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},Ya=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(Ha,"__esModule",{value:!0}),Ha.animationFrameProvider=void 0,Ka=Wr,Ha.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=Ha.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new Ka.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=Ha.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Ya([],Ga(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ha.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,Ya([],Ga(e)))},delegate:void 0},Object.defineProperty(n,"__esModule",{value:!0}),n.animationFrames=void 0,o),Qa=P,Xa=h;function Ja(a){return new Za.Observable(function(r){var n=a||Qa.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=Xa.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&Xa.animationFrameProvider.cancelAnimationFrame(i)}})}n.animationFrames=function(e){return e?Ja(e):ts};var $a,es,ts=Ja(),t={},f={},u=(Object.defineProperty(f,"__esModule",{value:!0}),f.ObjectUnsubscribedError=void 0,y),i=(f.ObjectUnsubscribedError=u.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||($a=function(e,t){return($a=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}$a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),rs=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.")},ns=(Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0,o),os=Wr,is=f,us=_,as=m,s=(es=ns.Observable,i(ss,es),ss.prototype.lift=function(e){var t=new ls(this,this);return t.operator=e,t},ss.prototype._throwIfClosed=function(){if(this.closed)throw new is.ObjectUnsubscribedError},ss.prototype.next=function(o){var i=this;as.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=rs(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}}}})},ss.prototype.error=function(t){var r=this;as.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)}})},ss.prototype.complete=function(){var t=this;as.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},ss.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(ss.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),ss.prototype._trySubscribe=function(e){return this._throwIfClosed(),es.prototype._trySubscribe.call(this,e)},ss.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},ss.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?os.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new os.Subscription(function(){t.currentObservers=null,us.arrRemove(o,e)}))},ss.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},ss.prototype.asObservable=function(){var e=new ns.Observable;return e.source=this,e},ss.create=function(e,t){return new ls(e,t)},ss);function ss(){var e=es.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}t.Subject=s;i(fs,cs=s),fs.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},fs.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},fs.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},fs.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:os.EMPTY_SUBSCRIPTION};var cs,ls=fs;function fs(e,t){var r=cs.call(this)||this;return r.destination=e,r.source=t,r}t.AnonymousSubject=ls;var ps,v={},g=r&&r.__extends||(ps=function(e,t){return(ps=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}ps(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(v,"__esModule",{value:!0}),v.BehaviorSubject=void 0;ds=t.Subject,g(hs,ds),Object.defineProperty(hs.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),hs.prototype._subscribe=function(e){var t=ds.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},hs.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},hs.prototype.next=function(e){ds.prototype.next.call(this,this._value=e)};var ds,w=hs;function hs(e){var t=ds.call(this)||this;return t._value=e,t}v.BehaviorSubject=w;var bs,ys,P={},u={},m=(bs=u,Object.defineProperty(bs,"__esModule",{value:!0}),bs.dateTimestampProvider=void 0,bs.dateTimestampProvider={now:function(){return(bs.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(ys=function(e,t){return(ys=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}ys(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(P,"__esModule",{value:!0}),P.ReplaySubject=void 0;var _s,vs=u,i=(_s=t.Subject,m(ms,_s),ms.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(),_s.prototype.next.call(this,e)},ms.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},ms.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)}},ms);function ms(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=vs.dateTimestampProvider);var n=_s.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}P.ReplaySubject=i;var gs,s={},g=r&&r.__extends||(gs=function(e,t){return(gs=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}gs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(s,"__esModule",{value:!0}),s.AsyncSubject=void 0;Os=t.Subject,g(ws,Os),ws.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())},ws.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},ws.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&Os.prototype.next.call(this,t),Os.prototype.complete.call(this))};var Os,w=ws;function ws(){var e=null!==Os&&Os.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}s.AsyncSubject=w;var Es,m={},i={},g={},w={},C=r&&r.__extends||(Es=function(e,t){return(Es=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}Es(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(w,"__esModule",{value:!0}),w.Action=void 0;Ps=Wr.Subscription,C(Ss,Ps),Ss.prototype.schedule=function(e,t){return this};var Ps,C=Ss;function Ss(e,t){return Ps.call(this)||this}w.Action=C;var Ts,js,Cs,Rs,C={},Is=(Ts=C,js=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},Cs=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(Ts,"__esModule",{value:!0}),Ts.intervalProvider=void 0,Ts.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Ts.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,Cs([e,t],js(r))):setInterval.apply(void 0,Cs([e,t],js(r)))},clearInterval:function(e){var t=Ts.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(Rs=function(e,t){return(Rs=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}Rs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(g,"__esModule",{value:!0}),g.AsyncAction=void 0;var As,ks=C,Ms=_,C=(As=w.Action,Is(Ns,As),Ns.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},Ns.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),ks.intervalProvider.setInterval(e.flush.bind(e,this),r)},Ns.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&ks.intervalProvider.clearInterval(t)},Ns.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))},Ns.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},Ns.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,Ms.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,As.prototype.unsubscribe.call(this))},Ns);function Ns(e,t){var r=As.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}g.AsyncAction=C;var xs,Ds,Us,Ls,Fs,Bs,w={},Is={},Ws=(Object.defineProperty(Is,"__esModule",{value:!0}),Is.TestTools=Is.Immediate=void 0,1),qs={};function zs(e){return e in qs&&(delete qs[e],!0)}Is.Immediate={setImmediate:function(e){var t=Ws++;return qs[t]=!0,(xs=xs||Promise.resolve()).then(function(){return zs(t)&&e()}),t},clearImmediate:function(e){zs(e)}},Is.TestTools={pending:function(){return Object.keys(qs).length}},Ds=w,Us=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(Ds,"__esModule",{value:!0}),Ds.immediateProvider=void 0,Fs=Is.Immediate.setImmediate,Bs=Is.Immediate.clearImmediate,Ds.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ds.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||Fs).apply(void 0,Ls([],Us(e)))},clearImmediate:function(e){var t=Ds.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||Bs)(e)},delegate:void 0};var Vs,C=r&&r.__extends||(Vs=function(e,t){return(Vs=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}Vs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(i,"__esModule",{value:!0}),i.AsapAction=void 0;var Hs,Gs=w,Is=(Hs=g.AsyncAction,C(Ys,Hs),Ys.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Hs.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Gs.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},Ys.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Hs.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Gs.immediateProvider.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))},Ys);function Ys(e,t){var r=Hs.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}i.AsapAction=Is;var w={},C={},Is={},Ks=(Object.defineProperty(Is,"__esModule",{value:!0}),Is.Scheduler=void 0,u);function Zs(e,t){void 0===t&&(t=Zs.now),this.schedulerActionCtor=e,this.now=t}Zs.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},Zs.now=Ks.dateTimestampProvider.now,Is.Scheduler=Zs;var Qs,Xs,Ks=r&&r.__extends||(Qs=function(e,t){return(Qs=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}Qs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Js=(Object.defineProperty(C,"__esModule",{value:!0}),C.AsyncScheduler=void 0,Is),Ks=(Xs=Js.Scheduler,Ks($s,Xs),$s.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}}},$s);function $s(e,t){void 0===t&&(t=Js.Scheduler.now);e=Xs.call(this,e,t)||this;return e.actions=[],e._active=!1,e}C.AsyncScheduler=Ks;var ec,Ks=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(w,"__esModule",{value:!0}),w.AsapScheduler=void 0;tc=C.AsyncScheduler,Ks(rc,tc),rc.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 tc,Ks=rc;function rc(){return null!==tc&&tc.apply(this,arguments)||this}w.AsapScheduler=Ks,Ks=m,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.asap=Ks.asapScheduler=void 0,Ks.asapScheduler=new w.AsapScheduler(i.AsapAction),Ks.asap=Ks.asapScheduler;var nc,w={},Ks=(i=w,Object.defineProperty(i,"__esModule",{value:!0}),i.async=i.asyncScheduler=void 0,i.asyncScheduler=new C.AsyncScheduler(g.AsyncAction),i.async=i.asyncScheduler,{}),i={},oc=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(i,"__esModule",{value:!0}),i.QueueAction=void 0;ic=g.AsyncAction,oc(uc,ic),uc.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?ic.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},uc.prototype.execute=function(e,t){return 0<t||this.closed?ic.prototype.execute.call(this,e,t):this._execute(e,t)},uc.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?ic.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var ic,oc=uc;function uc(e,t){var r=ic.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}i.QueueAction=oc;var ac,oc={},sc=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(oc,"__esModule",{value:!0}),oc.QueueScheduler=void 0;cc=C.AsyncScheduler,sc(lc,cc);var cc,sc=lc;function lc(){return null!==cc&&cc.apply(this,arguments)||this}oc.QueueScheduler=sc,sc=Ks,Object.defineProperty(sc,"__esModule",{value:!0}),sc.queue=sc.queueScheduler=void 0,sc.queueScheduler=new oc.QueueScheduler(i.QueueAction),sc.queue=sc.queueScheduler;var fc,oc={},i={},sc=r&&r.__extends||(fc=function(e,t){return(fc=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}fc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(i,"__esModule",{value:!0}),i.AnimationFrameAction=void 0;var pc,dc=h,h=(pc=g.AsyncAction,sc(hc,pc),hc.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?pc.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=dc.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},hc.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return pc.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&&(dc.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},hc);function hc(e,t){var r=pc.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}i.AnimationFrameAction=h;var bc,sc={},h=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(sc,"__esModule",{value:!0}),sc.AnimationFrameScheduler=void 0;yc=C.AsyncScheduler,h(_c,yc),_c.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 yc,h=_c;function _c(){return null!==yc&&yc.apply(this,arguments)||this}sc.AnimationFrameScheduler=h,h=oc,Object.defineProperty(h,"__esModule",{value:!0}),h.animationFrame=h.animationFrameScheduler=void 0,h.animationFrameScheduler=new sc.AnimationFrameScheduler(i.AnimationFrameAction),h.animationFrame=h.animationFrameScheduler;var vc,mc,sc={},i=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)}),h=(Object.defineProperty(sc,"__esModule",{value:!0}),sc.VirtualAction=sc.VirtualTimeScheduler=void 0,g),gc=Wr,g=(mc=C.AsyncScheduler,i(Oc,mc),Oc.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}},Oc.frameTimeFactor=10,Oc);function Oc(e,t){void 0===t&&(t=1/0);var r=mc.call(this,e=void 0===e?Ec:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}sc.VirtualTimeScheduler=g;wc=h.AsyncAction,i(Pc,wc),Pc.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return wc.prototype.schedule.call(this,e,t);this.active=!1;var r=new Pc(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return gc.Subscription.EMPTY},Pc.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(Pc.sortActions),1},Pc.prototype.recycleAsyncId=function(e,t,r){},Pc.prototype._execute=function(e,t){if(!0===this.active)return wc.prototype._execute.call(this,e,t)},Pc.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 wc,Ec=Pc;function Pc(e,t,r){void 0===r&&(r=e.index+=1);var n=wc.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}sc.VirtualAction=Ec;var Sc,Tc,C={},g={},h=(Sc=g,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.empty=Sc.EMPTY=void 0,Tc=o,Sc.EMPTY=new Tc.Observable(function(e){return e.complete()}),Sc.empty=function(e){return e?(t=e,new Tc.Observable(function(e){return t.schedule(function(){return e.complete()})})):Sc.EMPTY;var t},{}),i={},jc={},Cc=(Object.defineProperty(jc,"__esModule",{value:!0}),jc.isScheduler=void 0,E);jc.isScheduler=function(e){return e&&Cc.isFunction(e.schedule)},Object.defineProperty(i,"__esModule",{value:!0}),i.popNumber=i.popScheduler=i.popResultSelector=void 0;var Rc=E,Ic=jc;function Ac(e){return e[e.length-1]}i.popResultSelector=function(e){return Rc.isFunction(Ac(e))?e.pop():void 0},i.popScheduler=function(e){return Ic.isScheduler(Ac(e))?e.pop():void 0},i.popNumber=function(e,t){return"number"==typeof Ac(e)?e.pop():t};var kc={},Mc={},Nc={},R={},xc={},Dc=(Object.defineProperty(xc,"__esModule",{value:!0}),xc.isArrayLike=void 0,xc.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),Uc=(Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.isPromise=void 0,E);Dc.isPromise=function(e){return Uc.isFunction(null==e?void 0:e.then)};var Lc={},Fc=(Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.isInteropObservable=void 0,ut),Bc=E;Lc.isInteropObservable=function(e){return Bc.isFunction(e[Fc.observable])};var Wc={},qc=(Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.isAsyncIterable=void 0,E);Wc.isAsyncIterable=function(e){return Symbol.asyncIterator&&qc.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var zc={};Object.defineProperty(zc,"__esModule",{value:!0}),zc.createInvalidObservableTypeError=void 0,zc.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 Vc={},Hc={};function Gc(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.iterator=Hc.getSymbolIterator=void 0,Hc.getSymbolIterator=Gc,Hc.iterator=Gc(),Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.isIterable=void 0;var Yc=Hc,Kc=E;Vc.isIterable=function(e){return Kc.isFunction(null==e?void 0:e[Yc.iterator])};var Zc={},Qc=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}}}},Xc=r&&r.__await||function(e){return this instanceof Xc?(this.v=e,this):new Xc(e)},Jc=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 Xc?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])}},$c=(Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.isReadableStreamLike=Zc.readableStreamLikeToAsyncGenerator=void 0,E);Zc.readableStreamLikeToAsyncGenerator=function(o){return Jc(this,arguments,function(){var t,r,n;return Qc(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,Xc(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,Xc(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,Xc(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]}})})},Zc.isReadableStreamLike=function(e){return $c.isFunction(null==e?void 0:e.getReader)};var el=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())})},tl=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}}}},rl=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 nl?nl(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)})}}},nl=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.")},ol=(Object.defineProperty(R,"__esModule",{value:!0}),R.fromReadableStreamLike=R.fromAsyncIterable=R.fromIterable=R.fromPromise=R.fromArrayLike=R.fromInteropObservable=R.innerFrom=void 0,xc),il=Dc,ul=o,al=Lc,sl=Wc,cl=zc,ll=Vc,fl=Zc,pl=E,dl=O,hl=ut;function bl(r){return new ul.Observable(function(e){var t=r[hl.observable]();if(pl.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function yl(r){return new ul.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function _l(e){return new ul.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,dl.reportUnhandledError)})}function vl(u){return new ul.Observable(function(e){var t,r;try{for(var n=nl(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 ml(e){return new ul.Observable(function(t){!function(r,n){var o,i,u,a;return el(this,void 0,void 0,function(){var t;return tl(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=rl(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 gl(e){return ml(fl.readableStreamLikeToAsyncGenerator(e))}R.innerFrom=function(e){if(e instanceof ul.Observable)return e;if(null!=e){if(al.isInteropObservable(e))return bl(e);if(ol.isArrayLike(e))return yl(e);if(il.isPromise(e))return _l(e);if(sl.isAsyncIterable(e))return ml(e);if(ll.isIterable(e))return vl(e);if(fl.isReadableStreamLike(e))return gl(e)}throw cl.createInvalidObservableTypeError(e)},R.fromInteropObservable=bl,R.fromArrayLike=yl,R.fromPromise=_l,R.fromIterable=vl,R.fromAsyncIterable=ml,R.fromReadableStreamLike=gl;var O={},Ol={};Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.executeSchedule=void 0,Ol.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(O,"__esModule",{value:!0}),O.observeOn=void 0;var wl=Ol,El=S,Pl=T;O.observeOn=function(r,n){return void 0===n&&(n=0),El.operate(function(e,t){e.subscribe(Pl.createOperatorSubscriber(t,function(e){return wl.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return wl.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return wl.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var Sl={},Tl=(Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.subscribeOn=void 0,S);Sl.subscribeOn=function(r,n){return void 0===n&&(n=0),Tl.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.scheduleObservable=void 0;var jl=R,Cl=O,Rl=Sl;Nc.scheduleObservable=function(e,t){return jl.innerFrom(e).pipe(Rl.subscribeOn(t),Cl.observeOn(t))};var Il={},Al=(Object.defineProperty(Il,"__esModule",{value:!0}),Il.schedulePromise=void 0,R),kl=O,Ml=Sl;Il.schedulePromise=function(e,t){return Al.innerFrom(e).pipe(Ml.subscribeOn(t),kl.observeOn(t))};var Nl={},xl=(Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.scheduleArray=void 0,o);Nl.scheduleArray=function(r,n){return new xl.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var Dl={},Ul=(Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.scheduleIterable=void 0,o),Ll=Hc,Fl=E,Bl=Ol;Dl.scheduleIterable=function(e,t){return new Ul.Observable(function(n){var o;return Bl.executeSchedule(n,t,function(){o=e[Ll.iterator](),Bl.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 Fl.isFunction(null==o?void 0:o.return)&&o.return()}})};var Hc={},Wl=(Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.scheduleAsyncIterable=void 0,o),ql=Ol;Hc.scheduleAsyncIterable=function(r,n){if(r)return new Wl.Observable(function(t){ql.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();ql.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 zl={},Vl=(Object.defineProperty(zl,"__esModule",{value:!0}),zl.scheduleReadableStreamLike=void 0,Hc),Hl=Zc;zl.scheduleReadableStreamLike=function(e,t){return Vl.scheduleAsyncIterable(Hl.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.scheduled=void 0;var Gl=Nc,Yl=Il,Kl=Nl,Zl=Dl,Ql=Hc,Xl=Lc,Jl=Dc,$l=xc,ef=Vc,tf=Wc,rf=zc,nf=Zc,of=zl;Mc.scheduled=function(e,t){if(null!=e){if(Xl.isInteropObservable(e))return Gl.scheduleObservable(e,t);if($l.isArrayLike(e))return Kl.scheduleArray(e,t);if(Jl.isPromise(e))return Yl.schedulePromise(e,t);if(tf.isAsyncIterable(e))return Ql.scheduleAsyncIterable(e,t);if(ef.isIterable(e))return Zl.scheduleIterable(e,t);if(nf.isReadableStreamLike(e))return of.scheduleReadableStreamLike(e,t)}throw rf.createInvalidObservableTypeError(e)},Object.defineProperty(kc,"__esModule",{value:!0}),kc.from=void 0;var uf=Mc,af=R;kc.from=function(e,t){return t?uf.scheduled(e,t):af.innerFrom(e)},Object.defineProperty(h,"__esModule",{value:!0}),h.of=void 0;var sf=i,cf=kc;h.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=sf.popScheduler(e);return cf.from(e,r)};var lf,ff,pf,df,Nc={},hf=(Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.throwError=void 0,o),bf=E;function yf(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function _f(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)}Nc.throwError=function(e,t){function r(e){return e.error(n())}var n=bf.isFunction(e)?e:function(){return e};return new hf.Observable(t?function(e){return t.schedule(r,0,e)}:r)},Il=C,Object.defineProperty(Il,"__esModule",{value:!0}),Il.observeNotification=Il.Notification=Il.NotificationKind=void 0,lf=g,ff=h,pf=Nc,df=E,(Nl=Il.NotificationKind||(Il.NotificationKind={})).NEXT="N",Nl.ERROR="E",Nl.COMPLETE="C",yf.prototype.observe=function(e){return _f(this,e)},yf.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()},yf.prototype.accept=function(e,t,r){var n;return df.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},yf.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?ff.of(t):"E"===e?pf.throwError(function(){return r}):"C"===e?lf.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},yf.createNext=function(e){return new yf("N",e)},yf.createError=function(e){return new yf("E",void 0,e)},yf.createComplete=function(){return yf.completeNotification},yf.completeNotification=new yf("C"),Nl=yf,Il.Notification=Nl,Il.observeNotification=_f;var Hc={},vf=(Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.isObservable=void 0,o),mf=E;Hc.isObservable=function(e){return!!e&&(e instanceof vf.Observable||mf.isFunction(e.lift)&&mf.isFunction(e.subscribe))};var Lc={},Dc={},Vc=(Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.EmptyError=void 0,y),gf=(Dc.EmptyError=Vc.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.lastValueFrom=void 0,Dc);Lc.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 gf.EmptyError)}})})};var Wc={},Of=(Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.firstValueFrom=void 0,Dc),wf=Xr;Wc.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new wf.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new Of.EmptyError)}});n.subscribe(r)})};var Ef,Pf,Sf,Tf,jf,Cf,Rf,zc={},Zc=(Object.defineProperty(zc,"__esModule",{value:!0}),zc.ArgumentOutOfRangeError=void 0,y),zl=(zc.ArgumentOutOfRangeError=Zc.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),Nl=(Object.defineProperty(zl,"__esModule",{value:!0}),zl.NotFoundError=void 0,y),Il=(zl.NotFoundError=Nl.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),Vc=(Object.defineProperty(Il,"__esModule",{value:!0}),Il.SequenceError=void 0,y),Zc=(Il.SequenceError=Vc.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),Nl={};function If(e){throw new Ef.TimeoutError(e)}Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.isValidDate=void 0,Nl.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},Ef=Zc,Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.timeout=Ef.TimeoutError=void 0,Pf=w,Sf=Nl,Tf=S,jf=R,Cf=T,Rf=Ol,Ef.TimeoutError=y.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),Ef.timeout=function(e,t){var a=(e=Sf.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?If:r,l=void 0===(r=e.scheduler)?null!=t?t:Pf.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return Tf.operate(function(e,t){function r(e){n=Rf.executeSchedule(t,l,function(){try{u.unsubscribe(),jf.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(Cf.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 Vc={},y={},Af={},kf={},Mf=(Object.defineProperty(kf,"__esModule",{value:!0}),kf.map=void 0,S),Nf=T;kf.map=function(n,o){return Mf.operate(function(e,t){var r=0;e.subscribe(Nf.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var xf=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},Df=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},Uf=(Object.defineProperty(Af,"__esModule",{value:!0}),Af.mapOneOrManyArgs=void 0,kf),Lf=Array.isArray;Af.mapOneOrManyArgs=function(r){return Uf.map(function(e){return t=r,Lf(e=e)?t.apply(void 0,Df([],xf(e))):t(e);var t})};var Ff=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},Bf=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},Wf=(Object.defineProperty(y,"__esModule",{value:!0}),y.bindCallbackInternals=void 0,jc),qf=o,zf=Sl,Vf=Af,Hf=O,Gf=s;y.bindCallbackInternals=function r(a,s,n,o){if(n){if(!Wf.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(Vf.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(zf.subscribeOn(o),Hf.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new Gf.AsyncSubject,u=!0;return new qf.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,Bf(Bf([],Ff(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(Vc,"__esModule",{value:!0}),Vc.bindCallback=void 0;var Yf=y;Vc.bindCallback=function(e,t,r){return Yf.bindCallbackInternals(!1,e,t,r)};var Kf={},Zf=(Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.bindNodeCallback=void 0,y);Kf.bindNodeCallback=function(e,t,r){return Zf.bindCallbackInternals(!0,e,t,r)};var y={},Qf={},Xf=(Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.argsArgArrayOrObject=void 0,Array.isArray),Jf=Object.getPrototypeOf,$f=Object.prototype,ep=Object.keys;Qf.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(Xf(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Jf(r)===$f)return{args:(r=ep(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var tp={};Object.defineProperty(tp,"__esModule",{value:!0}),tp.createObject=void 0,tp.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(y,"__esModule",{value:!0}),y.combineLatestInit=y.combineLatest=void 0;var rp=o,np=Qf,op=kc,ip=p,up=Af,ap=i,sp=tp,cp=T,lp=Ol;function fp(a,s,c){return void 0===c&&(c=ip.identity),function(u){pp(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){pp(s,function(){var e=op.from(a[r],s),t=!1;e.subscribe(cp.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 pp(e,t,r){e?lp.executeSchedule(r,e,t):t()}y.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ap.popScheduler(e),n=ap.popResultSelector(e),o=np.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?op.from([],r):(o=new rp.Observable(fp(i,r,u?function(e){return sp.createObject(u,e)}:ip.identity)),n?o.pipe(up.mapOneOrManyArgs(n)):o)},y.combineLatestInit=fp;var dp={},hp={},bp={},yp={},_p={},vp=(Object.defineProperty(_p,"__esModule",{value:!0}),_p.mergeInternals=void 0,R),mp=Ol,gp=T;_p.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;vp.innerFrom(n(e,l++)).subscribe(gp.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?mp.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(gp.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(yp,"__esModule",{value:!0}),yp.mergeMap=void 0;var Op=kf,wp=R,Ep=S,Pp=_p,Sp=E;yp.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),Sp.isFunction(i)?e(function(r,n){return Op.map(function(e,t){return i(r,e,n,t)})(wp.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),Ep.operate(function(e,t){return Pp.mergeInternals(e,t,o,r)}))},Object.defineProperty(bp,"__esModule",{value:!0}),bp.mergeAll=void 0;var Tp=yp,jp=p;bp.mergeAll=function(e){return Tp.mergeMap(jp.identity,e=void 0===e?1/0:e)},Object.defineProperty(hp,"__esModule",{value:!0}),hp.concatAll=void 0;var Cp=bp;hp.concatAll=function(){return Cp.mergeAll(1)},Object.defineProperty(dp,"__esModule",{value:!0}),dp.concat=void 0;var Rp=hp,Ip=i,Ap=kc;dp.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Rp.concatAll()(Ap.from(e,Ip.popScheduler(e)))};var kp={},Mp={},Np=(Object.defineProperty(Mp,"__esModule",{value:!0}),Mp.defer=void 0,o),xp=R;Mp.defer=function(t){return new Np.Observable(function(e){xp.innerFrom(t()).subscribe(e)})},Object.defineProperty(kp,"__esModule",{value:!0}),kp.connectable=void 0;var Dp=t,Up=o,Lp=Mp,Fp={connector:function(){return new Dp.Subject},resetOnDisconnect:!0};kp.connectable=function(e,t){var r=null,n=(t=void 0===t?Fp:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new Up.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=Lp.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var Bp={},Wp=(Object.defineProperty(Bp,"__esModule",{value:!0}),Bp.forkJoin=void 0,o),qp=Qf,zp=R,Vp=i,Hp=T,Gp=Af,Yp=tp;Bp.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Vp.popResultSelector(e),u=(n=qp.argsArgArrayOrObject(e)).args,a=n.keys,n=new Wp.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;zp.innerFrom(u[t]).subscribe(Hp.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?Yp.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(Gp.mapOneOrManyArgs(r)):n};var Qf={},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=(Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.fromEvent=void 0,R),Qp=o,Xp=yp,Jp=xc,$p=E,ed=Af,td=["addListener","removeListener"],rd=["addEventListener","removeEventListener"],nd=["on","off"];function od(r,n){return function(t){return function(e){return r[t](n,e)}}}Qf.fromEvent=function t(r,n,o,e){if($p.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(ed.mapOneOrManyArgs(e));var e=Kp((e=r,$p.isFunction(e.addEventListener)&&$p.isFunction(e.removeEventListener)?rd.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,$p.isFunction(e.addListener)&&$p.isFunction(e.removeListener)?td.map(od(r,n)):(e=r,$p.isFunction(e.on)&&$p.isFunction(e.off)?nd.map(od(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&Jp.isArrayLike(r))return Xp.mergeMap(function(e){return t(e,n,o)})(Zp.innerFrom(r));if(i)return new Qp.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 tp={},id=(Object.defineProperty(tp,"__esModule",{value:!0}),tp.fromEventPattern=void 0,o),ud=E,ad=Af;tp.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(ad.mapOneOrManyArgs(t)):new id.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 ud.isFunction(o)?function(){return o(e,t)}:void 0})};var xc={},sd=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}}}},cd=(Object.defineProperty(xc,"__esModule",{value:!0}),xc.generate=void 0,p),ld=jc,fd=Mp,pd=Dl;xc.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return sd(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?cd.identity:i,o=e.scheduler):(a=e,!t||ld.isScheduler(t)?(u=cd.identity,o=t):u=t),fd.defer(o?function(){return pd.scheduleIterable(s(),o)}:s)};var Dl={},dd=(Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.iif=void 0,Mp);Dl.iif=function(e,t,r){return dd.defer(function(){return e()?t:r})};var hd={},bd={},yd=(Object.defineProperty(bd,"__esModule",{value:!0}),bd.timer=void 0,o),_d=w,vd=jc,md=Nl;bd.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=_d.async);var i=-1;return null!=e&&(vd.isScheduler(e)?o=e:i=e),new yd.Observable(function(e){var t=md.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(hd,"__esModule",{value:!0}),hd.interval=void 0;var gd=w,Od=bd;hd.interval=function(e,t){return Od.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?gd.asyncScheduler:t)};var jc={},wd=(Object.defineProperty(jc,"__esModule",{value:!0}),jc.merge=void 0,bp),Ed=R,Pd=g,Sd=i,Td=kc;jc.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Sd.popScheduler(e),n=Sd.popNumber(e,1/0),o=e;return o.length?1===o.length?Ed.innerFrom(o[0]):wd.mergeAll(n)(Td.from(o,r)):Pd.EMPTY};var jd,Cd={},Rd=(jd=Cd,Object.defineProperty(jd,"__esModule",{value:!0}),jd.never=jd.NEVER=void 0,jd.NEVER=new o.Observable(b.noop),jd.never=function(){return jd.NEVER},{}),Id={},Ad=(Object.defineProperty(Id,"__esModule",{value:!0}),Id.argsOrArgArray=void 0,Array.isArray);Id.argsOrArgArray=function(e){return 1===e.length&&Ad(e[0])?e[0]:e},Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.onErrorResumeNext=void 0;var kd=o,Md=Id,Nd=T,xd=b,Dd=R;Rd.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Md.argsOrArgArray(e);return new kd.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=Dd.innerFrom(i[n++])}catch(e){return void o()}var t=new Nd.OperatorSubscriber(r,void 0,xd.noop,xd.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var Ud={},Ld=(Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.pairs=void 0,kc);Ud.pairs=function(e,t){return Ld.from(Object.entries(e),t)};var Fd={},Bd={};Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.not=void 0,Bd.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var Wd={},qd=(Object.defineProperty(Wd,"__esModule",{value:!0}),Wd.filter=void 0,S),zd=T;Wd.filter=function(n,o){return qd.operate(function(e,t){var r=0;e.subscribe(zd.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(Fd,"__esModule",{value:!0}),Fd.partition=void 0;var Vd=Bd,Hd=Wd,Gd=R;Fd.partition=function(e,t,r){return[Hd.filter(t,r)(Gd.innerFrom(e)),Hd.filter(Vd.not(t,r))(Gd.innerFrom(e))]};var Yd={},Kd=(Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.raceInit=Yd.race=void 0,o),Zd=R,Qd=Id,Xd=T;function Jd(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(Zd.innerFrom(t[r]).subscribe(Xd.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)}}Yd.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=Qd.argsOrArgArray(e)).length?Zd.innerFrom(e[0]):new Kd.Observable(Jd(e))},Yd.raceInit=Jd;var $d={},eh=(Object.defineProperty($d,"__esModule",{value:!0}),$d.range=void 0,o),th=g;$d.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return th.EMPTY;var o=e+r;return new eh.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 rh={},nh=(Object.defineProperty(rh,"__esModule",{value:!0}),rh.using=void 0,o),oh=R,ih=g;rh.using=function(n,o){return new nh.Observable(function(e){var t=n(),r=o(t);return(r?oh.innerFrom(r):ih.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var uh={},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=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},ch=(Object.defineProperty(uh,"__esModule",{value:!0}),uh.zip=void 0,o),lh=R,fh=Id,ph=g,dh=T,hh=i;uh.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=hh.popResultSelector(e),u=fh.argsOrArgArray(e);return u.length?new ch.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){lh.innerFrom(u[t]).subscribe(dh.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,sh([],ah(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}}):ph.EMPTY};var bh={},yh=(Object.defineProperty(bh,"__esModule",{value:!0}),{}),_h=(Object.defineProperty(yh,"__esModule",{value:!0}),yh.audit=void 0,S),vh=R,mh=T;yh.audit=function(s){return _h.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(mh.createOperatorSubscriber(t,function(e){o=!0,i=e,u||vh.innerFrom(s(e)).subscribe(u=mh.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var gh={},Oh=(Object.defineProperty(gh,"__esModule",{value:!0}),gh.auditTime=void 0,w),wh=yh,Eh=bd;gh.auditTime=function(e,t){return void 0===t&&(t=Oh.asyncScheduler),wh.audit(function(){return Eh.timer(e,t)})};var Ph={},Sh=(Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.buffer=void 0,S),Th=b,jh=T,Ch=R;Ph.buffer=function(n){return Sh.operate(function(e,t){var r=[];return e.subscribe(jh.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),Ch.innerFrom(n).subscribe(jh.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},Th.noop)),function(){r=null}})};var Rh={},Ih=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.")},Ah=(Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.bufferCount=void 0,S),kh=T,Mh=_;Rh.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,Ah.operate(function(e,f){var p=[],d=0;e.subscribe(kh.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=Ih(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=Ih(i),c=s.next();!c.done;c=s.next()){var l=c.value;Mh.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=Ih(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 Nh={},xh=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.")},Dh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.bufferTime=void 0,Wr),Uh=S,Lh=T,Fh=_,Bh=w,Wh=i,qh=Ol;Nh.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=Wh.popScheduler(t))?e:Bh.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return Uh.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),Fh.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new Dh.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),qh.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?qh.executeSchedule(r,u,o,a,!0):n=!0,o(),Lh.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=xh(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 zh={},Vh=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.")},Hh=(Object.defineProperty(zh,"__esModule",{value:!0}),zh.bufferToggle=void 0,Wr),Gh=S,Yh=R,Kh=T,Zh=b,Qh=_;zh.bufferToggle=function(t,o){return Gh.operate(function(e,n){var i=[];Yh.innerFrom(t).subscribe(Kh.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new Hh.Subscription);r.add(Yh.innerFrom(o(e)).subscribe(Kh.createOperatorSubscriber(n,function(){Qh.arrRemove(i,t),n.next(t),r.unsubscribe()},Zh.noop)))},Zh.noop)),e.subscribe(Kh.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=Vh(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 Xh={},Jh=(Object.defineProperty(Xh,"__esModule",{value:!0}),Xh.bufferWhen=void 0,S),$h=b,eb=T,tb=R;Xh.bufferWhen=function(i){return Jh.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),tb.innerFrom(i()).subscribe(n=eb.createOperatorSubscriber(t,o,$h.noop))};o(),e.subscribe(eb.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 rb={},nb=(Object.defineProperty(rb,"__esModule",{value:!0}),rb.catchError=void 0,R),ob=T,ib=S;rb.catchError=function u(a){return ib.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(ob.createOperatorSubscriber(r,void 0,void 0,function(e){n=nb.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 ub={},ab={},I={},sb={},cb={},lb={},fb=(Object.defineProperty(lb,"__esModule",{value:!0}),lb.scanInternals=void 0,T);lb.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(fb.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(cb,"__esModule",{value:!0}),cb.reduce=void 0;var pb=lb,db=S;cb.reduce=function(e,t){return db.operate(pb.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(sb,"__esModule",{value:!0}),sb.toArray=void 0;function hb(e,t){return e.push(t),e}var bb=cb,yb=S;sb.toArray=function(){return yb.operate(function(e,t){bb.reduce(hb,[])(e).subscribe(t)})},Object.defineProperty(I,"__esModule",{value:!0}),I.joinAllInternals=void 0;var _b=p,vb=Af,mb=c,gb=yp,Ob=sb;I.joinAllInternals=function(t,e){return mb.pipe(Ob.toArray(),gb.mergeMap(function(e){return t(e)}),e?vb.mapOneOrManyArgs(e):_b.identity)},Object.defineProperty(ab,"__esModule",{value:!0}),ab.combineLatestAll=void 0;var wb=y,Eb=I;ab.combineLatestAll=function(e){return Eb.joinAllInternals(wb.combineLatest,e)},Object.defineProperty(ub,"__esModule",{value:!0}),ub.combineAll=void 0;ub.combineAll=ab.combineLatestAll;var Pb={},Sb={},Tb=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},jb=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},Cb=(Object.defineProperty(Sb,"__esModule",{value:!0}),Sb.combineLatest=void 0,y),Rb=S,Ib=Id,Ab=Af,kb=c,Mb=i;function Nb(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Mb.popResultSelector(r);return t?kb.pipe(Nb.apply(void 0,jb([],Tb(r))),Ab.mapOneOrManyArgs(t)):Rb.operate(function(e,t){Cb.combineLatestInit(jb([e],Tb(Ib.argsOrArgArray(r))))(t)})}Sb.combineLatest=Nb;var xb=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},Db=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},Ub=(Object.defineProperty(Pb,"__esModule",{value:!0}),Pb.combineLatestWith=void 0,Sb);Pb.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ub.combineLatest.apply(void 0,Db([],xb(e)))};var Af={},Lb=(Object.defineProperty(Af,"__esModule",{value:!0}),Af.concatMap=void 0,yp),Fb=E;Af.concatMap=function(e,t){return Fb.isFunction(t)?Lb.mergeMap(e,t,1):Lb.mergeMap(e,1)};var Bb={},Wb=(Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.concatMapTo=void 0,Af),qb=E;Bb.concatMapTo=function(e,t){return qb.isFunction(t)?Wb.concatMap(function(){return e},t):Wb.concatMap(function(){return e})};var zb={},Vb={},Hb=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},Gb=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},Yb=(Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.concat=void 0,S),Kb=hp,Zb=i,Qb=kc;Vb.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Zb.popScheduler(r);return Yb.operate(function(e,t){Kb.concatAll()(Qb.from(Gb([e],Hb(r)),n)).subscribe(t)})};var Xb=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},Jb=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},$b=(Object.defineProperty(zb,"__esModule",{value:!0}),zb.concatWith=void 0,Vb);zb.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return $b.concat.apply(void 0,Jb([],Xb(e)))};var ey={},ty={},ry=(Object.defineProperty(ty,"__esModule",{value:!0}),ty.fromSubscribable=void 0,o);ty.fromSubscribable=function(t){return new ry.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(ey,"__esModule",{value:!0}),ey.connect=void 0;var ny=t,oy=R,iy=S,uy=ty,ay={connector:function(){return new ny.Subject}};ey.connect=function(n,e){var o=(e=void 0===e?ay:e).connector;return iy.operate(function(e,t){var r=o();oy.innerFrom(n(uy.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var ty={},sy=(Object.defineProperty(ty,"__esModule",{value:!0}),ty.count=void 0,cb);ty.count=function(n){return sy.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var cy={},ly=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.debounce=void 0,S),fy=b,py=T,dy=R;cy.debounce=function(u){return ly.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(py.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=py.createOperatorSubscriber(t,r,fy.noop),dy.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var hy={},by=(Object.defineProperty(hy,"__esModule",{value:!0}),hy.debounceTime=void 0,w),yy=S,_y=T;hy.debounceTime=function(a,s){return void 0===s&&(s=by.asyncScheduler),yy.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(_y.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 vy={},my=(Object.defineProperty(vy,"__esModule",{value:!0}),vy.defaultIfEmpty=void 0,S),gy=T;vy.defaultIfEmpty=function(n){return my.operate(function(e,t){var r=!1;e.subscribe(gy.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var A={},Oy={},wy={},Ey=(Object.defineProperty(wy,"__esModule",{value:!0}),wy.take=void 0,g),Py=S,Sy=T;wy.take=function(n){return n<=0?function(){return Ey.EMPTY}:Py.operate(function(e,t){var r=0;e.subscribe(Sy.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var Ty={},jy=(Object.defineProperty(Ty,"__esModule",{value:!0}),Ty.ignoreElements=void 0,S),Cy=T,Ry=b;Ty.ignoreElements=function(){return jy.operate(function(e,t){e.subscribe(Cy.createOperatorSubscriber(t,Ry.noop))})};var Iy={},Ay=(Object.defineProperty(Iy,"__esModule",{value:!0}),Iy.mapTo=void 0,kf);Iy.mapTo=function(e){return Ay.map(function(){return e})},Object.defineProperty(Oy,"__esModule",{value:!0}),Oy.delayWhen=void 0;var ky=dp,My=wy,Ny=Ty,xy=Iy,Dy=yp,Uy=R;Oy.delayWhen=function t(r,n){return n?function(e){return ky.concat(n.pipe(My.take(1),Ny.ignoreElements()),e.pipe(t(r)))}:Dy.mergeMap(function(e,t){return Uy.innerFrom(r(e,t)).pipe(My.take(1),xy.mapTo(e))})},Object.defineProperty(A,"__esModule",{value:!0}),A.delay=void 0;var Ly=w,Fy=Oy,By=bd;A.delay=function(e,t){var r=By.timer(e,t=void 0===t?Ly.asyncScheduler:t);return Fy.delayWhen(function(){return r})};var Wy={},qy=(Object.defineProperty(Wy,"__esModule",{value:!0}),Wy.dematerialize=void 0,C),zy=S,Vy=T;Wy.dematerialize=function(){return zy.operate(function(e,t){e.subscribe(Vy.createOperatorSubscriber(t,function(e){return qy.observeNotification(e,t)}))})};var Hy={},Gy=(Object.defineProperty(Hy,"__esModule",{value:!0}),Hy.distinct=void 0,S),Yy=T,Ky=b,Zy=R;Hy.distinct=function(o,t){return Gy.operate(function(e,r){var n=new Set;e.subscribe(Yy.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&Zy.innerFrom(t).subscribe(Yy.createOperatorSubscriber(r,function(){return n.clear()},Ky.noop))})};var Qy={},Xy=(Object.defineProperty(Qy,"__esModule",{value:!0}),Qy.distinctUntilChanged=void 0,p),Jy=S,$y=T;function e_(e,t){return e===t}Qy.distinctUntilChanged=function(i,u){return void 0===u&&(u=Xy.identity),i=null!=i?i:e_,Jy.operate(function(e,r){var n,o=!0;e.subscribe($y.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var t_={},r_=(Object.defineProperty(t_,"__esModule",{value:!0}),t_.distinctUntilKeyChanged=void 0,Qy);t_.distinctUntilKeyChanged=function(r,n){return r_.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var n_={},o_={},i_=(Object.defineProperty(o_,"__esModule",{value:!0}),o_.throwIfEmpty=void 0,Dc),u_=S,a_=T;function s_(){return new i_.EmptyError}o_.throwIfEmpty=function(n){return void 0===n&&(n=s_),u_.operate(function(e,t){var r=!1;e.subscribe(a_.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(n_,"__esModule",{value:!0}),n_.elementAt=void 0;var c_=zc,l_=Wd,f_=o_,p_=vy,d_=wy;n_.elementAt=function(r,t){if(r<0)throw new c_.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(l_.filter(function(e,t){return t===r}),d_.take(1),n?p_.defaultIfEmpty(t):f_.throwIfEmpty(function(){return new c_.ArgumentOutOfRangeError}))}};var h_={},b_=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},y_=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(h_,"__esModule",{value:!0}),h_.endWith=void 0,dp),v_=h;h_.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return __.concat(e,v_.of.apply(void 0,y_([],b_(t))))}};var m_={},g_=(Object.defineProperty(m_,"__esModule",{value:!0}),m_.every=void 0,S),O_=T;m_.every=function(o,i){return g_.operate(function(t,r){var n=0;t.subscribe(O_.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var w_={},E_={},P_={},S_=(Object.defineProperty(P_,"__esModule",{value:!0}),P_.exhaustMap=void 0,kf),T_=R,j_=S,C_=T;P_.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return T_.innerFrom(i(r,n)).pipe(S_.map(function(e,t){return o(r,e,n,t)}))}))}:j_.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(C_.createOperatorSubscriber(t,function(e){n||(n=C_.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),T_.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(E_,"__esModule",{value:!0}),E_.exhaustAll=void 0;var R_=P_,I_=p;E_.exhaustAll=function(){return R_.exhaustMap(I_.identity)},Object.defineProperty(w_,"__esModule",{value:!0}),w_.exhaust=void 0;w_.exhaust=E_.exhaustAll;var A_={},k_=(Object.defineProperty(A_,"__esModule",{value:!0}),A_.expand=void 0,S),M_=_p;A_.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,k_.operate(function(e,t){return M_.mergeInternals(e,t,r,n,void 0,!0,o)})};var N_={},x_=(Object.defineProperty(N_,"__esModule",{value:!0}),N_.finalize=void 0,S);N_.finalize=function(r){return x_.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var D_={},U_=(Object.defineProperty(D_,"__esModule",{value:!0}),D_.createFind=D_.find=void 0,S),L_=T;function F_(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(L_.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()}))}}D_.find=function(e,t){return U_.operate(F_(e,t,"value"))},D_.createFind=F_;var B_={},W_=(Object.defineProperty(B_,"__esModule",{value:!0}),B_.findIndex=void 0,S),q_=D_;B_.findIndex=function(e,t){return W_.operate(q_.createFind(e,t,"index"))};var z_={},V_=(Object.defineProperty(z_,"__esModule",{value:!0}),z_.first=void 0,Dc),H_=Wd,G_=wy,Y_=vy,K_=o_,Z_=p;z_.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?H_.filter(function(e,t){return n(e,t,r)}):Z_.identity,G_.take(1),t?Y_.defaultIfEmpty(e):K_.throwIfEmpty(function(){return new V_.EmptyError}))}};var Q_={},X_=(Object.defineProperty(Q_,"__esModule",{value:!0}),Q_.groupBy=void 0,o),J_=R,$_=t,ev=S,tv=T;Q_.groupBy=function(b,t,y,_){return ev.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 tv.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new $_.Subject),i=n,u=o,(a=new X_.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=tv.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(J_.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 rv={},nv=(Object.defineProperty(rv,"__esModule",{value:!0}),rv.isEmpty=void 0,S),ov=T;rv.isEmpty=function(){return nv.operate(function(e,t){e.subscribe(ov.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var iv={},uv={},av=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.")},sv=(Object.defineProperty(uv,"__esModule",{value:!0}),uv.takeLast=void 0,g),cv=S,lv=T;uv.takeLast=function(t){return t<=0?function(){return sv.EMPTY}:cv.operate(function(e,i){var u=[];e.subscribe(lv.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=av(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(iv,"__esModule",{value:!0}),iv.last=void 0;var fv=Dc,pv=Wd,dv=uv,hv=o_,bv=vy,yv=p;iv.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?pv.filter(function(e,t){return n(e,t,r)}):yv.identity,dv.takeLast(1),t?bv.defaultIfEmpty(e):hv.throwIfEmpty(function(){return new fv.EmptyError}))}};var _v={},vv=(Object.defineProperty(_v,"__esModule",{value:!0}),_v.materialize=void 0,C),mv=S,gv=T;_v.materialize=function(){return mv.operate(function(e,t){e.subscribe(gv.createOperatorSubscriber(t,function(e){t.next(vv.Notification.createNext(e))},function(){t.next(vv.Notification.createComplete()),t.complete()},function(e){t.next(vv.Notification.createError(e)),t.complete()}))})};var Ov={},wv=(Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.max=void 0,cb),Ev=E;Ov.max=function(r){return wv.reduce(Ev.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var Pv={},Sv=(Object.defineProperty(Pv,"__esModule",{value:!0}),Pv.flatMap=void 0,yp),Sv=(Pv.flatMap=Sv.mergeMap,{}),Tv=(Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.mergeMapTo=void 0,yp),jv=E;Sv.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),jv.isFunction(t)?Tv.mergeMap(function(){return e},t,r):Tv.mergeMap(function(){return e},r="number"==typeof t?t:r)};var Cv={},Rv=(Object.defineProperty(Cv,"__esModule",{value:!0}),Cv.mergeScan=void 0,S),Iv=_p;Cv.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),Rv.operate(function(e,t){var r=o;return Iv.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var _p={},Av={},kv=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},Mv=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},Nv=(Object.defineProperty(Av,"__esModule",{value:!0}),Av.merge=void 0,S),xv=bp,Dv=i,Uv=kc;Av.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Dv.popScheduler(r),o=Dv.popNumber(r,1/0);return Nv.operate(function(e,t){xv.mergeAll(o)(Uv.from(Mv([e],kv(r)),n)).subscribe(t)})};var Lv=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},Fv=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},Bv=(Object.defineProperty(_p,"__esModule",{value:!0}),_p.mergeWith=void 0,Av);_p.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Bv.merge.apply(void 0,Fv([],Lv(e)))};var Wv={},qv=(Object.defineProperty(Wv,"__esModule",{value:!0}),Wv.min=void 0,cb),zv=E;Wv.min=function(r){return qv.reduce(zv.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var Vv={},Hv=(Object.defineProperty(Vv,"__esModule",{value:!0}),Vv.multicast=void 0,hn),Gv=E,Yv=ey;Vv.multicast=function(e,t){var r=Gv.isFunction(e)?e:function(){return e};return Gv.isFunction(t)?Yv.connect(t,{connector:r}):function(e){return new Hv.ConnectableObservable(e,r)}};var Kv={},Zv=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},Qv=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},Xv=(Object.defineProperty(Kv,"__esModule",{value:!0}),Kv.onErrorResumeNext=Kv.onErrorResumeNextWith=void 0,Id),Jv=Rd;function $v(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Xv.argsOrArgArray(e);return function(e){return Jv.onErrorResumeNext.apply(void 0,Qv([e],Zv(r)))}}Kv.onErrorResumeNextWith=$v,Kv.onErrorResumeNext=$v;var em={},tm=(Object.defineProperty(em,"__esModule",{value:!0}),em.pairwise=void 0,S),rm=T;em.pairwise=function(){return tm.operate(function(e,r){var n,o=!1;e.subscribe(rm.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var nm={},om=(Object.defineProperty(nm,"__esModule",{value:!0}),nm.pluck=void 0,kf);nm.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 om.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 im={},um=(Object.defineProperty(im,"__esModule",{value:!0}),im.publish=void 0,t),am=Vv,sm=ey;im.publish=function(t){return t?function(e){return sm.connect(t)(e)}:function(e){return am.multicast(new um.Subject)(e)}};var cm={},lm=(Object.defineProperty(cm,"__esModule",{value:!0}),cm.publishBehavior=void 0,v),fm=hn;cm.publishBehavior=function(r){return function(e){var t=new lm.BehaviorSubject(r);return new fm.ConnectableObservable(e,function(){return t})}};var pm={},dm=(Object.defineProperty(pm,"__esModule",{value:!0}),pm.publishLast=void 0,s),hm=hn;pm.publishLast=function(){return function(e){var t=new dm.AsyncSubject;return new hm.ConnectableObservable(e,function(){return t})}};var bm={},ym=(Object.defineProperty(bm,"__esModule",{value:!0}),bm.publishReplay=void 0,P),_m=Vv,vm=E;bm.publishReplay=function(t,r,e,n){e&&!vm.isFunction(e)&&(n=e);var o=vm.isFunction(e)?e:void 0;return function(e){return _m.multicast(new ym.ReplaySubject(t,r,n),o)(e)}};var mm={},gm=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},Om=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},wm=(Object.defineProperty(mm,"__esModule",{value:!0}),mm.raceWith=void 0,Yd),Em=S,Pm=p;mm.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?Em.operate(function(e,t){wm.raceInit(Om([e],gm(r)))(t)}):Pm.identity};var Sm={},Tm=(Object.defineProperty(Sm,"__esModule",{value:!0}),Sm.repeat=void 0,g),jm=S,Cm=T,Rm=R,Im=bd;Sm.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 Tm.EMPTY}:jm.operate(function(t,r){function n(){var e=!1;o=t.subscribe(Cm.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?Im.timer(a):Rm.innerFrom(a(i)),t=Cm.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var Am={},km=(Object.defineProperty(Am,"__esModule",{value:!0}),Am.repeatWhen=void 0,R),Mm=t,Nm=S,xm=T;Am.repeatWhen=function(l){return Nm.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 Mm.Subject,km.innerFrom(l(n)).subscribe(xm.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(xm.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var Dm={},Um=(Object.defineProperty(Dm,"__esModule",{value:!0}),Dm.retry=void 0,S),Lm=T,Fm=p,Bm=bd,Wm=R;Dm.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?Fm.identity:Um.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(Lm.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?Bm.timer(l):Wm.innerFrom(l(e,a)),n=Lm.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var qm={},zm=(Object.defineProperty(qm,"__esModule",{value:!0}),qm.retryWhen=void 0,R),Vm=t,Hm=S,Gm=T;qm.retryWhen=function(u){return Hm.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(Gm.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new Vm.Subject,zm.innerFrom(u(n)).subscribe(Gm.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var Ym={},Km=(Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.sample=void 0,R),Zm=S,Qm=b,Xm=T;Ym.sample=function(o){return Zm.operate(function(e,t){var r=!1,n=null;e.subscribe(Xm.createOperatorSubscriber(t,function(e){r=!0,n=e})),Km.innerFrom(o).subscribe(Xm.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},Qm.noop))})};var Jm={},$m=(Object.defineProperty(Jm,"__esModule",{value:!0}),Jm.sampleTime=void 0,w),e0=Ym,t0=hd;Jm.sampleTime=function(e,t){return e0.sample(t0.interval(e,t=void 0===t?$m.asyncScheduler:t))};var r0={},n0=(Object.defineProperty(r0,"__esModule",{value:!0}),r0.scan=void 0,S),o0=lb;r0.scan=function(e,t){return n0.operate(o0.scanInternals(e,t,2<=arguments.length,!0))};var lb={},i0=(Object.defineProperty(lb,"__esModule",{value:!0}),lb.sequenceEqual=void 0,S),u0=T,a0=R;function s0(){return{buffer:[],complete:!1}}lb.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),i0.operate(function(e,t){function r(n,o){var r=u0.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=s0(),o=s0(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),a0.innerFrom(u).subscribe(r(o,n))})};var c0={},l0=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},f0=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},p0=(Object.defineProperty(c0,"__esModule",{value:!0}),c0.share=void 0,R),d0=t,h0=Xr,b0=S;function y0(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 h0.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),p0.innerFrom(t.apply(void 0,f0([],l0(n)))).subscribe(r)}c0.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new d0.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 b0.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=y0(n,b))}),r.subscribe(t),!o&&0<a&&(o=new h0.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=y0(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=y0(f,h),r.complete()}}),p0.innerFrom(e).subscribe(o))})(e)}};var _0={},v0=(Object.defineProperty(_0,"__esModule",{value:!0}),_0.shareReplay=void 0,P),m0=c0;_0.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,m0.share({connector:function(){return new v0.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var g0={},O0=(Object.defineProperty(g0,"__esModule",{value:!0}),g0.single=void 0,Dc),w0=Il,E0=zl,P0=S,S0=T;g0.single=function(a){return P0.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(S0.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new w0.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new E0.NotFoundError("No matching values"):new O0.EmptyError)}))})};var T0={},j0=(Object.defineProperty(T0,"__esModule",{value:!0}),T0.skip=void 0,Wd);T0.skip=function(r){return j0.filter(function(e,t){return r<=t})};var C0={},R0=(Object.defineProperty(C0,"__esModule",{value:!0}),C0.skipLast=void 0,p),I0=S,A0=T;C0.skipLast=function(u){return u<=0?R0.identity:I0.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(A0.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 k0={},M0=(Object.defineProperty(k0,"__esModule",{value:!0}),k0.skipUntil=void 0,S),N0=T,x0=R,D0=b;k0.skipUntil=function(o){return M0.operate(function(e,t){var r=!1,n=N0.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},D0.noop);x0.innerFrom(o).subscribe(n),e.subscribe(N0.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var U0={},L0=(Object.defineProperty(U0,"__esModule",{value:!0}),U0.skipWhile=void 0,S),F0=T;U0.skipWhile=function(o){return L0.operate(function(e,t){var r=!1,n=0;e.subscribe(F0.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var B0={},W0=(Object.defineProperty(B0,"__esModule",{value:!0}),B0.startWith=void 0,dp),q0=i,z0=S;B0.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=q0.popScheduler(r);return z0.operate(function(e,t){(n?W0.concat(r,e,n):W0.concat(r,e)).subscribe(t)})};var V0={},H0={},G0=(Object.defineProperty(H0,"__esModule",{value:!0}),H0.switchMap=void 0,R),Y0=S,K0=T;H0.switchMap=function(s,c){return Y0.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(K0.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;G0.innerFrom(s(t,n)).subscribe(u=K0.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(V0,"__esModule",{value:!0}),V0.switchAll=void 0;var Z0=H0,Q0=p;V0.switchAll=function(){return Z0.switchMap(Q0.identity)};var X0={},J0=(Object.defineProperty(X0,"__esModule",{value:!0}),X0.switchMapTo=void 0,H0),$0=E;X0.switchMapTo=function(e,t){return $0.isFunction(t)?J0.switchMap(function(){return e},t):J0.switchMap(function(){return e})};var eg={},tg=(Object.defineProperty(eg,"__esModule",{value:!0}),eg.switchScan=void 0,H0),rg=S;eg.switchScan=function(n,o){return rg.operate(function(e,t){var r=o;return tg.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var ng={},og=(Object.defineProperty(ng,"__esModule",{value:!0}),ng.takeUntil=void 0,S),ig=T,ug=R,ag=b;ng.takeUntil=function(r){return og.operate(function(e,t){ug.innerFrom(r).subscribe(ig.createOperatorSubscriber(t,function(){return t.complete()},ag.noop)),t.closed||e.subscribe(t)})};var sg={},cg=(Object.defineProperty(sg,"__esModule",{value:!0}),sg.takeWhile=void 0,S),lg=T;sg.takeWhile=function(o,i){return void 0===i&&(i=!1),cg.operate(function(e,r){var n=0;e.subscribe(lg.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var fg={},pg=(Object.defineProperty(fg,"__esModule",{value:!0}),fg.tap=void 0,E),dg=S,hg=T,bg=p;fg.tap=function(e,t,r){var o=pg.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?dg.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(hg.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)}))}):bg.identity};var E={},yg=(Object.defineProperty(E,"__esModule",{value:!0}),E.throttle=void 0,S),_g=T,vg=R;E.throttle=function(h,b){return yg.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=vg.innerFrom(h(e)).subscribe(_g.createOperatorSubscriber(t,f,p))};e.subscribe(_g.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 mg={},gg=(Object.defineProperty(mg,"__esModule",{value:!0}),mg.throttleTime=void 0,w),Og=E,wg=bd;mg.throttleTime=function(e,t,r){var n=wg.timer(e,t=void 0===t?gg.asyncScheduler:t);return Og.throttle(function(){return n},r)};var Eg={},Pg=(Object.defineProperty(Eg,"__esModule",{value:!0}),Eg.TimeInterval=Eg.timeInterval=void 0,w),Sg=S,Tg=T;Eg.timeInterval=function(i){return void 0===i&&(i=Pg.asyncScheduler),Sg.operate(function(e,n){var o=i.now();e.subscribe(Tg.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new jg(e,r))}))})};var jg=function(e,t){this.value=e,this.interval=t},Cg=(Eg.TimeInterval=jg,{}),Rg=(Object.defineProperty(Cg,"__esModule",{value:!0}),Cg.timeoutWith=void 0,w),Ig=Nl,Ag=Zc;Cg.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:Rg.async,Ig.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 Ag.timeout({first:n,each:o,scheduler:r,with:e})};var Nl={},kg=(Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.timestamp=void 0,u),Mg=kf;Nl.timestamp=function(t){return void 0===t&&(t=kg.dateTimestampProvider),Mg.map(function(e){return{value:e,timestamp:t.now()}})};var u={},Ng=(Object.defineProperty(u,"__esModule",{value:!0}),u.window=void 0,t),xg=S,Dg=T,Ug=b,Lg=R;u.window=function(o){return xg.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new Ng.Subject;t.next(n.asObservable());return e.subscribe(Dg.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),Lg.innerFrom(o).subscribe(Dg.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new Ng.Subject)},Ug.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var Fg={},Bg=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.")},Wg=(Object.defineProperty(Fg,"__esModule",{value:!0}),Fg.windowCount=void 0,t),qg=S,zg=T;Fg.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return qg.operate(function(e,i){var u=[new Wg.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(zg.createOperatorSubscriber(i,function(e){try{for(var t=Bg(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 Wg.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 Vg={},Hg=(Object.defineProperty(Vg,"__esModule",{value:!0}),Vg.windowTime=void 0,t),Gg=w,Yg=Wr,Kg=S,Zg=T,Qg=_,Xg=i,Jg=Ol;Vg.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=Xg.popScheduler(t))?e:Gg.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return Kg.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(),Qg.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new Yg.Subscription,n.add(e),t=new Hg.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),Jg.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?Jg.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(Zg.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 Ol={},$g=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.")},eO=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.windowToggle=void 0,t),tO=Wr,rO=S,nO=R,oO=T,iO=b,uO=_;Ol.windowToggle=function(t,a){return rO.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];nO.innerFrom(t).subscribe(oO.createOperatorSubscriber(o,function(e){var t,r=new eO.Subject,n=(u.push(r),new tO.Subscription);try{t=nO.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(oO.createOperatorSubscriber(o,function(){uO.arrRemove(u,r),r.complete(),n.unsubscribe()},iO.noop,i)))},iO.noop)),e.subscribe(oO.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=$g(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 _={},aO=(Object.defineProperty(_,"__esModule",{value:!0}),_.windowWhen=void 0,t),sO=S,cO=T,lO=R;_.windowWhen=function(u){return sO.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 aO.Subject,t.next(r.asObservable());try{e=lO.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=cO.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(cO.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var fO={},pO=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},dO=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},hO=(Object.defineProperty(fO,"__esModule",{value:!0}),fO.withLatestFrom=void 0,S),bO=T,yO=R,_O=p,vO=b,mO=i;fO.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=mO.popResultSelector(a);return hO.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){yO.innerFrom(a[t]).subscribe(bO.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(_O.identity))&&(o=null))},vO.noop))}(u);e.subscribe(bO.createOperatorSubscriber(r,function(e){i&&(e=dO([e],pO(n)),r.next(s?s.apply(void 0,dO([],pO(e))):e))}))})};var T={},gO=(Object.defineProperty(T,"__esModule",{value:!0}),T.zipAll=void 0,uh),OO=I;T.zipAll=function(e){return OO.joinAllInternals(gO.zip,e)};var R={},i={},wO=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},EO=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},PO=(Object.defineProperty(i,"__esModule",{value:!0}),i.zip=void 0,uh),SO=S;i.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return SO.operate(function(e,t){PO.zip.apply(void 0,EO([e],wO(r))).subscribe(t)})};var TO,jO,CO,RO,IO,AO,kO,MO,NO,xO,DO,UO,LO,FO,BO,WO,qO,zO,VO,HO,GO,YO,KO,ZO,QO,XO,JO,$O,ew,tw,rw,nw,ow,iw,uw,aw,sw,cw,lw,fw,pw,dw,hw,bw,yw,_w,vw,mw,gw,Ow,ww,Ew,Pw,Sw,Tw,jw,Cw,Rw,Iw,Aw,kw,Mw,Nw,xw,Dw,Uw,Lw,Fw,Bw,Ww,qw,zw,Vw,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,SE,TE,jE,CE,RE,IE,AE,kE,ME,NE,xE,DE,UE,LE,FE,BE,WE,qE,zE,VE,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,SP,TP,jP,CP,RP,IP,AP,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},MP=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},NP=(Object.defineProperty(R,"__esModule",{value:!0}),R.zipWith=void 0,i);R.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return NP.zip.apply(void 0,MP([],kP(e)))},I=Y,TO=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)||TO(t,e,r)},Object.defineProperty(I,"__esModule",{value:!0}),I.interval=I.iif=I.generate=I.fromEventPattern=I.fromEvent=I.from=I.forkJoin=I.empty=I.defer=I.connectable=I.concat=I.combineLatest=I.bindNodeCallback=I.bindCallback=I.UnsubscriptionError=I.TimeoutError=I.SequenceError=I.ObjectUnsubscribedError=I.NotFoundError=I.EmptyError=I.ArgumentOutOfRangeError=I.firstValueFrom=I.lastValueFrom=I.isObservable=I.identity=I.noop=I.pipe=I.NotificationKind=I.Notification=I.Subscriber=I.Subscription=I.Scheduler=I.VirtualAction=I.VirtualTimeScheduler=I.animationFrameScheduler=I.animationFrame=I.queueScheduler=I.queue=I.asyncScheduler=I.async=I.asapScheduler=I.asap=I.AsyncSubject=I.ReplaySubject=I.BehaviorSubject=I.Subject=I.animationFrames=I.observable=I.ConnectableObservable=I.Observable=void 0,I.filter=I.expand=I.exhaustMap=I.exhaustAll=I.exhaust=I.every=I.endWith=I.elementAt=I.distinctUntilKeyChanged=I.distinctUntilChanged=I.distinct=I.dematerialize=I.delayWhen=I.delay=I.defaultIfEmpty=I.debounceTime=I.debounce=I.count=I.connect=I.concatWith=I.concatMapTo=I.concatMap=I.concatAll=I.combineLatestWith=I.combineLatestAll=I.combineAll=I.catchError=I.bufferWhen=I.bufferToggle=I.bufferTime=I.bufferCount=I.buffer=I.auditTime=I.audit=I.config=I.NEVER=I.EMPTY=I.scheduled=I.zip=I.using=I.timer=I.throwError=I.range=I.race=I.partition=I.pairs=I.onErrorResumeNext=I.of=I.never=I.merge=void 0,I.switchMap=I.switchAll=I.subscribeOn=I.startWith=I.skipWhile=I.skipUntil=I.skipLast=I.skip=I.single=I.shareReplay=I.share=I.sequenceEqual=I.scan=I.sampleTime=I.sample=I.refCount=I.retryWhen=I.retry=I.repeatWhen=I.repeat=I.reduce=I.raceWith=I.publishReplay=I.publishLast=I.publishBehavior=I.publish=I.pluck=I.pairwise=I.onErrorResumeNextWith=I.observeOn=I.multicast=I.min=I.mergeWith=I.mergeScan=I.mergeMapTo=I.mergeMap=I.flatMap=I.mergeAll=I.max=I.materialize=I.mapTo=I.map=I.last=I.isEmpty=I.ignoreElements=I.groupBy=I.first=I.findIndex=I.find=I.finalize=void 0,I.zipWith=I.zipAll=I.withLatestFrom=I.windowWhen=I.windowToggle=I.windowTime=I.windowCount=I.window=I.toArray=I.timestamp=I.timeoutWith=I.timeout=I.timeInterval=I.throwIfEmpty=I.throttleTime=I.throttle=I.tap=I.takeWhile=I.takeUntil=I.takeLast=I.take=I.switchScan=I.switchMapTo=void 0,jO=o,Object.defineProperty(I,"Observable",{enumerable:!0,get:function(){return jO.Observable}}),CO=hn,Object.defineProperty(I,"ConnectableObservable",{enumerable:!0,get:function(){return CO.ConnectableObservable}}),RO=ut,Object.defineProperty(I,"observable",{enumerable:!0,get:function(){return RO.observable}}),IO=n,Object.defineProperty(I,"animationFrames",{enumerable:!0,get:function(){return IO.animationFrames}}),AO=t,Object.defineProperty(I,"Subject",{enumerable:!0,get:function(){return AO.Subject}}),kO=v,Object.defineProperty(I,"BehaviorSubject",{enumerable:!0,get:function(){return kO.BehaviorSubject}}),MO=P,Object.defineProperty(I,"ReplaySubject",{enumerable:!0,get:function(){return MO.ReplaySubject}}),NO=s,Object.defineProperty(I,"AsyncSubject",{enumerable:!0,get:function(){return NO.AsyncSubject}}),xO=m,Object.defineProperty(I,"asap",{enumerable:!0,get:function(){return xO.asap}}),Object.defineProperty(I,"asapScheduler",{enumerable:!0,get:function(){return xO.asapScheduler}}),DO=w,Object.defineProperty(I,"async",{enumerable:!0,get:function(){return DO.async}}),Object.defineProperty(I,"asyncScheduler",{enumerable:!0,get:function(){return DO.asyncScheduler}}),UO=Ks,Object.defineProperty(I,"queue",{enumerable:!0,get:function(){return UO.queue}}),Object.defineProperty(I,"queueScheduler",{enumerable:!0,get:function(){return UO.queueScheduler}}),LO=oc,Object.defineProperty(I,"animationFrame",{enumerable:!0,get:function(){return LO.animationFrame}}),Object.defineProperty(I,"animationFrameScheduler",{enumerable:!0,get:function(){return LO.animationFrameScheduler}}),FO=sc,Object.defineProperty(I,"VirtualTimeScheduler",{enumerable:!0,get:function(){return FO.VirtualTimeScheduler}}),Object.defineProperty(I,"VirtualAction",{enumerable:!0,get:function(){return FO.VirtualAction}}),BO=Is,Object.defineProperty(I,"Scheduler",{enumerable:!0,get:function(){return BO.Scheduler}}),WO=Wr,Object.defineProperty(I,"Subscription",{enumerable:!0,get:function(){return WO.Subscription}}),qO=Xr,Object.defineProperty(I,"Subscriber",{enumerable:!0,get:function(){return qO.Subscriber}}),zO=C,Object.defineProperty(I,"Notification",{enumerable:!0,get:function(){return zO.Notification}}),Object.defineProperty(I,"NotificationKind",{enumerable:!0,get:function(){return zO.NotificationKind}}),VO=c,Object.defineProperty(I,"pipe",{enumerable:!0,get:function(){return VO.pipe}}),HO=b,Object.defineProperty(I,"noop",{enumerable:!0,get:function(){return HO.noop}}),GO=p,Object.defineProperty(I,"identity",{enumerable:!0,get:function(){return GO.identity}}),YO=Hc,Object.defineProperty(I,"isObservable",{enumerable:!0,get:function(){return YO.isObservable}}),KO=Lc,Object.defineProperty(I,"lastValueFrom",{enumerable:!0,get:function(){return KO.lastValueFrom}}),ZO=Wc,Object.defineProperty(I,"firstValueFrom",{enumerable:!0,get:function(){return ZO.firstValueFrom}}),QO=zc,Object.defineProperty(I,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return QO.ArgumentOutOfRangeError}}),XO=Dc,Object.defineProperty(I,"EmptyError",{enumerable:!0,get:function(){return XO.EmptyError}}),JO=zl,Object.defineProperty(I,"NotFoundError",{enumerable:!0,get:function(){return JO.NotFoundError}}),$O=f,Object.defineProperty(I,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return $O.ObjectUnsubscribedError}}),ew=Il,Object.defineProperty(I,"SequenceError",{enumerable:!0,get:function(){return ew.SequenceError}}),tw=Zc,Object.defineProperty(I,"TimeoutError",{enumerable:!0,get:function(){return tw.TimeoutError}}),rw=Et,Object.defineProperty(I,"UnsubscriptionError",{enumerable:!0,get:function(){return rw.UnsubscriptionError}}),nw=Vc,Object.defineProperty(I,"bindCallback",{enumerable:!0,get:function(){return nw.bindCallback}}),ow=Kf,Object.defineProperty(I,"bindNodeCallback",{enumerable:!0,get:function(){return ow.bindNodeCallback}}),iw=y,Object.defineProperty(I,"combineLatest",{enumerable:!0,get:function(){return iw.combineLatest}}),uw=dp,Object.defineProperty(I,"concat",{enumerable:!0,get:function(){return uw.concat}}),aw=kp,Object.defineProperty(I,"connectable",{enumerable:!0,get:function(){return aw.connectable}}),sw=Mp,Object.defineProperty(I,"defer",{enumerable:!0,get:function(){return sw.defer}}),cw=g,Object.defineProperty(I,"empty",{enumerable:!0,get:function(){return cw.empty}}),lw=Bp,Object.defineProperty(I,"forkJoin",{enumerable:!0,get:function(){return lw.forkJoin}}),fw=kc,Object.defineProperty(I,"from",{enumerable:!0,get:function(){return fw.from}}),pw=Qf,Object.defineProperty(I,"fromEvent",{enumerable:!0,get:function(){return pw.fromEvent}}),dw=tp,Object.defineProperty(I,"fromEventPattern",{enumerable:!0,get:function(){return dw.fromEventPattern}}),hw=xc,Object.defineProperty(I,"generate",{enumerable:!0,get:function(){return hw.generate}}),bw=Dl,Object.defineProperty(I,"iif",{enumerable:!0,get:function(){return bw.iif}}),yw=hd,Object.defineProperty(I,"interval",{enumerable:!0,get:function(){return yw.interval}}),_w=jc,Object.defineProperty(I,"merge",{enumerable:!0,get:function(){return _w.merge}}),vw=Cd,Object.defineProperty(I,"never",{enumerable:!0,get:function(){return vw.never}}),mw=h,Object.defineProperty(I,"of",{enumerable:!0,get:function(){return mw.of}}),gw=Rd,Object.defineProperty(I,"onErrorResumeNext",{enumerable:!0,get:function(){return gw.onErrorResumeNext}}),Ow=Ud,Object.defineProperty(I,"pairs",{enumerable:!0,get:function(){return Ow.pairs}}),ww=Fd,Object.defineProperty(I,"partition",{enumerable:!0,get:function(){return ww.partition}}),Ew=Yd,Object.defineProperty(I,"race",{enumerable:!0,get:function(){return Ew.race}}),Pw=$d,Object.defineProperty(I,"range",{enumerable:!0,get:function(){return Pw.range}}),Sw=Nc,Object.defineProperty(I,"throwError",{enumerable:!0,get:function(){return Sw.throwError}}),Tw=bd,Object.defineProperty(I,"timer",{enumerable:!0,get:function(){return Tw.timer}}),jw=rh,Object.defineProperty(I,"using",{enumerable:!0,get:function(){return jw.using}}),Cw=uh,Object.defineProperty(I,"zip",{enumerable:!0,get:function(){return Cw.zip}}),Rw=Mc,Object.defineProperty(I,"scheduled",{enumerable:!0,get:function(){return Rw.scheduled}}),Iw=g,Object.defineProperty(I,"EMPTY",{enumerable:!0,get:function(){return Iw.EMPTY}}),Aw=Cd,Object.defineProperty(I,"NEVER",{enumerable:!0,get:function(){return Aw.NEVER}}),S(bh,I),kw=qt,Object.defineProperty(I,"config",{enumerable:!0,get:function(){return kw.config}}),Mw=yh,Object.defineProperty(I,"audit",{enumerable:!0,get:function(){return Mw.audit}}),Nw=gh,Object.defineProperty(I,"auditTime",{enumerable:!0,get:function(){return Nw.auditTime}}),xw=Ph,Object.defineProperty(I,"buffer",{enumerable:!0,get:function(){return xw.buffer}}),Dw=Rh,Object.defineProperty(I,"bufferCount",{enumerable:!0,get:function(){return Dw.bufferCount}}),Uw=Nh,Object.defineProperty(I,"bufferTime",{enumerable:!0,get:function(){return Uw.bufferTime}}),Lw=zh,Object.defineProperty(I,"bufferToggle",{enumerable:!0,get:function(){return Lw.bufferToggle}}),Fw=Xh,Object.defineProperty(I,"bufferWhen",{enumerable:!0,get:function(){return Fw.bufferWhen}}),Bw=rb,Object.defineProperty(I,"catchError",{enumerable:!0,get:function(){return Bw.catchError}}),Ww=ub,Object.defineProperty(I,"combineAll",{enumerable:!0,get:function(){return Ww.combineAll}}),qw=ab,Object.defineProperty(I,"combineLatestAll",{enumerable:!0,get:function(){return qw.combineLatestAll}}),zw=Pb,Object.defineProperty(I,"combineLatestWith",{enumerable:!0,get:function(){return zw.combineLatestWith}}),Vw=hp,Object.defineProperty(I,"concatAll",{enumerable:!0,get:function(){return Vw.concatAll}}),Hw=Af,Object.defineProperty(I,"concatMap",{enumerable:!0,get:function(){return Hw.concatMap}}),Gw=Bb,Object.defineProperty(I,"concatMapTo",{enumerable:!0,get:function(){return Gw.concatMapTo}}),Yw=zb,Object.defineProperty(I,"concatWith",{enumerable:!0,get:function(){return Yw.concatWith}}),Kw=ey,Object.defineProperty(I,"connect",{enumerable:!0,get:function(){return Kw.connect}}),Zw=ty,Object.defineProperty(I,"count",{enumerable:!0,get:function(){return Zw.count}}),Qw=cy,Object.defineProperty(I,"debounce",{enumerable:!0,get:function(){return Qw.debounce}}),Xw=hy,Object.defineProperty(I,"debounceTime",{enumerable:!0,get:function(){return Xw.debounceTime}}),Jw=vy,Object.defineProperty(I,"defaultIfEmpty",{enumerable:!0,get:function(){return Jw.defaultIfEmpty}}),$w=A,Object.defineProperty(I,"delay",{enumerable:!0,get:function(){return $w.delay}}),eE=Oy,Object.defineProperty(I,"delayWhen",{enumerable:!0,get:function(){return eE.delayWhen}}),tE=Wy,Object.defineProperty(I,"dematerialize",{enumerable:!0,get:function(){return tE.dematerialize}}),rE=Hy,Object.defineProperty(I,"distinct",{enumerable:!0,get:function(){return rE.distinct}}),nE=Qy,Object.defineProperty(I,"distinctUntilChanged",{enumerable:!0,get:function(){return nE.distinctUntilChanged}}),oE=t_,Object.defineProperty(I,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return oE.distinctUntilKeyChanged}}),iE=n_,Object.defineProperty(I,"elementAt",{enumerable:!0,get:function(){return iE.elementAt}}),uE=h_,Object.defineProperty(I,"endWith",{enumerable:!0,get:function(){return uE.endWith}}),aE=m_,Object.defineProperty(I,"every",{enumerable:!0,get:function(){return aE.every}}),sE=w_,Object.defineProperty(I,"exhaust",{enumerable:!0,get:function(){return sE.exhaust}}),cE=E_,Object.defineProperty(I,"exhaustAll",{enumerable:!0,get:function(){return cE.exhaustAll}}),lE=P_,Object.defineProperty(I,"exhaustMap",{enumerable:!0,get:function(){return lE.exhaustMap}}),fE=A_,Object.defineProperty(I,"expand",{enumerable:!0,get:function(){return fE.expand}}),pE=Wd,Object.defineProperty(I,"filter",{enumerable:!0,get:function(){return pE.filter}}),dE=N_,Object.defineProperty(I,"finalize",{enumerable:!0,get:function(){return dE.finalize}}),hE=D_,Object.defineProperty(I,"find",{enumerable:!0,get:function(){return hE.find}}),bE=B_,Object.defineProperty(I,"findIndex",{enumerable:!0,get:function(){return bE.findIndex}}),yE=z_,Object.defineProperty(I,"first",{enumerable:!0,get:function(){return yE.first}}),_E=Q_,Object.defineProperty(I,"groupBy",{enumerable:!0,get:function(){return _E.groupBy}}),vE=Ty,Object.defineProperty(I,"ignoreElements",{enumerable:!0,get:function(){return vE.ignoreElements}}),mE=rv,Object.defineProperty(I,"isEmpty",{enumerable:!0,get:function(){return mE.isEmpty}}),gE=iv,Object.defineProperty(I,"last",{enumerable:!0,get:function(){return gE.last}}),OE=kf,Object.defineProperty(I,"map",{enumerable:!0,get:function(){return OE.map}}),wE=Iy,Object.defineProperty(I,"mapTo",{enumerable:!0,get:function(){return wE.mapTo}}),EE=_v,Object.defineProperty(I,"materialize",{enumerable:!0,get:function(){return EE.materialize}}),PE=Ov,Object.defineProperty(I,"max",{enumerable:!0,get:function(){return PE.max}}),SE=bp,Object.defineProperty(I,"mergeAll",{enumerable:!0,get:function(){return SE.mergeAll}}),TE=Pv,Object.defineProperty(I,"flatMap",{enumerable:!0,get:function(){return TE.flatMap}}),jE=yp,Object.defineProperty(I,"mergeMap",{enumerable:!0,get:function(){return jE.mergeMap}}),CE=Sv,Object.defineProperty(I,"mergeMapTo",{enumerable:!0,get:function(){return CE.mergeMapTo}}),RE=Cv,Object.defineProperty(I,"mergeScan",{enumerable:!0,get:function(){return RE.mergeScan}}),IE=_p,Object.defineProperty(I,"mergeWith",{enumerable:!0,get:function(){return IE.mergeWith}}),AE=Wv,Object.defineProperty(I,"min",{enumerable:!0,get:function(){return AE.min}}),kE=Vv,Object.defineProperty(I,"multicast",{enumerable:!0,get:function(){return kE.multicast}}),ME=O,Object.defineProperty(I,"observeOn",{enumerable:!0,get:function(){return ME.observeOn}}),NE=Kv,Object.defineProperty(I,"onErrorResumeNextWith",{enumerable:!0,get:function(){return NE.onErrorResumeNextWith}}),xE=em,Object.defineProperty(I,"pairwise",{enumerable:!0,get:function(){return xE.pairwise}}),DE=nm,Object.defineProperty(I,"pluck",{enumerable:!0,get:function(){return DE.pluck}}),UE=im,Object.defineProperty(I,"publish",{enumerable:!0,get:function(){return UE.publish}}),LE=cm,Object.defineProperty(I,"publishBehavior",{enumerable:!0,get:function(){return LE.publishBehavior}}),FE=pm,Object.defineProperty(I,"publishLast",{enumerable:!0,get:function(){return FE.publishLast}}),BE=bm,Object.defineProperty(I,"publishReplay",{enumerable:!0,get:function(){return BE.publishReplay}}),WE=mm,Object.defineProperty(I,"raceWith",{enumerable:!0,get:function(){return WE.raceWith}}),qE=cb,Object.defineProperty(I,"reduce",{enumerable:!0,get:function(){return qE.reduce}}),zE=Sm,Object.defineProperty(I,"repeat",{enumerable:!0,get:function(){return zE.repeat}}),VE=Am,Object.defineProperty(I,"repeatWhen",{enumerable:!0,get:function(){return VE.repeatWhen}}),HE=Dm,Object.defineProperty(I,"retry",{enumerable:!0,get:function(){return HE.retry}}),GE=qm,Object.defineProperty(I,"retryWhen",{enumerable:!0,get:function(){return GE.retryWhen}}),YE=j,Object.defineProperty(I,"refCount",{enumerable:!0,get:function(){return YE.refCount}}),KE=Ym,Object.defineProperty(I,"sample",{enumerable:!0,get:function(){return KE.sample}}),ZE=Jm,Object.defineProperty(I,"sampleTime",{enumerable:!0,get:function(){return ZE.sampleTime}}),QE=r0,Object.defineProperty(I,"scan",{enumerable:!0,get:function(){return QE.scan}}),XE=lb,Object.defineProperty(I,"sequenceEqual",{enumerable:!0,get:function(){return XE.sequenceEqual}}),JE=c0,Object.defineProperty(I,"share",{enumerable:!0,get:function(){return JE.share}}),$E=_0,Object.defineProperty(I,"shareReplay",{enumerable:!0,get:function(){return $E.shareReplay}}),eP=g0,Object.defineProperty(I,"single",{enumerable:!0,get:function(){return eP.single}}),tP=T0,Object.defineProperty(I,"skip",{enumerable:!0,get:function(){return tP.skip}}),rP=C0,Object.defineProperty(I,"skipLast",{enumerable:!0,get:function(){return rP.skipLast}}),nP=k0,Object.defineProperty(I,"skipUntil",{enumerable:!0,get:function(){return nP.skipUntil}}),oP=U0,Object.defineProperty(I,"skipWhile",{enumerable:!0,get:function(){return oP.skipWhile}}),iP=B0,Object.defineProperty(I,"startWith",{enumerable:!0,get:function(){return iP.startWith}}),uP=Sl,Object.defineProperty(I,"subscribeOn",{enumerable:!0,get:function(){return uP.subscribeOn}}),aP=V0,Object.defineProperty(I,"switchAll",{enumerable:!0,get:function(){return aP.switchAll}}),sP=H0,Object.defineProperty(I,"switchMap",{enumerable:!0,get:function(){return sP.switchMap}}),cP=X0,Object.defineProperty(I,"switchMapTo",{enumerable:!0,get:function(){return cP.switchMapTo}}),lP=eg,Object.defineProperty(I,"switchScan",{enumerable:!0,get:function(){return lP.switchScan}}),fP=wy,Object.defineProperty(I,"take",{enumerable:!0,get:function(){return fP.take}}),pP=uv,Object.defineProperty(I,"takeLast",{enumerable:!0,get:function(){return pP.takeLast}}),dP=ng,Object.defineProperty(I,"takeUntil",{enumerable:!0,get:function(){return dP.takeUntil}}),hP=sg,Object.defineProperty(I,"takeWhile",{enumerable:!0,get:function(){return hP.takeWhile}}),bP=fg,Object.defineProperty(I,"tap",{enumerable:!0,get:function(){return bP.tap}}),yP=E,Object.defineProperty(I,"throttle",{enumerable:!0,get:function(){return yP.throttle}}),_P=mg,Object.defineProperty(I,"throttleTime",{enumerable:!0,get:function(){return _P.throttleTime}}),vP=o_,Object.defineProperty(I,"throwIfEmpty",{enumerable:!0,get:function(){return vP.throwIfEmpty}}),mP=Eg,Object.defineProperty(I,"timeInterval",{enumerable:!0,get:function(){return mP.timeInterval}}),gP=Zc,Object.defineProperty(I,"timeout",{enumerable:!0,get:function(){return gP.timeout}}),OP=Cg,Object.defineProperty(I,"timeoutWith",{enumerable:!0,get:function(){return OP.timeoutWith}}),wP=Nl,Object.defineProperty(I,"timestamp",{enumerable:!0,get:function(){return wP.timestamp}}),EP=sb,Object.defineProperty(I,"toArray",{enumerable:!0,get:function(){return EP.toArray}}),PP=u,Object.defineProperty(I,"window",{enumerable:!0,get:function(){return PP.window}}),SP=Fg,Object.defineProperty(I,"windowCount",{enumerable:!0,get:function(){return SP.windowCount}}),TP=Vg,Object.defineProperty(I,"windowTime",{enumerable:!0,get:function(){return TP.windowTime}}),jP=Ol,Object.defineProperty(I,"windowToggle",{enumerable:!0,get:function(){return jP.windowToggle}}),CP=_,Object.defineProperty(I,"windowWhen",{enumerable:!0,get:function(){return CP.windowWhen}}),RP=fO,Object.defineProperty(I,"withLatestFrom",{enumerable:!0,get:function(){return RP.withLatestFrom}}),IP=T,Object.defineProperty(I,"zipAll",{enumerable:!0,get:function(){return IP.zipAll}}),AP=R,Object.defineProperty(I,"zipWith",{enumerable:!0,get:function(){return AP.zipWith}});var o={},hn={},xP=(Object.defineProperty(hn,"__esModule",{value:!0}),hn.partition=void 0,Bd),DP=Wd;hn.partition=function(t,r){return function(e){return[DP.filter(t,r)(e),DP.filter(xP.not(t,r))(e)]}};var UP,LP,FP,BP,WP,qP,zP,VP,HP,GP,YP,KP,ZP,QP,XP,JP,$P,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,SS,TS,jS,CS,RS,IS,AS,kS,MS,NS,xS,DS,US,LS,FS,BS,WS,qS,zS,VS,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,S1,T1,j1,C1,R1,I1,A1,k1,M1,N1,x1,D1,U1,L1,F1,B1,W1,ut={},q1=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},z1=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},V1=(Object.defineProperty(ut,"__esModule",{value:!0}),ut.race=void 0,Id),H1=mm;ut.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return H1.raceWith.apply(void 0,z1([],q1(V1.argsOrArgArray(e))))},n=o,Object.defineProperty(n,"__esModule",{value:!0}),n.mergeAll=n.merge=n.max=n.materialize=n.mapTo=n.map=n.last=n.isEmpty=n.ignoreElements=n.groupBy=n.first=n.findIndex=n.find=n.finalize=n.filter=n.expand=n.exhaustMap=n.exhaustAll=n.exhaust=n.every=n.endWith=n.elementAt=n.distinctUntilKeyChanged=n.distinctUntilChanged=n.distinct=n.dematerialize=n.delayWhen=n.delay=n.defaultIfEmpty=n.debounceTime=n.debounce=n.count=n.connect=n.concatWith=n.concatMapTo=n.concatMap=n.concatAll=n.concat=n.combineLatestWith=n.combineLatest=n.combineLatestAll=n.combineAll=n.catchError=n.bufferWhen=n.bufferToggle=n.bufferTime=n.bufferCount=n.buffer=n.auditTime=n.audit=void 0,n.timeInterval=n.throwIfEmpty=n.throttleTime=n.throttle=n.tap=n.takeWhile=n.takeUntil=n.takeLast=n.take=n.switchScan=n.switchMapTo=n.switchMap=n.switchAll=n.subscribeOn=n.startWith=n.skipWhile=n.skipUntil=n.skipLast=n.skip=n.single=n.shareReplay=n.share=n.sequenceEqual=n.scan=n.sampleTime=n.sample=n.refCount=n.retryWhen=n.retry=n.repeatWhen=n.repeat=n.reduce=n.raceWith=n.race=n.publishReplay=n.publishLast=n.publishBehavior=n.publish=n.pluck=n.partition=n.pairwise=n.onErrorResumeNext=n.observeOn=n.multicast=n.min=n.mergeWith=n.mergeScan=n.mergeMapTo=n.mergeMap=n.flatMap=void 0,n.zipWith=n.zipAll=n.zip=n.withLatestFrom=n.windowWhen=n.windowToggle=n.windowTime=n.windowCount=n.window=n.toArray=n.timestamp=n.timeoutWith=n.timeout=void 0,UP=yh,Object.defineProperty(n,"audit",{enumerable:!0,get:function(){return UP.audit}}),LP=gh,Object.defineProperty(n,"auditTime",{enumerable:!0,get:function(){return LP.auditTime}}),FP=Ph,Object.defineProperty(n,"buffer",{enumerable:!0,get:function(){return FP.buffer}}),BP=Rh,Object.defineProperty(n,"bufferCount",{enumerable:!0,get:function(){return BP.bufferCount}}),WP=Nh,Object.defineProperty(n,"bufferTime",{enumerable:!0,get:function(){return WP.bufferTime}}),qP=zh,Object.defineProperty(n,"bufferToggle",{enumerable:!0,get:function(){return qP.bufferToggle}}),zP=Xh,Object.defineProperty(n,"bufferWhen",{enumerable:!0,get:function(){return zP.bufferWhen}}),VP=rb,Object.defineProperty(n,"catchError",{enumerable:!0,get:function(){return VP.catchError}}),HP=ub,Object.defineProperty(n,"combineAll",{enumerable:!0,get:function(){return HP.combineAll}}),GP=ab,Object.defineProperty(n,"combineLatestAll",{enumerable:!0,get:function(){return GP.combineLatestAll}}),YP=Sb,Object.defineProperty(n,"combineLatest",{enumerable:!0,get:function(){return YP.combineLatest}}),KP=Pb,Object.defineProperty(n,"combineLatestWith",{enumerable:!0,get:function(){return KP.combineLatestWith}}),ZP=Vb,Object.defineProperty(n,"concat",{enumerable:!0,get:function(){return ZP.concat}}),QP=hp,Object.defineProperty(n,"concatAll",{enumerable:!0,get:function(){return QP.concatAll}}),XP=Af,Object.defineProperty(n,"concatMap",{enumerable:!0,get:function(){return XP.concatMap}}),JP=Bb,Object.defineProperty(n,"concatMapTo",{enumerable:!0,get:function(){return JP.concatMapTo}}),$P=zb,Object.defineProperty(n,"concatWith",{enumerable:!0,get:function(){return $P.concatWith}}),eS=ey,Object.defineProperty(n,"connect",{enumerable:!0,get:function(){return eS.connect}}),tS=ty,Object.defineProperty(n,"count",{enumerable:!0,get:function(){return tS.count}}),rS=cy,Object.defineProperty(n,"debounce",{enumerable:!0,get:function(){return rS.debounce}}),nS=hy,Object.defineProperty(n,"debounceTime",{enumerable:!0,get:function(){return nS.debounceTime}}),oS=vy,Object.defineProperty(n,"defaultIfEmpty",{enumerable:!0,get:function(){return oS.defaultIfEmpty}}),iS=A,Object.defineProperty(n,"delay",{enumerable:!0,get:function(){return iS.delay}}),uS=Oy,Object.defineProperty(n,"delayWhen",{enumerable:!0,get:function(){return uS.delayWhen}}),aS=Wy,Object.defineProperty(n,"dematerialize",{enumerable:!0,get:function(){return aS.dematerialize}}),sS=Hy,Object.defineProperty(n,"distinct",{enumerable:!0,get:function(){return sS.distinct}}),cS=Qy,Object.defineProperty(n,"distinctUntilChanged",{enumerable:!0,get:function(){return cS.distinctUntilChanged}}),lS=t_,Object.defineProperty(n,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return lS.distinctUntilKeyChanged}}),fS=n_,Object.defineProperty(n,"elementAt",{enumerable:!0,get:function(){return fS.elementAt}}),pS=h_,Object.defineProperty(n,"endWith",{enumerable:!0,get:function(){return pS.endWith}}),dS=m_,Object.defineProperty(n,"every",{enumerable:!0,get:function(){return dS.every}}),hS=w_,Object.defineProperty(n,"exhaust",{enumerable:!0,get:function(){return hS.exhaust}}),bS=E_,Object.defineProperty(n,"exhaustAll",{enumerable:!0,get:function(){return bS.exhaustAll}}),yS=P_,Object.defineProperty(n,"exhaustMap",{enumerable:!0,get:function(){return yS.exhaustMap}}),_S=A_,Object.defineProperty(n,"expand",{enumerable:!0,get:function(){return _S.expand}}),vS=Wd,Object.defineProperty(n,"filter",{enumerable:!0,get:function(){return vS.filter}}),mS=N_,Object.defineProperty(n,"finalize",{enumerable:!0,get:function(){return mS.finalize}}),gS=D_,Object.defineProperty(n,"find",{enumerable:!0,get:function(){return gS.find}}),OS=B_,Object.defineProperty(n,"findIndex",{enumerable:!0,get:function(){return OS.findIndex}}),wS=z_,Object.defineProperty(n,"first",{enumerable:!0,get:function(){return wS.first}}),ES=Q_,Object.defineProperty(n,"groupBy",{enumerable:!0,get:function(){return ES.groupBy}}),PS=Ty,Object.defineProperty(n,"ignoreElements",{enumerable:!0,get:function(){return PS.ignoreElements}}),SS=rv,Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return SS.isEmpty}}),TS=iv,Object.defineProperty(n,"last",{enumerable:!0,get:function(){return TS.last}}),jS=kf,Object.defineProperty(n,"map",{enumerable:!0,get:function(){return jS.map}}),CS=Iy,Object.defineProperty(n,"mapTo",{enumerable:!0,get:function(){return CS.mapTo}}),RS=_v,Object.defineProperty(n,"materialize",{enumerable:!0,get:function(){return RS.materialize}}),IS=Ov,Object.defineProperty(n,"max",{enumerable:!0,get:function(){return IS.max}}),AS=Av,Object.defineProperty(n,"merge",{enumerable:!0,get:function(){return AS.merge}}),kS=bp,Object.defineProperty(n,"mergeAll",{enumerable:!0,get:function(){return kS.mergeAll}}),MS=Pv,Object.defineProperty(n,"flatMap",{enumerable:!0,get:function(){return MS.flatMap}}),NS=yp,Object.defineProperty(n,"mergeMap",{enumerable:!0,get:function(){return NS.mergeMap}}),xS=Sv,Object.defineProperty(n,"mergeMapTo",{enumerable:!0,get:function(){return xS.mergeMapTo}}),DS=Cv,Object.defineProperty(n,"mergeScan",{enumerable:!0,get:function(){return DS.mergeScan}}),US=_p,Object.defineProperty(n,"mergeWith",{enumerable:!0,get:function(){return US.mergeWith}}),LS=Wv,Object.defineProperty(n,"min",{enumerable:!0,get:function(){return LS.min}}),FS=Vv,Object.defineProperty(n,"multicast",{enumerable:!0,get:function(){return FS.multicast}}),BS=O,Object.defineProperty(n,"observeOn",{enumerable:!0,get:function(){return BS.observeOn}}),WS=Kv,Object.defineProperty(n,"onErrorResumeNext",{enumerable:!0,get:function(){return WS.onErrorResumeNext}}),qS=em,Object.defineProperty(n,"pairwise",{enumerable:!0,get:function(){return qS.pairwise}}),zS=hn,Object.defineProperty(n,"partition",{enumerable:!0,get:function(){return zS.partition}}),VS=nm,Object.defineProperty(n,"pluck",{enumerable:!0,get:function(){return VS.pluck}}),HS=im,Object.defineProperty(n,"publish",{enumerable:!0,get:function(){return HS.publish}}),GS=cm,Object.defineProperty(n,"publishBehavior",{enumerable:!0,get:function(){return GS.publishBehavior}}),YS=pm,Object.defineProperty(n,"publishLast",{enumerable:!0,get:function(){return YS.publishLast}}),KS=bm,Object.defineProperty(n,"publishReplay",{enumerable:!0,get:function(){return KS.publishReplay}}),ZS=ut,Object.defineProperty(n,"race",{enumerable:!0,get:function(){return ZS.race}}),QS=mm,Object.defineProperty(n,"raceWith",{enumerable:!0,get:function(){return QS.raceWith}}),XS=cb,Object.defineProperty(n,"reduce",{enumerable:!0,get:function(){return XS.reduce}}),JS=Sm,Object.defineProperty(n,"repeat",{enumerable:!0,get:function(){return JS.repeat}}),$S=Am,Object.defineProperty(n,"repeatWhen",{enumerable:!0,get:function(){return $S.repeatWhen}}),e1=Dm,Object.defineProperty(n,"retry",{enumerable:!0,get:function(){return e1.retry}}),t1=qm,Object.defineProperty(n,"retryWhen",{enumerable:!0,get:function(){return t1.retryWhen}}),r1=j,Object.defineProperty(n,"refCount",{enumerable:!0,get:function(){return r1.refCount}}),n1=Ym,Object.defineProperty(n,"sample",{enumerable:!0,get:function(){return n1.sample}}),o1=Jm,Object.defineProperty(n,"sampleTime",{enumerable:!0,get:function(){return o1.sampleTime}}),i1=r0,Object.defineProperty(n,"scan",{enumerable:!0,get:function(){return i1.scan}}),u1=lb,Object.defineProperty(n,"sequenceEqual",{enumerable:!0,get:function(){return u1.sequenceEqual}}),a1=c0,Object.defineProperty(n,"share",{enumerable:!0,get:function(){return a1.share}}),s1=_0,Object.defineProperty(n,"shareReplay",{enumerable:!0,get:function(){return s1.shareReplay}}),c1=g0,Object.defineProperty(n,"single",{enumerable:!0,get:function(){return c1.single}}),l1=T0,Object.defineProperty(n,"skip",{enumerable:!0,get:function(){return l1.skip}}),f1=C0,Object.defineProperty(n,"skipLast",{enumerable:!0,get:function(){return f1.skipLast}}),p1=k0,Object.defineProperty(n,"skipUntil",{enumerable:!0,get:function(){return p1.skipUntil}}),d1=U0,Object.defineProperty(n,"skipWhile",{enumerable:!0,get:function(){return d1.skipWhile}}),h1=B0,Object.defineProperty(n,"startWith",{enumerable:!0,get:function(){return h1.startWith}}),b1=Sl,Object.defineProperty(n,"subscribeOn",{enumerable:!0,get:function(){return b1.subscribeOn}}),y1=V0,Object.defineProperty(n,"switchAll",{enumerable:!0,get:function(){return y1.switchAll}}),_1=H0,Object.defineProperty(n,"switchMap",{enumerable:!0,get:function(){return _1.switchMap}}),v1=X0,Object.defineProperty(n,"switchMapTo",{enumerable:!0,get:function(){return v1.switchMapTo}}),m1=eg,Object.defineProperty(n,"switchScan",{enumerable:!0,get:function(){return m1.switchScan}}),g1=wy,Object.defineProperty(n,"take",{enumerable:!0,get:function(){return g1.take}}),O1=uv,Object.defineProperty(n,"takeLast",{enumerable:!0,get:function(){return O1.takeLast}}),w1=ng,Object.defineProperty(n,"takeUntil",{enumerable:!0,get:function(){return w1.takeUntil}}),E1=sg,Object.defineProperty(n,"takeWhile",{enumerable:!0,get:function(){return E1.takeWhile}}),P1=fg,Object.defineProperty(n,"tap",{enumerable:!0,get:function(){return P1.tap}}),S1=E,Object.defineProperty(n,"throttle",{enumerable:!0,get:function(){return S1.throttle}}),T1=mg,Object.defineProperty(n,"throttleTime",{enumerable:!0,get:function(){return T1.throttleTime}}),j1=o_,Object.defineProperty(n,"throwIfEmpty",{enumerable:!0,get:function(){return j1.throwIfEmpty}}),C1=Eg,Object.defineProperty(n,"timeInterval",{enumerable:!0,get:function(){return C1.timeInterval}}),R1=Zc,Object.defineProperty(n,"timeout",{enumerable:!0,get:function(){return R1.timeout}}),I1=Cg,Object.defineProperty(n,"timeoutWith",{enumerable:!0,get:function(){return I1.timeoutWith}}),A1=Nl,Object.defineProperty(n,"timestamp",{enumerable:!0,get:function(){return A1.timestamp}}),k1=sb,Object.defineProperty(n,"toArray",{enumerable:!0,get:function(){return k1.toArray}}),M1=u,Object.defineProperty(n,"window",{enumerable:!0,get:function(){return M1.window}}),N1=Fg,Object.defineProperty(n,"windowCount",{enumerable:!0,get:function(){return N1.windowCount}}),x1=Vg,Object.defineProperty(n,"windowTime",{enumerable:!0,get:function(){return x1.windowTime}}),D1=Ol,Object.defineProperty(n,"windowToggle",{enumerable:!0,get:function(){return D1.windowToggle}}),U1=_,Object.defineProperty(n,"windowWhen",{enumerable:!0,get:function(){return U1.windowWhen}}),L1=fO,Object.defineProperty(n,"withLatestFrom",{enumerable:!0,get:function(){return L1.withLatestFrom}}),F1=i,Object.defineProperty(n,"zip",{enumerable:!0,get:function(){return F1.zip}}),B1=T,Object.defineProperty(n,"zipAll",{enumerable:!0,get:function(){return B1.zipAll}}),W1=R,Object.defineProperty(n,"zipWith",{enumerable:!0,get:function(){return W1.zipWith}});var t={},G1=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())})},Y1=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},K1=(Object.defineProperty(t,"__esModule",{value:!0}),e),Z1=Y,Q1=o,X1=0,J1=1,$1=2;function eT(e,t){e=e.pipe((0,Q1.publishReplay)(1),(0,Q1.refCount)());this._result=e,this._keys=e.pipe((0,Q1.mergeMap)(function(e){return(0,Z1.from)(e.keys())}),(0,Q1.publishReplay)(1),(0,Q1.refCount)()),this._records=void 0,this._controls=new tT,this._summary=new Z1.ReplaySubject,this._state=t||X1}eT.prototype.keys=function(){return this._keys},eT.prototype.records=function(){var r=this,e=this._result.pipe((0,Q1.mergeMap)(function(t){return new Z1.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},eT.prototype.consume=function(){var r=this;return this._result.pipe((0,Q1.mergeMap)(function(t){return new Z1.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},eT.prototype.pause=function(){this._controls.pause()},eT.prototype.resume=function(){return this._controls.resume()},eT.prototype.push=function(){return this._controls.push()},eT.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<J1?(this._state=J1,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,K1.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},eT.prototype._toObservable=function(){var n=this;return new Z1.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new eT((t=e,new Z1.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},eT.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new tT);var a=new Z1.Subject,s=function(n){return G1(e,void 0,void 0,function(){var t,r;return Y1(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 G1(this,void 0,void 0,function(){return Y1(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 G1(t,void 0,void 0,function(){var t,r;return Y1(this,function(e){switch(e.label){case 0:return this._state=$1,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=$1,t._summary.error(e)}},this._controls),this._records)},t.default=eT;rT.prototype.pause=function(){this._paused=!0},Object.defineProperty(rT.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(rT.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),rT.prototype.resume=function(){return G1(this,void 0,void 0,function(){var t;return Y1(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]}})})},rT.prototype.push=function(){return G1(this,void 0,void 0,function(){return Y1(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(rT.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var tT=rT;function rT(e){void 0===e&&(e=function(){return G1(t,void 0,void 0,function(){return Y1(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var v={},P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},nT=(Object.defineProperty(v,"__esModule",{value:!0}),Y),oT=P(t);function iT(e){this._txc=e}P(e),iT.prototype.run=function(e,r){var n=this;return new oT.default(new nT.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},iT.prototype.commit=function(){var e=this;return new nT.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},iT.prototype.rollback=function(){var e=this;return new nT.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},iT.prototype.isOpen=function(){return this._txc.isOpen()},iT.prototype.close=function(){var e=this;return new nT.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},v.default=iT;s={},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function uT(e){e=e.run;this._run=e}Object.defineProperty(s,"__esModule",{value:!0}),m(t),m(v),uT.fromTransaction=function(e){return new uT({run:e.run.bind(e)})},uT.prototype.run=function(e,t){return this._run(e,t)},s.default=uT;var w={},aT=(Object.defineProperty(w,"__esModule",{value:!0}),e),sT=Y,cT=o,lT=(aT.internal.logger.Logger,aT.error.SERVICE_UNAVAILABLE);function fT(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=pT(void 0===t?3e4:t,3e4),this._initialDelay=pT(r,1e3),this._delayMultiplier=pT(n,2),this._delayJitter=pT(o,.2),this._logger=e}function pT(e,t){return e||0===e?e:t}fT.prototype.retry=function(e){var a=this;return e.pipe((0,cT.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,cT.mergeMap)(function(e){if(!(0,aT.isRetriableError)(e))return(0,sT.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,aT.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),lT)).seenErrors=n,(0,sT.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,sT.of)(1).pipe((0,cT.delay)(r))}))}))},fT.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},w.default=fT;var Ks=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dT=(Object.defineProperty(V,"__esModule",{value:!0}),Y),hT=o,bT=Ks(t),oc=e,yT=Ks(v),_T=Ks(s),vT=Ks(w),sc=oc.internal.constants,mT=sc.ACCESS_MODE_READ,gT=sc.ACCESS_MODE_WRITE,OT=sc.TELEMETRY_APIS,wT=oc.internal.txConfig.TxConfig;function ET(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 vT.default({maxRetryTimeout:e})}(r),this._log=e}ET.prototype.run=function(e,r,n){var o=this;return new bT.default(new dT.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},ET.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:OT.UNMANAGED_TRANSACTION})},ET.prototype.readTransaction=function(e,t){return this._runTransaction(mT,e,t)},ET.prototype.writeTransaction=function(e,t){return this._runTransaction(gT,e,t)},ET.prototype.executeRead=function(e,t){return this._executeInTransaction(mT,e,t)},ET.prototype.executeWrite=function(e,t){return this._executeInTransaction(gT,e,t)},ET.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new _T.default({run:e.run.bind(e)})})},ET.prototype.close=function(){var e=this;return new dT.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},ET.prototype[Symbol.asyncDispose]=function(){return this.close()},ET.prototype.lastBookmark=function(){return this.lastBookmarks()},ET.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},ET.prototype._beginTransaction=function(e,t,r){var n=this,o=wT.empty();return t&&(o=new wT(t,this._log)),new dT.Observable(function(t){try{n._session._beginTransaction(e,o,r).then(function(e){t.next(new yT.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},ET.prototype._runTransaction=function(e,r,t,n){var o=this,i=(void 0===n&&(n=function(e){return e}),wT.empty()),u=(t&&(i=new wT(t)),{apiTelemetryConfig:{api:OT.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}});return this._retryLogic.retry((0,dT.of)(1).pipe((0,hT.mergeMap)(function(){return o._beginTransaction(e,i,u.apiTelemetryConfig)}),(0,hT.mergeMap)(function(t){return(0,dT.defer)(function(){try{return r(n(t))}catch(e){return(0,dT.throwError)(function(){return e})}}).pipe((0,hT.catchError)(function(e){return t.rollback().pipe((0,hT.concatWith)((0,dT.throwError)(function(){return e})))}),(0,hT.concatWith)(t.commit()))})))},V.default=ET;var PT,ST,Is=r&&r.__extends||(PT=function(e,t){return(PT=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}PT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Wr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xr=(Object.defineProperty(L,"__esModule",{value:!0}),L.WRITE=L.READ=L.Driver=void 0,e),TT=Wr(V),jT=Xr.internal.constants.FETCH_ALL,C=Xr.driver.READ,CT=Xr.driver.WRITE,c=(L.READ=C,L.WRITE=CT,Is(RT,ST=Xr.Driver),RT.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 TT.default({session:this._newSession({defaultAccessMode:void 0===t?CT: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===jT)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(jT," 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})},RT);function RT(){return null!==ST&&ST.apply(this,arguments)||this}L.Driver=c,L.default=c;b={},Object.defineProperty(b,"__esModule",{value:!0}),b.default="5.28.2",p={},Hc={},Lc={};function IT(){}Object.defineProperty(Lc,"__esModule",{value:!0}),IT.prototype.selectReader=function(e){throw new Error("Abstract function")},IT.prototype.selectWriter=function(e){throw new Error("Abstract function")},Lc.default=IT;Wc={},zc={};function AT(e){this._offset=e||0}Object.defineProperty(zc,"__esModule",{value:!0}),AT.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},zc.default=AT;var kT,MT,Dc=r&&r.__extends||(kT=function(e,t){return(kT=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}kT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),zl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},NT=(Object.defineProperty(Wc,"__esModule",{value:!0}),zl(zc)),f=zl(Lc),Il=(MT=f.default,Dc(xT,MT),xT.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},xT.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},xT.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},xT);function xT(e){var t=MT.call(this)||this;return t._readersIndex=new NT.default,t._writersIndex=new NT.default,t._connectionPool=e,t}Wc.default=Il;Et=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.LeastConnectedLoadBalancingStrategy=Hc.LoadBalancingStrategy=void 0,Vc=Et(Lc),Hc.LoadBalancingStrategy=Vc.default,Kf=Et(Wc),Hc.LeastConnectedLoadBalancingStrategy=Kf.default,Hc.default=Kf.default,y={},dp={},kp={},Mp={},Bp={},kc={},Qf={},tp={byteLength:function(e){var e=qT(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};tp.toByteArray=function(e){var t,r,n=qT(e),o=n[0],n=n[1],i=new LT(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=UT[e.charCodeAt(r)]<<18|UT[e.charCodeAt(r+1)]<<12|UT[e.charCodeAt(r+2)]<<6|UT[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=UT[e.charCodeAt(r)]<<2|UT[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=UT[e.charCodeAt(r)]<<10|UT[e.charCodeAt(r+1)]<<4|UT[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},tp.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 DT[e>>18&63]+DT[e>>12&63]+DT[e>>6&63]+DT[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(DT[t>>2]+DT[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(DT[t>>10]+DT[t>>4&63]+DT[t<<2&63]+"="));return o.join("")};for(var DT=[],UT=[],LT="undefined"!=typeof Uint8Array?Uint8Array:Array,FT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",BT=0,WT=FT.length;BT<WT;++BT)DT[BT]=FT[BT],UT[FT.charCodeAt(BT)]=BT;function qT(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]}UT["-".charCodeAt(0)]=62,UT["_".charCodeAt(0)]=63;xc={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 zT=Qf;const bD=tp,yD=xc,_D=(Dl="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,zT.Buffer=k,zT.SlowBuffer=function(e){+e!=e&&(e=0);return k.alloc(+e)},zT.INSPECT_MAX_BYTES=50,2147483647);function VT(e){if(e>_D)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 HT(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return YT(e)}function HT(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|XT(n,o);let e=VT(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return gj(o=t,Uint8Array)?ZT((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):KT(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(gj(t,ArrayBuffer)||t&&gj(t.buffer,ArrayBuffer))return ZT(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(gj(t,SharedArrayBuffer)||t&&gj(t.buffer,SharedArrayBuffer)))return ZT(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|QT(e.length),0===(r=VT(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Oj(e.length)?VT(0):KT(e);if("Buffer"===e.type&&Array.isArray(e.data))return KT(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 GT(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 YT(e){return GT(e),VT(e<0?0:0|QT(e))}function KT(t){var r=t.length<0?0:0|QT(t.length);const n=VT(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function ZT(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 QT(e){if(e>=_D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_D.toString(16)+" bytes");return 0|e}function XT(e,t){if(k.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||gj(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 _j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return vj(e).length;default:if(o)return n?-1:_j(e).length;t=(""+t).toLowerCase(),o=!0}}function JT(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+=OD[o[e]];return t;return}case"utf8":case"utf-8":return oj(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?bD.fromByteArray(d):bD.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 $T(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function ej(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=Oj(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:tj(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):tj(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function tj(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 rj(e,t,r,n){return mj(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 nj(e,t,r,n){return mj(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 oj(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<=vD)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=vD));return e}}zT.kMaxLength=_D,(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=HT,Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(e,t,r){return t=t,r=r,GT(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?VT(e).fill(t,r):VT(e).fill(t):VT(e)},k.allocUnsafe=YT,k.allocUnsafeSlow=YT,k.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==k.prototype},k.compare=function(r,n){if(gj(r,Uint8Array)&&(r=k.from(r,r.offset,r.byteLength)),gj(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(gj(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=XT,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)$T(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)$T(this,e,e+3),$T(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)$T(this,e,e+7),$T(this,e+1,e+6),$T(this,e+2,e+5),$T(this,e+3,e+4);return this},k.prototype.toLocaleString=k.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?oj(this,0,e):JT.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=zT.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},Dl&&(k.prototype[Dl]=k.prototype.inspect),k.prototype.compare=function(e,t,r,n,o){if(gj(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 ej(this,e,t,r,!0)},k.prototype.lastIndexOf=function(e,t,r){return ej(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(Oj(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,mj(_j(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return rj(this,t,r,n);case"base64":return i=this,u=r,o=n,mj(vj(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nj(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 vD=4096;function ij(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 uj(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 aj(e,t,r,n,o){hj(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 sj(e,t,r,n,o){hj(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 cj(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 lj(e,t,r,n,o){return t=+t,r>>>=0,o||cj(e,0,r,4),yD.write(e,t,r,n,23,4),r+4}function fj(e,t,r,n,o){return t=+t,r>>>=0,o||cj(e,0,r,8),yD.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||ij(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||ij(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||ij(e,1,this.length),this[e]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(e,t){return e>>>=0,t||ij(e,2,this.length),this[e]|this[e+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(e,t){return e>>>=0,t||ij(e,2,this.length),this[e]<<8|this[e+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(e,t){return e>>>=0,t||ij(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||ij(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},k.prototype.readBigUInt64LE=wj(function(e){bj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||yj(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=wj(function(e){bj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||yj(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||ij(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||ij(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||ij(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},k.prototype.readInt16LE=function(e,t){e>>>=0,t||ij(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||ij(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||ij(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||ij(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},k.prototype.readBigInt64LE=wj(function(e){bj(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||yj(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=wj(function(e){bj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||yj(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||ij(e,4,this.length),yD.read(this,e,!0,23,4)},k.prototype.readFloatBE=function(e,t){return e>>>=0,t||ij(e,4,this.length),yD.read(this,e,!1,23,4)},k.prototype.readDoubleLE=function(e,t){return e>>>=0,t||ij(e,8,this.length),yD.read(this,e,!0,52,8)},k.prototype.readDoubleBE=function(e,t){return e>>>=0,t||ij(e,8,this.length),yD.read(this,e,!1,52,8)},k.prototype.writeUintLE=k.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||uj(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||uj(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||uj(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||uj(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||uj(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||uj(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||uj(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=wj(function(e,t=0){return aj(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=wj(function(e,t=0){return sj(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||uj(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||uj(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||uj(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||uj(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||uj(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||uj(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||uj(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=wj(function(e,t=0){return aj(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=wj(function(e,t=0){return sj(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeFloatLE=function(e,t,r){return lj(this,e,t,!0,r)},k.prototype.writeFloatBE=function(e,t,r){return lj(this,e,t,!1,r)},k.prototype.writeDoubleLE=function(e,t,r){return fj(this,e,t,!0,r)},k.prototype.writeDoubleBE=function(e,t,r){return fj(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 mD={};function pj(e,t,r){mD[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 dj(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 hj(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 mD.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,bj(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||yj(u,r.length-(n+1))}function bj(e,t){if("number"!=typeof e)throw new mD.ERR_INVALID_ARG_TYPE(t,"number",e)}function yj(e,t,r){if(Math.floor(e)!==e)throw bj(e,r),new mD.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new mD.ERR_BUFFER_OUT_OF_BOUNDS;throw new mD.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}pj("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),pj("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),pj("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=dj(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=dj(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const gD=/[^+/0-9A-Za-z-_]/g;function _j(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 vj(e){return bD.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(gD,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function mj(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 gj(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Oj(e){return e!=e}const OD=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 wj(e){return"undefined"==typeof BigInt?Ej:e}function Ej(){throw new Error("BigInt not supported")}}var Pj,hd={},jc={},h=r&&r.__extends||(Pj=function(e,t){return(Pj=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}Pj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Rd=(Object.defineProperty(jc,"__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 Tj(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}jc.default=Rd;h(jj,Sj=Rd),jj.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},jj.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},jj.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},jj.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},jj.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},jj.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var Sj,Tj=jj;function jj(e,t,r){t=Sj.call(this,t)||this;return t._start=e,t._inner=r,t}var Cj,Rj,Ud=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fd=(Object.defineProperty(hd,"__esModule",{value:!0}),hd.BaseBuffer=void 0,Ud(jc)),Yd=(hd.BaseBuffer=Fd.default,hd.default=Fd.default,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)})),$d=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ij=(Object.defineProperty(kc,"__esModule",{value:!0}),kc.alloc=void 0,$d(Qf)),Nc=$d(hd),Aj=(Rj=Nc.default,Yd(kj,Rj),kj.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},kj.prototype.getInt8=function(e){return this._buffer.readInt8(e)},kj.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},kj.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}},kj.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},kj.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},kj.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},kj.prototype.putBytes=function(e,t){var r;t instanceof kj?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):Rj.prototype.putBytes.call(this,e,t)},kj.prototype.getSlice=function(e,t){return new kj(this._buffer.slice(e,e+t))},kj);function kj(e){var t=this,e=(e=e)instanceof Ij.default.Buffer?e:"number"==typeof e&&"function"==typeof Ij.default.Buffer.alloc?Ij.default.Buffer.alloc(e):new Ij.default.Buffer(e);return(t=Rj.call(this,e.length)||this)._buffer=e,t}kc.default=Aj,kc.alloc=function(e){return new Aj(e)};var bd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Mj=(Object.defineProperty(Bp,"__esModule",{value:!0}),bd(kc)),Nj=e,rh=Nj.internal.util,xj=rh.ENCRYPTION_OFF,Dj=rh.ENCRYPTION_ON;function Uj(e,t,r){void 0===t&&(t=Lj),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===Dj}(e),n=function(e){return!1===e.encrypted||e.encrypted===xj}(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,Nj.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:"'+xj+'"` 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 Mj.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function Lj(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}Uj.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,Nj.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,Nj.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))},Uj.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof Mj.default))throw(0,Nj.newError)("Don't know how to send buffer: "+e);try{this._ws.send(e._buffer)}catch(e){if(1===this._ws.readyState)throw(0,Nj.newError)("unexpected failure to write.",void 0,e);this._handleConnectionError()}}},Uj.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},Uj.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},Uj.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},Uj.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},Uj.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,Nj.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))},Uj.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},Uj.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},Bp.default=Uj;var Fj,uh={},Mc=r&&r.__extends||(Fj=function(e,t){return(Fj=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}Fj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(uh,"__esModule",{value:!0});var Bj,g=e.internal.resolver.BaseHostNameResolver,Cd=(Mc(Wj,Bj=g),Wj.prototype.resolve=function(e){return this._resolveToItself(e)},Wj);function Wj(){return null!==Bj&&Bj.apply(this,arguments)||this}uh.default=Cd;var qj,S={},zj=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())})},Vj=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},bh=(Object.defineProperty(S,"__esModule",{value:!0}),S.default={load:function(t){return zj(this,void 0,void 0,function(){return Vj(this,function(e){return[2,t]})})}},r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}}),qt=(Object.defineProperty(Mp,"__esModule",{value:!0}),Mp.ClientCertificatesLoader=Mp.HostNameResolver=Mp.Channel=void 0,bh(Bp)),I=bh(uh),Bd=bh(S),Id=(Mp.Channel=qt.default,Mp.HostNameResolver=I.default,Mp.ClientCertificatesLoader=Bd.default,{}),yh={},gh=r&&r.__extends||(qj=function(e,t){return(qj=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}qj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(yh,"__esModule",{value:!0});var Hj,Gj=kc,Ph=(Hj=hd.BaseBuffer,gh(Yj,Hj),Yj.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}},Yj.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}},Yj.prototype.getFloat64=function(e){for(var t=(0,Gj.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},Yj);function Yj(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=Hj.call(this,r)||this)._buffers=e,t}yh.default=Ph;var Kj,Zj,Rh=r&&r.__extends||(Kj=function(e,t){return(Kj=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}Kj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Nh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zh=(Object.defineProperty(Id,"__esModule",{value:!0}),Id.Dechunker=Id.Chunker=void 0,Nh(jc)),Qj=kc,Xj=Nh(yh),Xh=(Zj=zh.default,Rh(Jj,Zj),Jj.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},Jj.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},Jj.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},Jj.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},Jj.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,Qj.alloc)(this._bufferSize),this._chunkOpen=!1),this},Jj.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},Jj.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)},Jj.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},Jj);function Jj(e,t){var r=Zj.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,Qj.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function $j(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}Id.Chunker=Xh,$j.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},$j.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},$j.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)},$j.prototype.CLOSED=function(e){},$j.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 Xj.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},$j.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},Id.Dechunker=$j;var rb={},eC=(Object.defineProperty(rb,"__esModule",{value:!0}),e),ub=eC.internal.util,ab=ub.ENCRYPTION_OFF,Sb=ub.ENCRYPTION_ON,tC=eC.error.SERVICE_UNAVAILABLE,rC=[null,void 0,!0,!1,Sb,ab],nC=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];rb.default=function(e,t,r,n){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==rC.indexOf(e))return e;throw(0,eC.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(rC))}(t),this.trust=function(e){e=e.trust;if(-1!==nC.indexOf(e))return e;throw(0,eC.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(nC))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||tC,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=n};var oC,iC,Pb={},Vb={},hp={exports:{}};function uC(e,t){for(var r in e)t[r]=e[r]}function aC(e,t,r){return iC(e,t,r)}Bb=(Af=hp).exports,(iC=(oC=Qf).Buffer).from&&iC.alloc&&iC.allocUnsafe&&iC.allocUnsafeSlow?Af.exports=oC:(uC(oC,Bb),Bb.Buffer=aC),aC.prototype=Object.create(iC.prototype),uC(iC,aC),aC.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return iC(e,t,r)},aC.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=iC(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},aC.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return iC(e)},aC.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return oC.SlowBuffer(e)};var sC=hp.exports.Buffer,cC=sC.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 lC(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||sC.isEncoding!==cC&&cC(e))return t||e;throw new Error("Unknown encoding: "+e)}function fC(e){var t;switch(this.encoding=lC(e),this.encoding){case"utf16le":this.text=hC,this.end=bC,t=4;break;case"utf8":this.fillLast=dC,t=4;break;case"base64":this.text=yC,this.end=_C,t=3;break;default:return this.write=vC,void(this.end=mC)}this.lastNeed=0,this.lastTotal=0,this.lastChar=sC.allocUnsafe(t)}function pC(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function dC(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 hC(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 bC(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 yC(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 _C(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function vC(e){return e.toString(this.encoding)}function mC(e){return e&&e.length?this.write(e):""}(Vb.StringDecoder=fC).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||""},fC.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},fC.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=pC(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=pC(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=pC(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)},fC.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 gC,OC,wC,EC,PC,zb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},SC=(Object.defineProperty(Pb,"__esModule",{value:!0}),zb(kc)),TC=e,jC=zb(Qf),CC=new Vb.StringDecoder("utf8");Pb.default={encode:function(e){return new SC.default((e=e,"function"==typeof jC.default.Buffer.from?jC.default.Buffer.from(e,"utf8"):new jC.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 CC.write(e._buffer)},r=function(){return CC.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,TC.newError)("Don't know how to decode strings from '".concat(e,"'"))}},ey=kp,gC=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]}),ty=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||gC(t,e,r)},OC=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(ey,"__esModule",{value:!0}),ey.utf8=ey.alloc=ey.ChannelConfig=void 0,ty(Mp,ey),ty(Id,ey),wC=rb,Object.defineProperty(ey,"ChannelConfig",{enumerable:!0,get:function(){return OC(wC).default}}),EC=kc,Object.defineProperty(ey,"alloc",{enumerable:!0,get:function(){return EC.alloc}}),PC=Pb,Object.defineProperty(ey,"utf8",{enumerable:!0,get:function(){return OC(PC).default}}),Object.defineProperty(dp,"__esModule",{value:!0});var RC=kp,IC=e,AC=["5.8","5.7","5.6","5.4","5.3","5.2","5.1","5.0","4.4","4.3","4.2","3.0"],kC=0;function MC(e,t){return{major:e,minor:t}}function NC(n,o){for(var e=o.readVarInt(),t=[],r=0;r<e;r++)var i=[o.readUInt8(),o.readUInt8(),o.readUInt8(),o.readUInt8()],t=t.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}(i));o.readVarInt();var u=kC,a=0,s=0;t.sort(function(e,t){return Number(e.major)!==Number(t.major)?Number(t.major)-Number(e.major):Number(t.minor)-Number(e.minor)});for(r=0;r<t.length;r++){var c=t[r];if(AC.includes(c.major+"."+c.minor)){a=c.major,s=c.minor;break}}return new Promise(function(e,t){try{var r=(0,RC.alloc)(5);r.writeInt32(s<<8|a),r.writeVarInt(u),n.write(r),e({protocolVersion:Number(a+"."+s),capabilites:u,consumeRemainingBuffer:function(e){o.hasRemaining()&&e(o.readSlice(o.remaining()))}})}catch(e){t(e)}})}function xC(){var e=[MC(255,1),[MC(5,8),MC(5,0)],[MC(4,4),MC(4,2)],MC(3,0)];if(4<e.length)throw(0,IC.newError)("It should not have more than 4 versions of the protocol");var o=(0,RC.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}dp.default=function(t,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){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw t.error("Handshake failed since server responded with HTTP."),(0,IC.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)");return Number(e[3]+"."+e[2])}(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(xC())})}(t,e).then(function(e){return 255.1===e.protocolVersion?NC(t,e.buffer):e})};var DC,cy={},hy={},vy={},A={},Oy={},Wy=r&&r.__extends||(DC=function(e,t){return(DC=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}DC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Hy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qy=(Object.defineProperty(Oy,"__esModule",{value:!0}),Hy(e),UC.ofRecord=function(e){return null===e?UC.ofNull():new HC(e)},UC.ofMessageResponse=function(e){return null===e?UC.ofNull():new FC(e)},UC.ofNull=function(){return new qC},Object.defineProperty(UC.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(UC.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(UC.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(UC.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),UC);function UC(){}Oy.default=Qy;Wy(BC,LC=Qy),Object.defineProperty(BC.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(BC.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(BC.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(BC.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var LC,FC=BC;function BC(e){var t=LC.call(this)||this;return t._response=e,t}Wy(zC,WC=Qy),Object.defineProperty(zC.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var WC,qC=zC;function zC(){return null!==WC&&WC.apply(this,arguments)||this}Wy(GC,VC=Qy),Object.defineProperty(GC.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(GC.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(GC.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(GC.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var VC,HC=GC;function GC(e){var t=VC.call(this)||this;return t._record=e,t}var t_={},n_={},YC=(Object.defineProperty(n_,"__esModule",{value:!0}),n_.reuseOngoingRequest=n_.identity=void 0,e);n_.identity=function(e){return e},n_.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=YC.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)})}};var h_={},KC=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(h_,"__esModule",{value:!0}),h_.equals=void 0,h_.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=KC(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 ZC,QC=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]}),XC=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&QC(t,e,r);return XC(t,e),t},w_=(Object.defineProperty(t_,"__esModule",{value:!0}),t_.object=t_.functional=void 0,t_.functional=m_(n_),t_.object=m_(h_),r&&r.__extends||(ZC=function(e,t){return(ZC=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}ZC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),E_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},JC=(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),$C=E_(Oy),eR=t_,tR=JC.internal.constants.FETCH_ALL,rR=JC.error.PROTOCOL_ERROR,P_=(nR.prototype.onNext=function(e){},nR.prototype.onError=function(e){},nR.prototype.onCompleted=function(e){},nR);function nR(){}A.StreamObserver=P_;w_(iR,oR=P_),iR.prototype.pause=function(){this._paused=!0},iR.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},iR.prototype.onNext=function(e){this._haveRecordStreamed=!0;var t=new JC.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))},iR.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},iR.prototype.onError=function(e){this._state.onError(this,e)},iR.prototype.cancel=function(){this._discard=!0},iR.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(wR.STREAMING)},iR.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(wR.SUCCEEDED)},iR.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===wR.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===wR.READY&&this._handleStreaming()},iR.prototype._handleHasMore=function(e){this._setState(wR.READY),this._handleStreaming(),delete e.has_more},iR.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(wR.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,JC.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),rR))},iR.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()}},iR.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(wR.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},iR.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},iR.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):(this._pulled=!0,this._moreFunction(this._queryId,this._fetchSize,this)),this._setState(wR.STREAMING)},iR.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},iR.prototype._setState=function(e){this._state=e},iR.prototype._setupAutoPull=function(){this._autoPull=!0};var oR,A_=iR;function iR(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?tR: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=oR.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||eR.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?wR.READY:wR.READY_STREAMING),b._setupAutoPull(),b._paused=!1,b._pulled=!t,b._haveRecordStreamed=!1,b._onDb=e,b}A.ResultStreamObserver=A_;w_(aR,uR=P_),aR.prototype.onNext=function(e){this.onError((0,JC.newError)("Received RECORD when initializing "+JC.json.stringify(e)))},aR.prototype.onError=function(e){this._onError&&this._onError(e)},aR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var uR,Wd=aR;function aR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=uR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.LoginObserver=Wd;w_(cR,sR=P_),cR.prototype.onNext=function(e){this.onError((0,JC.newError)("Received RECORD when logging off "+JC.json.stringify(e)))},cR.prototype.onError=function(e){this._onError&&this._onError(e)},cR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var sR,N_=cR;function cR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=sR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.LogoffObserver=N_;w_(fR,lR=P_),fR.prototype.onNext=function(e){this.onError((0,JC.newError)("Received RECORD when resetting: received record is: "+JC.json.stringify(e),rR))},fR.prototype.onError=function(e){e.code===rR&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},fR.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var lR,D_=fR;function fR(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=lR.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}A.ResetObserver=D_;w_(dR,pR=A_),dR.prototype.onNext=function(e){this.onError((0,JC.newError)("Received RECORD when sending telemetry "+JC.json.stringify(e),rR))},dR.prototype.onError=function(e){this._onError&&this._onError(e)},dR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var pR,B_=dR;function dR(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=pR.call(this)||this;return r._onError=t,r._onCompleted=e,r}A.TelemetryObserver=B_;w_(bR,hR=A_);var hR,z_=bR;function bR(e){var t=e.error,e=e.onError,e=hR.call(this,{beforeError:e})||this;return e.onError(t),e}A.FailedObserver=z_;w_(_R,yR=A_);var yR,Q_=_R;function _R(){var e=yR.call(this)||this;return yR.prototype.markCompleted.call(e),e}A.CompletedObserver=Q_;w_(mR,vR=P_),mR.prototype.onNext=function(e){this._records.push(e)},mR.prototype.onError=function(e){e.code===rR&&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,JC.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+JC.json.stringify(this._records),rR)):this._onCompleted&&this._onCompleted($C.default.ofRecord(this._records[0]))};var vR,Ty=mR;function mR(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=vR.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}A.ProcedureRouteObserver=Ty;w_(OR,gR=P_),OR.prototype.onNext=function(e){this.onError((0,JC.newError)("Received RECORD when resetting: received record is: "+JC.json.stringify(e),rR))},OR.prototype.onError=function(e){e.code===rR&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},OR.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted($C.default.ofMessageResponse(e))};var gR,rv=OR;function OR(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=gR.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}A.RouteObserver=rv;var wR={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(wR.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(){}}},ER=(Object.defineProperty(vy,"__esModule",{value:!0}),vy.assertNotificationFilterIsEmpty=vy.assertImpersonatedUserIsEmpty=vy.assertTxConfigIsEmpty=vy.assertDatabaseIsEmpty=void 0,e);vy.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,ER.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")).message),r.onError(e),e},vy.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,ER.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")).message),r.onError(e),e},vy.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,ER.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,"."))).message),r.onError(t),t},vy.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,ER.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(ER.json.stringify(e),"."))).message),r.onError(t),t};var iv={},kf={},Iy={},PR=(Object.defineProperty(Iy,"__esModule",{value:!0}),Iy.verifyStructSize=Iy.Structure=void 0,e),SR=PR.error.PROTOCOL_ERROR,_v=(Object.defineProperty(TR.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),TR.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+"])"},TR);function TR(e,t){this.signature=e,this.fields=t}Iy.Structure=_v,Iy.verifyStructSize=function(e,t,r){if(t!==r)throw(0,PR.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),SR)},Iy.default=_v,Object.defineProperty(kf,"__esModule",{value:!0}),kf.Unpacker=kf.Packer=void 0;var jR=kp,CR=t_,RR=Iy,IR=e,AR=IR.error.PROTOCOL_ERROR;function kR(e){this._ch=e,this._byteArraysSupported=!0}function MR(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}kR.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=CR.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,IR.int)(o))};if((0,IR.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 RR.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))},kR.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,IR.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},kR.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},kR.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))},kR.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},kR.prototype.packString=function(e){var e=jR.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,IR.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)}},kR.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,IR.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)}},kR.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,IR.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])},kR.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,IR.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)}},kR.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,IR.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)}},kR.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,IR.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},kR.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},kR.prototype._nonPackableValue=function(e){return function(){throw(0,IR.newError)(e,AR)}},kf.Packer=kR,MR.prototype.unpack=function(e,t){void 0===t&&(t=CR.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,IR.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,IR.newError)("Unknown packed value with marker "+r.toString(16))},MR.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,IR.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},MR.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},MR.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},MR.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,IR.int)(e):240<=e&&e<256?(0,IR.int)(e-256):200===e?(0,IR.int)(t.readInt8()):201===e?(0,IR.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,IR.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new IR.Integer(e,r)):null},MR.prototype._unpackString=function(e,t,r,n){return 128===t?jR.utf8.decode(n,r):208===e?jR.utf8.decode(n,n.readUInt8()):209===e?jR.utf8.decode(n,n.readUInt16()):210===e?jR.utf8.decode(n,n.readUInt32()):null},MR.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},MR.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},MR.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},MR.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},MR.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},MR.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},MR.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},MR.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new RR.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},kf.Unpacker=MR;var NR,xR,Ov={},Av=r&&r.__extends||(NR=function(e,t){return(NR=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}NR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),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]}),UR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),bp=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&DR(t,e,r);return UR(t,e),t},Pv=(Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.Unpacker=Ov.Packer=void 0,bp(kf)),yp=(xR=Pv.Packer,Av(LR,xR),LR.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},LR);function LR(){return null!==xR&&xR.apply(this,arguments)||this}Ov.Packer=yp;FR=Pv.Unpacker,Av(BR,FR);var FR,Sv=BR;function BR(e,t){return FR.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}Ov.Unpacker=Sv;var WR=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]}),qR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cv=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&WR(t,e,r);return qR(t,e),t},_p=(Object.defineProperty(iv,"__esModule",{value:!0}),iv.structure=iv.v2=iv.v1=void 0,Cv(kf)),Wv=(iv.v1=_p,Cv(Ov)),Vv=(iv.v2=Wv,Cv(Iy)),O=(iv.structure=Vv,iv.default=Wv,{}),zR=(Object.defineProperty(O,"__esModule",{value:!0}),O.SIGNATURES=void 0,e),Kv=zR.internal.constants,VR=Kv.ACCESS_MODE_READ,HR=Kv.FETCH_ALL,GR=zR.internal.util.assertString,em=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}),hn=(O.SIGNATURES=em,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(zR.json.stringify(t))})},N.pullAll=function(){return XR},N.reset=function(){return JR},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 ZR(n,t=void 0===t?null:t),r&&(n.routing=r),new N(1,[n],function(){return"HELLO ".concat(zR.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}),ZR(o,r),n&&(o.routing=n),new N(1,[o],function(){return"HELLO ".concat(zR.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}),QR(o,r),n&&(o.routing=n),new N(1,[o],function(){return"HELLO ".concat(zR.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=YR(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new N(17,[t],function(){return"BEGIN ".concat(zR.json.stringify(t))})},N.begin5x5=function(e){var e=void 0===e?{}:e,t=YR(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter,{appendNotificationFilter:QR});return new N(17,[t],function(){return"BEGIN ".concat(zR.json.stringify(t))})},N.commit=function(){return $R},N.rollback=function(){return eI},N.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=YR(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(zR.json.stringify(t)," ").concat(zR.json.stringify(n))})},N.runWithMetadata5x5=function(e,t,r){var r=void 0===r?{}:r,n=YR(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter,{appendNotificationFilter:QR});return new N(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(zR.json.stringify(t)," ").concat(zR.json.stringify(n))})},N.goodbye=function(){return tI},N.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=KR(null==t?-1:t,(void 0===e?HR:e)||HR);return new N(63,[r],function(){return"PULL ".concat(zR.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=KR(null==t?-1:t,(void 0===e?HR:e)||HR);return new N(47,[r],function(){return"DISCARD ".concat(zR.json.stringify(r))})},N.telemetry=function(e){var e=e.api,t=(0,zR.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(zR.json.stringify(e)," ").concat(zR.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(zR.json.stringify(e)," ").concat(zR.json.stringify(t)," ").concat(zR.json.stringify(n))})},N);function N(e,t,r){this.signature=e,this.fields=t,this.toString=r}function YR(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=GR(r,"database")),o&&(a.imp_user=GR(o,"impersonatedUser")),n===VR&&(a.mode="r"),(null!=(e=u.appendNotificationFilter)?e:ZR)(a,i),a}function KR(e,t){t={n:(0,zR.int)(t)};return-1!==e&&(t.qid=(0,zR.int)(e)),t}function ZR(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 QR(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 XR=new(O.default=hn)(63,[],function(){return"PULL_ALL"}),JR=new hn(15,[],function(){return"RESET"}),$R=new hn(18,[],function(){return"COMMIT"}),eI=new hn(19,[],function(){return"ROLLBACK"}),tI=new hn(2,[],function(){return"GOODBYE"}),nm={},im={},rI=(Object.defineProperty(im,"__esModule",{value:!0}),im.TypeTransformer=void 0,iv),nI=e.internal.objectUtil;function oI(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 iI(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)}oI.prototype.fromStructure=function(e){try{return e instanceof rI.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return nI.createBrokenObject(e)}},oI.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},im.default=oI,iI.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new iI({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},im.TypeTransformer=iI;var uI=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},aI=(Object.defineProperty(nm,"__esModule",{value:!0}),e),sI=iv,cI=im,lI=aI.error.PROTOCOL_ERROR;nm.default={createNodeTransformer:function(){return new cI.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof aI.Node},toStructure:function(e){throw(0,aI.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),lI)},fromStructure:function(e){sI.structure.verifyStructSize("Node",3,e.size);var e=uI(e.fields,3),t=e[0],r=e[1],e=e[2];return new aI.Node(t,r,e)}})},createRelationshipTransformer:function(){return new cI.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof aI.Relationship},toStructure:function(e){throw(0,aI.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),lI)},fromStructure:function(e){sI.structure.verifyStructSize("Relationship",5,e.size);var e=uI(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new aI.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new cI.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof aI.UnboundRelationship},toStructure:function(e){throw(0,aI.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),lI)},fromStructure:function(e){sI.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=uI(e.fields,3),t=e[0],r=e[1],e=e[2];return new aI.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new cI.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof aI.Path},toStructure:function(e){throw(0,aI.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),lI)},fromStructure:function(e){sI.structure.verifyStructSize("Path",3,e.size);for(var e=uI(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,aI.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof aI.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof aI.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new aI.PathSegment(i,c,a)),i=a}return new aI.Path(t[0],t[t.length-1],o)}})}};var fI=r&&r.__assign||function(){return(fI=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)},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]}),dI=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),cm=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&pI(t,e,r);return dI(t,e),t},pm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hI=(Object.defineProperty(hy,"__esModule",{value:!0}),vy),bI=iv,yI=cm(O),_I=A,vI=e,mI=pm(nm),gI=pm(im),OI=vI.internal.bookmarks.Bookmarks,bm=vI.internal.constants,wI=bm.ACCESS_MODE_WRITE,EI=bm.BOLT_PROTOCOL_V1,PI=(vI.internal.logger.Logger,vI.internal.txConfig.TxConfig),SI=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),ut=(Object.defineProperty(TI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new gI.default(Object.values(mI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(TI.prototype,"version",{get:function(){return EI},enumerable:!1,configurable:!0}),Object.defineProperty(TI.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(TI.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(TI.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),TI.prototype.packer=function(){return this._packer},TI.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},TI.prototype.unpacker=function(){return this._unpacker},TI.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},TI.prototype.transformMetadata=function(e){return e},TI.prototype.enrichErrorMetadata=function(e){return fI(fI({},e),{diagnostic_record:null!==e.diagnostic_record?fI(fI({},SI),e.diagnostic_record):null})},TI.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 _I.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,hI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(yI.default.init(r,n),e,!0),e},TI.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=(e.flush,new _I.LogoffObserver({onCompleted:t,onError:r})),t=(0,vI.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},TI.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 _I.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,vI.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},TI.prototype.prepareToClose=function(){},TI.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})},TI.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:OI.empty(),txConfig:PI.empty(),mode:wI,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},TI.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:OI.empty(),txConfig:PI.empty(),mode:wI,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},TI.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 _I.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,hI.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,hI.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,hI.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,hI.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(yI.default.run(e,t),a,!1),this.write(yI.default.pullAll(),a,d),a},Object.defineProperty(TI.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),TI.prototype.reset=function(e){var e=void 0===e?{}:e,t=e.onError,e=e.onComplete,t=new _I.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(yI.default.reset(),t,!0),t},TI.prototype.telemetry=function(e,t){e.api;e=void 0===t?{}:t,e.onError,t=e.onCompleted,e=new _I.CompletedObserver;return t&&t(),e},TI.prototype._createPacker=function(e){return new bI.v1.Packer(e)},TI.prototype._createUnpacker=function(e,t){return new bI.v1.Unpacker(e,t)},TI.prototype.write=function(e,t,r){this.queueObserverIfProtocolIsNotBroken(t)&&(this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._lastMessageSignature=e.signature,t=new bI.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},TI.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===yI.SIGNATURES.HELLO||this._lastMessageSignature===yI.SIGNATURES.LOGON},TI.prototype.isLastMessageReset=function(){return this._lastMessageSignature===yI.SIGNATURES.RESET},TI.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},TI.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},TI.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},TI.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},TI.prototype.isBroken=function(){return!!this._fatalError},TI.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},TI.prototype.resetFailure=function(){this._responseHandler._resetFailure()},TI.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)},TI.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},TI);function TI(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}}hy.default=ut;var mm={},cb={},Sm={},jI=(Object.defineProperty(Sm,"__esModule",{value:!0}),Sm.epochSecondAndNanoToLocalDateTime=Sm.nanoOfDayToLocalTime=Sm.epochDayToDate=void 0,e),Am=jI.internal.temporalUtil,CI=Am.DAYS_0000_TO_1970,RI=Am.DAYS_PER_400_YEAR_CYCLE,II=Am.NANOS_PER_HOUR,AI=Am.NANOS_PER_MINUTE,kI=Am.NANOS_PER_SECOND,MI=Am.SECONDS_PER_DAY,NI=Am.floorDiv,xI=Am.floorMod;function DI(e){var e=(e=(0,jI.int)(e)).add(CI).subtract(60),t=(0,jI.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(RI).subtract(1)).multiply(400),e=e.add(r.multiply(-RI))),e.multiply(400).add(591).div(RI)),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 jI.Date(r,n,e)}function UI(e){var t=(e=(0,jI.int)(e)).div(II),r=(e=e.subtract(t.multiply(II))).div(AI),n=(e=e.subtract(r.multiply(AI))).div(kI),e=e.subtract(n.multiply(kI));return new jI.LocalTime(t,r,n,e)}Sm.epochDayToDate=DI,Sm.nanoOfDayToLocalTime=UI,Sm.epochSecondAndNanoToLocalDateTime=function(e,t){var r=NI(e,MI),e=xI(e,MI).multiply(kI).add(t),t=DI(r),r=UI(e);return new jI.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var 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)},FI=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},Dm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},BI=(Object.defineProperty(cb,"__esModule",{value:!0}),e),WI=iv,qI=im,zI=Sm,qm=Dm(nm),j=BI.internal.temporalUtil,VI=j.dateToEpochDay,HI=j.localDateTimeToEpochSecond,GI=j.localTimeToNanoOfDay;function YI(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,BI.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}cb.default=LI(LI({},qm.default),{createPoint2DTransformer:function(){return new qI.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,BI.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new WI.structure.Structure(88,[(0,BI.int)(e.srid),e.x,e.y])},fromStructure:function(e){WI.structure.verifyStructSize("Point2D",3,e.size);var e=FI(e.fields,3),t=e[0],r=e[1],e=e[2];return new BI.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new qI.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,BI.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new WI.structure.Structure(89,[(0,BI.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){WI.structure.verifyStructSize("Point3D",4,e.size);var e=FI(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new BI.Point(t,r,n,e)}})},createDurationTransformer:function(){return new qI.TypeTransformer({signature:69,isTypeInstance:BI.isDuration,toStructure:function(e){var t=(0,BI.int)(e.months),r=(0,BI.int)(e.days),n=(0,BI.int)(e.seconds),e=(0,BI.int)(e.nanoseconds);return new WI.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){WI.structure.verifyStructSize("Duration",4,e.size);var e=FI(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new BI.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new qI.TypeTransformer({signature:116,isTypeInstance:BI.isLocalTime,toStructure:function(e){e=GI(e.hour,e.minute,e.second,e.nanosecond);return new WI.structure.Structure(116,[e])},fromStructure:function(e){WI.structure.verifyStructSize("LocalTime",1,e.size);e=FI(e.fields,1)[0];return YI((0,zI.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new qI.TypeTransformer({signature:84,isTypeInstance:BI.isTime,toStructure:function(e){var t=GI(e.hour,e.minute,e.second,e.nanosecond),e=(0,BI.int)(e.timeZoneOffsetSeconds);return new WI.structure.Structure(84,[t,e])},fromStructure:function(e){WI.structure.verifyStructSize("Time",2,e.size);var e=FI(e.fields,2),t=e[0],e=e[1],t=(0,zI.nanoOfDayToLocalTime)(t);return YI(new BI.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new qI.TypeTransformer({signature:68,isTypeInstance:BI.isDate,toStructure:function(e){e=VI(e.year,e.month,e.day);return new WI.structure.Structure(68,[e])},fromStructure:function(e){WI.structure.verifyStructSize("Date",1,e.size);e=FI(e.fields,1)[0];return YI((0,zI.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new qI.TypeTransformer({signature:100,isTypeInstance:BI.isLocalDateTime,toStructure:function(e){var t=HI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,BI.int)(e.nanosecond);return new WI.structure.Structure(100,[t,e])},fromStructure:function(e){WI.structure.verifyStructSize("LocalDateTime",2,e.size);var e=FI(e.fields,2),t=e[0],e=e[1];return YI((0,zI.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new qI.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,BI.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=HI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,BI.int)(e.nanosecond),e=e.timeZoneId;return new WI.structure.Structure(102,[t,r,e])},fromStructure:function(e){WI.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=FI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,zI.epochSecondAndNanoToLocalDateTime)(t,r);return YI(new BI.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 qI.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,BI.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=HI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,BI.int)(e.nanosecond),e=(0,BI.int)(e.timeZoneOffsetSeconds);return new WI.structure.Structure(70,[t,r,e])},fromStructure:function(e){WI.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=FI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,zI.epochSecondAndNanoToLocalDateTime)(t,r);return YI(new BI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var KI,ZI,Ym=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)}),Jm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},r0=(Object.defineProperty(mm,"__esModule",{value:!0}),Jm(hy)),QI=Jm(iv),lb=e,XI=Jm(cb),JI=Jm(im),$I=lb.internal.constants.BOLT_PROTOCOL_V2,c0=(ZI=r0.default,Ym(eA,ZI),eA.prototype._createPacker=function(e){return new QI.default.Packer(e)},eA.prototype._createUnpacker=function(e,t){return new QI.default.Unpacker(e,t)},Object.defineProperty(eA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new JI.default(Object.values(XI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(eA.prototype,"version",{get:function(){return $I},enumerable:!1,configurable:!0}),eA);function eA(){return null!==ZI&&ZI.apply(this,arguments)||this}mm.default=c0;var tA,rA,_0={},g0={},nA=r&&r.__assign||function(){return(nA=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)},T0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},C0=(Object.defineProperty(g0,"__esModule",{value:!0}),T0(cb)),k0=(g0.default=nA({},C0.default),r&&r.__extends||(tA=function(e,t){return(tA=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}tA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),oA=r&&r.__assign||function(){return(oA=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)},U0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},B0=(Object.defineProperty(_0,"__esModule",{value:!0}),U0(mm)),iA=U0(O),uA=vy,aA=A,sA=U0(g0),cA=U0(im),lA=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),fA=e.internal.txConfig.TxConfig,pA="context",dA="CALL dbms.cluster.routing.getRoutingTable($".concat(pA,")"),hA=new aA.StreamObserver,Sl=(rA=B0.default,k0(bA,rA),Object.defineProperty(bA.prototype,"version",{get:function(){return lA},enumerable:!1,configurable:!0}),Object.defineProperty(bA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new cA.default(Object.values(sA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),bA.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},bA.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 aA.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,uA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(iA.default.hello(r,n),e,!0),e},bA.prototype.prepareToClose=function(){this.write(iA.default.goodbye(),hA,!0)},bA.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 aA.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,uA.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,uA.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,uA.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(iA.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},bA.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new aA.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(iA.default.commit(),t,!0),t},bA.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new aA.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(iA.default.rollback(),t,!0),t},bA.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 aA.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,uA.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,uA.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,uA.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(iA.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(iA.default.pullAll(),c,b),c},bA.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(dA,((t={})[pA]=void 0===r?{}:r,t),oA(oA({},n),{txConfig:fA.empty()}));return new aA.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},bA);function bA(){return null!==rA&&rA.apply(this,arguments)||this}_0.default=Sl;var yA,_A,V0={},H0={},vA=r&&r.__assign||function(){return(vA=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)},X0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},eg=(Object.defineProperty(H0,"__esModule",{value:!0}),X0(g0)),wy=(H0.default=vA({},eg.default),r&&r.__extends||(yA=function(e,t){return(yA=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}yA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),mA=r&&r.__assign||function(){return(mA=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)},uv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ng=(Object.defineProperty(V0,"__esModule",{value:!0}),uv(_0)),gA=uv(O),OA=vy,wA=A,EA=uv(H0),PA=uv(im),sg=(e.internal.bookmarks.Bookmarks,e.internal.constants),SA=sg.BOLT_PROTOCOL_V4_0,TA=sg.FETCH_ALL,jA=e.internal.txConfig.TxConfig,CA="context",RA="database",IA="CALL dbms.routing.getRoutingTable($".concat(CA,", $").concat(RA,")"),fg=(_A=ng.default,wy(AA,_A),Object.defineProperty(AA.prototype,"version",{get:function(){return SA},enumerable:!1,configurable:!0}),Object.defineProperty(AA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new PA.default(Object.values(EA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),AA.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 wA.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,OA.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,OA.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(gA.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},AA.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===_?TA:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new wA.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,OA.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,OA.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(gA.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(gA.default.pull({n:_}),c,b),c},AA.prototype._requestMore=function(e,t,r){this.write(gA.default.pull({stmtId:e,n:t}),r,!0)},AA.prototype._requestDiscard=function(e,t){this.write(gA.default.discard({stmtId:e}),t,!0)},AA.prototype._noOp=function(){},AA.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(IA,((t={})[CA]=void 0===r?{}:r,t[RA]=n,t),mA(mA({},o),{txConfig:jA.empty()}));return new wA.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},AA);function AA(){return null!==_A&&_A.apply(this,arguments)||this}V0.default=fg;var kA,MA,E={},mg={},NA=r&&r.__assign||function(){return(NA=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)},o_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Eg=(Object.defineProperty(mg,"__esModule",{value:!0}),o_(H0)),Zc=(mg.default=NA({},Eg.default),r&&r.__extends||(kA=function(e,t){return(kA=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}kA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Cg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nl=(Object.defineProperty(E,"__esModule",{value:!0}),Cg(V0)),xA=Cg(O),DA=A,sb=e,UA=vy,LA=Cg(mg),FA=Cg(im),BA=sb.internal.constants.BOLT_PROTOCOL_V4_1,u=(MA=Nl.default,Zc(WA,MA),Object.defineProperty(WA.prototype,"version",{get:function(){return BA},enumerable:!1,configurable:!0}),Object.defineProperty(WA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new FA.default(Object.values(LA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),WA.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 DA.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,UA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(xA.default.hello(r,n,this._serversideRouting),e,!0),e},WA);function WA(e,t,r,n,o,i,u){e=MA.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}E.default=u;var qA,zA,Fg={},Vg={},VA=r&&r.__assign||function(){return(VA=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)},Ol=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_=(Object.defineProperty(Vg,"__esModule",{value:!0}),Ol(mg)),fO=(Vg.default=VA({},_.default),r&&r.__extends||(qA=function(e,t){return(qA=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}qA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},T=(Object.defineProperty(Fg,"__esModule",{value:!0}),i(E)),R=e,HA=i(Vg),GA=i(im),YA=R.internal.constants.BOLT_PROTOCOL_V4_2,n=(zA=T.default,fO(KA,zA),Object.defineProperty(KA.prototype,"version",{get:function(){return YA},enumerable:!1,configurable:!0}),Object.defineProperty(KA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new GA.default(Object.values(HA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),KA);function KA(){return null!==zA&&zA.apply(this,arguments)||this}Fg.default=n;var P={},m={},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)},Y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(m,"__esModule",{value:!0}),Y(Vg)),Ks=(m.default=ZA({},o.default),{}),w={},QA=r&&r.__assign||function(){return(QA=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)},sc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},oc=(Object.defineProperty(w,"__esModule",{value:!0}),sc(m)),XA=(w.default=QA({},oc.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}),Wr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},JA=(Object.defineProperty(Ks,"__esModule",{value:!0}),iv),$A=e,ek=Wr(w),tk=Sm,rk=n_,nk=$A.internal.temporalUtil.localDateTimeToEpochSecond;var ok=new Map;function ik(e,t,r){e=e,ok.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"}),ok.set(e,n));var n=ok.get(e),e=(0,$A.int)(t).multiply(1e3).add((0,$A.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()}:rk.identity:"hour"===t.type?e.hour=(0,$A.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,$A.int)(t.value)),e},{}),e=(r.year=r.adjustEra(r.year),nk(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 uk(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,$A.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}Ks.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return ek.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){JA.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=XA(e.fields,3),t=e[0],r=e[1],e=e[2],t=ik(e,t,r);return uk(new $A.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,$A.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=nk(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=ik(r,i,o),n=nk(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=ik(r,i,o),nk(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,$A.int)(e.nanosecond),i=e.timeZoneId;return new JA.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return ek.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=nk(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,$A.int)(e.nanosecond),e=(0,$A.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new JA.structure.Structure(73,[t,r,e])},fromStructure:function(e){JA.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=XA(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,$A.int)(t).add(e),t=(0,tk.epochSecondAndNanoToLocalDateTime)(t,r);return uk(new $A.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var ak,sk,C=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)}),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)},Is=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xr=(Object.defineProperty(P,"__esModule",{value:!0}),Is(Fg)),lk=Is(O),fk=A,pk=vy,dk=Is(m),hk=Is(Ks),bk=Is(im),yk=e.internal.bookmarks.Bookmarks,_k=e.internal.constants.BOLT_PROTOCOL_V4_3,c=(sk=Xr.default,C(vk,sk),Object.defineProperty(vk.prototype,"version",{get:function(){return _k},enumerable:!1,configurable:!0}),Object.defineProperty(vk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new bk.default(Object.values(dk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),vk.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 fk.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||yk.empty();return this.write(lk.default.route(t,e.values(),r),o,!0),o},vk.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 fk.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,pk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(lk.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},vk.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},vk.prototype._applyUtcPatch=function(){var t=this;this._transformer=new bk.default(Object.values(ck(ck({},dk.default),hk.default)).map(function(e){return e(t._config,t._log)}))},vk);function vk(){return null!==sk&&sk.apply(this,arguments)||this}P.default=c;var mk,gk,zc={},zl=r&&r.__extends||(mk=function(e,t){return(mk=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}mk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ok=r&&r.__assign||function(){return(Ok=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)},f=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Dc=(Object.defineProperty(zc,"__esModule",{value:!0}),f(P)),Il=e,wk=f(O),Ek=A,Pk=vy,Sk=f(w),Tk=f(Ks),jk=f(im),Lc=Il.internal.constants,Ck=Lc.BOLT_PROTOCOL_V4_4,Rk=Lc.FETCH_ALL,Ik=Il.internal.bookmarks.Bookmarks,Vc=(gk=Dc.default,zl(Ak,gk),Object.defineProperty(Ak.prototype,"version",{get:function(){return Ck},enumerable:!1,configurable:!0}),Object.defineProperty(Ak.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new jk.default(Object.values(Sk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Ak.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 Ek.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||Ik.empty();return this.write(wk.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},Ak.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===_?Rk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new Ek.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,Pk.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(wk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(wk.default.pull({n:_}),c,b),c},Ak.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 Ek.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,Pk.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(wk.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},Ak.prototype._applyUtcPatch=function(){var t=this;this._transformer=new jk.default(Object.values(Ok(Ok({},Sk.default),Tk.default)).map(function(e){return e(t._config,t._log)}))},Ak);function Ak(){return null!==gk&&gk.apply(this,arguments)||this}zc.default=Vc;var Et={},Wc={},kk=r&&r.__assign||function(){return(kk=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)},Mk=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},Kf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nk=(Object.defineProperty(Wc,"__esModule",{value:!0}),iv),xk=e,Dk=Kf(w),tp=Kf(Ks);Wc.default=kk(kk(kk({},Dk.default),tp.default),{createNodeTransformer:function(e){return Dk.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){Nk.structure.verifyStructSize("Node",4,e.size);var e=Mk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new xk.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return Dk.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){Nk.structure.verifyStructSize("Relationship",8,e.size);var e=Mk(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 xk.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return Dk.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){Nk.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=Mk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new xk.UnboundRelationship(t,r,n,e)}})}});var Uk,Lk,xc=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)}),Dl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},h=(Object.defineProperty(Et,"__esModule",{value:!0}),Dl(zc)),Fk=vy,Bk=Dl(Wc),Wk=Dl(im),qk=Dl(O),zk=A,Vk=e.internal.constants.BOLT_PROTOCOL_V5_0,Rd=(Lk=h.default,xc(Hk,Lk),Object.defineProperty(Hk.prototype,"version",{get:function(){return Vk},enumerable:!1,configurable:!0}),Object.defineProperty(Hk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Wk.default(Object.values(Bk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Hk.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 zk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,Fk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(qk.default.hello(r,n,this._serversideRouting),e,!0),e},Hk);function Hk(){return null!==Lk&&Lk.apply(this,arguments)||this}Et.default=Rd;var Gk,Yk,Ud={},Fd={},Kk=r&&r.__assign||function(){return(Kk=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}},Nc=(Object.defineProperty(Fd,"__esModule",{value:!0}),$d(Wc)),Yd=(Fd.default=Kk({},Nc.default),r&&r.__extends||(Gk=function(e,t){return(Gk=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}Gk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Zk=r&&r.__assign||function(){return(Zk=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)},bd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rh=(Object.defineProperty(Ud,"__esModule",{value:!0}),bd(Et)),Qk=vy,Xk=bd(Fd),Jk=bd(im),$k=bd(O),eM=A,tM=e.internal.constants.BOLT_PROTOCOL_V5_1,Mc=(Yk=rh.default,Yd(rM,Yk),Object.defineProperty(rM.prototype,"version",{get:function(){return tM},enumerable:!1,configurable:!0}),Object.defineProperty(rM.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}),Object.defineProperty(rM.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),rM.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 eM.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,Qk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write($k.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(Zk(Zk({},e),a.metadata))},onError:i,flush:!0})},rM.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 eM.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write($k.default.logon(r),i,e),i},rM.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new eM.LogoffObserver({onCompleted:t,onError:r});return this.write($k.default.logoff(),t,e),t},rM);function rM(){return null!==Yk&&Yk.apply(this,arguments)||this}Ud.default=Mc;var nM,oM,g={},Cd={},iM=r&&r.__assign||function(){return(iM=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)},Bp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},uh=(Object.defineProperty(Cd,"__esModule",{value:!0}),Bp(Fd)),bh=(Cd.default=iM({},uh.default),r&&r.__extends||(nM=function(e,t){return(nM=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}nM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),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)},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qt=(Object.defineProperty(g,"__esModule",{value:!0}),S(Ud)),aM=S(Cd),sM=S(im),cM=S(O),lM=A,I=e.internal.constants,fM=I.BOLT_PROTOCOL_V5_2,pM=I.FETCH_ALL,Bd=(oM=qt.default,bh(dM,oM),Object.defineProperty(dM.prototype,"version",{get:function(){return fM},enumerable:!1,configurable:!0}),Object.defineProperty(dM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new sM.default(Object.values(aM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(dM.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),dM.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 lM.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write(cM.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(uM(uM({},e),a.metadata))},onError:i,flush:!0})},dM.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 lM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(cM.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},dM.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===_?pM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new lM.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(cM.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(cM.default.pull({n:_}),c,b),c},dM);function dM(){return null!==oM&&oM.apply(this,arguments)||this}g.default=Bd;var hM,bM,gh={},Ph={},yM=r&&r.__assign||function(){return(yM=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)},jc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nh=(Object.defineProperty(Ph,"__esModule",{value:!0}),jc(Cd)),yh=(Ph.default=yM({},Nh.default),r&&r.__extends||(hM=function(e,t){return(hM=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}hM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),_M=r&&r.__assign||function(){return(_M=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)},zh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Rh=(Object.defineProperty(gh,"__esModule",{value:!0}),zh(g)),vM=zh(Ph),mM=zh(im),gM=zh(O),OM=A,wM=e.internal.constants.BOLT_PROTOCOL_V5_3,Xh=(bM=Rh.default,yh(EM,bM),Object.defineProperty(EM.prototype,"version",{get:function(){return wM},enumerable:!1,configurable:!0}),Object.defineProperty(EM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new mM.default(Object.values(vM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),EM.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 OM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(gM.default.hello5x3(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(_M(_M({},e),s.metadata))},onError:u,flush:!0})},EM);function EM(){return null!==bM&&bM.apply(this,arguments)||this}gh.default=Xh;var PM,SM,ub={},Sb={},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)},ab=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Af=(Object.defineProperty(Sb,"__esModule",{value:!0}),ab(Ph)),Bb=(Sb.default=TM({},Af.default),r&&r.__extends||(PM=function(e,t){return(PM=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}PM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),hp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zb=(Object.defineProperty(ub,"__esModule",{value:!0}),hp(gh)),jM=hp(Sb),CM=hp(O),RM=A,IM=hp(im),AM=e.internal.constants.BOLT_PROTOCOL_V5_4,Qf=(SM=zb.default,Bb(kM,SM),Object.defineProperty(kM.prototype,"version",{get:function(){return AM},enumerable:!1,configurable:!0}),Object.defineProperty(kM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new IM.default(Object.values(jM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),kM.prototype.telemetry=function(e,t){var e=e.api,t=void 0===t?{}:t,r=t.onError,t=t.onCompleted,t=new RM.TelemetryObserver({onCompleted:t,onError:r});return this.write(CM.default.telemetry({api:e}),t,!1),t},kM);function kM(){return null!==SM&&SM.apply(this,arguments)||this}ub.default=Qf;var MM,NM,Vb={},Mp={},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)},ty=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Id=(Object.defineProperty(Mp,"__esModule",{value:!0}),ty(Sb)),rb=(Mp.default=xM({},Id.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)})),DM=r&&r.__assign||function(){return(DM=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)},kc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Pb=(Object.defineProperty(Vb,"__esModule",{value:!0}),kc(ub)),UM=kc(Mp),LM=kc(im),FM=kc(O),BM=A,ey=e.internal.constants,WM=ey.BOLT_PROTOCOL_V5_5,qM=ey.FETCH_ALL,zM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),Hy=(NM=Pb.default,rb(VM,NM),Object.defineProperty(VM.prototype,"version",{get:function(){return WM},enumerable:!1,configurable:!0}),Object.defineProperty(VM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new LM.default(Object.values(UM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),VM.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 BM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(FM.default.hello5x5(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(DM(DM({},e),s.metadata))},onError:u,flush:!0})},VM.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 BM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(FM.default.begin5x5({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},VM.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===_?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 BM.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(FM.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(FM.default.pull({n:_}),c,b),c},VM.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return DM(DM({},e),{description:null!=e.neo4j_code?e.status_description:e.description,diagnostic_record:null!==e.diagnostic_record?DM(DM({},zM),e.diagnostic_record):null})})),e},VM);function VM(){return null!==NM&&NM.apply(this,arguments)||this}Vb.default=Hy;var HM,GM,Wy={},Qy={},YM=r&&r.__assign||function(){return(YM=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}},h_=(Object.defineProperty(Qy,"__esModule",{value:!0}),m_(Mp)),E_=(Qy.default=YM({},h_.default),r&&r.__extends||(HM=function(e,t){return(HM=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}HM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),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)},Wd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},N_=(Object.defineProperty(Wy,"__esModule",{value:!0}),Wd(Vb)),ZM=Wd(Qy),QM=Wd(im),XM=e.internal.constants.BOLT_PROTOCOL_V5_6,JM=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),D_=(GM=N_.default,E_($M,GM),Object.defineProperty($M.prototype,"version",{get:function(){return XM},enumerable:!1,configurable:!0}),Object.defineProperty($M.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new QM.default(Object.values(ZM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),$M.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return KM(KM({},e),{diagnostic_record:null!==e.diagnostic_record?KM(KM({},JM),e.diagnostic_record):null})})),e},$M);function $M(){return null!==GM&&GM.apply(this,arguments)||this}Wy.default=D_;var e2,t2,B_={},z_={},r2=r&&r.__assign||function(){return(r2=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_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Q_=(Object.defineProperty(z_,"__esModule",{value:!0}),A_(Qy)),Ty=(z_.default=r2({},Q_.default),r&&r.__extends||(e2=function(e,t){return(e2=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}e2(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)},w_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P_=(Object.defineProperty(B_,"__esModule",{value:!0}),w_(Wy)),o2=w_(z_),i2=w_(im),u2=e.internal.constants.BOLT_PROTOCOL_V5_7,a2=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),rv=(t2=P_.default,Ty(s2,t2),Object.defineProperty(s2.prototype,"version",{get:function(){return u2},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new i2.default(Object.values(o2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),s2.prototype.enrichErrorMetadata=function(e){return n2(n2({},e),{cause:null!==e.cause&&void 0!==e.cause?this.enrichErrorMetadata(e.cause):null,code:e.neo4j_code,diagnostic_record:null!==e.diagnostic_record?n2(n2({},a2),e.diagnostic_record):null})},s2);function s2(){return null!==t2&&t2.apply(this,arguments)||this}B_.default=rv;var c2,l2,_v={},bp={},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)},yp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Pv=(Object.defineProperty(bp,"__esModule",{value:!0}),yp(z_)),Av=(bp.default=f2({},Pv.default),r&&r.__extends||(c2=function(e,t){return(c2=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}c2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Sv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kf=(Object.defineProperty(_v,"__esModule",{value:!0}),Sv(B_)),p2=Sv(bp),d2=Sv(im),h2=Sv(O),b2=A,_p=e.internal.constants,y2=_p.BOLT_PROTOCOL_V5_8,_2=_p.FETCH_ALL,Ov=(l2=kf.default,Av(v2,l2),Object.defineProperty(v2.prototype,"version",{get:function(){return y2},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new d2.default(Object.values(p2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),v2.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===_?_2:_,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 b2.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(h2.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(h2.default.pull({n:_}),c,b),c},v2);function v2(){return null!==l2&&l2.apply(this,arguments)||this}_v.default=Ov;var Cv={},m2=(Object.defineProperty(Cv,"__esModule",{value:!0}),e);function g2(){}function O2(e){return e}var w2={onNext:g2,onCompleted:g2,onError:g2};function E2(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||O2,this._enrichErrorMetadata=r||O2,this._observer=Object.assign({onObserversCountChange:g2,onError:g2,onFailure:g2,onErrorApplyTransformation:O2},e)}Object.defineProperty(E2.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),E2.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(m2.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(m2.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(m2.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(m2.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,m2.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,m2.newError)("Unknown Bolt protocol message: "+e))}},E2.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(E2.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),E2.prototype._queueObserver=function(e){return(e=e||w2).onCompleted=e.onCompleted||g2,e.onError=e.onError||g2,e.onNext=e.onNext||g2,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},E2.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)}},E2.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},E2.prototype._resetFailure=function(){this._currentFailure=null},E2.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,m2.newError)(e.message,t,r,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},E2.prototype._handleErrorCause=function(e){var t=null!=e.cause?this._handleErrorCause(e.cause):void 0,t=(0,m2.newGQLError)(e.message,t,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},Cv.default=E2;var P2,hn,Iy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},S2=(Object.defineProperty(cy,"__esModule",{value:!0}),e),T2=Iy(hy),j2=Iy(mm),C2=Iy(_0),R2=Iy(V0),I2=Iy(E),A2=Iy(Fg),k2=Iy(P),M2=Iy(zc),N2=Iy(Et),x2=Iy(Ud),D2=Iy(g),U2=Iy(gh),L2=Iy(ub),F2=Iy(Vb),B2=Iy(Wy),W2=Iy(B_),q2=Iy(_v),z2=Iy(Cv);cy.default=function(e){var t=(e=void 0===e?{}: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,f=t,p=s,d=r,h={disableLosslessIntegers:i,useBigInt:u},b=a,y=function(t){var r=new z2.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),v=c;switch(f){case 1:return new T2.default(p,d,h,y,v,_);case 2:return new j2.default(p,d,h,y,v,_);case 3:return new C2.default(p,d,h,y,v,_);case 4:return new R2.default(p,d,h,y,v,_);case 4.1:return new I2.default(p,d,h,y,v,_,b);case 4.2:return new A2.default(p,d,h,y,v,_,b);case 4.3:return new k2.default(p,d,h,y,v,_,b);case 4.4:return new M2.default(p,d,h,y,v,_,b);case 5:return new N2.default(p,d,h,y,v,_,b);case 5.1:return new x2.default(p,d,h,y,v,_,b);case 5.2:return new D2.default(p,d,h,y,v,_,b);case 5.3:return new U2.default(p,d,h,y,v,_,b);case 5.4:return new L2.default(p,d,h,y,v,_,b);case 5.5:return new F2.default(p,d,h,y,v,_,b);case 5.6:return new B2.default(p,d,h,y,v,_,b);case 5.7:return new W2.default(p,d,h,y,v,_,b);case 5.8:return new q2.default(p,d,h,y,v,_,b);default:throw(0,S2.newError)("Unknown Bolt protocol version: "+f)}},Vv=y,P2=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]}),Wv=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||P2(t,e,r)},Kv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Vv,"__esModule",{value:!0}),Vv.RawRoutingTable=Vv.BoltProtocol=void 0,em=Kv(dp),hn=Kv(cy),cm=Kv(P),Kv=Kv(Oy),Wv(A,Vv),Vv.BoltProtocol=cm.default,Vv.RawRoutingTable=Kv.default,Vv.default={handshake:em.default,create:hn.default};var V2,pm={},bm={},ut=r&&r.__extends||(V2=function(e,t){return(V2=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}V2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(bm,"__esModule",{value:!0});ut(G2,H2=e.ConnectionProvider),G2.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 H2,Am=G2;function G2(e){var t=H2.call(this)||this;return t._connection=e,t}bm.default=Am;var Y2,Dm={},nm={},j={},qm=r&&r.__extends||(Y2=function(e,t){return(Y2=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}Y2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(j,"__esModule",{value:!0});qm(Z2,K2=e.Connection),Object.defineProperty(Z2.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Z2.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Z2.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Z2.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Z2.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Z2.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Z2.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(Z2.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Z2.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(Z2.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Z2.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},Z2.prototype.write=function(e,t,r){throw new Error("not implemented")},Z2.prototype.close=function(){throw new Error("not implemented")},Z2.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e};var K2,Jm=Z2;function Z2(e){var t=K2.call(this)||this;return t._errorHandler=e,t}j.default=Jm;var Q2,lb={},r0=r&&r.__extends||(Q2=function(e,t){return(Q2=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}Q2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),X2=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())})},J2=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},Ym=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$2=(Object.defineProperty(lb,"__esModule",{value:!0}),lb.createChannelConnection=void 0,kp),eN=e,c0=Ym(j),tN=Ym(y),rN=eN.error.PROTOCOL_ERROR,nN=eN.internal.logger.Logger,oN=0;lb.createChannelConnection=function(i,u,a,s,e,c,l,t){void 0===c&&(c=null);var f=(t=void 0===t?function(e){return new $2.Channel(e)}:t)(new $2.ChannelConfig(i,u,a.errorCode(),e));return tN.default.handshake(f,s).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new $2.Chunker(f),o=new $2.Dechunker,t=new uN(f,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return tN.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})})};iN=c0.default,r0(aN,iN),aN.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},aN.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},aN.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})},aN.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},aN.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},aN.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(aN.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(aN.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(aN.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(aN.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(aN.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(aN.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),aN.prototype.connect=function(t,n,o,i){return X2(this,void 0,void 0,function(){var r=this;return J2(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,eN.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]}})})},aN.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,eN.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)}})})},aN.prototype.protocol=function(){return this._protocol},Object.defineProperty(aN.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(aN.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(aN.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(aN.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),aN.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(eN.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},aN.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},aN.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},aN.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},aN.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},aN.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()}})})},aN.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},aN.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()})}}))},aN.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},aN.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},aN.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},aN.prototype.close=function(){var t;return X2(this,void 0,void 0,function(){return J2(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]}})})},aN.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},aN.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,eN.newError)(e,rN);return this._handleFatalError(e),e};var iN,uN=aN;function aN(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=iN.call(this,t)||this;return t._authToken=null,t._idle=!1,t._reseting=!1,t._resetObservers=[],t._id=oN++,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 nN((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}lb.default=uN;var sN,cN,T0={},cb=r&&r.__extends||(sN=function(e,t){return(sN=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}sN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),C0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},U0=(Object.defineProperty(T0,"__esModule",{value:!0}),C0(j)),B0=(cN=U0.default,cb(lN,cN),lN.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},lN.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},lN.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},lN.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},lN.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(lN.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(lN.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(lN.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(lN.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(lN.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(lN.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(lN.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(lN.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(lN.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),lN.prototype.isOpen=function(){return this._delegate.isOpen()},lN.prototype.protocol=function(){return this._delegate.protocol()},lN.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},lN.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},lN.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},lN.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},lN.prototype.close=function(){return this._delegate.close()},lN.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},lN);function lN(e,t){var r=cN.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}T0.default=B0;k0={};Object.defineProperty(k0,"__esModule",{value:!0});var fN,pN,dN,hN=e.error.SERVICE_UNAVAILABLE,bN=e.error.SESSION_EXPIRED;function yN(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||_N,this._handleWriteFailure=r||_N,this._handleSecurityError=n||_N}function _N(e){return e}yN.create=function(e){return new yN(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleSecurityError)},yN.prototype.errorCode=function(){return this._errorCode},yN.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===bN||e.code===hN||"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},k0.default=yN,Sl=nm,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}),X0=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&fN(t,e,r);return pN(t,e),t},g0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.createChannelConnection=Sl.ConnectionErrorHandler=Sl.DelegateConnection=Sl.ChannelConnection=Sl.Connection=void 0,eg=g0(j),Sl.Connection=eg.default,dN=X0(lb),Sl.ChannelConnection=dN.default,Object.defineProperty(Sl,"createChannelConnection",{enumerable:!0,get:function(){return dN.createChannelConnection}}),X0=g0(T0),Sl.DelegateConnection=X0.default,X0=g0(k0),Sl.ConnectionErrorHandler=X0.default,Sl.default=eg.default;var uv={},vN=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())})},mN=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},gN=(Object.defineProperty(uv,"__esModule",{value:!0}),e),ON=t_;function wN(e){var t=e.authTokenManager,r=e.userAgent,e=e.boltAgent;this._authTokenManager=t||(0,gN.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=e}wN.prototype.authenticate=function(e){var r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return vN(this,void 0,void 0,function(){var t;return mN(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!ON.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(),ON.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]}})})},wN.prototype.handleError=function(e){var t=e.connection,e=e.code;return!(!t||!e.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,e)},uv.default=wN;var sg={},EN=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())})},PN=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={next:e(0),throw:e(1),return:e(2)};return"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 SN(e){e=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=e}Object.defineProperty(sg,"__esModule",{value:!0}),SN.prototype.check=function(r){return EN(this,void 0,void 0,function(){var t;return PN(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(SN.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),SN.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},sg.default=SN;var ng={},TN=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())})},jN=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},CN=(Object.defineProperty(ng,"__esModule",{value:!0}),kp);function RN(e){var t=e.clientCertificateProvider,e=e.loader;this._clientCertificateProvider=t,this._loader=e||CN.ClientCertificatesLoader,this._clientCertificate=null}RN.prototype.getClientCertificate=function(){return TN(this,void 0,void 0,function(){var t,r,n=this;return jN(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]}})})},ng.default=RN;var IN,AN,wy=r&&r.__extends||(IN=function(e,t){return(IN=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}IN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),kN=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())})},MN=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},NN=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},xN=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))},fg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},DN=(Object.defineProperty(Dm,"__esModule",{value:!0}),nm),UN=e,LN=fg(uv),FN=t_,BN=fg(sg),WN=fg(ng),qN=UN.error.SERVICE_UNAVAILABLE,zN=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],o_=UN.internal.pool,VN=o_.Pool,HN=o_.PoolConfig,H0=(AN=UN.ConnectionProvider,wy(GN,AN),GN.prototype._createConnectionErrorHandler=function(){return new DN.ConnectionErrorHandler(qN)},GN.prototype._getClientCertificate=function(){return kN(this,void 0,void 0,function(){return MN(this,function(e){return[2,this._config.clientCertificate.getClientCertificate()]})})},GN.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})})},GN.prototype._validateConnectionOnAcquire=function(e,r){var n=e.auth,o=e.skipReAuth;return kN(this,void 0,void 0,function(){var t;return MN(this,function(e){switch(e.label){case 0:if(!this._validateConnection(r))return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(r)];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not alive because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 4:return e.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:r,auth:n,skipReAuth:o})];case 5:return e.sent(),[2,!0];case 6:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not valid because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 7:return[2]}})})},GN.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},GN.prototype._validateConnection=function(e){return!!e.isOpen()&&!(this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},GN.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},GN.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return kN(this,void 0,void 0,function(){var t,r;return MN(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new UN.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]}})})},GN.prototype._verifyAuthentication=function(e){var u=e.getAddress,a=e.auth;return kN(this,void 0,void 0,function(){var t,r,n,o,i;return MN(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,UN.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(),zN.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]}})})},GN.prototype._verifyStickyConnection=function(e){var n=e.auth,o=e.connection;return e.address,kN(this,void 0,void 0,function(){var t,r;return MN(this,function(e){switch(e.label){case 0:return(t=FN.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,UN.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},GN.prototype.close=function(){return kN(this,void 0,void 0,function(){return MN(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]}})})},GN._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},GN._removeIdleObserverOnConnection=function(e){e._unsetIdle()},GN.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),e},GN);function GN(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(VN.bind.apply(VN,xN([void 0],NN(e),!1)))}:e,s=(void 0===t&&(t=null),AN.call(this)||this);return s._id=r,s._config=n,s._log=o,s._clientCertificateHolder=new WN.default({clientCertificateProvider:s._config.clientCertificate}),s._authenticationProvider=new LN.default({authTokenManager:a,userAgent:i,boltAgent:u}),s._livenessCheckProvider=new BN.default({connectionLivenessCheckTimeout:n.connectionLivenessCheckTimeout}),s._userAgent=i,s._boltAgent=u,s._createChannelConnection=t||function(n){return kN(s,void 0,void 0,function(){var t,r;return MN(this,function(e){switch(e.label){case 0:return t=DN.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:GN._installIdleObserverOnConnection.bind(s),removeIdleObserver:GN._removeIdleObserverOnConnection.bind(s),config:HN.fromDriverConfig(n),log:s._log}),s._openConnections={},s}Dm.default=H0;var YN,KN,Eg={},Cg=r&&r.__extends||(YN=function(e,t){return(YN=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}YN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ZN=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())})},QN=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},sb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nl=(Object.defineProperty(Eg,"__esModule",{value:!0}),sb(Dm)),XN=nm,Zc=e.internal.constants,JN=Zc.BOLT_PROTOCOL_V3,$N=Zc.BOLT_PROTOCOL_V4_0,ex=Zc.BOLT_PROTOCOL_V4_4,tx=Zc.BOLT_PROTOCOL_V5_1,rx=e.error.SERVICE_UNAVAILABLE,u=(KN=Nl.default,Cg(nx,KN),nx.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,o=(e.accessMode,e.database),i=(e.bookmarks,e.auth),u=e.forceReAuth;return ZN(this,void 0,void 0,function(){var t,r,n=this;return QN(this,function(e){switch(e.label){case 0:return t=XN.ConnectionErrorHandler.create({errorCode:rx,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 XN.DelegateConnection(r,t)]}})})},nx.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,"'")),KN.prototype._handleSecurityError.call(this,e,t,r)},nx.prototype._hasProtocolVersion=function(n){return ZN(this,void 0,void 0,function(){var t,r;return QN(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]}})})},nx.prototype.supportsMultiDb=function(){return ZN(this,void 0,void 0,function(){return QN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return $N<=e})];case 1:return[2,e.sent()]}})})},nx.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},nx.prototype.supportsTransactionConfig=function(){return ZN(this,void 0,void 0,function(){return QN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return JN<=e})];case 1:return[2,e.sent()]}})})},nx.prototype.supportsUserImpersonation=function(){return ZN(this,void 0,void 0,function(){return QN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return ex<=e})];case 1:return[2,e.sent()]}})})},nx.prototype.supportsSessionAuth=function(){return ZN(this,void 0,void 0,function(){return QN(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return tx<=e})];case 1:return[2,e.sent()]}})})},nx.prototype.verifyAuthentication=function(e){var r=e.auth;return ZN(this,void 0,void 0,function(){var t=this;return QN(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},nx.prototype.verifyConnectivityAndGetServerInfo=function(){return ZN(this,void 0,void 0,function(){return QN(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},nx);function nx(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=KN.call(this,{id:t,config:r,log:n,userAgent:i,boltAgent:u,authTokenManager:a,newPool:e})||this;return t._address=o,t}Eg.default=u;var Ol={},mg={},_={},i={},ox=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},ix=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))},ux=(Object.defineProperty(i,"__esModule",{value:!0}),i.createValidRoutingTable=void 0,e),R=ux.internal.constants,ax=R.ACCESS_MODE_WRITE,sx=R.ACCESS_MODE_READ,cx=ux.internal.serverAddress.ServerAddress,lx=ux.error.PROTOCOL_ERROR,fx=(px.fromRawRoutingTable=hx,px.prototype.forget=function(e){this.readers=dx(this.readers,e),this.writers=dx(this.writers,e)},px.prototype.forgetRouter=function(e){this.routers=dx(this.routers,e)},px.prototype.forgetWriter=function(e){this.writers=dx(this.writers,e)},px.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===sx&&0===this.readers.length||e===ax&&0===this.writers.length},px.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},px.prototype.allServers=function(){return ix(ix(ix([],ox(this.routers),!1),ox(this.readers),!1),ox(this.writers),!1)},px.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,"]]")},px);function px(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,ux.int)(0),this.ttl=e}function dx(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function hx(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,ux.int)(Date.now()),n=(0,ux.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?ux.Integer.MAX_VALUE:n}catch(e){throw(0,ux.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(ux.json.stringify(t),"\nError message: ").concat(e.message),lx)}}(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=yx(e).map(function(e){return cx.fromUrl(e)}):"WRITE"===t?i=yx(e).map(function(e){return cx.fromUrl(e)}):"READ"===t&&(o=yx(e).map(function(e){return cx.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,ux.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(ux.json.stringify(t.servers),"\nError message: ").concat(e.message),lx)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return bx(u,"routers",t),bx(a,"readers",t),new fx({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function bx(e,t,r){if(0===e.length)throw(0,ux.newError)("Received no "+t+" from router "+r,lx)}function yx(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}i.default=fx,i.createValidRoutingTable=hx;var T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_x=(Object.defineProperty(_,"__esModule",{value:!0}),T(i));function vx(e){this._routingContext=e}vx.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:_x.default.fromRawRoutingTable(r,n,e)})})},vx.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})})},_.default=vx;var mx,gx,fO=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=(Object.defineProperty(mg,"__esModule",{value:!0}),mg.RoutingTable=mg.Rediscovery=void 0,fO(_)),Y=(mg.Rediscovery=n.default,fO(i)),Vg=(mg.RoutingTable=Y.default,mg.default=n.default,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)})),Ox=r&&r.__assign||function(){return(Ox=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)},wx=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]}),Ex=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&wx(t,e,r);return Ex(t,e),t},Px=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())})},Sx=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},Tx=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.")},jx=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},sc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cx=(Object.defineProperty(Ol,"__esModule",{value:!0}),e),Rx=o(mg),Ix=kp,Ax=sc(bm),oc=sc(Dm),kx=Hc,Mx=nm,Nx=t_,xx=Cx.error.SERVICE_UNAVAILABLE,Dx=Cx.error.SESSION_EXPIRED,Ux=Cx.internal.bookmarks.Bookmarks,Wr=Cx.internal.constants,Lx=Wr.ACCESS_MODE_READ,Fx=Wr.ACCESS_MODE_WRITE,Bx=Wr.BOLT_PROTOCOL_V3,Wx=Wr.BOLT_PROTOCOL_V4_0,qx=Wr.BOLT_PROTOCOL_V4_4,zx=Wr.BOLT_PROTOCOL_V5_1,Vx=null,Hx=(0,Cx.int)(3e4),Sm=(gx=oc.default,Vg(Gx,gx),Gx.prototype._createConnectionErrorHandler=function(){return new Mx.ConnectionErrorHandler(Dx)},Gx.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||Vx),e},Gx.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,"'")),gx.prototype._handleSecurityError.call(this,e,t,r,n)},Gx.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||Vx),(0,Cx.newError)("No longer possible to write to server at "+t,Dx,e)},Gx.prototype.acquireConnection=function(e){var 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 Px(this,void 0,void 0,function(){var n,t,r,o,i=this;return Sx(this,function(e){switch(e.label){case 0:return(n={database:a||Vx},t=new Mx.ConnectionErrorHandler(Dx,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.SSREnabled()&&void 0!==p&&""===a)?!(r=this._routingTableRegistry.get(p,function(){return new Rx.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)]}})})},Gx.prototype.getConnectionFromRoutingTable=function(i,u,a,s){return Px(this,void 0,void 0,function(){var t,r,n,o;return Sx(this,function(e){switch(e.label){case 0:if(a===Lx)r=this._loadBalancingStrategy.selectReader(i.readers),t="read";else{if(a!==Fx)throw(0,Cx.newError)("Illegal mode "+a);r=this._loadBalancingStrategy.selectWriter(i.writers),t="write"}if(!r)throw(0,Cx.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(i),Dx);e.label=1;case 1:return e.trys.push([1,5,,6]),[4,this._connectionPool.acquire({auth:u},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 Mx.DelegateConnection(n,s)];case 5:throw o=e.sent(),s.handleAndTransformError(o,r);case 6:return[2]}})})},Gx.prototype._hasProtocolVersion=function(u){return Px(this,void 0,void 0,function(){var t,r,n,o,i;return Sx(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]}})})},Gx.prototype.supportsMultiDb=function(){return Px(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return Wx<=e})];case 1:return[2,e.sent()]}})})},Gx.prototype.supportsTransactionConfig=function(){return Px(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return Bx<=e})];case 1:return[2,e.sent()]}})})},Gx.prototype.supportsUserImpersonation=function(){return Px(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return qx<=e})];case 1:return[2,e.sent()]}})})},Gx.prototype.supportsSessionAuth=function(){return Px(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return zx<=e})];case 1:return[2,e.sent()]}})})},Gx.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},Gx.prototype.verifyAuthentication=function(e){var n=e.database,o=e.accessMode,i=e.auth;return Px(this,void 0,void 0,function(){var t=this;return Sx(this,function(e){return[2,this._verifyAuthentication({auth:i,getAddress:function(){return Px(t,void 0,void 0,function(){var t,r;return Sx(this,function(e){switch(e.label){case 0:return t={database:n||Vx},[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===Fx?r.writers:r.readers).length)throw(0,Cx.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),xx);return[2,r[0]]}})})}})]})})},Gx.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return Px(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return Sx(this,function(e){switch(e.label){case 0:return t={database:l||Vx},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===Fx?r.writers:r.readers,n=(0,Cx.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),xx),e.label=2;case 2:e.trys.push([2,9,10,11]),o=Tx(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}})})},Gx.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},Gx.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},Gx.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 Rx.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},Gx.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)},Gx.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return Px(this,void 0,void 0,function(){var t,r,n,o,i;return Sx(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,l)];case 1:return(t=jx.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=jx.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()]}})})},Gx.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return Px(this,void 0,void 0,function(){var t,r,n;return Sx(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,s)];case 1:return r=jx.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=jx.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()]}})})},Gx.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return Px(this,void 0,void 0,function(){var t,r;return Sx(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=jx.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,Gx._forgetRouter(o,n,r),[2,[null,t]])}})})},Gx.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return Px(this,void 0,void 0,function(){var t;return Sx(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()]}})})},Gx.prototype._resolveSeedRouter=function(n){return Px(this,void 0,void 0,function(){var t,r=this;return Sx(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)]}})})},Gx.prototype._fetchRoutingTable=function(s,c,l,f,p){return Px(this,void 0,void 0,function(){var t=this;return Sx(this,function(e){return[2,s.reduce(function(i,u,a){return Px(t,void 0,void 0,function(){var t,r,n,o;return Sx(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=jx.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(Gx._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=jx.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]))]})})},Gx.prototype._createSessionForRediscovery=function(o,i,u,a){return Px(this,void 0,void 0,function(){var t,r,n=this;return Sx(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:a},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=Mx.ConnectionErrorHandler.create({errorCode:Dx,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r)}}),r=t._sticky?new Mx.DelegateConnection(t):new Mx.DelegateConnection(t,r),r=new Ax.default(r),t.protocol().version<4?[2,[new Cx.Session({mode:Fx,bookmarks:Ux.empty(),connectionProvider:r}),null]]:[2,[new Cx.Session({mode:Lx,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},Gx.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,Cx.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),xx,e);var r,n;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},Gx.prototype._applyRoutingTableIfPossible=function(t,r,n){return Px(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r)];throw(0,Cx.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),xx,n);case 1:return e.sent(),[2,r]}})})},Gx.prototype._updateRoutingTable=function(t){return Px(this,void 0,void 0,function(){return Sx(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]}})})},Gx._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},Gx.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,Cx.newError)("Channel SSR Callback invoked with action other than 'OPEN' or 'CLOSE'");!0===e?this._withSSR=this._withSSR-1:this._withoutSSR=this._withoutSSR-1}},Gx.prototype.SSREnabled=function(){return 0<this._withSSR&&0===this._withoutSSR},Gx);function Gx(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=gx.call(this,{id:t,config:i,log:u,userAgent:a,boltAgent:s,authTokenManager:c,newPool:e},function(n){return Px(f,void 0,void 0,function(){var t,r;return Sx(this,function(e){switch(e.label){case 0:return t=Mx.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=Ox(Ox({},n),{address:r.toString()}),f._seedRouter=r,f._rediscovery=new Rx.default(f._routingContext),f._loadBalancingStrategy=new kx.LeastConnectedLoadBalancingStrategy(f._connectionPool),f._hostNameResolver=o,f._dnsResolver=new Ix.HostNameResolver,f._log=u,f._useSeedRouter=!0,f._routingTableRegistry=new fD(l?(0,Cx.int)(l):Hx),f._refreshRoutingTable=Nx.functional.reuseOngoingRequest(f._refreshRoutingTable,f),f._withSSR=0,f._withoutSSR=0,f}Ol.default=Sm;pD.prototype.register=function(e){return this._tables.set(e.database,e),this},pD.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},pD.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},pD.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},pD.prototype._forEach=function(e){var t,r;try{for(var n=Tx(this._tables),o=n.next();!o.done;o=n.next())e(jx(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},pD.prototype._remove=function(e){return this._tables.delete(e),this},pD.prototype._removeIf=function(e){var t,r;try{for(var n=Tx(this._tables),o=n.next();!o.done;o=n.next()){var i=jx(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 Yx,Kx,Zx,Qx,Xx,Jx,$x,eD,tD,rD,nD,x,oD,iD,uD,aD,sD,cD,lD,fD=pD;function pD(e){this._tables=new Map,this._routingTablePurgeDelay=e}function dD(e,t,r){void 0===r&&(r={}),uD(e,"Bolt URL");var n,o=cD.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=iD,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||lD,r.boltAgent=x.internal.boltAgent.fromVersion(nD.default),sD.fromUrl(o.hostAndPort)),t={address:s,typename:i?"Routing":"Direct",routing:i};return new rD.Driver(t,r,function(){{if(i)return function(e,t,r,n){return new oD.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if(aD(o.query))return function(e,t,r){return new oD.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 hD(r,n){return eD(this,void 0,void 0,function(){var t;return tD(this,function(e){switch(e.label){case 0:t=dD(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 n_=pm,Yx=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(n_,"__esModule",{value:!0}),n_.RoutingConnectionProvider=n_.DirectConnectionProvider=n_.PooledConnectionProvider=n_.SingleConnectionProvider=void 0,Kx=bm,Object.defineProperty(n_,"SingleConnectionProvider",{enumerable:!0,get:function(){return Yx(Kx).default}}),Zx=Dm,Object.defineProperty(n_,"PooledConnectionProvider",{enumerable:!0,get:function(){return Yx(Zx).default}}),Qx=Eg,Object.defineProperty(n_,"DirectConnectionProvider",{enumerable:!0,get:function(){return Yx(Qx).default}}),Xx=Ol,Object.defineProperty(n_,"RoutingConnectionProvider",{enumerable:!0,get:function(){return Yx(Xx).default}}),m=p,Jx=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]}),$x=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Is=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Jx(t,e,r);return $x(t,e),t},Xr=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Jx(t,e,r)},Object.defineProperty(m,"__esModule",{value:!0}),m.packstream=m.channel=m.buf=m.bolt=m.loadBalancing=void 0,m.loadBalancing=Is(Hc),m.bolt=Is(y),m.buf=Is(hd),m.channel=Is(kp),m.packstream=Is(iv),Xr(pm,m),C=U,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={next:e(0),throw:e(1),return:e(2)};return"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}}}},c=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(C,"__esModule",{value:!0}),C.UnboundRelationship=C.Relationship=C.Node=C.Record=C.ServerInfo=C.GqlStatusObject=C.Notification=C.QueryStatistics=C.ProfiledPlan=C.Plan=C.ResultSummary=C.RxResult=C.RxManagedTransaction=C.RxTransaction=C.RxSession=C.EagerResult=C.Result=C.ManagedTransaction=C.Transaction=C.Session=C.Driver=C.temporal=C.spatial=C.graph=C.error=C.routing=C.session=C.types=C.logging=C.auth=C.isRetriableError=C.Neo4jError=C.integer=C.isUnboundRelationship=C.isRelationship=C.isPathSegment=C.isPath=C.isNode=C.isDateTime=C.isLocalDateTime=C.isDate=C.isTime=C.isLocalTime=C.isDuration=C.isPoint=C.isInt=C.int=C.hasReachableServer=C.driver=C.authTokenManagers=void 0,C.clientCertificateProviders=C.notificationFilterMinimumSeverityLevel=C.notificationFilterDisabledClassification=C.notificationFilterDisabledCategory=C.notificationSeverityLevel=C.notificationClassification=C.notificationCategory=C.resultTransformers=C.bookmarkManager=C.DateTime=C.LocalDateTime=C.Date=C.Time=C.LocalTime=C.Duration=C.Integer=C.Point=C.PathSegment=C.Path=void 0,rD=L,Object.defineProperty(C,"Driver",{enumerable:!0,get:function(){return rD.Driver}}),nD=c(b),x=e,Object.defineProperty(C,"authTokenManagers",{enumerable:!0,get:function(){return x.authTokenManagers}}),Object.defineProperty(C,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(C,"isRetriableError",{enumerable:!0,get:function(){return x.isRetriableError}}),Object.defineProperty(C,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(C,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(C,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(C,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(C,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(C,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(C,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(C,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(C,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(C,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(C,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(C,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(C,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(C,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(C,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(C,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(C,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(C,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(C,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(C,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(C,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(C,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(C,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(C,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(C,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(C,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(C,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(C,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(C,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(C,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(C,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(C,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(C,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(C,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(C,"GqlStatusObject",{enumerable:!0,get:function(){return x.GqlStatusObject}}),Object.defineProperty(C,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(C,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(C,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(C,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(C,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(C,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(C,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(C,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(C,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(C,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(C,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(C,"notificationClassification",{enumerable:!0,get:function(){return x.notificationClassification}}),Object.defineProperty(C,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(C,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(C,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return x.notificationFilterDisabledClassification}}),Object.defineProperty(C,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(C,"clientCertificateProviders",{enumerable:!0,get:function(){return x.clientCertificateProviders}}),oD=p,f=c(V),C.RxSession=f.default,Lc=c(v),C.RxTransaction=Lc.default,Il=c(s),C.RxManagedTransaction=Il.default,c=c(t),C.RxResult=c.default,Dc=x.internal.util,iD=Dc.ENCRYPTION_ON,uD=Dc.assertString,aD=Dc.isEmptyObjectOrNull,sD=x.internal.serverAddress.ServerAddress,cD=x.internal.urlUtil,lD="neo4j-javascript/"+nD.default,C.driver=dD,C.hasReachableServer=hD,Dc={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},C.logging=Dc,zl={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},C.types=zl,Vc={READ:rD.READ,WRITE:rD.WRITE},C.session=Vc,w={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},C.integer=w,Kf={isPoint:x.isPoint},C.spatial=Kf,Ks={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},C.temporal=Ks,tp={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},C.graph=tp,w={authTokenManagers:x.authTokenManagers,driver:dD,hasReachableServer:hD,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,integer:w,Neo4jError:x.Neo4jError,isRetriableError:x.isRetriableError,auth:x.auth,logging:Dc,types:zl,session:Vc,routing:x.routing,error:x.error,graph:tp,spatial:Kf,temporal:Ks,Driver:rD.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:f.default,RxTransaction:Lc.default,RxManagedTransaction:Il.default,RxResult:c.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},C.default=w,D(U)});
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={},B={},W=(Object.defineProperty(B,"__esModule",{value:!0}),B.getBrokenObjectReason=B.isBrokenObject=B.createBrokenObject=void 0,"__isBrokenObject__"),V="__reason__";B.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===W||(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})},B.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[W]},B.getBrokenObjectReason=function(e){return e[V]},Object.defineProperty(F,"__esModule",{value:!0}),F.stringify=void 0;var q=B;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 z,H,G={},n=(n=G,Object.defineProperty(n,"__esModule",{value:!0}),n.rawPolyfilledDiagnosticRecord=void 0,n.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(n.rawPolyfilledDiagnosticRecord),r&&r.__extends||(z=function(e,t){return(z=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}z(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}),Z=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Y(t,e,r);return K(t,e),t},Q=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.GQLError=t.Neo4jError=t.isRetriableError=t.newGQLError=t.newError=void 0,Z(F)),X=G,Z={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"},J=(Object.freeze(Z),Object.values(Z)),$="ServiceUnavailable",ee=(t.SERVICE_UNAVAILABLE=$,"SessionExpired"),te=(t.SESSION_EXPIRED=ee,t.PROTOCOL_ERROR="ProtocolError",H=Error,n(re,H),Object.defineProperty(re.prototype,"diagnosticRecordAsJsonString",{get:function(){return Q.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),re);function re(e,t,r,n,o){var i=this;return(i=H.call(this,e,null!=o?{cause:o}:void 0)||this).constructor=re,i.__proto__=re.prototype,i.cause=null!=o?o:void 0,i.gqlStatus=t,i.gqlStatusDescription=r,i.diagnosticRecord=n,i.classification=void 0!==(e=i.diagnosticRecord)&&void 0!==e._classification&&J.includes(e._classification)?null==e?void 0:e._classification:"UNKNOWN",i.rawClassification=null!=(o=null==n?void 0:n._classification)?o:void 0,i.name="GQLError",i}t.GQLError=te;n(ie,ne=te),ie.isRetriable=function(e){return null!=e&&e instanceof ie&&e.retriable};var ne,oe=ie;function ie(e,t,r,n,o,i){e=ne.call(this,e,r,n,o,i)||this;return e.constructor=ie,e.__proto__=ie.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===$||r===ee||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=oe,t.newError=function(e,t,r,n,o,i){return new oe(e,null!=t?t:"N/A",null!=n?n:"50N42",null!=o?o:"error: general processing exception - unexpected error. "+e,null!=i?i:X.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:X.rawPolyfilledDiagnosticRecord,t)};Z=oe.isRetriable;t.isRetriableError=Z;var n={},ue=(Object.defineProperty(n,"__esModule",{value:!0}),n.toString=n.toNumber=n.inSafeRange=n.isInt=n.int=void 0,t),ae=new Map,Z=(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*de+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(de)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(de)+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(be)&&e.lessThan(be))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<=-he?d.MIN_VALUE:he<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%de|0,e/de|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(Z.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var a,se,ce,s,le,fe,pe,de=4294967296,he=de*de/2,be=Z.fromInt(1<<24),o=Z.fromValue,o=(n.int=o,Z.isInteger),o=(n.isInt=o,Z.inSafeRange),o=(n.inSafeRange=o,Z.toNumber),o=(n.toNumber=o,Z.toString),o=(n.toString=o,n.default=Z,{}),Z={},i={},ye=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]}),_e=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ye(t,e,r);return _e(t,e),t},ve=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.")},me=(Object.defineProperty(i,"__esModule",{value:!0}),i.ENCRYPTION_OFF=i.ENCRYPTION_ON=i.equals=i.validateQueryAndParameters=i.toNumber=i.assertValidDate=i.assertNumberOrInteger=i.assertNumber=i.assertString=i.assertObject=i.isString=i.isObject=i.isEmptyObjectOrNull=void 0,u(n)),ge=F;i.ENCRYPTION_ON="ENCRYPTION_ON";function Oe(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function we(e,t){if(Ee(e))return e;throw new TypeError((0,ge.stringify)(t)+" expected to be string but was: "+(0,ge.stringify)(e))}function Ee(e){return"[object String]"===Object.prototype.toString.call(e)}function Pe(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,s.int)(e),this._maxInteger=(0,s.int)(t)}function Se(e){return(0,s.int)(e).div(12)}function Te(e){return(0,s.int)(e).modulo(12)}function je(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 Ce(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 Ne(t=e?t.negate():t,a.MINUTES_PER_HOUR).multiply(e?-1:1)}function Ie(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 Re(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 Ae(e,t){return(0,le.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))}function ke(e,t,r){if((0,fe.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,le.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function Me(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 Ne(e,t){return e=(0,s.int)(e),t=(0,s.int)(t),e.subtract(Me(e,t).multiply(t))}function xe(e){return(e=(0,s.int)(e)).equals(0)?"":"."+De(e,9)}function De(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}i.ENCRYPTION_OFF="ENCRYPTION_OFF",i.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!Oe(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},i.isObject=Oe,i.validateQueryAndParameters=function(e,t,r){var n="",t=null!=t?t:{},r=null!=(r=null==r?void 0:r.skipAsserts)&&r;if("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){e=n;if(we(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!Oe(r))throw e=null!=r.constructor?" "+r.constructor.name:"",new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(e," ").concat(JSON.stringify(r)))}return{validatedQuery:n,params:t}},i.assertObject=function(e,t){if(Oe(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,ge.stringify)(e))},i.assertString=we,i.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,ge.stringify)(e));return e},i.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,me.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,ge.stringify)(e))},i.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,ge.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,ge.stringify)(e));return e},i.isString=Ee,i.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)return!1;var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;try{for(var a=ve(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},i.toNumber=function(e){return e instanceof me.default?e.toNumber():"bigint"==typeof e?(0,me.int)(e).toNumber():e},a=Z,se=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]}),ce=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&se(t,e,r);return ce(t,e),t},Object.defineProperty(a,"__esModule",{value:!0}),a.floorMod=a.floorDiv=a.assertValidZoneId=a.assertValidNanosecond=a.assertValidSecond=a.assertValidMinute=a.assertValidHour=a.assertValidDay=a.assertValidMonth=a.assertValidYear=a.timeZoneOffsetInSeconds=a.totalNanoseconds=a.newDate=a.toStandardDate=a.isoStringToStandardDate=a.dateToIsoString=a.timeZoneOffsetToIsoString=a.timeToIsoString=a.durationToIsoString=a.dateToEpochDay=a.localDateTimeToEpochSecond=a.localTimeToNanoOfDay=a.normalizeNanosecondsForDuration=a.normalizeSecondsForDuration=a.normalizeMinutesForDuration=a.normalizeHoursForDuration=a.normalizeMonthsForDuration=a.normalizeYearsForDuration=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,s=u(n),le=t,fe=i,Pe.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},Pe.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},u=Pe,a.YEAR_RANGE=new u(-999999999,999999999),a.MONTH_OF_YEAR_RANGE=new u(1,12),a.DAY_OF_MONTH_RANGE=new u(1,31),a.HOUR_OF_DAY_RANGE=new u(0,23),a.MINUTE_OF_HOUR_RANGE=new u(0,59),a.SECOND_OF_MINUTE_RANGE=new u(0,59),a.NANOSECOND_OF_SECOND_RANGE=new u(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,a.normalizeYearsForDuration=Se,a.normalizeMonthsForDuration=Te,a.normalizeHoursForDuration=je,a.normalizeMinutesForDuration=Ce,a.normalizeSecondsForDuration=function(e,t){return(0,s.int)(e).add(Me(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return Ne(e,a.NANOS_PER_SECOND)},a.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,s.int)(e),t=(0,s.int)(t),r=(0,s.int)(r),n=(0,s.int)(n),(e=(e=(e=e.multiply(a.NANOS_PER_HOUR)).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){return e=Ie(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),e.multiply(a.SECONDS_PER_DAY).add(t)},a.dateToEpochDay=Ie,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=De(Se(e)),e=De(Te(e)),t=De(t),i=De(je(r,n)),u=De(Ce(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=xe((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){return e=De(e,2),t=De(t,2),r=De(r,2),n=xe(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},a.timeZoneOffsetToIsoString=function(e){if((e=(0,s.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=De((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=De(e.div(a.SECONDS_PER_MINUTE).modulo(a.MINUTES_PER_HOUR),2);return null!=(e=(e=e.modulo(a.SECONDS_PER_MINUTE)).equals(0)?null:De(e,2))?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},a.dateToIsoString=function(e,t,r){return e=function(e){e=(0,s.int)(e);if(e.isNegative()||e.greaterThan(9999))return De(e,6,{usePositiveSign:!0});return De(e,4)}(e),t=De(t,2),r=De(r,2),"".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){return t=null!=t?t:0,e=e.getMilliseconds()*a.NANOS_PER_MILLISECOND,t instanceof s.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},a.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()+Re(e.getUTCMonth(),e.getUTCFullYear())-e.getUTCDate():e.getDate()-(e.getUTCDate()+Re(e.getMonth(),e.getFullYear()));return n*a.SECONDS_PER_HOUR+r*a.SECONDS_PER_MINUTE+t+e*a.SECONDS_PER_DAY},a.assertValidYear=function(e){return ke(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return ke(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return ke(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return ke(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return ke(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return ke(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return ke(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},pe=new Map,a.assertValidZoneId=function(t,r){var e=pe.get(r);if(!0!==e){if(!1===e)throw Ae(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),pe.set(r,!0)}catch(e){throw pe.set(r,!1),Ae(r,t)}}},a.floorDiv=Me,a.floorMod=Ne;var 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]}),Ue=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Le(t,e,r);return Ue(t,e),t},Fe=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},c=(Object.defineProperty(o,"__esModule",{value:!0}),o.isDateTime=o.DateTime=o.isLocalDateTime=o.LocalDateTime=o.isDate=o.Date=o.isTime=o.Time=o.isLocalTime=o.LocalTime=o.isDuration=o.Duration=void 0,u(Z)),Be=i,We=t,Ve=u(n),u={value:!0,enumerable:!1,configurable:!1,writable:!1},qe="__isDuration__",ze="__isLocalTime__",He="__isTime__",Ge="__isDate__",Ye="__isLocalDateTime__",Ke="__isDateTime__",l=(Ze.prototype.toString=function(){return c.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},Ze);function Ze(e,t,r,n){this.months=(0,Be.assertNumberOrInteger)(e,"Months"),this.days=(0,Be.assertNumberOrInteger)(t,"Days"),(0,Be.assertNumberOrInteger)(r,"Seconds"),(0,Be.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=c.normalizeSecondsForDuration(r,n),"number"==typeof r&&(0,Ve.isInt)(this.seconds)&&(this.seconds=this.seconds.toNumber()),"bigint"==typeof r&&(0,Ve.isInt)(this.seconds)&&(this.seconds=this.seconds.toBigInt()),this.nanoseconds=c.normalizeNanosecondsForDuration(n),"number"==typeof n&&(0,Ve.isInt)(this.nanoseconds)&&(this.nanoseconds=this.nanoseconds.toNumber()),"bigint"==typeof n&&(0,Ve.isInt)(this.nanoseconds)&&(this.nanoseconds=this.nanoseconds.toBigInt()),Object.freeze(this)}o.Duration=l,Object.defineProperty(l.prototype,qe,u),o.isDuration=function(e){return tt(e,qe)};Qe.fromStandardDate=function(e,t){nt(e,t);t=c.totalNanoseconds(e,t);return new Qe(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof Ve.default?t.toInt():"bigint"==typeof t?(0,Ve.int)(t).toInt():t)},Qe.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};l=Qe;function Qe(e,t,r,n){this.hour=c.assertValidHour(e),this.minute=c.assertValidMinute(t),this.second=c.assertValidSecond(r),this.nanosecond=c.assertValidNanosecond(n),Object.freeze(this)}o.LocalTime=l,Object.defineProperty(l.prototype,ze,u),o.isLocalTime=function(e){return tt(e,ze)};Xe.fromStandardDate=function(e,t){return nt(e,t),new Xe(e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ve.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e))},Xe.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+c.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};l=Xe;function Xe(e,t,r,n,o){this.hour=c.assertValidHour(e),this.minute=c.assertValidMinute(t),this.second=c.assertValidSecond(r),this.nanosecond=c.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,Be.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}o.Time=l,Object.defineProperty(l.prototype,He,u),o.isTime=function(e){return tt(e,He)};Je.fromStandardDate=function(e){return this.fromStandardDateLocal(e)},Je.fromStandardDateLocal=function(e){return nt(e),new Je(e.getFullYear(),e.getMonth()+1,e.getDate())},Je.fromStandardDateUTC=function(e){return nt(e),new Je(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate())},Je.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Je.prototype.toString=function(){return c.dateToIsoString(this.year,this.month,this.day)};l=Je;function Je(e,t,r){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),Object.freeze(this)}o.Date=l,Object.defineProperty(l.prototype,Ge,u),o.isDate=function(e){return tt(e,Ge)};$e.fromStandardDate=function(e,t){return nt(e,t),new $e(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ve.toNumber)(c.totalNanoseconds(e,t)))},$e.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},$e.prototype.toString=function(){return rt(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};l=$e;function $e(e,t,r,n,o,i,u){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),this.hour=c.assertValidHour(n),this.minute=c.assertValidMinute(o),this.second=c.assertValidSecond(i),this.nanosecond=c.assertValidNanosecond(u),Object.freeze(this)}o.LocalDateTime=l,Object.defineProperty(l.prototype,Ye,u),o.isLocalDateTime=function(e){return tt(e,Ye)};et.fromStandardDate=function(e,t){return nt(e,t),new et(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ve.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e),null)},et.prototype.toStandardDate=function(){return c.toStandardDate(this._toUTC())},et.prototype.toString=function(){var e;return rt(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?c.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},et.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=c.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,Ve.int)(e).multiply(1e3).add((0,Ve.int)(this.nanosecond).div(1e6)).toNumber()};l=et;function et(e,t,r,n,o,i,u,a,s){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),this.hour=c.assertValidHour(n),this.minute=c.assertValidMinute(o),this.second=c.assertValidSecond(i),this.nanosecond=c.assertValidNanosecond(u);e=Fe(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,We.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,Be.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,Be.assertString)(t,"Time zone ID"),c.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 tt(e,t){return null!=e&&!0===e[t]}function rt(e,t,r,n,o,i,u){return c.dateToIsoString(e,t,r)+"T"+c.timeToIsoString(n,o,i,u)}function nt(e,t){(0,Be.assertValidDate)(e,"Standard date"),null!=t&&(0,Be.assertNumberOrInteger)(t,"Nanosecond")}o.DateTime=l,Object.defineProperty(l.prototype,Ke,u),o.isDateTime=function(e){return tt(e,Ke)};var l={},ot=(Object.defineProperty(l,"__esModule",{value:!0}),l.isPathSegment=l.PathSegment=l.isPath=l.Path=l.isUnboundRelationship=l.UnboundRelationship=l.isRelationship=l.Relationship=l.isNode=l.Node=void 0,F),u={value:!0,enumerable:!1,configurable:!1,writable:!1},it="__isNode__",ut="__isRelationship__",at="__isUnboundRelationship__",st="__isPath__",ct="__isPathSegment__";function lt(e,t){return null!=e&&!0===e[t]}pt.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,ot.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var ft=pt;function pt(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=vt(n,function(){return e.toString()})}l.Node=ft,Object.defineProperty(ft.prototype,it,u),l.isNode=function(e){return lt(e,it)};ht.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,ot.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var dt=ht;function ht(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=vt(i,function(){return e.toString()}),this.startNodeElementId=vt(u,function(){return t.toString()}),this.endNodeElementId=vt(a,function(){return r.toString()})}l.Relationship=dt,Object.defineProperty(dt.prototype,ut,u),l.isRelationship=function(e){return lt(e,ut)};bt.prototype.bind=function(e,t){return new dt(this.identity,e,t,this.type,this.properties,this.elementId)},bt.prototype.bindTo=function(e,t){return new dt(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},bt.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,ot.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};ft=bt;function bt(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=vt(n,function(){return e.toString()})}l.UnboundRelationship=ft,Object.defineProperty(ft.prototype,at,u),l.isUnboundRelationship=function(e){return lt(e,at)};function yt(e,t,r){this.start=e,this.relationship=t,this.end=r}l.PathSegment=yt,Object.defineProperty(yt.prototype,ct,u),l.isPathSegment=function(e){return lt(e,ct)};function _t(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function vt(e,t){return null==e?t():e}l.Path=_t,Object.defineProperty(_t.prototype,st,u),l.isPath=function(e){return lt(e,st)};var ft={},mt=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},gt=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.")},Ot=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},wt=(Object.defineProperty(ft,"__esModule",{value:!0}),t);function Et(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)}Et.prototype.forEach=function(e){var t,r;try{for(var n=gt(this.entries()),o=n.next();!o.done;o=n.next()){var i=Ot(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}}},Et.prototype.map=function(e){var t,r,n=[];try{for(var o=gt(this.entries()),i=o.next();!i.done;i=o.next()){var u=Ot(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},Et.prototype.entries=function(){var t;return mt(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]}})},Et.prototype.values=function(){var t;return mt(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]}})},Et.prototype[Symbol.iterator]=function(){var t;return mt(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]}})},Et.prototype.toObject=function(){var t,e,r={};try{for(var n=gt(this.entries()),o=n.next();!o.done;o=n.next()){var i=Ot(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},Et.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,wt.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,wt.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]},Et.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},ft.default=Et;var u={},Pt=(Object.defineProperty(u,"__esModule",{value:!0}),u.isPoint=u.Point=void 0,i),St="__isPoint__",Tt=(jt.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(Ct(this.srid),", x=").concat(Ct(this.x),", y=").concat(Ct(this.y),"}"):"Point{srid=".concat(Ct(this.srid),", x=").concat(Ct(this.x),", y=").concat(Ct(this.y),", z=").concat(Ct(this.z),"}")},jt);function jt(e,t,r,n){this.srid=(0,Pt.assertNumberOrInteger)(e,"SRID"),this.x=(0,Pt.assertNumber)(t,"X coordinate"),this.y=(0,Pt.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,Pt.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function Ct(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}u.Point=Tt,Object.defineProperty(Tt.prototype,St,{value:!0,enumerable:!1,configurable:!1,writable:!1}),u.isPoint=function(e){return null!=e&&!0===e[St]};var Tt={},f={},p={},h=(Object.defineProperty(p,"__esModule",{value:!0}),p.FailedObserver=p.CompletedObserver=void 0,It.prototype.subscribe=function(e){At(e,e.onKeys,[]),At(e,e.onCompleted,{})},It.prototype.cancel=function(){},It.prototype.pause=function(){},It.prototype.resume=function(){},It.prototype.prepareToHandleSingleResponse=function(){},It.prototype.markCompleted=function(){},It.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},It);function It(){}function Rt(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function At(e,t,r){null!=t&&t.bind(e)(r)}p.CompletedObserver=h,Rt.prototype.subscribe=function(e){At(e,e.onError,this._error),this._observers.push(e)},Rt.prototype.onError=function(t){At(this,this._beforeError,t),this._observers.forEach(function(e){return At(e,e.onError,t)})},Rt.prototype.cancel=function(){},Rt.prototype.pause=function(){},Rt.prototype.resume=function(){},Rt.prototype.markCompleted=function(){},Rt.prototype.prepareToHandleSingleResponse=function(){},p.FailedObserver=Rt;var h={},kt=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]}),Mt=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&kt(t,e,r);return Mt(t,e),t},Nt=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},xt=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))},Dt=(Object.defineProperty(h,"__esModule",{value:!0}),h.Bookmarks=void 0,b(i)),b=(Lt.empty=function(){return Ut},Lt.prototype.isEmpty=function(){return 0===this._values.length},Lt.prototype.values=function(){return this._values},Lt.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},Lt.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},Lt);function Lt(e){this._values=function(e){if(null==e||""===e)return[];if(Dt.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(!Dt.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return xt([],Nt(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var Ut=new(h.Bookmarks=b)(null);var Ft,Bt,b={},y=(Object.defineProperty(b,"__esModule",{value:!0}),b.TELEMETRY_APIS=b.BOLT_PROTOCOL_V6_0=b.BOLT_PROTOCOL_V5_8=b.BOLT_PROTOCOL_V5_7=b.BOLT_PROTOCOL_V5_6=b.BOLT_PROTOCOL_V5_5=b.BOLT_PROTOCOL_V5_4=b.BOLT_PROTOCOL_V5_3=b.BOLT_PROTOCOL_V5_2=b.BOLT_PROTOCOL_V5_1=b.BOLT_PROTOCOL_V5_0=b.BOLT_PROTOCOL_V4_4=b.BOLT_PROTOCOL_V4_3=b.BOLT_PROTOCOL_V4_2=b.BOLT_PROTOCOL_V4_1=b.BOLT_PROTOCOL_V4_0=b.BOLT_PROTOCOL_V3=b.BOLT_PROTOCOL_V2=b.BOLT_PROTOCOL_V1=b.DEFAULT_POOL_MAX_SIZE=b.DEFAULT_POOL_ACQUISITION_TIMEOUT=b.DEFAULT_CONNECTION_TIMEOUT_MILLIS=b.ACCESS_MODE_WRITE=b.ACCESS_MODE_READ=b.FETCH_ALL=void 0,b.FETCH_ALL=-1,b.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,b.DEFAULT_POOL_MAX_SIZE=100,b.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,b.ACCESS_MODE_READ="READ",b.ACCESS_MODE_WRITE="WRITE",b.BOLT_PROTOCOL_V1=1,b.BOLT_PROTOCOL_V2=2,b.BOLT_PROTOCOL_V3=3,b.BOLT_PROTOCOL_V4_0=4,b.BOLT_PROTOCOL_V4_1=4.1,b.BOLT_PROTOCOL_V4_2=4.2,b.BOLT_PROTOCOL_V4_3=4.3,b.BOLT_PROTOCOL_V4_4=4.4,b.BOLT_PROTOCOL_V5_0=5,b.BOLT_PROTOCOL_V5_1=5.1,b.BOLT_PROTOCOL_V5_2=5.2,b.BOLT_PROTOCOL_V5_3=5.3,b.BOLT_PROTOCOL_V5_4=5.4,b.BOLT_PROTOCOL_V5_5=5.5,b.BOLT_PROTOCOL_V5_6=5.6,b.BOLT_PROTOCOL_V5_7=5.7,b.BOLT_PROTOCOL_V5_8=5.8,b.BOLT_PROTOCOL_V6_0=6,b.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),_={},v=r&&r.__extends||(Ft=function(e,t){return(Ft=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}Ft(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Wt=(Object.defineProperty(_,"__esModule",{value:!0}),_.Logger=void 0,t),Vt="error",qt="warn",zt="info",Ht="debug",Gt=((m={})[Vt]=0,m[qt]=1,m[zt]=2,m[Ht]=3,m),m=(Yt.create=function(e){return null!=(null==e?void 0:e.logging)?new Yt(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=Gt[e];if(null!=t||0===t)return e;throw(0,Wt.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(Gt).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,Wt.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},Yt.noOp=function(){return Zt},Yt.prototype.isErrorEnabled=function(){return Qt(this._level,Vt)},Yt.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(Vt,e)},Yt.prototype.isWarnEnabled=function(){return Qt(this._level,qt)},Yt.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(qt,e)},Yt.prototype.isInfoEnabled=function(){return Qt(this._level,zt)},Yt.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(zt,e)},Yt.prototype.isDebugEnabled=function(){return Qt(this._level,Ht)},Yt.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(Ht,e)},Yt);function Yt(e,t){this._level=e,this._loggerFunction=t}function Kt(){return Bt.call(this,zt,function(e,t){})||this}_.Logger=m,v(Kt,Bt=m),Kt.prototype.isErrorEnabled=function(){return!1},Kt.prototype.error=function(e){},Kt.prototype.isWarnEnabled=function(){return!1},Kt.prototype.warn=function(e){},Kt.prototype.isInfoEnabled=function(){return!1},Kt.prototype.info=function(e){},Kt.prototype.isDebugEnabled=function(){return!1},Kt.prototype.debug=function(e){};var Zt=new Kt;function Qt(e,t){return Gt[e]>=Gt[t]}var Xt,v=r&&r.__extends||(Xt=function(e,t){return(Xt=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}Xt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Jt=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())})},$t=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},er=(Object.defineProperty(y,"__esModule",{value:!0}),y.EMPTY_CONNECTION_HOLDER=y.ReadOnlyConnectionHolder=y.ConnectionHolder=void 0,t),tr=i,rr=b,nr=h,or=_,m=(ir.prototype.mode=function(){return this._mode},ir.prototype.database=function(){return this._database},ir.prototype.setDatabase=function(e){this._database=e},ir.prototype.bookmarks=function(){return this._bookmarks},ir.prototype.connectionProvider=function(){return this._connectionProvider},ir.prototype.referenceCount=function(){return this._referenceCount},ir.prototype.initializeConnection=function(e){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider,e),this._referenceCount++,!0)},ir.prototype._createConnectionPromise=function(o,i){return Jt(this,void 0,void 0,function(){var t,r,n;return $t(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()]}})})},ir.prototype._getBookmarks=function(){return Jt(this,void 0,void 0,function(){return $t(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},ir.prototype.getConnection=function(){return this._connectionPromise},ir.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},ir.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},ir.prototype.log=function(){return this._log},ir.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(lr).then(function(){return e.release().then(function(){return null})}):e.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},ir.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},ir);function ir(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:rr.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=r?(0,tr.assertString)(r,"database"):"",this._bookmarks=null!=n?n:nr.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(nr.Bookmarks.empty())}}y.ConnectionHolder=m;v(sr,ur=m),sr.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},sr.prototype.getConnection=function(){return this._connectionHolder.getConnection()},sr.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},sr.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var ur,ar,g=sr;function sr(e){var t=ur.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 cr(){return ar.call(this,{log:or.Logger.create({})})||this}y.ReadOnlyConnectionHolder=g,y.default=g,v(cr,ar=m),cr.prototype.mode=function(){},cr.prototype.database=function(){},cr.prototype.initializeConnection=function(){return!0},cr.prototype.getConnection=function(){return Jt(this,void 0,void 0,function(){return $t(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,er.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},cr.prototype.releaseConnection=function(){return Jt(this,void 0,void 0,function(){return $t(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},cr.prototype.close=function(){return Jt(this,void 0,void 0,function(){return $t(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};g=new cr;function lr(e){return null}y.EMPTY_CONNECTION_HOLDER=g;var v={},fr=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]}),pr=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&fr(t,e,r);return pr(t,e),t},dr=(Object.defineProperty(v,"__esModule",{value:!0}),v.TxConfig=void 0,m(i)),hr=t,br=n,g=(yr.empty=function(){return _r},yr.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},yr);function yr(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,br.int)(e.timeout,{ceilFloat:!0});if(t.isNegative())throw(0,hr.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 _r=new(v.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)},mr=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())})},gr=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},Or=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},wr=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))},Er=(Object.defineProperty(m,"__esModule",{value:!0}),m.TransactionExecutor=void 0,t),Pr=b;function Sr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,wr([e,t],Or(r),!1))}function Tr(e){return clearTimeout(e)}function jr(e,t,r,n,o){void 0===o&&(o={setTimeout:Sr,clearTimeout:Tr}),this._maxRetryTimeMs=Cr(e,3e4),this._initialRetryDelayMs=Cr(t,1e3),this._multiplier=Cr(r,2),this._jitterFactor=Cr(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=Pr.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}function Cr(e,t){return null!=e?e:t}jr.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)})},jr.prototype.close=function(){var t=this;this._inFlightTimeoutIds.forEach(function(e){return t._clearTimeout(e)}),this._inFlightTimeoutIds=[]},jr.prototype._retryTransactionPromise=function(o,i,e,r,u,a,s){var c=this;return Date.now()-r>this._maxRetryTimeMs||!(0,Er.isRetriableError)(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)})},jr.prototype._executeTransactionInsidePromise=function(u,a,s,c,l,f){return mr(this,void 0,void 0,function(){var t,r,n,o,i=this;return gr(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]}})})},jr.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},jr.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},jr.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},jr.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},jr.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,Er.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,Er.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,Er.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,Er.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},m.TransactionExecutor=jr;var g={},Ir=r&&r.__assign||function(){return(Ir=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)},Rr=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},Ar=(Object.defineProperty(g,"__esModule",{value:!0}),g.Url=g.formatIPv6Address=g.formatIPv4Address=g.defaultPortForScheme=g.parseDatabaseUrl=void 0,i),kr=7687,Mr=7474,Nr=7473,xr=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Dr(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function Lr(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 Ur(e){return"http"===e?Mr:"https"===e?Nr:kr}g.Url=xr,g.parseDatabaseUrl=function(e){(0,Ar.assertString)(e,"URL");var t,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]),Rr((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=Ir(Ir({},n),t(r[0]))).path=r[1]+r[2]):n.path=e;return n}((n=(n=(n=e).trim()).includes("://")?{schemeMissing:!1,url:n}:{schemeMissing:!0,url:"none://".concat(n)}).url),n=n.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),o=function(e){if(null!=e)return e.trim();throw new Error("Unable to extract host from null or undefined URL")}(r.host),i=function(e){if(""!==e&&null!=e)return e.includes(":")?Lr(e):e;throw new Error("Illegal host ".concat(e))}(o),u=function(e,t){e="string"==typeof e?parseInt(e,10):e;return null==e||isNaN(e)?Ur(t):e}(r.port,n),i="".concat(i,":").concat(u),r=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=Dr(e[0],"key",r),e=Dr(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!=(t=r.query)?t:"string"==typeof(t=r.resourceName)?Rr(t.split("?"),2)[1]:null,e);return new xr(n,o,u,i,r)},g.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},g.formatIPv6Address=function(e,t){return e=Lr(e),"".concat(e,":").concat(t)},g.defaultPortForScheme=Ur;var Fr={},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]}),Wr=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Br(t,e,r);return Wr(t,e),t},Vr=(Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.ServerAddress=void 0,i),qr=O(g);function zr(e,t,r,n){this._host=(0,Vr.assertString)(e,"host"),this._resolved=null!=t?(0,Vr.assertString)(t,"resolved"):null,this._port=(0,Vr.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}zr.prototype.host=function(){return this._host},zr.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},zr.prototype.port=function(){return this._port},zr.prototype.resolveWith=function(e){return new zr(this._host,e,this._port,this._hostPort)},zr.prototype.asHostPort=function(){return this._hostPort},zr.prototype.asKey=function(){return this._hostPort},zr.prototype.toString=function(){return this._stringValue},zr.fromUrl=function(e){e=qr.parseDatabaseUrl(e);return new zr(e.host,null,e.port,e.hostAndPort)},Fr.ServerAddress=zr;var O={},w={};function Hr(){}Object.defineProperty(w,"__esModule",{value:!0}),Hr.prototype.resolve=function(){throw new Error("Abstract function")},Hr.prototype._resolveToItself=function(e){return Promise.resolve([e])},w.default=Hr;var E={},Gr=(Object.defineProperty(E,"__esModule",{value:!0}),Fr);function Yr(e){return Promise.resolve([e])}function Kr(e){this._resolverFunction=null!=e?e:Yr}Kr.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 Gr.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=Kr;var Zr,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=void 0,w.fromVersion=function(e,t){var r=null!=(t=(t=void 0===t?function(){return{get userAgent(){}}}: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}},Xr=P,Zr=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]}),Qr=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Zr(t,e,r)},Object.defineProperty(Xr,"__esModule",{value:!0}),Qr(w,Xr);var Qr={},w={},Xr=(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,Jr.defaultConfig=function(){return new Jr(100,6e4)},Jr.fromDriverConfig=function(e){return new Jr(en(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,en(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},Jr);function Jr(e,t){this.maxSize=$r(e,100),this.acquisitionTimeout=$r(t,6e4)}function $r(e,t){return en(e)?e:t}function en(e){return 0===e||null!=e}w.default=Xr;var Xr={},tn=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())})},rn=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},nn=(Object.defineProperty(Xr,"__esModule",{value:!0}),S(w)),on=t,un=_,S=(an.prototype.acquire=function(s,c,l){return tn(this,void 0,void 0,function(){var o,i,t,u,a=this;return rn(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 ln(o,s,l,e,t,r,a._log));i[o].push(n),a._processPendingAcquireRequests(c)})];case 1:return[2,e.sent()]}})})},an.prototype.getAcquisitionTimeoutError=function(e){var t=e.asKey(),r=this.activeResourceCount(e),e=this.has(e)?this._pools[t].length:0;return(0,on.newError)("Connection acquisition timed out in ".concat(this._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(r,", Idle conn count = ").concat(e,"."))},an.prototype.purge=function(t){return tn(this,void 0,void 0,function(){return rn(this,function(e){switch(e.label){case 0:return[4,this._purgeKey(t.asKey())];case 1:return[2,e.sent()]}})})},an.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},an.prototype.close=function(){return tn(this,void 0,void 0,function(){var r=this;return rn(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(t){return tn(r,void 0,void 0,function(){return rn(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()]}})})},an.prototype.keepAll=function(o){return tn(this,void 0,void 0,function(){var t,r,n=this;return rn(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 tn(n,void 0,void 0,function(){return rn(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()]}})})},an.prototype.has=function(e){return e.asKey()in this._pools},an.prototype.activeResourceCount=function(e){return null!=(e=this._activeResourceCounts[e.asKey()])?e:0},an.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return null==t&&(t=new bn,this._pools[e]=t,this._pendingCreates[e]=0),t},an.prototype._acquire=function(c,l,f){return tn(this,void 0,void 0,function(){var t,n,r,o,i,u,a,s=this;return rn(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,on.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];sn(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(),cn(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 cn(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 tn(s,void 0,void 0,function(){return rn(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),sn(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}]}})})},an.prototype._release=function(n,o,i){return tn(this,void 0,void 0,function(){var t,r=this;return rn(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 cn(t,this._activeResourceCounts),this._processPendingAcquireRequests(n),[7];case 10:return[2]}})})},an.prototype._purgeKey=function(o){return tn(this,void 0,void 0,function(){var t,r,n;return rn(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]}})})},an.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])},an);function an(e){var t=e.create,t=void 0===t?function(e,t,r){return tn(s,void 0,void 0,function(){return rn(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 tn(s,void 0,void 0,function(){return rn(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?nn.default.defaultConfig():a,e=e.log,e=void 0===e?un.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 sn(e,t){var r=null!=(r=t[e])?r:0;t[e]=r+1}function cn(e,t){var r=(null!=(r=t[e])?r:0)-1;0<r?t[e]=r:delete t[e]}Object.defineProperty(fn.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(fn.prototype,"requireNew",{get:function(){var e;return null!=(e=this._config.requireNew)&&e},enumerable:!1,configurable:!0}),fn.prototype.isCompleted=function(){return this._completed},fn.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))},fn.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var ln=fn;function fn(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:{}}yn.prototype.isActive=function(){return this._active},yn.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},yn.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},yn.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(yn.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),yn.prototype.pop=function(){var e=this._elements.pop();return null!=e&&this._elementsInUse.add(e),e},yn.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},yn.prototype.pushInUse=function(e){this._elementsInUse.add(e)},yn.prototype.removeInUse=function(e){this._elementsInUse.delete(e)};var pn,dn,hn,bn=yn;function yn(){this._active=!0,this._elements=[],this._elementsInUse=new Set}Xr.default=S,S=Qr,pn=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}),j=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&pn(t,e,r);return dn(t,e),t},T=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(S,"__esModule",{value:!0}),S.DEFAULT_MAX_SIZE=S.DEFAULT_ACQUISITION_TIMEOUT=S.PoolConfig=S.Pool=void 0,hn=j(w),S.PoolConfig=hn.default,Object.defineProperty(S,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return hn.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(S,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return hn.DEFAULT_MAX_SIZE}}),j=T(Xr),S.Pool=j.default,S.default=j.default;var _n=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]}),vn=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&_n(t,e,r);return vn(t,e),t},T=(Object.defineProperty(f,"__esModule",{value:!0}),f.pool=f.boltAgent=f.objectUtil=f.resolver=f.serverAddress=f.urlUtil=f.logger=f.transactionExecutor=f.txConfig=f.connectionHolder=f.constants=f.bookmarks=f.observer=f.temporalUtil=f.util=void 0,w(i)),Xr=(f.util=T,w(Z)),S=(f.temporalUtil=Xr,w(p)),j=(f.observer=S,w(h)),T=(f.bookmarks=j,w(b)),Z=(f.constants=T,w(y)),Xr=(f.connectionHolder=Z,w(v)),S=(f.txConfig=Xr,w(m)),j=(f.transactionExecutor=S,w(_)),T=(f.logger=j,w(g)),Z=(f.urlUtil=T,w(Fr)),Xr=(f.serverAddress=Z,w(O)),S=(f.resolver=Xr,w(B)),j=(f.objectUtil=S,w(P)),g=(f.boltAgent=j,w(Qr)),T=(f.pool=g,{}),mn=r&&r.__assign||function(){return(mn=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)},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}),Fr=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&gn(t,e,r);return On(t,e),t},wn=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=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))},Pn=(Object.defineProperty(T,"__esModule",{value:!0}),T.buildNotificationsFromMetadata=T.buildGqlStatusObjectFromMetadata=T.polyfillNotification=T.polyfillGqlStatusObject=T.GqlStatusObject=T.Notification=T.notificationClassification=T.notificationCategory=T.notificationSeverityLevel=void 0,Fr(F)),Sn=f,Tn=G,jn={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"}},Cn={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},In=(T.notificationSeverityLevel=Cn,Object.freeze(Cn),Object.values(Cn)),Z={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",SCHEMA:"SCHEMA",UNKNOWN:"UNKNOWN"},Rn=(T.notificationCategory=Z,Object.freeze(Z),Object.values(Z)),An=Z,kn=(T.notificationClassification=An,function(e){this.code=e.code,this.title=e.title,this.description=e.description,this.position=Bn(e.position),this.severityLevel=Wn(e.severity),this.rawSeverityLevel=e.severity,this.category=Vn(e.category),this.rawCategory=e.category}),Mn=(T.Notification=kn,Object.defineProperty(Nn.prototype,"diagnosticRecordAsJsonString",{get:function(){return Pn.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),Nn);function Nn(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?Bn(this.diagnosticRecord._position):void 0,this.severity=Wn(this.diagnosticRecord._severity),this.rawSeverity=this.diagnosticRecord._severity,this.classification=Vn(this.diagnosticRecord._classification),this.rawClassification=this.diagnosticRecord._classification,this.isNotification=null!=e.neo4j_code,Object.freeze(this)}function xn(e){var t;if(null!=e.neo4j_code)return new kn({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 Dn(e){var t=e.severity===Cn.WARNING?jn.WARNING:jn.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:mn({},Tn.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 Mn(r)}T.GqlStatusObject=Mn,T.polyfillNotification=xn,T.polyfillGqlStatusObject=Dn;var Ln={SUCCESS:new Mn({gql_status:"00000",status_description:"note: successful completion",diagnostic_record:Tn.rawPolyfilledDiagnosticRecord}),NO_DATA:new Mn({gql_status:"02000",status_description:"note: no data",diagnostic_record:Tn.rawPolyfilledDiagnosticRecord}),NO_DATA_UNKNOWN_SUBCONDITION:new Mn(mn(mn({},jn.NO_DATA),{diagnostic_record:Tn.rawPolyfilledDiagnosticRecord})),OMITTED_RESULT:new Mn({gql_status:"00001",status_description:"note: successful completion - omitted result",diagnostic_record:Tn.rawPolyfilledDiagnosticRecord})};Object.freeze(Ln),T.buildGqlStatusObjectFromMetadata=function(e){if(null!=e.statuses)return e.statuses.map(function(e){return new Mn(e)});var t=!0===(null==(t=e.stream_summary)?void 0:t.have_records_streamed)?Ln.SUCCESS:!1===(null==t?void 0:t.has_keys)?Ln.OMITTED_RESULT:!0===(null==t?void 0:t.pulled)?Ln.NO_DATA:Ln.NO_DATA_UNKNOWN_SUBCONDITION;return En([t],wn(null!=(e=null==(t=e.notifications)?void 0:t.map(Dn))?e:[]),!1).sort(function(e,t){return Fn(e)-Fn(t)})};var Un=Object.freeze({"02":0,"01":1,"00":2});function Fn(e){var e=null==(e=e.gqlStatus)?void 0:e.slice(0,2);return null!=(e=Un[e])?e:9999}function Bn(e){return null==e?{}:{offset:Sn.util.toNumber(e.offset),line:Sn.util.toNumber(e.line),column:Sn.util.toNumber(e.column)}}function Wn(e){return In.includes(e)?e:Cn.UNKNOWN}function Vn(e){return Rn.includes(e)?e:An.UNKNOWN}T.buildNotificationsFromMetadata=function(e){return null!=e.notifications?e.notifications.map(function(e){return new kn(e)}):null!=e.statuses?e.statuses.map(xn).filter(function(e){return null!=e}):[]},T.default=Mn,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.Stats=Tt.QueryStatistics=Tt.ProfiledPlan=Tt.Plan=Tt.ServerInfo=Tt.queryType=void 0;var qn=f,zn=T,O=(Hn.prototype.hasPlan=function(){return this.plan instanceof Gn},Hn.prototype.hasProfile=function(){return this.profile instanceof Yn},Hn);function Hn(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new Zn(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new Gn(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new Yn(r.profile),this.notifications=(0,zn.buildNotificationsFromMetadata)(r),this.gqlStatusObjects=(0,zn.buildGqlStatusObjectFromMetadata)(r),this.server=new Xn(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 Gn=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)}):[]},Yn=(Tt.Plan=Gn,Kn.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},Kn);function Kn(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=Jn("dbHits",e),this.rows=Jn("rows",e),this.pageCacheMisses=Jn("pageCacheMisses",e),this.pageCacheHits=Jn("pageCacheHits",e),this.pageCacheHitRatio=Jn("pageCacheHitRatio",e),this.time=Jn("time",e),this.children=null!=e.children?e.children.map(function(e){return new Kn(e)}):[]}Tt.ProfiledPlan=Yn;Tt.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},Qn.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)},Qn.prototype.updates=function(){return this._stats},Qn.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},Qn.prototype.systemUpdates=function(){return this._systemUpdates};var Zn=Qn;function Qn(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]=qn.util.toNumber(r[e]):"systemUpdates"===t?n._systemUpdates=qn.util.toNumber(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}Tt.QueryStatistics=Zn;var Xn=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Jn(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?(t=t[e],qn.util.toNumber(t)):r}Tt.ServerInfo=Xn;function $n(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}function eo(e){console.log("Uncaught error when processing result: "+e)}function to(e){}function ro(e){}Tt.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},Tt.default=O;var no,Xr={},B=(Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.notificationFilterDisabledClassification=Xr.notificationFilterDisabledCategory=Xr.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),S=(Xr.notificationFilterMinimumSeverityLevel=B,Object.freeze(B),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"}),P=(Xr.notificationFilterDisabledCategory=S,Object.freeze(S),S),j=(Xr.notificationFilterDisabledClassification=P,Xr.default=$n,{}),oo=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())})},io=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},w=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},uo=(Object.defineProperty(j,"__esModule",{value:!0}),w(Tt)),ao=f,so=t,co=ao.connectionHolder.EMPTY_CONNECTION_HOLDER;function lo(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[no]="Result",this._stack=null==(i=new Error("")).stack?null:i.stack.replace(/^Error(\n\r)*/,""),this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=n?n:co,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}lo.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)})},lo.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)})},lo.prototype._getOrCreatePromise=function(){var e=this;return null==this._p&&(this._p=new Promise(function(t,r){var n=[];e.subscribe({onNext:function(e){n.push(e)},onCompleted:function(e){t({records:n,summary:e})},onError:function(e){r(e)}})})),this._p},lo.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,so.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return oo(n,void 0,void 0,function(){var t;return io(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,so.newError)("InvalidState: Result stream finished without Summary",so.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 oo(n,void 0,void 0,function(){var t;return io(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 oo(n,void 0,void 0,function(){var t;return io(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 oo(n,void 0,void 0,function(){return io(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()]}})})}}},lo.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},lo.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},lo.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},lo.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},lo.prototype.isOpen=function(){return null===this._summary&&null===this._error},lo.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)})},lo.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:to,i=null!=(e=n.onError)?e:eo,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)}}},lo.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},lo.prototype._releaseConnectionAndGetSummary=function(t){var e=ao.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)})},lo.prototype._createQueuedResultObserver=function(n){var e=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(){var r;return oo(this,void 0,void 0,function(){var t;return io(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,so.newError)("Unexpected empty buffer",so.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},t={onNext:function(e){t._push({done:!1,value:e})},onCompleted:function(e){t._push({done:!0,value:e})},onError:function(e){t._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 oo(e,void 0,void 0,function(){var t;return io(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 oo(e,void 0,void 0,function(){var t,r;return io(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 t},no=Symbol.toStringTag,j.default=lo;Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};g={},Object.defineProperty(g,"__esModule",{value:!0}),g.Releasable=void 0,fo.prototype.release=function(){throw new Error("Not implemented")},Fr=fo;function fo(){}function po(){}g.Releasable=Fr,po.prototype.acquireConnection=function(e){throw Error("Not implemented")},po.prototype.supportsMultiDb=function(){throw Error("Not implemented")},po.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},po.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},po.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},po.prototype.SSREnabled=function(){return!1},po.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},po.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},po.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},po.prototype.close=function(){throw Error("Not implemented")},g.default=po;G={};function ho(){}Object.defineProperty(G,"__esModule",{value:!0}),ho.prototype.beginTransaction=function(e){throw new Error("Not implemented")},ho.prototype.run=function(e,t,r){throw new Error("Not implemented")},ho.prototype.commitTransaction=function(e){throw new Error("Not implemented")},ho.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},ho.prototype.resetAndFlush=function(){throw new Error("Not implemented")},ho.prototype.isOpen=function(){throw new Error("Not implemented")},ho.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},ho.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},G.default=ho;var Z={},bo=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())})},yo=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},O=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_o=(Object.defineProperty(Z,"__esModule",{value:!0}),i),vo=y,mo=h,go=v,Oo=p,wo=t,Eo=O(j);function Po(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=So.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._lowRecordWatermak=c,this._highRecordWatermark=s,this._bookmarks=mo.Bookmarks.empty(),this._notificationFilter=l,this._apiTelemetryConfig=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){f._acceptActive=e})}Po.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return bo(t,void 0,void 0,function(){var t,r=this;return yo(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,wo.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},Po.prototype.run=function(e,t){e=(0,_o.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._lowRecordWatermak,preparationJob:this._activePromise});return this._results.push(t),t},Po.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)}})})},Po.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)}})})},Po.prototype.isOpen=function(){return this._state===So.ACTIVE},Po.prototype.close=function(){return bo(this,void 0,void 0,function(){return yo(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]}})})},Po.prototype[Symbol.asyncDispose]=function(){return this.close()},Po.prototype._onErrorCallback=function(t){return this._state===So.FAILED?Promise.resolve(null):(this._state=So.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())},Po.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new mo.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:mo.Bookmarks.empty(),null==e?void 0:e.db)};var So={ACTIVE:{commit:function(e){return{result:To(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:So.SUCCEEDED}},rollback:function(e){return{result:To(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:So.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 jo(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.run(t,r,{bookmarks:mo.Bookmarks.empty(),txConfig:go.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,wo.newError)("No connection available")}).catch(function(e){return new Oo.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:jo(new Oo.FailedObserver({error:(0,wo.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:So.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:jo(new Oo.CompletedObserver,"ROLLBACK",{},t,0,0),state:So.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,jo(new Oo.FailedObserver({error:(0,wo.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:jo(new Oo.FailedObserver({error:(0,wo.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},vo.EMPTY_CONNECTION_HOLDER,0,0),state:So.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:jo(new Oo.FailedObserver({error:(0,wo.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},vo.EMPTY_CONNECTION_HOLDER,0,0),state:So.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,jo(new Oo.FailedObserver({error:(0,wo.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:jo(new Oo.FailedObserver({error:(0,wo.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:So.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:jo(new Oo.FailedObserver({error:(0,wo.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:So.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,jo(new Oo.FailedObserver({error:(0,wo.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function To(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,wo.newError)("No connection available")})}).catch(function(e){return new Oo.FailedObserver({error:e,onError:n})});return new Eo.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function jo(e,t,r,n,o,i){return void 0===n&&(n=vo.EMPTY_CONNECTION_HOLDER),new Eo.default(Promise.resolve(e),t,r,new vo.ReadOnlyConnectionHolder(null!=n?n:vo.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}Z.default=Po;B={};function Co(e){e=e.run;this._run=e}Object.defineProperty(B,"__esModule",{value:!0}),Co.fromTransaction=function(e){return new Co({run:e.run.bind(e)})},Co.prototype.run=function(e,t){return this._run(e,t)},B.default=Co;var Io,Ro,Ao,S={},P=r&&r.__extends||(Io=function(e,t){return(Io=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}Io(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ko=r&&r.__assign||function(){return(ko=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)},w=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fr=(Object.defineProperty(S,"__esModule",{value:!0}),w(Z)),O=(Ao=Fr.default,P(Mo,Ao),Mo.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},Mo.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},Mo.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},Mo.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},Mo.prototype._toTransaction=function(){return ko(ko({},this),{run:Ao.prototype.run.bind(this),commit:Ao.prototype.commit.bind(this),rollback:Ao.prototype.rollback.bind(this),close:Ao.prototype.close.bind(this),isOpen:Ao.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},Mo.prototype._begin=function(e,t){return Ao.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this),onDB:this._onDbCallback})},Mo.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},Mo.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},Mo);function Mo(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=Ao.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[Ro]="TransactionPromise",t._onDbCallback=e,t}Ro=Symbol.toStringTag,S.default=O;var w={},Fr={},No=(Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.cacheKey=void 0,F);Fr.cacheKey=function(e,t){return null!=t?"basic:"+t:void 0===e?"DEFAULT":"basic"===e.scheme?"basic:"+(null!=(t=e.principal)?t:""):"kerberos"===e.scheme?"kerberos:"+e.credentials:"bearer"===e.scheme?"bearer:"+e.credentials:"none"===e.scheme?"none":(0,No.stringify)(e,{sortedElements:!0})};var 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())})},Do=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},Lo=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},Uo=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))},P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fo=(Object.defineProperty(w,"__esModule",{value:!0}),p),Bo=i,Wo=b,Vo=t,qo=P(j),zo=y,Ho=m,Go=h,Yo=v,Ko=P(S),Zo=P(B),Qo=Fr;function Xo(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 zo.ConnectionHolder({mode:Wo.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 zo.ConnectionHolder({mode:Wo.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:Go.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Ho.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}Xo.prototype.run=function(e,t,r){var o=this,e=(0,Bo.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Yo.TxConfig(r,this._log):Yo.TxConfig.empty(),t=this._run(i,u,function(n){return xo(o,void 0,void 0,function(){var t,r=this;return Do(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:Wo.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},Xo.prototype._run=function(e,t,r){var r=this._acquireAndConsumeConnection(r),n=r.connectionHolder,r=r.resultPromise.catch(function(e){return Promise.resolve(new Fo.FailedObserver({error:e}))}),o={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new qo.default(r,e,t,n,o)},Xo.prototype._acquireConnection=function(e){var r=this,e=this._acquireAndConsumeConnection(e),n=e.connectionHolder;return e.resultPromise.then(function(t){return xo(r,void 0,void 0,function(){return Do(this,function(e){switch(e.label){case 0:return[4,n.releaseConnection()];case 1:return e.sent(),[2,t]}})})})},Xo.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,Vo.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,Vo.newError)("Cannot run query in a closed session."));return{connectionHolder:e,resultPromise:r}},Xo.prototype.beginTransaction=function(e){var t=Yo.TxConfig.empty();return null!=e&&(t=new Yo.TxConfig(e,this._log)),this._beginTransaction(this._mode,t,{api:Wo.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},Xo.prototype._beginTransaction=function(e,t,r){var n=this;if(!this._open)throw(0,Vo.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,Vo.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=Xo._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(this._databaseGuess),this._hasTx=!0,e=new Ko.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},Xo.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,Vo.newError)("You cannot run more transactions on a closed session.")},Xo.prototype._transactionClosed=function(){this._hasTx=!1},Xo.prototype.lastBookmark=function(){return this.lastBookmarks()},Xo.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},Xo.prototype._bookmarks=function(){var r;return xo(this,void 0,void 0,function(){var t;return Do(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Go.Bookmarks(Uo(Uo([],Lo(t),!1),Lo(this._configuredBookmarks),!1))]}})})},Xo.prototype.readTransaction=function(e,t){t=new Yo.TxConfig(t,this._log);return this._runTransaction(Wo.ACCESS_MODE_READ,t,e)},Xo.prototype.writeTransaction=function(e,t){t=new Yo.TxConfig(t,this._log);return this._runTransaction(Wo.ACCESS_MODE_WRITE,t,e)},Xo.prototype._runTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e)},Xo.prototype.executeRead=function(e,t){t=new Yo.TxConfig(t,this._log);return this._executeInTransaction(Wo.ACCESS_MODE_READ,t,e)},Xo.prototype.executeWrite=function(e,t){t=new Yo.TxConfig(t,this._log);return this._executeInTransaction(Wo.ACCESS_MODE_WRITE,t,e)},Xo.prototype._executeInTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e,Zo.default.fromTransaction)},Xo.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,Qo.cacheKey)(this._auth,this._impersonatedUser),e)))},Xo.prototype._getConnectionAcquistionBookmarks=function(){var r;return xo(this,void 0,void 0,function(){var t;return Do(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Go.Bookmarks(Uo(Uo([],Lo(this._configuredBookmarks),!1),Lo(t),!1))]}})})},Xo.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=Go.Bookmarks.empty())},Xo.prototype.close=function(){return xo(this,void 0,void 0,function(){return Do(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]}})})},Xo.prototype[Symbol.asyncDispose]=function(){return this.close()},Xo.prototype._connectionHolderWithMode=function(e){if(e===Wo.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===Wo.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,Vo.newError)("Unknown access mode: "+e)},Xo.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new Go.Bookmarks(e.bookmark),t,e.db)},Xo.prototype._calculateWatermaks=function(){return this._fetchSize===Wo.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},Xo.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},Xo._validateSessionMode=function(e){e=null!=e?e:Wo.ACCESS_MODE_WRITE;if(e!==Wo.ACCESS_MODE_READ&&e!==Wo.ACCESS_MODE_WRITE)throw(0,Vo.newError)("Illegal session mode "+e);return e},w.default=Xo;var O={},p={},Jo=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())})},$o=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},ei=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.")},ti=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},ri=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))},y=(Object.defineProperty(p,"__esModule",{value:!0}),p.bookmarkManager=void 0,ni.prototype.updateBookmarks=function(e,t){return Jo(this,void 0,void 0,function(){return $o(this,function(e){throw new Error("Not implemented")})})},ni.prototype.getBookmarks=function(){return Jo(this,void 0,void 0,function(){return $o(this,function(e){throw new Error("Not implemented")})})},ni);function ni(){throw new Error("Not implemented")}p.default=y,p.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new oi(t,e.bookmarksSupplier,e.bookmarksConsumer)};ii.prototype.updateBookmarks=function(f,p){return Jo(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return $o(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=ei(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=ei(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(ri([],ti(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},ii.prototype.getBookmarks=function(){var s;return Jo(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return $o(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:r=null!=(s=e.sent())?s:[];try{for(n=ei(r),o=n.next();!o.done;o=n.next())i=o.value,t.add(i)}catch(e){u={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(u)throw u.error}}e.label=2;case 2:return[2,ri([],ti(t),!1)]}})})};var oi=ii;function ii(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())})},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={next:e(0),throw:e(1),return:e(2)};return"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}},si=(Object.defineProperty(m,"__esModule",{value:!0}),v(Qr)),ci=t;function li(){}li.prototype.eagerResultTransformer=function(){return fi},li.prototype.eager=function(){return fi},li.prototype.mappedResultTransformer=function(e){return pi(e)},li.prototype.mapped=function(e){return pi(e)},li.prototype.first=function(){return di},li.prototype.summary=function(){return hi};P=new li;function fi(o){return ui(this,void 0,void 0,function(){var t,r,n;return ai(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 si.default(n,r,t)]}})})}function pi(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,ci.newError)("Requires a map or/and a collect functions.");return function(o){return ui(e,void 0,void 0,function(){return ai(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 di(o){return ui(this,void 0,void 0,function(){var t,r,n;return ai(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 hi(t){return ui(this,void 0,void 0,function(){return ai(this,function(e){switch(e.label){case 0:return[4,t.summary()];case 1:return[2,e.sent()]}})})}Object.freeze(P),m.default=P;var y={},bi=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())})},yi=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={next:e(0),throw:e(1),return:e(2)};return"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=(Object.defineProperty(y,"__esModule",{value:!0}),b);function vi(e){this._createSession=e}vi.prototype.execute=function(o,i,u){return bi(this,void 0,void 0,function(){var t,r,n=this;return yi(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 bi(n,void 0,void 0,function(){return yi(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 bi(n,void 0,void 0,function(){var t;return yi(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]}})})},y.default=vi;v={};function mi(e){this.maxSize=e,this.pruneCount=Math.max(Math.round(.01*e*Math.log(e)),1),this.map=new Map}Object.defineProperty(v,"__esModule",{value:!0}),mi.prototype.set=function(e,t){this.map.set(e,{database:t,lastUsed:Date.now()}),this._pruneCache()},mi.prototype.get=function(e){e=this.map.get(e);if(void 0!==e)return e.lastUsed=Date.now(),e.database},mi.prototype.delete=function(e){this.map.delete(e)},mi.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])},v.default=mi;function gi(){this.routing=Wi.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 Oi=r&&r.__assign||function(){return(Oi=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)},wi=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())})},Ei=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={next:e(0),throw:e(1),return:e(2)};return"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}},Pi=(Object.defineProperty(O,"__esModule",{value:!0}),O.QueryConfig=O.SessionConfig=O.routing=O.WRITE=O.READ=O.Driver=void 0,h),Si=P(E),Ti=b,ji=_,Ci=P(w),Ii=i,Ri=p,Ai=P(m),ki=P(y),Mi=t,Ni=P(v),xi=Fr,Di=36e5,Li=1e3,Ui=Ti.ACCESS_MODE_READ,Fi=(O.READ=Ui,Ti.ACCESS_MODE_WRITE),Bi=(O.WRITE=Fi,0),Wi=(O.SessionConfig=function(){this.defaultAccessMode=Fi,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"}),h=(O.routing=Wi,Object.freeze(Wi),O.QueryConfig=gi,Object.defineProperty(Vi.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Vi.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),wi(this,void 0,void 0,function(){var t,r,n;return Ei(this,function(e){switch(e.label){case 0:if(t=null===u.bookmarkManager?void 0:null!=(a=u.bookmarkManager)?a:this.executeQueryBookmarkManager,r=null!=(a=u.resultTransformer)?a:Ai.default.eager(),(n=null!=(s=u.routing)?s:Wi.WRITE)!==Wi.READ&&n!==Wi.WRITE)throw(0,Mi.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser,transactionConfig:u.transactionConfig,auth:u.auth,signal:u.signal},o,i)];case 1:return[2,e.sent()]}})})},Vi.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:Ui})},Vi.prototype.verifyAuthentication=function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return wi(this,void 0,void 0,function(){return Ei(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:Ui})];case 1:return[2,e.sent()]}})})},Vi.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:Ui})},Vi.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Vi.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Vi.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Vi.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},Vi.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Vi.prototype.isEncrypted=function(){return this._isEncrypted()},Vi.prototype._supportsRouting=function(){return this._meta.routing},Vi.prototype._isEncrypted=function(){return this._config.encrypted===Ii.ENCRYPTION_ON||!0===this._config.encrypted},Vi.prototype._getTrust=function(){return this._config.trust},Vi.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?Fi:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:zi(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,auth:e})},Vi.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Vi.prototype[Symbol.asyncDispose]=function(){return this.close()},Vi.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Vi.prototype._homeDatabaseCallback=function(e,t){this.homeDatabaseCache.set(e,t)},Vi.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=Ci.default._validateSessionMode(t),c=this._getOrCreateConnectionProvider(),l=this.homeDatabaseCache.get((0,xi.cacheKey)(e,i)),f=this._homeDatabaseCallback.bind(this),r=null!=r?new Pi.Bookmarks(r):Pi.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:c,bookmarks:r,config:Oi({cachedHomeDatabase:l,routingDriver:this._supportsRouting()},this._config),reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:s,auth:e,log:this._log,homeDatabaseCallback:f})},Vi.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new Si.default(e.resolver)))),this._connectionProvider},Vi);function Vi(e,t,r,n,o){void 0===n&&(n=function(e){return new Ci.default(e)}),void 0===o&&(o=function(e){return new ki.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=qi(i.maxConnectionLifetime,Di),i.maxConnectionPoolSize=qi(i.maxConnectionPoolSize,Ti.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=qi(i.connectionAcquisitionTimeout,Ti.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=zi(i.fetchSize,Li),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?Ti.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=ji.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=Bi++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,Ri.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this.homeDatabaseCache=new Ni.default(1e4),this._afterConstruction()}function qi(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function zi(e,t){e=parseInt(e,10);if(0<e||e===Ti.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(Ti.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}O.Driver=h,O.default=h;var E={},Hi=(Object.defineProperty(E,"__esModule",{value:!0}),t),Gi=F;function Yi(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(Yi(t)&&(n.credentials=t),Yi(r)&&(n.realm=r),Yi(o)){try{(0,Gi.stringify)(o)}catch(e){throw(0,Hi.newError)("Circular references in custom auth token parameters",void 0,e)}n.parameters=o}return n}};var b={},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())})},Zi=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qi=(Object.defineProperty(b,"__esModule",{value:!0}),b.staticAuthTokenManager=b.authTokenManagers=b.AuthTokenAndExpiration=void 0,_(E)),Xi=f;function Ji(){}function $i(){}Ji.prototype.getToken=function(){throw new Error("Not Implemented")},Ji.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},b.default=Ji,b.AuthTokenAndExpiration=function(){this.token=Qi.default.none(),this.expiration=void 0},$i.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 ru(e,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},$i.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 ru(function(){return Ki(t,void 0,void 0,function(){var t;return Zi(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"])};i=new $i;b.authTokenManagers=i,Object.freeze(i),b.staticAuthTokenManager=function(e){return e=e.authToken,new ou(e)};tu.prototype.subscribe=function(e){this._subscribers.push(e)},tu.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},tu.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var eu=tu;function tu(e){this._subscribers=e=void 0===e?[]:e}nu.prototype.getToken=function(){var t;return Ki(this,void 0,void 0,function(){return Zi(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]}})})},nu.prototype.handleSecurityException=function(e,t){return!!this._handledSecurityCodes.includes(t)&&(Xi.util.equals(e,null==(t=this._currentAuthData)?void 0:t.token)&&this._scheduleRefreshAuthToken(),!0)},nu.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new eu,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)},nu.prototype._refreshAuthToken=function(){return Ki(this,void 0,void 0,function(){var r=this;return Zi(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 ru=nu;function nu(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}iu.prototype.getToken=function(){return this._authToken},iu.prototype.handleSecurityException=function(e,t){return!1};var ou=iu;function iu(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 au,su,y={},P=r&&r.__extends||(au=function(e,t){return(au=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}au(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),v=(Object.defineProperty(y,"__esModule",{value:!0}),y.InternalConfig=y.Config=void 0,y.Config=uu,P(cu,su=uu),cu);function cu(){return null!==su&&su.apply(this,arguments)||this}y.InternalConfig=v;var lu,Fr={},h=r&&r.__extends||(lu=function(e,t){return(lu=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}lu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),fu=r&&r.__assign||function(){return(fu=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)},pu=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]}),du=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&pu(t,e,r);return du(t,e),t},hu=(Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.resolveCertificateProvider=Fr.clientCertificateProviders=Fr.RotatingClientCertificateProvider=Fr.ClientCertificateProvider=void 0,_(F)),i=(Fr.default=function(){this.certfile="",this.keyfile="",this.password=void 0},bu.prototype.hasUpdate=function(){throw new Error("Not Implemented")},bu.prototype.getClientCertificate=function(){throw new Error("Not Implemented")},bu);function bu(){}Fr.ClientCertificateProvider=i;h(_u,yu=i),_u.prototype.updateCertificate=function(e){throw new Error("Not implemented")};var yu,P=_u;function _u(){return null!==yu&&yu.apply(this,arguments)||this}function vu(){}Fr.RotatingClientCertificateProvider=P,vu.prototype.rotating=function(e){e=e.initialCertificate;if(null==e||!mu(e))throw new TypeError("initialCertificate should be ClientCertificate, but got ".concat(hu.stringify(e)));e=fu({},e);return new Eu(e)};v=new vu;function mu(e){return null!=e&&"object"==typeof e&&"certfile"in e&&(gu(r=e.certfile)||Ou(r,gu))&&"keyfile"in e&&(t(r=e.keyfile)||Ou(r,t))&&wu("password",e);function t(e){return"string"==typeof e||null!=e&&"object"==typeof e&&"path"in e&&"string"==typeof e.path&&wu("password",e)}var r}function gu(e){return"string"==typeof e}function Ou(e,t,r){return void 0===r&&(r=!1),Array.isArray(e)&&(r||0<e.length)&&e.filter(t).length===e.length}function wu(e,t){return!(e in t)||null==t[e]||"string"==typeof t[e]}Fr.clientCertificateProviders=v,Object.freeze(v),Fr.resolveCertificateProvider=function(e){if(null!=e){if("object"==typeof e&&"hasUpdate"in e&&"getClientCertificate"in e&&"function"==typeof e.getClientCertificate&&"function"==typeof e.hasUpdate)return e;var t;if(mu(e))return t=fu({},e),{getClientCertificate:function(){return t},hasUpdate:function(){return!1}};throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(hu.stringify(e)))}};Pu.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},Pu.prototype.getClientCertificate=function(){return this._certificate},Pu.prototype.updateCertificate=function(e){if(!mu(e))throw new TypeError("certificate should be ClientCertificate, but got ".concat(hu.stringify(e)));this._certificate=fu({},e),this._updated=!0};var Eu=Pu;function Pu(e,t){void 0===t&&(t=!1),this._certificate=e,this._updated=t}var Su,Tu,ju,Cu,Iu,Ru,Au,ku,Mu,Nu,xu,Du,Lu,Uu,Fu,Bu,_={},Wu=(Object.defineProperty(_,"__esModule",{value:!0}),_.vector=void 0,t),Vu={INT8:"INT8",INT16:"INT16",INT32:"INT32",INT64:"INT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"},qu=(Object.freeze(Vu),zu.prototype.asTypedArray=function(){return this._typedArray},zu.prototype.getType=function(){return this._type},zu);function zu(e){if(e instanceof Int8Array)this._type=Vu.INT8;else if(e instanceof Int16Array)this._type=Vu.INT16;else if(e instanceof Int32Array)this._type=Vu.INT32;else if(e instanceof BigInt64Array)this._type=Vu.INT64;else if(e instanceof Float32Array)this._type=Vu.FLOAT32;else{if(!(e instanceof Float64Array))throw e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof BigUint64Array?(0,Wu.newError)("The neo4j Vector class does not support Unsigned Integer Arrays, please use a signed IntArray"):(0,Wu.newError)("The neo4j Vector class is a wrapper for TypedArrays. got ".concat(typeof e));this._type=Vu.FLOAT64}this._typedArray=e}_.default=qu,_.vector=function(e){return new qu(e)},h=e,Su=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]}),Tu=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Su(t,e,r);return Tu(t,e),t},P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(h,"__esModule",{value:!0}),h.EagerResult=h.Result=h.Stats=h.QueryStatistics=h.ProfiledPlan=h.Plan=h.GqlStatusObject=h.Notification=h.ServerInfo=h.queryType=h.ResultSummary=h.Record=h.isPathSegment=h.PathSegment=h.isPath=h.Path=h.isUnboundRelationship=h.UnboundRelationship=h.isRelationship=h.Relationship=h.isNode=h.Node=h.Time=h.LocalTime=h.LocalDateTime=h.isTime=h.isLocalTime=h.isLocalDateTime=h.isDuration=h.isDateTime=h.isDate=h.Duration=h.DateTime=h.Date=h.Point=h.isPoint=h.internal=h.toString=h.toNumber=h.inSafeRange=h.isInt=h.int=h.Integer=h.error=h.isRetriableError=h.GQLError=h.newGQLError=h.Neo4jError=h.newError=h.authTokenManagers=void 0,h.vector=h.Vector=h.resolveCertificateProvider=h.clientCertificateProviders=h.notificationFilterMinimumSeverityLevel=h.notificationFilterDisabledClassification=h.notificationFilterDisabledCategory=h.notificationSeverityLevel=h.notificationClassification=h.notificationCategory=h.resultTransformers=h.routing=h.staticAuthTokenManager=h.bookmarkManager=h.auth=h.json=h.driver=h.types=h.Driver=h.Session=h.TransactionPromise=h.ManagedTransaction=h.Transaction=h.Connection=h.Releasable=h.ConnectionProvider=void 0,ju=t,Object.defineProperty(h,"newError",{enumerable:!0,get:function(){return ju.newError}}),Object.defineProperty(h,"Neo4jError",{enumerable:!0,get:function(){return ju.Neo4jError}}),Object.defineProperty(h,"newGQLError",{enumerable:!0,get:function(){return ju.newGQLError}}),Object.defineProperty(h,"GQLError",{enumerable:!0,get:function(){return ju.GQLError}}),Object.defineProperty(h,"isRetriableError",{enumerable:!0,get:function(){return ju.isRetriableError}}),Cu=i(n),h.Integer=Cu.default,Object.defineProperty(h,"int",{enumerable:!0,get:function(){return Cu.int}}),Object.defineProperty(h,"isInt",{enumerable:!0,get:function(){return Cu.isInt}}),Object.defineProperty(h,"inSafeRange",{enumerable:!0,get:function(){return Cu.inSafeRange}}),Object.defineProperty(h,"toNumber",{enumerable:!0,get:function(){return Cu.toNumber}}),Object.defineProperty(h,"toString",{enumerable:!0,get:function(){return Cu.toString}}),Iu=o,Object.defineProperty(h,"Date",{enumerable:!0,get:function(){return Iu.Date}}),Object.defineProperty(h,"DateTime",{enumerable:!0,get:function(){return Iu.DateTime}}),Object.defineProperty(h,"Duration",{enumerable:!0,get:function(){return Iu.Duration}}),Object.defineProperty(h,"isDate",{enumerable:!0,get:function(){return Iu.isDate}}),Object.defineProperty(h,"isDateTime",{enumerable:!0,get:function(){return Iu.isDateTime}}),Object.defineProperty(h,"isDuration",{enumerable:!0,get:function(){return Iu.isDuration}}),Object.defineProperty(h,"isLocalDateTime",{enumerable:!0,get:function(){return Iu.isLocalDateTime}}),Object.defineProperty(h,"isLocalTime",{enumerable:!0,get:function(){return Iu.isLocalTime}}),Object.defineProperty(h,"isTime",{enumerable:!0,get:function(){return Iu.isTime}}),Object.defineProperty(h,"LocalDateTime",{enumerable:!0,get:function(){return Iu.LocalDateTime}}),Object.defineProperty(h,"LocalTime",{enumerable:!0,get:function(){return Iu.LocalTime}}),Object.defineProperty(h,"Time",{enumerable:!0,get:function(){return Iu.Time}}),Ru=l,Object.defineProperty(h,"Node",{enumerable:!0,get:function(){return Ru.Node}}),Object.defineProperty(h,"isNode",{enumerable:!0,get:function(){return Ru.isNode}}),Object.defineProperty(h,"Relationship",{enumerable:!0,get:function(){return Ru.Relationship}}),Object.defineProperty(h,"isRelationship",{enumerable:!0,get:function(){return Ru.isRelationship}}),Object.defineProperty(h,"UnboundRelationship",{enumerable:!0,get:function(){return Ru.UnboundRelationship}}),Object.defineProperty(h,"isUnboundRelationship",{enumerable:!0,get:function(){return Ru.isUnboundRelationship}}),Object.defineProperty(h,"Path",{enumerable:!0,get:function(){return Ru.Path}}),Object.defineProperty(h,"isPath",{enumerable:!0,get:function(){return Ru.isPath}}),Object.defineProperty(h,"PathSegment",{enumerable:!0,get:function(){return Ru.PathSegment}}),Object.defineProperty(h,"isPathSegment",{enumerable:!0,get:function(){return Ru.isPathSegment}}),v=P(ft),h.Record=v.default,Au=u,Object.defineProperty(h,"isPoint",{enumerable:!0,get:function(){return Au.isPoint}}),Object.defineProperty(h,"Point",{enumerable:!0,get:function(){return Au.Point}}),ku=i(Tt),h.ResultSummary=ku.default,Object.defineProperty(h,"queryType",{enumerable:!0,get:function(){return ku.queryType}}),Object.defineProperty(h,"ServerInfo",{enumerable:!0,get:function(){return ku.ServerInfo}}),Object.defineProperty(h,"Plan",{enumerable:!0,get:function(){return ku.Plan}}),Object.defineProperty(h,"ProfiledPlan",{enumerable:!0,get:function(){return ku.ProfiledPlan}}),Object.defineProperty(h,"QueryStatistics",{enumerable:!0,get:function(){return ku.QueryStatistics}}),Object.defineProperty(h,"Stats",{enumerable:!0,get:function(){return ku.Stats}}),Mu=i(T),h.GqlStatusObject=Mu.default,Object.defineProperty(h,"Notification",{enumerable:!0,get:function(){return Mu.Notification}}),Object.defineProperty(h,"notificationCategory",{enumerable:!0,get:function(){return Mu.notificationCategory}}),Object.defineProperty(h,"notificationClassification",{enumerable:!0,get:function(){return Mu.notificationClassification}}),Object.defineProperty(h,"notificationSeverityLevel",{enumerable:!0,get:function(){return Mu.notificationSeverityLevel}}),Nu=Xr,Object.defineProperty(h,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return Nu.notificationFilterDisabledCategory}}),Object.defineProperty(h,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return Nu.notificationFilterDisabledClassification}}),Object.defineProperty(h,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return Nu.notificationFilterMinimumSeverityLevel}}),t=P(j),h.Result=t.default,n=P(Qr),h.EagerResult=n.default,xu=i(g),h.ConnectionProvider=xu.default,Object.defineProperty(h,"Releasable",{enumerable:!0,get:function(){return xu.Releasable}}),o=P(G),h.Connection=o.default,l=P(Z),h.Transaction=l.default,ft=P(B),h.ManagedTransaction=ft.default,u=P(S),h.TransactionPromise=u.default,Tt=P(w),h.Session=Tt.default,T=i(O),Xr=T,h.Driver=T.default,h.driver=Xr,j=P(E),h.auth=j.default,Du=p,Object.defineProperty(h,"bookmarkManager",{enumerable:!0,get:function(){return Du.bookmarkManager}}),Lu=b,Object.defineProperty(h,"authTokenManagers",{enumerable:!0,get:function(){return Lu.authTokenManagers}}),Object.defineProperty(h,"staticAuthTokenManager",{enumerable:!0,get:function(){return Lu.staticAuthTokenManager}}),Uu=O,Object.defineProperty(h,"routing",{enumerable:!0,get:function(){return Uu.routing}}),Qr=i(y),h.types=Qr,g=i(F),h.json=g,P=P(m),h.resultTransformers=P.default,Fu=Fr,Object.defineProperty(h,"clientCertificateProviders",{enumerable:!0,get:function(){return Fu.clientCertificateProviders}}),Object.defineProperty(h,"resolveCertificateProvider",{enumerable:!0,get:function(){return Fu.resolveCertificateProvider}}),G=i(f),h.internal=G,Bu=i(_),h.Vector=Bu.default,Object.defineProperty(h,"vector",{enumerable:!0,get:function(){return Bu.vector}}),i={SERVICE_UNAVAILABLE:ju.SERVICE_UNAVAILABLE,SESSION_EXPIRED:ju.SESSION_EXPIRED,PROTOCOL_ERROR:ju.PROTOCOL_ERROR},h.error=i,i={authTokenManagers:Lu.authTokenManagers,newError:ju.newError,Neo4jError:ju.Neo4jError,newGQLError:ju.newGQLError,GQLError:ju.GQLError,isRetriableError:ju.isRetriableError,error:i,Integer:Cu.default,int:Cu.int,isInt:Cu.isInt,inSafeRange:Cu.inSafeRange,toNumber:Cu.toNumber,toString:Cu.toString,internal:G,isPoint:Au.isPoint,Point:Au.Point,Date:Iu.Date,DateTime:Iu.DateTime,Duration:Iu.Duration,isDate:Iu.isDate,isDateTime:Iu.isDateTime,isDuration:Iu.isDuration,isLocalDateTime:Iu.isLocalDateTime,isLocalTime:Iu.isLocalTime,isTime:Iu.isTime,LocalDateTime:Iu.LocalDateTime,LocalTime:Iu.LocalTime,Time:Iu.Time,Node:Ru.Node,isNode:Ru.isNode,Relationship:Ru.Relationship,isRelationship:Ru.isRelationship,UnboundRelationship:Ru.UnboundRelationship,isUnboundRelationship:Ru.isUnboundRelationship,Path:Ru.Path,isPath:Ru.isPath,PathSegment:Ru.PathSegment,isPathSegment:Ru.isPathSegment,Record:v.default,ResultSummary:ku.default,queryType:ku.queryType,ServerInfo:ku.ServerInfo,Notification:Mu.Notification,GqlStatusObject:Mu.default,Plan:ku.Plan,ProfiledPlan:ku.ProfiledPlan,QueryStatistics:ku.QueryStatistics,Stats:ku.Stats,Result:t.default,EagerResult:n.default,Transaction:l.default,ManagedTransaction:ft.default,TransactionPromise:u.default,Session:Tt.default,Driver:T.default,Connection:o.default,Releasable:xu.Releasable,types:Qr,driver:Xr,json:g,auth:j.default,bookmarkManager:Du.bookmarkManager,routing:Uu.routing,resultTransformers:P.default,notificationCategory:Mu.notificationCategory,notificationClassification:Mu.notificationClassification,notificationSeverityLevel:Mu.notificationSeverityLevel,notificationFilterDisabledCategory:Nu.notificationFilterDisabledCategory,notificationFilterDisabledClassification:Nu.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:Nu.notificationFilterMinimumSeverityLevel,clientCertificateProviders:Fu.clientCertificateProviders,resolveCertificateProvider:Fu.resolveCertificateProvider},h.default=i;Z={},B={},S={},w={},E={};Object.defineProperty(E,"__esModule",{value:!0}),E.isFunction=void 0,E.isFunction=function(e){return"function"==typeof e};p={},b={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.createErrorClass=void 0,O.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(b,"__esModule",{value:!0}),b.UnsubscriptionError=void 0;y=O,b.UnsubscriptionError=y.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}}),F={};Object.defineProperty(F,"__esModule",{value:!0}),F.arrRemove=void 0,F.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var Hu=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.")},Gu=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},Yu=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},Ku=(Object.defineProperty(p,"__esModule",{value:!0}),p.isSubscription=p.EMPTY_SUBSCRIPTION=p.Subscription=void 0,E),Zu=b,Qu=F,Xu=(Ju.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=Hu(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(Ku.isFunction(u))try{u()}catch(e){r=e instanceof Zu.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=Hu(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{$u(l)}catch(e){r=null!=r?r:[],e instanceof Zu.UnsubscriptionError?r=Yu(Yu([],Gu(r)),Gu(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 Zu.UnsubscriptionError(r)}},Ju.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)$u(e);else{if(e instanceof Ju){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},Ju.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},Ju.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},Ju.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Qu.arrRemove(t,e)},Ju.prototype.remove=function(e){var t=this._finalizers;t&&Qu.arrRemove(t,e),e instanceof Ju&&e._removeParent(this)},Ju.EMPTY=((m=new Ju).closed=!0,m),Ju);function Ju(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function $u(e){Ku.isFunction(e)?e():e.unsubscribe()}p.Subscription=Xu,p.EMPTY_SUBSCRIPTION=Xu.EMPTY,p.isSubscription=function(e){return e instanceof Xu||e&&"closed"in e&&Ku.isFunction(e.remove)&&Ku.isFunction(e.add)&&Ku.isFunction(e.unsubscribe)};var ea,ta,ra,Fr={},f=(Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.config=void 0,Fr.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),_={},na=(ea=_,ta=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},ra=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(ea,"__esModule",{value:!0}),ea.timeoutProvider=void 0,ea.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=ea.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,ra([e,t],ta(r))):setTimeout.apply(void 0,ra([e,t],ta(r)))},clearTimeout:function(e){var t=ea.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(f,"__esModule",{value:!0}),f.reportUnhandledError=void 0,Fr),oa=_;f.reportUnhandledError=function(t){oa.timeoutProvider.setTimeout(function(){var e=na.config.onUnhandledError;if(!e)throw t;e(t)})};G={};Object.defineProperty(G,"__esModule",{value:!0}),G.noop=void 0,G.noop=function(){};v={};function ia(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(v,"__esModule",{value:!0}),v.createNotification=v.nextNotification=v.errorNotification=v.COMPLETE_NOTIFICATION=void 0,v.COMPLETE_NOTIFICATION=ia("C",void 0,void 0),v.errorNotification=function(e){return ia("E",void 0,e)},v.nextNotification=function(e){return ia("N",e,void 0)},v.createNotification=ia;var ua,aa,sa,ca,la,fa,pa,da,ha,ba,ya,_a,va,ma,t={},ga=(Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0,Fr),Oa=null;function wa(e){var t=sa.call(this)||this;return t.isStopped=!1,e?(t.destination=e,la.isSubscription(e)&&e.add(t)):t.destination=ua.EMPTY_OBSERVER,t}function Ea(e,t){return ya.call(e,t)}function Pa(e){this.partialObserver=e}function Sa(e,t,r){var n=va.call(this)||this;return r=ca.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&fa.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&Ea(e.next,t),error:e.error&&Ea(e.error,t),complete:e.complete&&Ea(e.complete,t)}):e,n.destination=new _a(r),n}function Ta(e){fa.config.useDeprecatedSynchronousErrorHandling?ba.captureError(e):pa.reportUnhandledError(e)}function ja(e,t){var r=fa.config.onStoppedNotification;r&&ha.timeoutProvider.setTimeout(function(){return r(e,t)})}t.errorContext=function(e){if(ga.config.useDeprecatedSynchronousErrorHandling){var t=!Oa;if(t&&(Oa={errorThrown:!1,error:null}),e(),t){var t=Oa,r=t.errorThrown,t=t.error;if(Oa=null,r)throw t}}else e()},t.captureError=function(e){ga.config.useDeprecatedSynchronousErrorHandling&&Oa&&(Oa.errorThrown=!0,Oa.error=e)},ua=w,n=r&&r.__extends||(aa=function(e,t){return(aa=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}aa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(ua,"__esModule",{value:!0}),ua.EMPTY_OBSERVER=ua.SafeSubscriber=ua.Subscriber=void 0,ca=E,fa=Fr,pa=f,l=G,da=v,ha=_,ba=t,sa=(la=p).Subscription,n(wa,sa),wa.create=function(e,t,r){return new ma(e,t,r)},wa.prototype.next=function(e){this.isStopped?ja(da.nextNotification(e),this):this._next(e)},wa.prototype.error=function(e){this.isStopped?ja(da.errorNotification(e),this):(this.isStopped=!0,this._error(e))},wa.prototype.complete=function(){this.isStopped?ja(da.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},wa.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,sa.prototype.unsubscribe.call(this),this.destination=null)},wa.prototype._next=function(e){this.destination.next(e)},wa.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},wa.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},ft=wa,ua.Subscriber=ft,ya=Function.prototype.bind,Pa.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Ta(e)}},Pa.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Ta(e)}else Ta(e)},Pa.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Ta(e)}},_a=Pa,n(Sa,va=ft),ma=Sa,ua.SafeSubscriber=ma,ua.EMPTY_OBSERVER={closed:!0,next:l.noop,error:function(e){throw e},complete:l.noop};u={},Object.defineProperty(u,"__esModule",{value:!0}),u.observable=void 0,u.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",Tt={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.identity=void 0,T.identity=function(e){return e},Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.pipeFromArray=Tt.pipe=void 0;var Ca=T;function Ia(t){return 0===t.length?Ca.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}Tt.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ia(e)},Tt.pipeFromArray=Ia,Object.defineProperty(S,"__esModule",{value:!0}),S.Observable=void 0;var Ra=w,Aa=p,o=u,ka=Tt,Ma=Fr,Na=E,xa=t;function Da(e){e&&(this._subscribe=e)}function La(e){return null!=(e=null!=e?e:Ma.config.Promise)?e:Promise}Da.prototype.lift=function(e){var t=new Da;return t.source=this,t.operator=e,t},Da.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof Ra.Subscriber||function(e){return e&&Na.isFunction(e.next)&&Na.isFunction(e.error)&&Na.isFunction(e.complete)}(n)&&Aa.isSubscription(n)?e:new Ra.SafeSubscriber(e,t,r);return xa.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},Da.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},Da.prototype.forEach=function(n,e){var o=this;return new(e=La(e))(function(e,t){var r=new Ra.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},Da.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},Da.prototype[o.observable]=function(){return this},Da.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ka.pipeFromArray(e)(this)},Da.prototype.toPromise=function(e){var n=this;return new(e=La(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},Da.create=function(e){return new Da(e)},S.Observable=Da;var Qr={},Xr={},g={},Ua=(Object.defineProperty(g,"__esModule",{value:!0}),g.operate=g.hasLift=void 0,E);function Fa(e){return Ua.isFunction(null==e?void 0:e.lift)}g.hasLift=Fa,g.operate=function(t){return function(e){if(Fa(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 Ba,j={},P=r&&r.__extends||(Ba=function(e,t){return(Ba=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}Ba(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),h=(Object.defineProperty(j,"__esModule",{value:!0}),j.OperatorSubscriber=j.createOperatorSubscriber=void 0,w);j.createOperatorSubscriber=function(e,t,r,n,o){return new Va(e,t,r,n,o)};P(qa,Wa=h.Subscriber),qa.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,Wa.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var Wa,Va=qa;function qa(t,r,e,n,o,i){var u=Wa.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:Wa.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:Wa.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:Wa.prototype._complete,u}j.OperatorSubscriber=Va,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.refCount=void 0;var za=g,Ha=j;Xr.refCount=function(){return za.operate(function(r,n){var o=null,e=(r._refCount++,Ha.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 Ga,i=r&&r.__extends||(Ga=function(e,t){return(Ga=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}Ga(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.ConnectableObservable=void 0;var Ya,Ka=p,Za=Xr,Qa=j,Xa=g,y=(Ya=S.Observable,i(Ja,Ya),Ja.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},Ja.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},Ja.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},Ja.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new Ka.Subscription,t=this.getSubject(),e.add(this.source.subscribe(Qa.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=Ka.Subscription.EMPTY)),e},Ja.prototype.refCount=function(){return Za.refCount()(this)},Ja);function Ja(e,t){var r=Ya.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,Xa.hasLift(e)&&(r.lift=e.lift),r}Qr.ConnectableObservable=y;var $a,es,ts,rs,ns,m={},v={},_=($a=v,Object.defineProperty($a,"__esModule",{value:!0}),$a.performanceTimestampProvider=void 0,$a.performanceTimestampProvider={now:function(){return($a.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),os=(es=_,ts=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},rs=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(es,"__esModule",{value:!0}),es.animationFrameProvider=void 0,ns=p,es.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=es.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new ns.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=es.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,rs([],ts(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=es.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,rs([],ts(e)))},delegate:void 0},Object.defineProperty(m,"__esModule",{value:!0}),m.animationFrames=void 0,S),is=v,us=_;function as(a){return new os.Observable(function(r){var n=a||is.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=us.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&us.animationFrameProvider.cancelAnimationFrame(i)}})}m.animationFrames=function(e){return e?as(e):ls};var ss,cs,ls=as(),n={},ft={},l=(Object.defineProperty(ft,"__esModule",{value:!0}),ft.ObjectUnsubscribedError=void 0,O),o=(ft.ObjectUnsubscribedError=l.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(ss=function(e,t){return(ss=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}ss(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),fs=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.")},ps=(Object.defineProperty(n,"__esModule",{value:!0}),n.AnonymousSubject=n.Subject=void 0,S),ds=p,hs=ft,bs=F,ys=t,P=(cs=ps.Observable,o(_s,cs),_s.prototype.lift=function(e){var t=new ms(this,this);return t.operator=e,t},_s.prototype._throwIfClosed=function(){if(this.closed)throw new hs.ObjectUnsubscribedError},_s.prototype.next=function(o){var i=this;ys.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=fs(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}}}})},_s.prototype.error=function(t){var r=this;ys.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)}})},_s.prototype.complete=function(){var t=this;ys.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},_s.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(_s.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),_s.prototype._trySubscribe=function(e){return this._throwIfClosed(),cs.prototype._trySubscribe.call(this,e)},_s.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},_s.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?ds.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new ds.Subscription(function(){t.currentObservers=null,bs.arrRemove(o,e)}))},_s.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},_s.prototype.asObservable=function(){var e=new ps.Observable;return e.source=this,e},_s.create=function(e,t){return new ms(e,t)},_s);function _s(){var e=cs.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}n.Subject=P;o(gs,vs=P),gs.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},gs.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},gs.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},gs.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:ds.EMPTY_SUBSCRIPTION};var vs,ms=gs;function gs(e,t){var r=vs.call(this)||this;return r.destination=e,r.source=t,r}n.AnonymousSubject=ms;var Os,h={},i=r&&r.__extends||(Os=function(e,t){return(Os=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}Os(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(h,"__esModule",{value:!0}),h.BehaviorSubject=void 0;ws=n.Subject,i(Es,ws),Object.defineProperty(Es.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),Es.prototype._subscribe=function(e){var t=ws.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},Es.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},Es.prototype.next=function(e){ws.prototype.next.call(this,this._value=e)};var ws,y=Es;function Es(e){var t=ws.call(this)||this;return t._value=e,t}h.BehaviorSubject=y;var Ps,Ss,v={},l={},t=(Ps=l,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.dateTimestampProvider=void 0,Ps.dateTimestampProvider={now:function(){return(Ps.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(Ss=function(e,t){return(Ss=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}Ss(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(v,"__esModule",{value:!0}),v.ReplaySubject=void 0;var Ts,js=l,o=(Ts=n.Subject,t(Cs,Ts),Cs.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(),Ts.prototype.next.call(this,e)},Cs.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},Cs.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)}},Cs);function Cs(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=js.dateTimestampProvider);var n=Ts.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}v.ReplaySubject=o;var Is,P={},i=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(P,"__esModule",{value:!0}),P.AsyncSubject=void 0;Rs=n.Subject,i(As,Rs),As.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())},As.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},As.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&Rs.prototype.next.call(this,t),Rs.prototype.complete.call(this))};var Rs,y=As;function As(){var e=null!==Rs&&Rs.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}P.AsyncSubject=y;var ks,t={},o={},i={},y={},Ms=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)});Object.defineProperty(y,"__esModule",{value:!0}),y.Action=void 0;Ns=p.Subscription,Ms(xs,Ns),xs.prototype.schedule=function(e,t){return this};var Ns,Ms=xs;function xs(e,t){return Ns.call(this)||this}y.Action=Ms;var Ds,Ls,Us,Fs,Ms={},Bs=(Ds=Ms,Ls=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},Us=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(Ds,"__esModule",{value:!0}),Ds.intervalProvider=void 0,Ds.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Ds.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,Us([e,t],Ls(r))):setInterval.apply(void 0,Us([e,t],Ls(r)))},clearInterval:function(e){var t=Ds.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(Fs=function(e,t){return(Fs=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}Fs(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(i,"__esModule",{value:!0}),i.AsyncAction=void 0;var Ws,Vs=Ms,qs=F,Ms=(Ws=y.Action,Bs(zs,Ws),zs.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},zs.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Vs.intervalProvider.setInterval(e.flush.bind(e,this),r)},zs.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&Vs.intervalProvider.clearInterval(t)},zs.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))},zs.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},zs.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,qs.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,Ws.prototype.unsubscribe.call(this))},zs);function zs(e,t){var r=Ws.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}i.AsyncAction=Ms;var Hs,Gs,Ys,Ks,Zs,Qs,y={},Bs={},Xs=(Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.TestTools=Bs.Immediate=void 0,1),Js={};function $s(e){return e in Js&&(delete Js[e],!0)}Bs.Immediate={setImmediate:function(e){var t=Xs++;return Js[t]=!0,(Hs=Hs||Promise.resolve()).then(function(){return $s(t)&&e()}),t},clearImmediate:function(e){$s(e)}},Bs.TestTools={pending:function(){return Object.keys(Js).length}},Gs=y,Ys=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},Ks=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(Gs,"__esModule",{value:!0}),Gs.immediateProvider=void 0,Zs=Bs.Immediate.setImmediate,Qs=Bs.Immediate.clearImmediate,Gs.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Gs.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||Zs).apply(void 0,Ks([],Ys(e)))},clearImmediate:function(e){var t=Gs.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||Qs)(e)},delegate:void 0};var ec,Ms=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(o,"__esModule",{value:!0}),o.AsapAction=void 0;var tc,rc=y,Bs=(tc=i.AsyncAction,Ms(nc,tc),nc.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?tc.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=rc.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},nc.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return tc.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(rc.immediateProvider.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))},nc);function nc(e,t){var r=tc.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}o.AsapAction=Bs;var y={},Ms={},Bs={},oc=(Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.Scheduler=void 0,l);function ic(e,t){void 0===t&&(t=ic.now),this.schedulerActionCtor=e,this.now=t}ic.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},ic.now=oc.dateTimestampProvider.now,Bs.Scheduler=ic;var uc,ac,oc=r&&r.__extends||(uc=function(e,t){return(uc=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}uc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),sc=(Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.AsyncScheduler=void 0,Bs),oc=(ac=sc.Scheduler,oc(cc,ac),cc.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}}},cc);function cc(e,t){void 0===t&&(t=sc.Scheduler.now);e=ac.call(this,e,t)||this;return e.actions=[],e._active=!1,e}Ms.AsyncScheduler=oc;var lc,oc=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(y,"__esModule",{value:!0}),y.AsapScheduler=void 0;fc=Ms.AsyncScheduler,oc(pc,fc),pc.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 fc,oc=pc;function pc(){return null!==fc&&fc.apply(this,arguments)||this}y.AsapScheduler=oc,oc=t,Object.defineProperty(oc,"__esModule",{value:!0}),oc.asap=oc.asapScheduler=void 0,oc.asapScheduler=new y.AsapScheduler(o.AsapAction),oc.asap=oc.asapScheduler;var dc,y={},oc=(o=y,Object.defineProperty(o,"__esModule",{value:!0}),o.async=o.asyncScheduler=void 0,o.asyncScheduler=new Ms.AsyncScheduler(i.AsyncAction),o.async=o.asyncScheduler,{}),o={},hc=r&&r.__extends||(dc=function(e,t){return(dc=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}dc(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;bc=i.AsyncAction,hc(yc,bc),yc.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?bc.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},yc.prototype.execute=function(e,t){return 0<t||this.closed?bc.prototype.execute.call(this,e,t):this._execute(e,t)},yc.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?bc.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var bc,hc=yc;function yc(e,t){var r=bc.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}o.QueueAction=hc;var _c,hc={},vc=r&&r.__extends||(_c=function(e,t){return(_c=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}_c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(hc,"__esModule",{value:!0}),hc.QueueScheduler=void 0;mc=Ms.AsyncScheduler,vc(gc,mc);var mc,vc=gc;function gc(){return null!==mc&&mc.apply(this,arguments)||this}hc.QueueScheduler=vc,vc=oc,Object.defineProperty(vc,"__esModule",{value:!0}),vc.queue=vc.queueScheduler=void 0,vc.queueScheduler=new hc.QueueScheduler(o.QueueAction),vc.queue=vc.queueScheduler;var Oc,hc={},o={},vc=r&&r.__extends||(Oc=function(e,t){return(Oc=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}Oc(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 wc,Ec=_,_=(wc=i.AsyncAction,vc(Pc,wc),Pc.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?wc.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ec.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},Pc.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return wc.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Ec.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},Pc);function Pc(e,t){var r=wc.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}o.AnimationFrameAction=_;var Sc,vc={},_=r&&r.__extends||(Sc=function(e,t){return(Sc=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}Sc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(vc,"__esModule",{value:!0}),vc.AnimationFrameScheduler=void 0;Tc=Ms.AsyncScheduler,_(jc,Tc),jc.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 Tc,_=jc;function jc(){return null!==Tc&&Tc.apply(this,arguments)||this}vc.AnimationFrameScheduler=_,_=hc,Object.defineProperty(_,"__esModule",{value:!0}),_.animationFrame=_.animationFrameScheduler=void 0,_.animationFrameScheduler=new vc.AnimationFrameScheduler(o.AnimationFrameAction),_.animationFrame=_.animationFrameScheduler;var Cc,Ic,vc={},o=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(vc,"__esModule",{value:!0}),vc.VirtualAction=vc.VirtualTimeScheduler=void 0,i),Rc=p,i=(Ic=Ms.AsyncScheduler,o(Ac,Ic),Ac.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}},Ac.frameTimeFactor=10,Ac);function Ac(e,t){void 0===t&&(t=1/0);var r=Ic.call(this,e=void 0===e?Mc:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}vc.VirtualTimeScheduler=i;kc=_.AsyncAction,o(Nc,kc),Nc.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return kc.prototype.schedule.call(this,e,t);this.active=!1;var r=new Nc(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return Rc.Subscription.EMPTY},Nc.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(Nc.sortActions),1},Nc.prototype.recycleAsyncId=function(e,t,r){},Nc.prototype._execute=function(e,t){if(!0===this.active)return kc.prototype._execute.call(this,e,t)},Nc.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 kc,Mc=Nc;function Nc(e,t,r){void 0===r&&(r=e.index+=1);var n=kc.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}vc.VirtualAction=Mc;var xc,Dc,Ms={},i={},_=(xc=i,Object.defineProperty(xc,"__esModule",{value:!0}),xc.empty=xc.EMPTY=void 0,Dc=S,xc.EMPTY=new Dc.Observable(function(e){return e.complete()}),xc.empty=function(e){return e?(t=e,new Dc.Observable(function(e){return t.schedule(function(){return e.complete()})})):xc.EMPTY;var t},{}),o={},Lc={},Uc=(Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.isScheduler=void 0,E);Lc.isScheduler=function(e){return e&&Uc.isFunction(e.schedule)},Object.defineProperty(o,"__esModule",{value:!0}),o.popNumber=o.popScheduler=o.popResultSelector=void 0;var Fc=E,Bc=Lc;function Wc(e){return e[e.length-1]}o.popResultSelector=function(e){return Fc.isFunction(Wc(e))?e.pop():void 0},o.popScheduler=function(e){return Bc.isScheduler(Wc(e))?e.pop():void 0},o.popNumber=function(e,t){return"number"==typeof Wc(e)?e.pop():t};var Vc={},qc={},zc={},C={},Hc={},Gc=(Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.isArrayLike=void 0,Hc.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),Yc=(Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.isPromise=void 0,E);Gc.isPromise=function(e){return Yc.isFunction(null==e?void 0:e.then)};var Kc={},Zc=(Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.isInteropObservable=void 0,u),Qc=E;Kc.isInteropObservable=function(e){return Qc.isFunction(e[Zc.observable])};var Xc={},Jc=(Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.isAsyncIterable=void 0,E);Xc.isAsyncIterable=function(e){return Symbol.asyncIterator&&Jc.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var $c={};Object.defineProperty($c,"__esModule",{value:!0}),$c.createInvalidObservableTypeError=void 0,$c.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 el={},tl={};function rl(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(tl,"__esModule",{value:!0}),tl.iterator=tl.getSymbolIterator=void 0,tl.getSymbolIterator=rl,tl.iterator=rl(),Object.defineProperty(el,"__esModule",{value:!0}),el.isIterable=void 0;var nl=tl,ol=E;el.isIterable=function(e){return ol.isFunction(null==e?void 0:e[nl.iterator])};var il={},ul=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}}}},al=r&&r.__await||function(e){return this instanceof al?(this.v=e,this):new al(e)},sl=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 al?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])}},cl=(Object.defineProperty(il,"__esModule",{value:!0}),il.isReadableStreamLike=il.readableStreamLikeToAsyncGenerator=void 0,E);il.readableStreamLikeToAsyncGenerator=function(o){return sl(this,arguments,function(){var t,r,n;return ul(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,al(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,al(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,al(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]}})})},il.isReadableStreamLike=function(e){return cl.isFunction(null==e?void 0:e.getReader)};var ll=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:[]},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}}}},pl=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 dl?dl(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)})}}},dl=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.")},hl=(Object.defineProperty(C,"__esModule",{value:!0}),C.fromReadableStreamLike=C.fromAsyncIterable=C.fromIterable=C.fromPromise=C.fromArrayLike=C.fromInteropObservable=C.innerFrom=void 0,Hc),bl=Gc,yl=S,_l=Kc,vl=Xc,ml=$c,gl=el,Ol=il,wl=E,El=f,Pl=u;function Sl(r){return new yl.Observable(function(e){var t=r[Pl.observable]();if(wl.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Tl(r){return new yl.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function jl(e){return new yl.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,El.reportUnhandledError)})}function Cl(u){return new yl.Observable(function(e){var t,r;try{for(var n=dl(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 Il(e){return new yl.Observable(function(t){!function(r,n){var o,i,u,a;return ll(this,void 0,void 0,function(){var t;return fl(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=pl(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 Rl(e){return Il(Ol.readableStreamLikeToAsyncGenerator(e))}C.innerFrom=function(e){if(e instanceof yl.Observable)return e;if(null!=e){if(_l.isInteropObservable(e))return Sl(e);if(hl.isArrayLike(e))return Tl(e);if(bl.isPromise(e))return jl(e);if(vl.isAsyncIterable(e))return Il(e);if(gl.isIterable(e))return Cl(e);if(Ol.isReadableStreamLike(e))return Rl(e)}throw ml.createInvalidObservableTypeError(e)},C.fromInteropObservable=Sl,C.fromArrayLike=Tl,C.fromPromise=jl,C.fromIterable=Cl,C.fromAsyncIterable=Il,C.fromReadableStreamLike=Rl;var f={},Al={};Object.defineProperty(Al,"__esModule",{value:!0}),Al.executeSchedule=void 0,Al.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(f,"__esModule",{value:!0}),f.observeOn=void 0;var kl=Al,Ml=g,Nl=j;f.observeOn=function(r,n){return void 0===n&&(n=0),Ml.operate(function(e,t){e.subscribe(Nl.createOperatorSubscriber(t,function(e){return kl.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return kl.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return kl.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var xl={},Dl=(Object.defineProperty(xl,"__esModule",{value:!0}),xl.subscribeOn=void 0,g);xl.subscribeOn=function(r,n){return void 0===n&&(n=0),Dl.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(zc,"__esModule",{value:!0}),zc.scheduleObservable=void 0;var Ll=C,Ul=f,Fl=xl;zc.scheduleObservable=function(e,t){return Ll.innerFrom(e).pipe(Fl.subscribeOn(t),Ul.observeOn(t))};var Bl={},Wl=(Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.schedulePromise=void 0,C),Vl=f,ql=xl;Bl.schedulePromise=function(e,t){return Wl.innerFrom(e).pipe(ql.subscribeOn(t),Vl.observeOn(t))};var zl={},Hl=(Object.defineProperty(zl,"__esModule",{value:!0}),zl.scheduleArray=void 0,S);zl.scheduleArray=function(r,n){return new Hl.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var Gl={},Yl=(Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.scheduleIterable=void 0,S),Kl=tl,Zl=E,Ql=Al;Gl.scheduleIterable=function(e,t){return new Yl.Observable(function(n){var o;return Ql.executeSchedule(n,t,function(){o=e[Kl.iterator](),Ql.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 Zl.isFunction(null==o?void 0:o.return)&&o.return()}})};var tl={},Xl=(Object.defineProperty(tl,"__esModule",{value:!0}),tl.scheduleAsyncIterable=void 0,S),Jl=Al;tl.scheduleAsyncIterable=function(r,n){if(r)return new Xl.Observable(function(t){Jl.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();Jl.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 $l={},ef=(Object.defineProperty($l,"__esModule",{value:!0}),$l.scheduleReadableStreamLike=void 0,tl),tf=il;$l.scheduleReadableStreamLike=function(e,t){return ef.scheduleAsyncIterable(tf.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(qc,"__esModule",{value:!0}),qc.scheduled=void 0;var rf=zc,nf=Bl,of=zl,uf=Gl,af=tl,sf=Kc,cf=Gc,lf=Hc,ff=el,pf=Xc,df=$c,hf=il,bf=$l;qc.scheduled=function(e,t){if(null!=e){if(sf.isInteropObservable(e))return rf.scheduleObservable(e,t);if(lf.isArrayLike(e))return of.scheduleArray(e,t);if(cf.isPromise(e))return nf.schedulePromise(e,t);if(pf.isAsyncIterable(e))return af.scheduleAsyncIterable(e,t);if(ff.isIterable(e))return uf.scheduleIterable(e,t);if(hf.isReadableStreamLike(e))return bf.scheduleReadableStreamLike(e,t)}throw df.createInvalidObservableTypeError(e)},Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.from=void 0;var yf=qc,_f=C;Vc.from=function(e,t){return t?yf.scheduled(e,t):_f.innerFrom(e)},Object.defineProperty(_,"__esModule",{value:!0}),_.of=void 0;var vf=o,mf=Vc;_.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=vf.popScheduler(e);return mf.from(e,r)};var gf,Of,wf,Ef,zc={},Pf=(Object.defineProperty(zc,"__esModule",{value:!0}),zc.throwError=void 0,S),Sf=E;function Tf(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function jf(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)}zc.throwError=function(e,t){function r(e){return e.error(n())}var n=Sf.isFunction(e)?e:function(){return e};return new Pf.Observable(t?function(e){return t.schedule(r,0,e)}:r)},Bl=Ms,Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.observeNotification=Bl.Notification=Bl.NotificationKind=void 0,gf=i,Of=_,wf=zc,Ef=E,(zl=Bl.NotificationKind||(Bl.NotificationKind={})).NEXT="N",zl.ERROR="E",zl.COMPLETE="C",Tf.prototype.observe=function(e){return jf(this,e)},Tf.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()},Tf.prototype.accept=function(e,t,r){var n;return Ef.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},Tf.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?Of.of(t):"E"===e?wf.throwError(function(){return r}):"C"===e?gf.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},Tf.createNext=function(e){return new Tf("N",e)},Tf.createError=function(e){return new Tf("E",void 0,e)},Tf.createComplete=function(){return Tf.completeNotification},Tf.completeNotification=new Tf("C"),zl=Tf,Bl.Notification=zl,Bl.observeNotification=jf;var tl={},Cf=(Object.defineProperty(tl,"__esModule",{value:!0}),tl.isObservable=void 0,S),If=E;tl.isObservable=function(e){return!!e&&(e instanceof Cf.Observable||If.isFunction(e.lift)&&If.isFunction(e.subscribe))};var Kc={},Gc={},el=(Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.EmptyError=void 0,O),Rf=(Gc.EmptyError=el.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.lastValueFrom=void 0,Gc);Kc.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 Rf.EmptyError)}})})};var Xc={},Af=(Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.firstValueFrom=void 0,Gc),kf=w;Xc.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new kf.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new Af.EmptyError)}});n.subscribe(r)})};var Mf,Nf,xf,Df,Lf,Uf,Ff,$c={},il=(Object.defineProperty($c,"__esModule",{value:!0}),$c.ArgumentOutOfRangeError=void 0,O),$l=($c.ArgumentOutOfRangeError=il.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),zl=(Object.defineProperty($l,"__esModule",{value:!0}),$l.NotFoundError=void 0,O),Bl=($l.NotFoundError=zl.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),el=(Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.SequenceError=void 0,O),il=(Bl.SequenceError=el.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),zl={};function Bf(e){throw new Mf.TimeoutError(e)}Object.defineProperty(zl,"__esModule",{value:!0}),zl.isValidDate=void 0,zl.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},Mf=il,Object.defineProperty(Mf,"__esModule",{value:!0}),Mf.timeout=Mf.TimeoutError=void 0,Nf=y,xf=zl,Df=g,Lf=C,Uf=j,Ff=Al,Mf.TimeoutError=O.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),Mf.timeout=function(e,t){var a=(e=xf.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?Bf:r,l=void 0===(r=e.scheduler)?null!=t?t:Nf.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return Df.operate(function(e,t){function r(e){n=Ff.executeSchedule(t,l,function(){try{u.unsubscribe(),Lf.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(Uf.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 el={},O={},Wf={},Vf={},qf=(Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.map=void 0,g),zf=j;Vf.map=function(n,o){return qf.operate(function(e,t){var r=0;e.subscribe(zf.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var Hf=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},Gf=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},Yf=(Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.mapOneOrManyArgs=void 0,Vf),Kf=Array.isArray;Wf.mapOneOrManyArgs=function(r){return Yf.map(function(e){return t=r,Kf(e=e)?t.apply(void 0,Gf([],Hf(e))):t(e);var t})};var Zf=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},Qf=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},Xf=(Object.defineProperty(O,"__esModule",{value:!0}),O.bindCallbackInternals=void 0,Lc),Jf=S,$f=xl,ep=Wf,tp=f,rp=P;O.bindCallbackInternals=function r(a,s,n,o){if(n){if(!Xf.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(ep.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($f.subscribeOn(o),tp.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new rp.AsyncSubject,u=!0;return new Jf.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,Qf(Qf([],Zf(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(el,"__esModule",{value:!0}),el.bindCallback=void 0;var np=O;el.bindCallback=function(e,t,r){return np.bindCallbackInternals(!1,e,t,r)};var op={},ip=(Object.defineProperty(op,"__esModule",{value:!0}),op.bindNodeCallback=void 0,O);op.bindNodeCallback=function(e,t,r){return ip.bindCallbackInternals(!0,e,t,r)};var O={},up={},ap=(Object.defineProperty(up,"__esModule",{value:!0}),up.argsArgArrayOrObject=void 0,Array.isArray),sp=Object.getPrototypeOf,cp=Object.prototype,lp=Object.keys;up.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(ap(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&sp(r)===cp)return{args:(r=lp(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var fp={};Object.defineProperty(fp,"__esModule",{value:!0}),fp.createObject=void 0,fp.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(O,"__esModule",{value:!0}),O.combineLatestInit=O.combineLatest=void 0;var pp=S,dp=up,hp=Vc,bp=T,yp=Wf,_p=o,vp=fp,mp=j,gp=Al;function Op(a,s,c){return void 0===c&&(c=bp.identity),function(u){wp(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){wp(s,function(){var e=hp.from(a[r],s),t=!1;e.subscribe(mp.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 wp(e,t,r){e?gp.executeSchedule(r,e,t):t()}O.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=_p.popScheduler(e),n=_p.popResultSelector(e),o=dp.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?hp.from([],r):(o=new pp.Observable(Op(i,r,u?function(e){return vp.createObject(u,e)}:bp.identity)),n?o.pipe(yp.mapOneOrManyArgs(n)):o)},O.combineLatestInit=Op;var Ep={},Pp={},Sp={},Tp={},jp={},Cp=(Object.defineProperty(jp,"__esModule",{value:!0}),jp.mergeInternals=void 0,C),Ip=Al,Rp=j;jp.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;Cp.innerFrom(n(e,l++)).subscribe(Rp.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?Ip.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(Rp.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(Tp,"__esModule",{value:!0}),Tp.mergeMap=void 0;var Ap=Vf,kp=C,Mp=g,Np=jp,xp=E;Tp.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),xp.isFunction(i)?e(function(r,n){return Ap.map(function(e,t){return i(r,e,n,t)})(kp.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),Mp.operate(function(e,t){return Np.mergeInternals(e,t,o,r)}))},Object.defineProperty(Sp,"__esModule",{value:!0}),Sp.mergeAll=void 0;var Dp=Tp,Lp=T;Sp.mergeAll=function(e){return Dp.mergeMap(Lp.identity,e=void 0===e?1/0:e)},Object.defineProperty(Pp,"__esModule",{value:!0}),Pp.concatAll=void 0;var Up=Sp;Pp.concatAll=function(){return Up.mergeAll(1)},Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.concat=void 0;var Fp=Pp,Bp=o,Wp=Vc;Ep.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Fp.concatAll()(Wp.from(e,Bp.popScheduler(e)))};var Vp={},qp={},zp=(Object.defineProperty(qp,"__esModule",{value:!0}),qp.defer=void 0,S),Hp=C;qp.defer=function(t){return new zp.Observable(function(e){Hp.innerFrom(t()).subscribe(e)})},Object.defineProperty(Vp,"__esModule",{value:!0}),Vp.connectable=void 0;var Gp=n,Yp=S,Kp=qp,Zp={connector:function(){return new Gp.Subject},resetOnDisconnect:!0};Vp.connectable=function(e,t){var r=null,n=(t=void 0===t?Zp:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new Yp.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=Kp.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var Qp={},Xp=(Object.defineProperty(Qp,"__esModule",{value:!0}),Qp.forkJoin=void 0,S),Jp=up,$p=C,ed=o,td=j,rd=Wf,nd=fp;Qp.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ed.popResultSelector(e),u=(n=Jp.argsArgArrayOrObject(e)).args,a=n.keys,n=new Xp.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;$p.innerFrom(u[t]).subscribe(td.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?nd.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(rd.mapOneOrManyArgs(r)):n};var up={},od=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},id=(Object.defineProperty(up,"__esModule",{value:!0}),up.fromEvent=void 0,C),ud=S,ad=Tp,sd=Hc,cd=E,ld=Wf,fd=["addListener","removeListener"],pd=["addEventListener","removeEventListener"],dd=["on","off"];function hd(r,n){return function(t){return function(e){return r[t](n,e)}}}up.fromEvent=function t(r,n,o,e){if(cd.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(ld.mapOneOrManyArgs(e));var e=od((e=r,cd.isFunction(e.addEventListener)&&cd.isFunction(e.removeEventListener)?pd.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,cd.isFunction(e.addListener)&&cd.isFunction(e.removeListener)?fd.map(hd(r,n)):(e=r,cd.isFunction(e.on)&&cd.isFunction(e.off)?dd.map(hd(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&sd.isArrayLike(r))return ad.mergeMap(function(e){return t(e,n,o)})(id.innerFrom(r));if(i)return new ud.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 fp={},bd=(Object.defineProperty(fp,"__esModule",{value:!0}),fp.fromEventPattern=void 0,S),yd=E,_d=Wf;fp.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(_d.mapOneOrManyArgs(t)):new bd.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 yd.isFunction(o)?function(){return o(e,t)}:void 0})};var Hc={},vd=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}}}},md=(Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.generate=void 0,T),gd=Lc,Od=qp,wd=Gl;Hc.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return vd(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?md.identity:i,o=e.scheduler):(a=e,!t||gd.isScheduler(t)?(u=md.identity,o=t):u=t),Od.defer(o?function(){return wd.scheduleIterable(s(),o)}:s)};var Gl={},Ed=(Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.iif=void 0,qp);Gl.iif=function(e,t,r){return Ed.defer(function(){return e()?t:r})};var Pd={},Sd={},Td=(Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.timer=void 0,S),jd=y,Cd=Lc,Id=zl;Sd.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=jd.async);var i=-1;return null!=e&&(Cd.isScheduler(e)?o=e:i=e),new Td.Observable(function(e){var t=Id.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(Pd,"__esModule",{value:!0}),Pd.interval=void 0;var Rd=y,Ad=Sd;Pd.interval=function(e,t){return Ad.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?Rd.asyncScheduler:t)};var Lc={},kd=(Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.merge=void 0,Sp),Md=C,Nd=i,xd=o,Dd=Vc;Lc.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xd.popScheduler(e),n=xd.popNumber(e,1/0),o=e;return o.length?1===o.length?Md.innerFrom(o[0]):kd.mergeAll(n)(Dd.from(o,r)):Nd.EMPTY};var Ld,Ud={},Fd=(Ld=Ud,Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.never=Ld.NEVER=void 0,Ld.NEVER=new S.Observable(G.noop),Ld.never=function(){return Ld.NEVER},{}),Bd={},Wd=(Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.argsOrArgArray=void 0,Array.isArray);Bd.argsOrArgArray=function(e){return 1===e.length&&Wd(e[0])?e[0]:e},Object.defineProperty(Fd,"__esModule",{value:!0}),Fd.onErrorResumeNext=void 0;var Vd=S,qd=Bd,zd=j,Hd=G,Gd=C;Fd.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=qd.argsOrArgArray(e);return new Vd.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=Gd.innerFrom(i[n++])}catch(e){return void o()}var t=new zd.OperatorSubscriber(r,void 0,Hd.noop,Hd.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var Yd={},Kd=(Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.pairs=void 0,Vc);Yd.pairs=function(e,t){return Kd.from(Object.entries(e),t)};var Zd={},Qd={};Object.defineProperty(Qd,"__esModule",{value:!0}),Qd.not=void 0,Qd.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var Xd={},Jd=(Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.filter=void 0,g),$d=j;Xd.filter=function(n,o){return Jd.operate(function(e,t){var r=0;e.subscribe($d.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(Zd,"__esModule",{value:!0}),Zd.partition=void 0;var eh=Qd,th=Xd,rh=C;Zd.partition=function(e,t,r){return[th.filter(t,r)(rh.innerFrom(e)),th.filter(eh.not(t,r))(rh.innerFrom(e))]};var nh={},oh=(Object.defineProperty(nh,"__esModule",{value:!0}),nh.raceInit=nh.race=void 0,S),ih=C,uh=Bd,ah=j;function sh(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(ih.innerFrom(t[r]).subscribe(ah.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)}}nh.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=uh.argsOrArgArray(e)).length?ih.innerFrom(e[0]):new oh.Observable(sh(e))},nh.raceInit=sh;var ch={},lh=(Object.defineProperty(ch,"__esModule",{value:!0}),ch.range=void 0,S),fh=i;ch.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return fh.EMPTY;var o=e+r;return new lh.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 ph={},dh=(Object.defineProperty(ph,"__esModule",{value:!0}),ph.using=void 0,S),hh=C,bh=i;ph.using=function(n,o){return new dh.Observable(function(e){var t=n(),r=o(t);return(r?hh.innerFrom(r):bh.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var yh={},_h=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},vh=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},mh=(Object.defineProperty(yh,"__esModule",{value:!0}),yh.zip=void 0,S),gh=C,Oh=Bd,wh=i,Eh=j,Ph=o;yh.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Ph.popResultSelector(e),u=Oh.argsOrArgArray(e);return u.length?new mh.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){gh.innerFrom(u[t]).subscribe(Eh.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,vh([],_h(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}}):wh.EMPTY};var Sh={},Th=(Object.defineProperty(Sh,"__esModule",{value:!0}),{}),jh=(Object.defineProperty(Th,"__esModule",{value:!0}),Th.audit=void 0,g),Ch=C,Ih=j;Th.audit=function(s){return jh.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(Ih.createOperatorSubscriber(t,function(e){o=!0,i=e,u||Ch.innerFrom(s(e)).subscribe(u=Ih.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var Rh={},Ah=(Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.auditTime=void 0,y),kh=Th,Mh=Sd;Rh.auditTime=function(e,t){return void 0===t&&(t=Ah.asyncScheduler),kh.audit(function(){return Mh.timer(e,t)})};var Nh={},xh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.buffer=void 0,g),Dh=G,Lh=j,Uh=C;Nh.buffer=function(n){return xh.operate(function(e,t){var r=[];return e.subscribe(Lh.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),Uh.innerFrom(n).subscribe(Lh.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},Dh.noop)),function(){r=null}})};var Fh={},Bh=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.")},Wh=(Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.bufferCount=void 0,g),Vh=j,qh=F;Fh.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,Wh.operate(function(e,f){var p=[],d=0;e.subscribe(Vh.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=Bh(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=Bh(i),c=s.next();!c.done;c=s.next()){var l=c.value;qh.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=Bh(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 zh={},Hh=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.")},Gh=(Object.defineProperty(zh,"__esModule",{value:!0}),zh.bufferTime=void 0,p),Yh=g,Kh=j,Zh=F,Qh=y,Xh=o,Jh=Al;zh.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=Xh.popScheduler(t))?e:Qh.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return Yh.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),Zh.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new Gh.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),Jh.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?Jh.executeSchedule(r,u,o,a,!0):n=!0,o(),Kh.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=Hh(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 $h={},eb=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.")},tb=(Object.defineProperty($h,"__esModule",{value:!0}),$h.bufferToggle=void 0,p),rb=g,nb=C,ob=j,ib=G,ub=F;$h.bufferToggle=function(t,o){return rb.operate(function(e,n){var i=[];nb.innerFrom(t).subscribe(ob.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new tb.Subscription);r.add(nb.innerFrom(o(e)).subscribe(ob.createOperatorSubscriber(n,function(){ub.arrRemove(i,t),n.next(t),r.unsubscribe()},ib.noop)))},ib.noop)),e.subscribe(ob.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=eb(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 ab={},sb=(Object.defineProperty(ab,"__esModule",{value:!0}),ab.bufferWhen=void 0,g),cb=G,lb=j,fb=C;ab.bufferWhen=function(i){return sb.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),fb.innerFrom(i()).subscribe(n=lb.createOperatorSubscriber(t,o,cb.noop))};o(),e.subscribe(lb.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 pb={},db=(Object.defineProperty(pb,"__esModule",{value:!0}),pb.catchError=void 0,C),hb=j,bb=g;pb.catchError=function u(a){return bb.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(hb.createOperatorSubscriber(r,void 0,void 0,function(e){n=db.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 yb={},_b={},I={},vb={},mb={},gb={},Ob=(Object.defineProperty(gb,"__esModule",{value:!0}),gb.scanInternals=void 0,j);gb.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(Ob.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(mb,"__esModule",{value:!0}),mb.reduce=void 0;var wb=gb,Eb=g;mb.reduce=function(e,t){return Eb.operate(wb.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(vb,"__esModule",{value:!0}),vb.toArray=void 0;function Pb(e,t){return e.push(t),e}var Sb=mb,Tb=g;vb.toArray=function(){return Tb.operate(function(e,t){Sb.reduce(Pb,[])(e).subscribe(t)})},Object.defineProperty(I,"__esModule",{value:!0}),I.joinAllInternals=void 0;var jb=T,Cb=Wf,Ib=Tt,Rb=Tp,Ab=vb;I.joinAllInternals=function(t,e){return Ib.pipe(Ab.toArray(),Rb.mergeMap(function(e){return t(e)}),e?Cb.mapOneOrManyArgs(e):jb.identity)},Object.defineProperty(_b,"__esModule",{value:!0}),_b.combineLatestAll=void 0;var kb=O,Mb=I;_b.combineLatestAll=function(e){return Mb.joinAllInternals(kb.combineLatest,e)},Object.defineProperty(yb,"__esModule",{value:!0}),yb.combineAll=void 0;yb.combineAll=_b.combineLatestAll;var Nb={},xb={},Db=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},Lb=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},Ub=(Object.defineProperty(xb,"__esModule",{value:!0}),xb.combineLatest=void 0,O),Fb=g,Bb=Bd,Wb=Wf,Vb=Tt,qb=o;function zb(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=qb.popResultSelector(r);return t?Vb.pipe(zb.apply(void 0,Lb([],Db(r))),Wb.mapOneOrManyArgs(t)):Fb.operate(function(e,t){Ub.combineLatestInit(Lb([e],Db(Bb.argsOrArgArray(r))))(t)})}xb.combineLatest=zb;var Hb=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},Gb=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},Yb=(Object.defineProperty(Nb,"__esModule",{value:!0}),Nb.combineLatestWith=void 0,xb);Nb.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Yb.combineLatest.apply(void 0,Gb([],Hb(e)))};var Wf={},Kb=(Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.concatMap=void 0,Tp),Zb=E;Wf.concatMap=function(e,t){return Zb.isFunction(t)?Kb.mergeMap(e,t,1):Kb.mergeMap(e,1)};var Qb={},Xb=(Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.concatMapTo=void 0,Wf),Jb=E;Qb.concatMapTo=function(e,t){return Jb.isFunction(t)?Xb.concatMap(function(){return e},t):Xb.concatMap(function(){return e})};var $b={},ey={},ty=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},ry=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},ny=(Object.defineProperty(ey,"__esModule",{value:!0}),ey.concat=void 0,g),oy=Pp,iy=o,uy=Vc;ey.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=iy.popScheduler(r);return ny.operate(function(e,t){oy.concatAll()(uy.from(ry([e],ty(r)),n)).subscribe(t)})};var ay=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},sy=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},cy=(Object.defineProperty($b,"__esModule",{value:!0}),$b.concatWith=void 0,ey);$b.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return cy.concat.apply(void 0,sy([],ay(e)))};var ly={},fy={},py=(Object.defineProperty(fy,"__esModule",{value:!0}),fy.fromSubscribable=void 0,S);fy.fromSubscribable=function(t){return new py.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(ly,"__esModule",{value:!0}),ly.connect=void 0;var dy=n,hy=C,by=g,yy=fy,_y={connector:function(){return new dy.Subject}};ly.connect=function(n,e){var o=(e=void 0===e?_y:e).connector;return by.operate(function(e,t){var r=o();hy.innerFrom(n(yy.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var fy={},vy=(Object.defineProperty(fy,"__esModule",{value:!0}),fy.count=void 0,mb);fy.count=function(n){return vy.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var my={},gy=(Object.defineProperty(my,"__esModule",{value:!0}),my.debounce=void 0,g),Oy=G,wy=j,Ey=C;my.debounce=function(u){return gy.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(wy.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=wy.createOperatorSubscriber(t,r,Oy.noop),Ey.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var Py={},Sy=(Object.defineProperty(Py,"__esModule",{value:!0}),Py.debounceTime=void 0,y),Ty=g,jy=j;Py.debounceTime=function(a,s){return void 0===s&&(s=Sy.asyncScheduler),Ty.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(jy.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 Cy={},Iy=(Object.defineProperty(Cy,"__esModule",{value:!0}),Cy.defaultIfEmpty=void 0,g),Ry=j;Cy.defaultIfEmpty=function(n){return Iy.operate(function(e,t){var r=!1;e.subscribe(Ry.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var R={},Ay={},ky={},My=(Object.defineProperty(ky,"__esModule",{value:!0}),ky.take=void 0,i),Ny=g,xy=j;ky.take=function(n){return n<=0?function(){return My.EMPTY}:Ny.operate(function(e,t){var r=0;e.subscribe(xy.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var Dy={},Ly=(Object.defineProperty(Dy,"__esModule",{value:!0}),Dy.ignoreElements=void 0,g),Uy=j,Fy=G;Dy.ignoreElements=function(){return Ly.operate(function(e,t){e.subscribe(Uy.createOperatorSubscriber(t,Fy.noop))})};var By={},Wy=(Object.defineProperty(By,"__esModule",{value:!0}),By.mapTo=void 0,Vf);By.mapTo=function(e){return Wy.map(function(){return e})},Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.delayWhen=void 0;var Vy=Ep,qy=ky,zy=Dy,Hy=By,Gy=Tp,Yy=C;Ay.delayWhen=function t(r,n){return n?function(e){return Vy.concat(n.pipe(qy.take(1),zy.ignoreElements()),e.pipe(t(r)))}:Gy.mergeMap(function(e,t){return Yy.innerFrom(r(e,t)).pipe(qy.take(1),Hy.mapTo(e))})},Object.defineProperty(R,"__esModule",{value:!0}),R.delay=void 0;var Ky=y,Zy=Ay,Qy=Sd;R.delay=function(e,t){var r=Qy.timer(e,t=void 0===t?Ky.asyncScheduler:t);return Zy.delayWhen(function(){return r})};var Xy={},Jy=(Object.defineProperty(Xy,"__esModule",{value:!0}),Xy.dematerialize=void 0,Ms),$y=g,e_=j;Xy.dematerialize=function(){return $y.operate(function(e,t){e.subscribe(e_.createOperatorSubscriber(t,function(e){return Jy.observeNotification(e,t)}))})};var t_={},r_=(Object.defineProperty(t_,"__esModule",{value:!0}),t_.distinct=void 0,g),n_=j,o_=G,i_=C;t_.distinct=function(o,t){return r_.operate(function(e,r){var n=new Set;e.subscribe(n_.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&i_.innerFrom(t).subscribe(n_.createOperatorSubscriber(r,function(){return n.clear()},o_.noop))})};var u_={},a_=(Object.defineProperty(u_,"__esModule",{value:!0}),u_.distinctUntilChanged=void 0,T),s_=g,c_=j;function l_(e,t){return e===t}u_.distinctUntilChanged=function(i,u){return void 0===u&&(u=a_.identity),i=null!=i?i:l_,s_.operate(function(e,r){var n,o=!0;e.subscribe(c_.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var f_={},p_=(Object.defineProperty(f_,"__esModule",{value:!0}),f_.distinctUntilKeyChanged=void 0,u_);f_.distinctUntilKeyChanged=function(r,n){return p_.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var d_={},h_={},b_=(Object.defineProperty(h_,"__esModule",{value:!0}),h_.throwIfEmpty=void 0,Gc),y_=g,__=j;function v_(){return new b_.EmptyError}h_.throwIfEmpty=function(n){return void 0===n&&(n=v_),y_.operate(function(e,t){var r=!1;e.subscribe(__.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(d_,"__esModule",{value:!0}),d_.elementAt=void 0;var m_=$c,g_=Xd,O_=h_,w_=Cy,E_=ky;d_.elementAt=function(r,t){if(r<0)throw new m_.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(g_.filter(function(e,t){return t===r}),E_.take(1),n?w_.defaultIfEmpty(t):O_.throwIfEmpty(function(){return new m_.ArgumentOutOfRangeError}))}};var P_={},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},T_=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},j_=(Object.defineProperty(P_,"__esModule",{value:!0}),P_.endWith=void 0,Ep),C_=_;P_.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return j_.concat(e,C_.of.apply(void 0,T_([],S_(t))))}};var I_={},R_=(Object.defineProperty(I_,"__esModule",{value:!0}),I_.every=void 0,g),A_=j;I_.every=function(o,i){return R_.operate(function(t,r){var n=0;t.subscribe(A_.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var k_={},M_={},N_={},x_=(Object.defineProperty(N_,"__esModule",{value:!0}),N_.exhaustMap=void 0,Vf),D_=C,L_=g,U_=j;N_.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return D_.innerFrom(i(r,n)).pipe(x_.map(function(e,t){return o(r,e,n,t)}))}))}:L_.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(U_.createOperatorSubscriber(t,function(e){n||(n=U_.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),D_.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(M_,"__esModule",{value:!0}),M_.exhaustAll=void 0;var F_=N_,B_=T;M_.exhaustAll=function(){return F_.exhaustMap(B_.identity)},Object.defineProperty(k_,"__esModule",{value:!0}),k_.exhaust=void 0;k_.exhaust=M_.exhaustAll;var W_={},V_=(Object.defineProperty(W_,"__esModule",{value:!0}),W_.expand=void 0,g),q_=jp;W_.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,V_.operate(function(e,t){return q_.mergeInternals(e,t,r,n,void 0,!0,o)})};var z_={},H_=(Object.defineProperty(z_,"__esModule",{value:!0}),z_.finalize=void 0,g);z_.finalize=function(r){return H_.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var G_={},Y_=(Object.defineProperty(G_,"__esModule",{value:!0}),G_.createFind=G_.find=void 0,g),K_=j;function Z_(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(K_.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()}))}}G_.find=function(e,t){return Y_.operate(Z_(e,t,"value"))},G_.createFind=Z_;var Q_={},X_=(Object.defineProperty(Q_,"__esModule",{value:!0}),Q_.findIndex=void 0,g),J_=G_;Q_.findIndex=function(e,t){return X_.operate(J_.createFind(e,t,"index"))};var $_={},ev=(Object.defineProperty($_,"__esModule",{value:!0}),$_.first=void 0,Gc),tv=Xd,rv=ky,nv=Cy,ov=h_,iv=T;$_.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?tv.filter(function(e,t){return n(e,t,r)}):iv.identity,rv.take(1),t?nv.defaultIfEmpty(e):ov.throwIfEmpty(function(){return new ev.EmptyError}))}};var uv={},av=(Object.defineProperty(uv,"__esModule",{value:!0}),uv.groupBy=void 0,S),sv=C,cv=n,lv=g,fv=j;uv.groupBy=function(b,t,y,_){return lv.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 fv.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new cv.Subject),i=n,u=o,(a=new av.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=fv.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(sv.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 pv={},dv=(Object.defineProperty(pv,"__esModule",{value:!0}),pv.isEmpty=void 0,g),hv=j;pv.isEmpty=function(){return dv.operate(function(e,t){e.subscribe(hv.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var bv={},yv={},_v=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.")},vv=(Object.defineProperty(yv,"__esModule",{value:!0}),yv.takeLast=void 0,i),mv=g,gv=j;yv.takeLast=function(t){return t<=0?function(){return vv.EMPTY}:mv.operate(function(e,i){var u=[];e.subscribe(gv.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=_v(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(bv,"__esModule",{value:!0}),bv.last=void 0;var Ov=Gc,wv=Xd,Ev=yv,Pv=h_,Sv=Cy,Tv=T;bv.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?wv.filter(function(e,t){return n(e,t,r)}):Tv.identity,Ev.takeLast(1),t?Sv.defaultIfEmpty(e):Pv.throwIfEmpty(function(){return new Ov.EmptyError}))}};var jv={},Cv=(Object.defineProperty(jv,"__esModule",{value:!0}),jv.materialize=void 0,Ms),Iv=g,Rv=j;jv.materialize=function(){return Iv.operate(function(e,t){e.subscribe(Rv.createOperatorSubscriber(t,function(e){t.next(Cv.Notification.createNext(e))},function(){t.next(Cv.Notification.createComplete()),t.complete()},function(e){t.next(Cv.Notification.createError(e)),t.complete()}))})};var Av={},kv=(Object.defineProperty(Av,"__esModule",{value:!0}),Av.max=void 0,mb),Mv=E;Av.max=function(r){return kv.reduce(Mv.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var Nv={},xv=(Object.defineProperty(Nv,"__esModule",{value:!0}),Nv.flatMap=void 0,Tp),xv=(Nv.flatMap=xv.mergeMap,{}),Dv=(Object.defineProperty(xv,"__esModule",{value:!0}),xv.mergeMapTo=void 0,Tp),Lv=E;xv.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),Lv.isFunction(t)?Dv.mergeMap(function(){return e},t,r):Dv.mergeMap(function(){return e},r="number"==typeof t?t:r)};var Uv={},Fv=(Object.defineProperty(Uv,"__esModule",{value:!0}),Uv.mergeScan=void 0,g),Bv=jp;Uv.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),Fv.operate(function(e,t){var r=o;return Bv.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var jp={},Wv={},Vv=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},qv=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},zv=(Object.defineProperty(Wv,"__esModule",{value:!0}),Wv.merge=void 0,g),Hv=Bd,Gv=Sp,Yv=o,Kv=Vc;Wv.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Yv.popScheduler(r),o=Yv.popNumber(r,1/0),r=Hv.argsOrArgArray(r);return zv.operate(function(e,t){Gv.mergeAll(o)(Kv.from(qv([e],Vv(r)),n)).subscribe(t)})};var Zv=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},Qv=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},Xv=(Object.defineProperty(jp,"__esModule",{value:!0}),jp.mergeWith=void 0,Wv);jp.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Xv.merge.apply(void 0,Qv([],Zv(e)))};var Jv={},$v=(Object.defineProperty(Jv,"__esModule",{value:!0}),Jv.min=void 0,mb),em=E;Jv.min=function(r){return $v.reduce(em.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var tm={},rm=(Object.defineProperty(tm,"__esModule",{value:!0}),tm.multicast=void 0,Qr),nm=E,om=ly;tm.multicast=function(e,t){var r=nm.isFunction(e)?e:function(){return e};return nm.isFunction(t)?om.connect(t,{connector:r}):function(e){return new rm.ConnectableObservable(e,r)}};var im={},um=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},am=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},sm=(Object.defineProperty(im,"__esModule",{value:!0}),im.onErrorResumeNext=im.onErrorResumeNextWith=void 0,Bd),cm=Fd;function lm(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=sm.argsOrArgArray(e);return function(e){return cm.onErrorResumeNext.apply(void 0,am([e],um(r)))}}im.onErrorResumeNextWith=lm,im.onErrorResumeNext=lm;var fm={},pm=(Object.defineProperty(fm,"__esModule",{value:!0}),fm.pairwise=void 0,g),dm=j;fm.pairwise=function(){return pm.operate(function(e,r){var n,o=!1;e.subscribe(dm.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var hm={},bm=(Object.defineProperty(hm,"__esModule",{value:!0}),hm.pluck=void 0,Vf);hm.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 bm.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 ym={},_m=(Object.defineProperty(ym,"__esModule",{value:!0}),ym.publish=void 0,n),vm=tm,mm=ly;ym.publish=function(t){return t?function(e){return mm.connect(t)(e)}:function(e){return vm.multicast(new _m.Subject)(e)}};var gm={},Om=(Object.defineProperty(gm,"__esModule",{value:!0}),gm.publishBehavior=void 0,h),wm=Qr;gm.publishBehavior=function(r){return function(e){var t=new Om.BehaviorSubject(r);return new wm.ConnectableObservable(e,function(){return t})}};var Em={},Pm=(Object.defineProperty(Em,"__esModule",{value:!0}),Em.publishLast=void 0,P),Sm=Qr;Em.publishLast=function(){return function(e){var t=new Pm.AsyncSubject;return new Sm.ConnectableObservable(e,function(){return t})}};var Tm={},jm=(Object.defineProperty(Tm,"__esModule",{value:!0}),Tm.publishReplay=void 0,v),Cm=tm,Im=E;Tm.publishReplay=function(t,r,e,n){e&&!Im.isFunction(e)&&(n=e);var o=Im.isFunction(e)?e:void 0;return function(e){return Cm.multicast(new jm.ReplaySubject(t,r,n),o)(e)}};var Rm={},Am=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},km=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},Mm=(Object.defineProperty(Rm,"__esModule",{value:!0}),Rm.raceWith=void 0,nh),Nm=g,xm=T;Rm.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?Nm.operate(function(e,t){Mm.raceInit(km([e],Am(r)))(t)}):xm.identity};var Dm={},Lm=(Object.defineProperty(Dm,"__esModule",{value:!0}),Dm.repeat=void 0,i),Um=g,Fm=j,Bm=C,Wm=Sd;Dm.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 Lm.EMPTY}:Um.operate(function(t,r){function n(){var e=!1;o=t.subscribe(Fm.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?Wm.timer(a):Bm.innerFrom(a(i)),t=Fm.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var Vm={},qm=(Object.defineProperty(Vm,"__esModule",{value:!0}),Vm.repeatWhen=void 0,C),zm=n,Hm=g,Gm=j;Vm.repeatWhen=function(l){return Hm.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 zm.Subject,qm.innerFrom(l(n)).subscribe(Gm.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(Gm.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var Ym={},Km=(Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.retry=void 0,g),Zm=j,Qm=T,Xm=Sd,Jm=C;Ym.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?Qm.identity:Km.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(Zm.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?Xm.timer(l):Jm.innerFrom(l(e,a)),n=Zm.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var $m={},e0=(Object.defineProperty($m,"__esModule",{value:!0}),$m.retryWhen=void 0,C),t0=n,r0=g,n0=j;$m.retryWhen=function(u){return r0.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(n0.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new t0.Subject,e0.innerFrom(u(n)).subscribe(n0.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var o0={},i0=(Object.defineProperty(o0,"__esModule",{value:!0}),o0.sample=void 0,C),u0=g,a0=G,s0=j;o0.sample=function(o){return u0.operate(function(e,t){var r=!1,n=null;e.subscribe(s0.createOperatorSubscriber(t,function(e){r=!0,n=e})),i0.innerFrom(o).subscribe(s0.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},a0.noop))})};var c0={},l0=(Object.defineProperty(c0,"__esModule",{value:!0}),c0.sampleTime=void 0,y),f0=o0,p0=Pd;c0.sampleTime=function(e,t){return f0.sample(p0.interval(e,t=void 0===t?l0.asyncScheduler:t))};var d0={},h0=(Object.defineProperty(d0,"__esModule",{value:!0}),d0.scan=void 0,g),b0=gb;d0.scan=function(e,t){return h0.operate(b0.scanInternals(e,t,2<=arguments.length,!0))};var gb={},y0=(Object.defineProperty(gb,"__esModule",{value:!0}),gb.sequenceEqual=void 0,g),_0=j,v0=C;function m0(){return{buffer:[],complete:!1}}gb.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),y0.operate(function(e,t){function r(n,o){var r=_0.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=m0(),o=m0(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),v0.innerFrom(u).subscribe(r(o,n))})};var g0={},O0=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},w0=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},E0=(Object.defineProperty(g0,"__esModule",{value:!0}),g0.share=void 0,C),P0=n,S0=w,T0=g;function j0(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 S0.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),E0.innerFrom(t.apply(void 0,w0([],O0(n)))).subscribe(r)}g0.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new P0.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 T0.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=j0(n,b))}),r.subscribe(t),!o&&0<a&&(o=new S0.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=j0(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=j0(f,h),r.complete()}}),E0.innerFrom(e).subscribe(o))})(e)}};var C0={},I0=(Object.defineProperty(C0,"__esModule",{value:!0}),C0.shareReplay=void 0,v),R0=g0;C0.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,R0.share({connector:function(){return new I0.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var A0={},k0=(Object.defineProperty(A0,"__esModule",{value:!0}),A0.single=void 0,Gc),M0=Bl,N0=$l,x0=g,D0=j;A0.single=function(a){return x0.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(D0.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new M0.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new N0.NotFoundError("No matching values"):new k0.EmptyError)}))})};var L0={},U0=(Object.defineProperty(L0,"__esModule",{value:!0}),L0.skip=void 0,Xd);L0.skip=function(r){return U0.filter(function(e,t){return r<=t})};var F0={},B0=(Object.defineProperty(F0,"__esModule",{value:!0}),F0.skipLast=void 0,T),W0=g,V0=j;F0.skipLast=function(u){return u<=0?B0.identity:W0.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(V0.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 q0={},z0=(Object.defineProperty(q0,"__esModule",{value:!0}),q0.skipUntil=void 0,g),H0=j,G0=C,Y0=G;q0.skipUntil=function(o){return z0.operate(function(e,t){var r=!1,n=H0.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},Y0.noop);G0.innerFrom(o).subscribe(n),e.subscribe(H0.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var K0={},Z0=(Object.defineProperty(K0,"__esModule",{value:!0}),K0.skipWhile=void 0,g),Q0=j;K0.skipWhile=function(o){return Z0.operate(function(e,t){var r=!1,n=0;e.subscribe(Q0.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var X0={},J0=(Object.defineProperty(X0,"__esModule",{value:!0}),X0.startWith=void 0,Ep),$0=o,eg=g;X0.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=$0.popScheduler(r);return eg.operate(function(e,t){(n?J0.concat(r,e,n):J0.concat(r,e)).subscribe(t)})};var tg={},rg={},ng=(Object.defineProperty(rg,"__esModule",{value:!0}),rg.switchMap=void 0,C),og=g,ig=j;rg.switchMap=function(s,c){return og.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(ig.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;ng.innerFrom(s(t,n)).subscribe(u=ig.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(tg,"__esModule",{value:!0}),tg.switchAll=void 0;var ug=rg,ag=T;tg.switchAll=function(){return ug.switchMap(ag.identity)};var sg={},cg=(Object.defineProperty(sg,"__esModule",{value:!0}),sg.switchMapTo=void 0,rg),lg=E;sg.switchMapTo=function(e,t){return lg.isFunction(t)?cg.switchMap(function(){return e},t):cg.switchMap(function(){return e})};var fg={},pg=(Object.defineProperty(fg,"__esModule",{value:!0}),fg.switchScan=void 0,rg),dg=g;fg.switchScan=function(n,o){return dg.operate(function(e,t){var r=o;return pg.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var hg={},bg=(Object.defineProperty(hg,"__esModule",{value:!0}),hg.takeUntil=void 0,g),yg=j,_g=C,vg=G;hg.takeUntil=function(r){return bg.operate(function(e,t){_g.innerFrom(r).subscribe(yg.createOperatorSubscriber(t,function(){return t.complete()},vg.noop)),t.closed||e.subscribe(t)})};var mg={},gg=(Object.defineProperty(mg,"__esModule",{value:!0}),mg.takeWhile=void 0,g),Og=j;mg.takeWhile=function(o,i){return void 0===i&&(i=!1),gg.operate(function(e,r){var n=0;e.subscribe(Og.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var wg={},Eg=(Object.defineProperty(wg,"__esModule",{value:!0}),wg.tap=void 0,E),Pg=g,Sg=j,Tg=T;wg.tap=function(e,t,r){var o=Eg.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?Pg.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(Sg.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)}))}):Tg.identity};var E={},jg=(Object.defineProperty(E,"__esModule",{value:!0}),E.throttle=void 0,g),Cg=j,Ig=C;E.throttle=function(h,b){return jg.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=Ig.innerFrom(h(e)).subscribe(Cg.createOperatorSubscriber(t,f,p))};e.subscribe(Cg.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 Rg={},Ag=(Object.defineProperty(Rg,"__esModule",{value:!0}),Rg.throttleTime=void 0,y),kg=E,Mg=Sd;Rg.throttleTime=function(e,t,r){var n=Mg.timer(e,t=void 0===t?Ag.asyncScheduler:t);return kg.throttle(function(){return n},r)};var Ng={},xg=(Object.defineProperty(Ng,"__esModule",{value:!0}),Ng.TimeInterval=Ng.timeInterval=void 0,y),Dg=g,Lg=j;Ng.timeInterval=function(i){return void 0===i&&(i=xg.asyncScheduler),Dg.operate(function(e,n){var o=i.now();e.subscribe(Lg.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new Ug(e,r))}))})};var Ug=function(e,t){this.value=e,this.interval=t},Fg=(Ng.TimeInterval=Ug,{}),Bg=(Object.defineProperty(Fg,"__esModule",{value:!0}),Fg.timeoutWith=void 0,y),Wg=zl,Vg=il;Fg.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:Bg.async,Wg.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 Vg.timeout({first:n,each:o,scheduler:r,with:e})};var zl={},qg=(Object.defineProperty(zl,"__esModule",{value:!0}),zl.timestamp=void 0,l),zg=Vf;zl.timestamp=function(t){return void 0===t&&(t=qg.dateTimestampProvider),zg.map(function(e){return{value:e,timestamp:t.now()}})};var l={},Hg=(Object.defineProperty(l,"__esModule",{value:!0}),l.window=void 0,n),Gg=g,Yg=j,Kg=G,Zg=C;l.window=function(o){return Gg.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new Hg.Subject;t.next(n.asObservable());return e.subscribe(Yg.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),Zg.innerFrom(o).subscribe(Yg.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new Hg.Subject)},Kg.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var Qg={},Xg=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.")},Jg=(Object.defineProperty(Qg,"__esModule",{value:!0}),Qg.windowCount=void 0,n),$g=g,eO=j;Qg.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return $g.operate(function(e,i){var u=[new Jg.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(eO.createOperatorSubscriber(i,function(e){try{for(var t=Xg(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 Jg.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 tO={},rO=(Object.defineProperty(tO,"__esModule",{value:!0}),tO.windowTime=void 0,n),nO=y,oO=p,iO=g,uO=j,aO=F,sO=o,cO=Al;tO.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=sO.popScheduler(t))?e:nO.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return iO.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(),aO.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new oO.Subscription,n.add(e),t=new rO.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),cO.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?cO.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(uO.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 Al={},lO=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.")},fO=(Object.defineProperty(Al,"__esModule",{value:!0}),Al.windowToggle=void 0,n),pO=p,dO=g,hO=C,bO=j,yO=G,_O=F;Al.windowToggle=function(t,a){return dO.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];hO.innerFrom(t).subscribe(bO.createOperatorSubscriber(o,function(e){var t,r=new fO.Subject,n=(u.push(r),new pO.Subscription);try{t=hO.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(bO.createOperatorSubscriber(o,function(){_O.arrRemove(u,r),r.complete(),n.unsubscribe()},yO.noop,i)))},yO.noop)),e.subscribe(bO.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=lO(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 F={},vO=(Object.defineProperty(F,"__esModule",{value:!0}),F.windowWhen=void 0,n),mO=g,gO=j,OO=C;F.windowWhen=function(u){return mO.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 vO.Subject,t.next(r.asObservable());try{e=OO.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=gO.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(gO.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var wO={},EO=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},PO=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},SO=(Object.defineProperty(wO,"__esModule",{value:!0}),wO.withLatestFrom=void 0,g),TO=j,jO=C,CO=T,IO=G,RO=o;wO.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=RO.popResultSelector(a);return SO.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){jO.innerFrom(a[t]).subscribe(TO.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(CO.identity))&&(o=null))},IO.noop))}(u);e.subscribe(TO.createOperatorSubscriber(r,function(e){i&&(e=PO([e],EO(n)),r.next(s?s.apply(void 0,PO([],EO(e))):e))}))})};var j={},AO=(Object.defineProperty(j,"__esModule",{value:!0}),j.zipAll=void 0,yh),kO=I;j.zipAll=function(e){return kO.joinAllInternals(AO.zip,e)};var C={},o={},MO=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},NO=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},xO=(Object.defineProperty(o,"__esModule",{value:!0}),o.zip=void 0,yh),DO=g;o.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return DO.operate(function(e,t){xO.zip.apply(void 0,NO([e],MO(r))).subscribe(t)})};var LO,UO,FO,BO,WO,VO,qO,zO,HO,GO,YO,KO,ZO,QO,XO,JO,$O,ew,tw,rw,nw,ow,iw,uw,aw,sw,cw,lw,fw,pw,dw,hw,bw,yw,_w,vw,mw,gw,Ow,ww,Ew,Pw,Sw,Tw,jw,Cw,Iw,Rw,Aw,kw,Mw,Nw,xw,Dw,Lw,Uw,Fw,Bw,Ww,Vw,qw,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,SE,TE,jE,CE,IE,RE,AE,kE,ME,NE,xE,DE,LE,UE,FE,BE,WE,VE,qE,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,SP,TP,jP,CP,IP,RP,AP,kP,MP,NP,xP,DP,LP,UP,FP,BP,WP,VP,qP=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(C,"__esModule",{value:!0}),C.zipWith=void 0,o);C.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return HP.zip.apply(void 0,zP([],qP(e)))},I=B,LO=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]}),g=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||LO(t,e,r)},Object.defineProperty(I,"__esModule",{value:!0}),I.interval=I.iif=I.generate=I.fromEventPattern=I.fromEvent=I.from=I.forkJoin=I.empty=I.defer=I.connectable=I.concat=I.combineLatest=I.bindNodeCallback=I.bindCallback=I.UnsubscriptionError=I.TimeoutError=I.SequenceError=I.ObjectUnsubscribedError=I.NotFoundError=I.EmptyError=I.ArgumentOutOfRangeError=I.firstValueFrom=I.lastValueFrom=I.isObservable=I.identity=I.noop=I.pipe=I.NotificationKind=I.Notification=I.Subscriber=I.Subscription=I.Scheduler=I.VirtualAction=I.VirtualTimeScheduler=I.animationFrameScheduler=I.animationFrame=I.queueScheduler=I.queue=I.asyncScheduler=I.async=I.asapScheduler=I.asap=I.AsyncSubject=I.ReplaySubject=I.BehaviorSubject=I.Subject=I.animationFrames=I.observable=I.ConnectableObservable=I.Observable=void 0,I.filter=I.expand=I.exhaustMap=I.exhaustAll=I.exhaust=I.every=I.endWith=I.elementAt=I.distinctUntilKeyChanged=I.distinctUntilChanged=I.distinct=I.dematerialize=I.delayWhen=I.delay=I.defaultIfEmpty=I.debounceTime=I.debounce=I.count=I.connect=I.concatWith=I.concatMapTo=I.concatMap=I.concatAll=I.combineLatestWith=I.combineLatestAll=I.combineAll=I.catchError=I.bufferWhen=I.bufferToggle=I.bufferTime=I.bufferCount=I.buffer=I.auditTime=I.audit=I.config=I.NEVER=I.EMPTY=I.scheduled=I.zip=I.using=I.timer=I.throwError=I.range=I.race=I.partition=I.pairs=I.onErrorResumeNext=I.of=I.never=I.merge=void 0,I.switchMap=I.switchAll=I.subscribeOn=I.startWith=I.skipWhile=I.skipUntil=I.skipLast=I.skip=I.single=I.shareReplay=I.share=I.sequenceEqual=I.scan=I.sampleTime=I.sample=I.refCount=I.retryWhen=I.retry=I.repeatWhen=I.repeat=I.reduce=I.raceWith=I.publishReplay=I.publishLast=I.publishBehavior=I.publish=I.pluck=I.pairwise=I.onErrorResumeNextWith=I.observeOn=I.multicast=I.min=I.mergeWith=I.mergeScan=I.mergeMapTo=I.mergeMap=I.flatMap=I.mergeAll=I.max=I.materialize=I.mapTo=I.map=I.last=I.isEmpty=I.ignoreElements=I.groupBy=I.first=I.findIndex=I.find=I.finalize=void 0,I.zipWith=I.zipAll=I.withLatestFrom=I.windowWhen=I.windowToggle=I.windowTime=I.windowCount=I.window=I.toArray=I.timestamp=I.timeoutWith=I.timeout=I.timeInterval=I.throwIfEmpty=I.throttleTime=I.throttle=I.tap=I.takeWhile=I.takeUntil=I.takeLast=I.take=I.switchScan=I.switchMapTo=void 0,UO=S,Object.defineProperty(I,"Observable",{enumerable:!0,get:function(){return UO.Observable}}),FO=Qr,Object.defineProperty(I,"ConnectableObservable",{enumerable:!0,get:function(){return FO.ConnectableObservable}}),BO=u,Object.defineProperty(I,"observable",{enumerable:!0,get:function(){return BO.observable}}),WO=m,Object.defineProperty(I,"animationFrames",{enumerable:!0,get:function(){return WO.animationFrames}}),VO=n,Object.defineProperty(I,"Subject",{enumerable:!0,get:function(){return VO.Subject}}),qO=h,Object.defineProperty(I,"BehaviorSubject",{enumerable:!0,get:function(){return qO.BehaviorSubject}}),zO=v,Object.defineProperty(I,"ReplaySubject",{enumerable:!0,get:function(){return zO.ReplaySubject}}),HO=P,Object.defineProperty(I,"AsyncSubject",{enumerable:!0,get:function(){return HO.AsyncSubject}}),GO=t,Object.defineProperty(I,"asap",{enumerable:!0,get:function(){return GO.asap}}),Object.defineProperty(I,"asapScheduler",{enumerable:!0,get:function(){return GO.asapScheduler}}),YO=y,Object.defineProperty(I,"async",{enumerable:!0,get:function(){return YO.async}}),Object.defineProperty(I,"asyncScheduler",{enumerable:!0,get:function(){return YO.asyncScheduler}}),KO=oc,Object.defineProperty(I,"queue",{enumerable:!0,get:function(){return KO.queue}}),Object.defineProperty(I,"queueScheduler",{enumerable:!0,get:function(){return KO.queueScheduler}}),ZO=hc,Object.defineProperty(I,"animationFrame",{enumerable:!0,get:function(){return ZO.animationFrame}}),Object.defineProperty(I,"animationFrameScheduler",{enumerable:!0,get:function(){return ZO.animationFrameScheduler}}),QO=vc,Object.defineProperty(I,"VirtualTimeScheduler",{enumerable:!0,get:function(){return QO.VirtualTimeScheduler}}),Object.defineProperty(I,"VirtualAction",{enumerable:!0,get:function(){return QO.VirtualAction}}),XO=Bs,Object.defineProperty(I,"Scheduler",{enumerable:!0,get:function(){return XO.Scheduler}}),JO=p,Object.defineProperty(I,"Subscription",{enumerable:!0,get:function(){return JO.Subscription}}),$O=w,Object.defineProperty(I,"Subscriber",{enumerable:!0,get:function(){return $O.Subscriber}}),ew=Ms,Object.defineProperty(I,"Notification",{enumerable:!0,get:function(){return ew.Notification}}),Object.defineProperty(I,"NotificationKind",{enumerable:!0,get:function(){return ew.NotificationKind}}),tw=Tt,Object.defineProperty(I,"pipe",{enumerable:!0,get:function(){return tw.pipe}}),rw=G,Object.defineProperty(I,"noop",{enumerable:!0,get:function(){return rw.noop}}),nw=T,Object.defineProperty(I,"identity",{enumerable:!0,get:function(){return nw.identity}}),ow=tl,Object.defineProperty(I,"isObservable",{enumerable:!0,get:function(){return ow.isObservable}}),iw=Kc,Object.defineProperty(I,"lastValueFrom",{enumerable:!0,get:function(){return iw.lastValueFrom}}),uw=Xc,Object.defineProperty(I,"firstValueFrom",{enumerable:!0,get:function(){return uw.firstValueFrom}}),aw=$c,Object.defineProperty(I,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return aw.ArgumentOutOfRangeError}}),sw=Gc,Object.defineProperty(I,"EmptyError",{enumerable:!0,get:function(){return sw.EmptyError}}),cw=$l,Object.defineProperty(I,"NotFoundError",{enumerable:!0,get:function(){return cw.NotFoundError}}),lw=ft,Object.defineProperty(I,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return lw.ObjectUnsubscribedError}}),fw=Bl,Object.defineProperty(I,"SequenceError",{enumerable:!0,get:function(){return fw.SequenceError}}),pw=il,Object.defineProperty(I,"TimeoutError",{enumerable:!0,get:function(){return pw.TimeoutError}}),dw=b,Object.defineProperty(I,"UnsubscriptionError",{enumerable:!0,get:function(){return dw.UnsubscriptionError}}),hw=el,Object.defineProperty(I,"bindCallback",{enumerable:!0,get:function(){return hw.bindCallback}}),bw=op,Object.defineProperty(I,"bindNodeCallback",{enumerable:!0,get:function(){return bw.bindNodeCallback}}),yw=O,Object.defineProperty(I,"combineLatest",{enumerable:!0,get:function(){return yw.combineLatest}}),_w=Ep,Object.defineProperty(I,"concat",{enumerable:!0,get:function(){return _w.concat}}),vw=Vp,Object.defineProperty(I,"connectable",{enumerable:!0,get:function(){return vw.connectable}}),mw=qp,Object.defineProperty(I,"defer",{enumerable:!0,get:function(){return mw.defer}}),gw=i,Object.defineProperty(I,"empty",{enumerable:!0,get:function(){return gw.empty}}),Ow=Qp,Object.defineProperty(I,"forkJoin",{enumerable:!0,get:function(){return Ow.forkJoin}}),ww=Vc,Object.defineProperty(I,"from",{enumerable:!0,get:function(){return ww.from}}),Ew=up,Object.defineProperty(I,"fromEvent",{enumerable:!0,get:function(){return Ew.fromEvent}}),Pw=fp,Object.defineProperty(I,"fromEventPattern",{enumerable:!0,get:function(){return Pw.fromEventPattern}}),Sw=Hc,Object.defineProperty(I,"generate",{enumerable:!0,get:function(){return Sw.generate}}),Tw=Gl,Object.defineProperty(I,"iif",{enumerable:!0,get:function(){return Tw.iif}}),jw=Pd,Object.defineProperty(I,"interval",{enumerable:!0,get:function(){return jw.interval}}),Cw=Lc,Object.defineProperty(I,"merge",{enumerable:!0,get:function(){return Cw.merge}}),Iw=Ud,Object.defineProperty(I,"never",{enumerable:!0,get:function(){return Iw.never}}),Rw=_,Object.defineProperty(I,"of",{enumerable:!0,get:function(){return Rw.of}}),Aw=Fd,Object.defineProperty(I,"onErrorResumeNext",{enumerable:!0,get:function(){return Aw.onErrorResumeNext}}),kw=Yd,Object.defineProperty(I,"pairs",{enumerable:!0,get:function(){return kw.pairs}}),Mw=Zd,Object.defineProperty(I,"partition",{enumerable:!0,get:function(){return Mw.partition}}),Nw=nh,Object.defineProperty(I,"race",{enumerable:!0,get:function(){return Nw.race}}),xw=ch,Object.defineProperty(I,"range",{enumerable:!0,get:function(){return xw.range}}),Dw=zc,Object.defineProperty(I,"throwError",{enumerable:!0,get:function(){return Dw.throwError}}),Lw=Sd,Object.defineProperty(I,"timer",{enumerable:!0,get:function(){return Lw.timer}}),Uw=ph,Object.defineProperty(I,"using",{enumerable:!0,get:function(){return Uw.using}}),Fw=yh,Object.defineProperty(I,"zip",{enumerable:!0,get:function(){return Fw.zip}}),Bw=qc,Object.defineProperty(I,"scheduled",{enumerable:!0,get:function(){return Bw.scheduled}}),Ww=i,Object.defineProperty(I,"EMPTY",{enumerable:!0,get:function(){return Ww.EMPTY}}),Vw=Ud,Object.defineProperty(I,"NEVER",{enumerable:!0,get:function(){return Vw.NEVER}}),g(Sh,I),qw=Fr,Object.defineProperty(I,"config",{enumerable:!0,get:function(){return qw.config}}),zw=Th,Object.defineProperty(I,"audit",{enumerable:!0,get:function(){return zw.audit}}),Hw=Rh,Object.defineProperty(I,"auditTime",{enumerable:!0,get:function(){return Hw.auditTime}}),Gw=Nh,Object.defineProperty(I,"buffer",{enumerable:!0,get:function(){return Gw.buffer}}),Yw=Fh,Object.defineProperty(I,"bufferCount",{enumerable:!0,get:function(){return Yw.bufferCount}}),Kw=zh,Object.defineProperty(I,"bufferTime",{enumerable:!0,get:function(){return Kw.bufferTime}}),Zw=$h,Object.defineProperty(I,"bufferToggle",{enumerable:!0,get:function(){return Zw.bufferToggle}}),Qw=ab,Object.defineProperty(I,"bufferWhen",{enumerable:!0,get:function(){return Qw.bufferWhen}}),Xw=pb,Object.defineProperty(I,"catchError",{enumerable:!0,get:function(){return Xw.catchError}}),Jw=yb,Object.defineProperty(I,"combineAll",{enumerable:!0,get:function(){return Jw.combineAll}}),$w=_b,Object.defineProperty(I,"combineLatestAll",{enumerable:!0,get:function(){return $w.combineLatestAll}}),eE=Nb,Object.defineProperty(I,"combineLatestWith",{enumerable:!0,get:function(){return eE.combineLatestWith}}),tE=Pp,Object.defineProperty(I,"concatAll",{enumerable:!0,get:function(){return tE.concatAll}}),rE=Wf,Object.defineProperty(I,"concatMap",{enumerable:!0,get:function(){return rE.concatMap}}),nE=Qb,Object.defineProperty(I,"concatMapTo",{enumerable:!0,get:function(){return nE.concatMapTo}}),oE=$b,Object.defineProperty(I,"concatWith",{enumerable:!0,get:function(){return oE.concatWith}}),iE=ly,Object.defineProperty(I,"connect",{enumerable:!0,get:function(){return iE.connect}}),uE=fy,Object.defineProperty(I,"count",{enumerable:!0,get:function(){return uE.count}}),aE=my,Object.defineProperty(I,"debounce",{enumerable:!0,get:function(){return aE.debounce}}),sE=Py,Object.defineProperty(I,"debounceTime",{enumerable:!0,get:function(){return sE.debounceTime}}),cE=Cy,Object.defineProperty(I,"defaultIfEmpty",{enumerable:!0,get:function(){return cE.defaultIfEmpty}}),lE=R,Object.defineProperty(I,"delay",{enumerable:!0,get:function(){return lE.delay}}),fE=Ay,Object.defineProperty(I,"delayWhen",{enumerable:!0,get:function(){return fE.delayWhen}}),pE=Xy,Object.defineProperty(I,"dematerialize",{enumerable:!0,get:function(){return pE.dematerialize}}),dE=t_,Object.defineProperty(I,"distinct",{enumerable:!0,get:function(){return dE.distinct}}),hE=u_,Object.defineProperty(I,"distinctUntilChanged",{enumerable:!0,get:function(){return hE.distinctUntilChanged}}),bE=f_,Object.defineProperty(I,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return bE.distinctUntilKeyChanged}}),yE=d_,Object.defineProperty(I,"elementAt",{enumerable:!0,get:function(){return yE.elementAt}}),_E=P_,Object.defineProperty(I,"endWith",{enumerable:!0,get:function(){return _E.endWith}}),vE=I_,Object.defineProperty(I,"every",{enumerable:!0,get:function(){return vE.every}}),mE=k_,Object.defineProperty(I,"exhaust",{enumerable:!0,get:function(){return mE.exhaust}}),gE=M_,Object.defineProperty(I,"exhaustAll",{enumerable:!0,get:function(){return gE.exhaustAll}}),OE=N_,Object.defineProperty(I,"exhaustMap",{enumerable:!0,get:function(){return OE.exhaustMap}}),wE=W_,Object.defineProperty(I,"expand",{enumerable:!0,get:function(){return wE.expand}}),EE=Xd,Object.defineProperty(I,"filter",{enumerable:!0,get:function(){return EE.filter}}),PE=z_,Object.defineProperty(I,"finalize",{enumerable:!0,get:function(){return PE.finalize}}),SE=G_,Object.defineProperty(I,"find",{enumerable:!0,get:function(){return SE.find}}),TE=Q_,Object.defineProperty(I,"findIndex",{enumerable:!0,get:function(){return TE.findIndex}}),jE=$_,Object.defineProperty(I,"first",{enumerable:!0,get:function(){return jE.first}}),CE=uv,Object.defineProperty(I,"groupBy",{enumerable:!0,get:function(){return CE.groupBy}}),IE=Dy,Object.defineProperty(I,"ignoreElements",{enumerable:!0,get:function(){return IE.ignoreElements}}),RE=pv,Object.defineProperty(I,"isEmpty",{enumerable:!0,get:function(){return RE.isEmpty}}),AE=bv,Object.defineProperty(I,"last",{enumerable:!0,get:function(){return AE.last}}),kE=Vf,Object.defineProperty(I,"map",{enumerable:!0,get:function(){return kE.map}}),ME=By,Object.defineProperty(I,"mapTo",{enumerable:!0,get:function(){return ME.mapTo}}),NE=jv,Object.defineProperty(I,"materialize",{enumerable:!0,get:function(){return NE.materialize}}),xE=Av,Object.defineProperty(I,"max",{enumerable:!0,get:function(){return xE.max}}),DE=Sp,Object.defineProperty(I,"mergeAll",{enumerable:!0,get:function(){return DE.mergeAll}}),LE=Nv,Object.defineProperty(I,"flatMap",{enumerable:!0,get:function(){return LE.flatMap}}),UE=Tp,Object.defineProperty(I,"mergeMap",{enumerable:!0,get:function(){return UE.mergeMap}}),FE=xv,Object.defineProperty(I,"mergeMapTo",{enumerable:!0,get:function(){return FE.mergeMapTo}}),BE=Uv,Object.defineProperty(I,"mergeScan",{enumerable:!0,get:function(){return BE.mergeScan}}),WE=jp,Object.defineProperty(I,"mergeWith",{enumerable:!0,get:function(){return WE.mergeWith}}),VE=Jv,Object.defineProperty(I,"min",{enumerable:!0,get:function(){return VE.min}}),qE=tm,Object.defineProperty(I,"multicast",{enumerable:!0,get:function(){return qE.multicast}}),zE=f,Object.defineProperty(I,"observeOn",{enumerable:!0,get:function(){return zE.observeOn}}),HE=im,Object.defineProperty(I,"onErrorResumeNextWith",{enumerable:!0,get:function(){return HE.onErrorResumeNextWith}}),GE=fm,Object.defineProperty(I,"pairwise",{enumerable:!0,get:function(){return GE.pairwise}}),YE=hm,Object.defineProperty(I,"pluck",{enumerable:!0,get:function(){return YE.pluck}}),KE=ym,Object.defineProperty(I,"publish",{enumerable:!0,get:function(){return KE.publish}}),ZE=gm,Object.defineProperty(I,"publishBehavior",{enumerable:!0,get:function(){return ZE.publishBehavior}}),QE=Em,Object.defineProperty(I,"publishLast",{enumerable:!0,get:function(){return QE.publishLast}}),XE=Tm,Object.defineProperty(I,"publishReplay",{enumerable:!0,get:function(){return XE.publishReplay}}),JE=Rm,Object.defineProperty(I,"raceWith",{enumerable:!0,get:function(){return JE.raceWith}}),$E=mb,Object.defineProperty(I,"reduce",{enumerable:!0,get:function(){return $E.reduce}}),eP=Dm,Object.defineProperty(I,"repeat",{enumerable:!0,get:function(){return eP.repeat}}),tP=Vm,Object.defineProperty(I,"repeatWhen",{enumerable:!0,get:function(){return tP.repeatWhen}}),rP=Ym,Object.defineProperty(I,"retry",{enumerable:!0,get:function(){return rP.retry}}),nP=$m,Object.defineProperty(I,"retryWhen",{enumerable:!0,get:function(){return nP.retryWhen}}),oP=Xr,Object.defineProperty(I,"refCount",{enumerable:!0,get:function(){return oP.refCount}}),iP=o0,Object.defineProperty(I,"sample",{enumerable:!0,get:function(){return iP.sample}}),uP=c0,Object.defineProperty(I,"sampleTime",{enumerable:!0,get:function(){return uP.sampleTime}}),aP=d0,Object.defineProperty(I,"scan",{enumerable:!0,get:function(){return aP.scan}}),sP=gb,Object.defineProperty(I,"sequenceEqual",{enumerable:!0,get:function(){return sP.sequenceEqual}}),cP=g0,Object.defineProperty(I,"share",{enumerable:!0,get:function(){return cP.share}}),lP=C0,Object.defineProperty(I,"shareReplay",{enumerable:!0,get:function(){return lP.shareReplay}}),fP=A0,Object.defineProperty(I,"single",{enumerable:!0,get:function(){return fP.single}}),pP=L0,Object.defineProperty(I,"skip",{enumerable:!0,get:function(){return pP.skip}}),dP=F0,Object.defineProperty(I,"skipLast",{enumerable:!0,get:function(){return dP.skipLast}}),hP=q0,Object.defineProperty(I,"skipUntil",{enumerable:!0,get:function(){return hP.skipUntil}}),bP=K0,Object.defineProperty(I,"skipWhile",{enumerable:!0,get:function(){return bP.skipWhile}}),yP=X0,Object.defineProperty(I,"startWith",{enumerable:!0,get:function(){return yP.startWith}}),_P=xl,Object.defineProperty(I,"subscribeOn",{enumerable:!0,get:function(){return _P.subscribeOn}}),vP=tg,Object.defineProperty(I,"switchAll",{enumerable:!0,get:function(){return vP.switchAll}}),mP=rg,Object.defineProperty(I,"switchMap",{enumerable:!0,get:function(){return mP.switchMap}}),gP=sg,Object.defineProperty(I,"switchMapTo",{enumerable:!0,get:function(){return gP.switchMapTo}}),OP=fg,Object.defineProperty(I,"switchScan",{enumerable:!0,get:function(){return OP.switchScan}}),wP=ky,Object.defineProperty(I,"take",{enumerable:!0,get:function(){return wP.take}}),EP=yv,Object.defineProperty(I,"takeLast",{enumerable:!0,get:function(){return EP.takeLast}}),PP=hg,Object.defineProperty(I,"takeUntil",{enumerable:!0,get:function(){return PP.takeUntil}}),SP=mg,Object.defineProperty(I,"takeWhile",{enumerable:!0,get:function(){return SP.takeWhile}}),TP=wg,Object.defineProperty(I,"tap",{enumerable:!0,get:function(){return TP.tap}}),jP=E,Object.defineProperty(I,"throttle",{enumerable:!0,get:function(){return jP.throttle}}),CP=Rg,Object.defineProperty(I,"throttleTime",{enumerable:!0,get:function(){return CP.throttleTime}}),IP=h_,Object.defineProperty(I,"throwIfEmpty",{enumerable:!0,get:function(){return IP.throwIfEmpty}}),RP=Ng,Object.defineProperty(I,"timeInterval",{enumerable:!0,get:function(){return RP.timeInterval}}),AP=il,Object.defineProperty(I,"timeout",{enumerable:!0,get:function(){return AP.timeout}}),kP=Fg,Object.defineProperty(I,"timeoutWith",{enumerable:!0,get:function(){return kP.timeoutWith}}),MP=zl,Object.defineProperty(I,"timestamp",{enumerable:!0,get:function(){return MP.timestamp}}),NP=vb,Object.defineProperty(I,"toArray",{enumerable:!0,get:function(){return NP.toArray}}),xP=l,Object.defineProperty(I,"window",{enumerable:!0,get:function(){return xP.window}}),DP=Qg,Object.defineProperty(I,"windowCount",{enumerable:!0,get:function(){return DP.windowCount}}),LP=tO,Object.defineProperty(I,"windowTime",{enumerable:!0,get:function(){return LP.windowTime}}),UP=Al,Object.defineProperty(I,"windowToggle",{enumerable:!0,get:function(){return UP.windowToggle}}),FP=F,Object.defineProperty(I,"windowWhen",{enumerable:!0,get:function(){return FP.windowWhen}}),BP=wO,Object.defineProperty(I,"withLatestFrom",{enumerable:!0,get:function(){return BP.withLatestFrom}}),WP=j,Object.defineProperty(I,"zipAll",{enumerable:!0,get:function(){return WP.zipAll}}),VP=C,Object.defineProperty(I,"zipWith",{enumerable:!0,get:function(){return VP.zipWith}});var S={},Qr={},GP=(Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.partition=void 0,Qd),YP=Xd;Qr.partition=function(t,r){return function(e){return[YP.filter(t,r)(e),YP.filter(GP.not(t,r))(e)]}};var KP,ZP,QP,XP,JP,$P,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,SS,TS,jS,CS,IS,RS,AS,kS,MS,NS,xS,DS,LS,US,FS,BS,WS,VS,qS,zS,HS,GS,YS,KS,ZS,QS,XS,JS,$S,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,ST,TT,jT,CT,IT,RT,AT,kT,MT,NT,xT,DT,LT,UT,FT,BT,WT,VT,qT,zT,HT,GT,YT,KT,ZT,QT,XT,JT,u={},$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},e1=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},t1=(Object.defineProperty(u,"__esModule",{value:!0}),u.race=void 0,Bd),r1=Rm;u.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r1.raceWith.apply(void 0,e1([],$T(t1.argsOrArgArray(e))))},m=S,Object.defineProperty(m,"__esModule",{value:!0}),m.mergeAll=m.merge=m.max=m.materialize=m.mapTo=m.map=m.last=m.isEmpty=m.ignoreElements=m.groupBy=m.first=m.findIndex=m.find=m.finalize=m.filter=m.expand=m.exhaustMap=m.exhaustAll=m.exhaust=m.every=m.endWith=m.elementAt=m.distinctUntilKeyChanged=m.distinctUntilChanged=m.distinct=m.dematerialize=m.delayWhen=m.delay=m.defaultIfEmpty=m.debounceTime=m.debounce=m.count=m.connect=m.concatWith=m.concatMapTo=m.concatMap=m.concatAll=m.concat=m.combineLatestWith=m.combineLatest=m.combineLatestAll=m.combineAll=m.catchError=m.bufferWhen=m.bufferToggle=m.bufferTime=m.bufferCount=m.buffer=m.auditTime=m.audit=void 0,m.timeInterval=m.throwIfEmpty=m.throttleTime=m.throttle=m.tap=m.takeWhile=m.takeUntil=m.takeLast=m.take=m.switchScan=m.switchMapTo=m.switchMap=m.switchAll=m.subscribeOn=m.startWith=m.skipWhile=m.skipUntil=m.skipLast=m.skip=m.single=m.shareReplay=m.share=m.sequenceEqual=m.scan=m.sampleTime=m.sample=m.refCount=m.retryWhen=m.retry=m.repeatWhen=m.repeat=m.reduce=m.raceWith=m.race=m.publishReplay=m.publishLast=m.publishBehavior=m.publish=m.pluck=m.partition=m.pairwise=m.onErrorResumeNext=m.observeOn=m.multicast=m.min=m.mergeWith=m.mergeScan=m.mergeMapTo=m.mergeMap=m.flatMap=void 0,m.zipWith=m.zipAll=m.zip=m.withLatestFrom=m.windowWhen=m.windowToggle=m.windowTime=m.windowCount=m.window=m.toArray=m.timestamp=m.timeoutWith=m.timeout=void 0,KP=Th,Object.defineProperty(m,"audit",{enumerable:!0,get:function(){return KP.audit}}),ZP=Rh,Object.defineProperty(m,"auditTime",{enumerable:!0,get:function(){return ZP.auditTime}}),QP=Nh,Object.defineProperty(m,"buffer",{enumerable:!0,get:function(){return QP.buffer}}),XP=Fh,Object.defineProperty(m,"bufferCount",{enumerable:!0,get:function(){return XP.bufferCount}}),JP=zh,Object.defineProperty(m,"bufferTime",{enumerable:!0,get:function(){return JP.bufferTime}}),$P=$h,Object.defineProperty(m,"bufferToggle",{enumerable:!0,get:function(){return $P.bufferToggle}}),eS=ab,Object.defineProperty(m,"bufferWhen",{enumerable:!0,get:function(){return eS.bufferWhen}}),tS=pb,Object.defineProperty(m,"catchError",{enumerable:!0,get:function(){return tS.catchError}}),rS=yb,Object.defineProperty(m,"combineAll",{enumerable:!0,get:function(){return rS.combineAll}}),nS=_b,Object.defineProperty(m,"combineLatestAll",{enumerable:!0,get:function(){return nS.combineLatestAll}}),oS=xb,Object.defineProperty(m,"combineLatest",{enumerable:!0,get:function(){return oS.combineLatest}}),iS=Nb,Object.defineProperty(m,"combineLatestWith",{enumerable:!0,get:function(){return iS.combineLatestWith}}),uS=ey,Object.defineProperty(m,"concat",{enumerable:!0,get:function(){return uS.concat}}),aS=Pp,Object.defineProperty(m,"concatAll",{enumerable:!0,get:function(){return aS.concatAll}}),sS=Wf,Object.defineProperty(m,"concatMap",{enumerable:!0,get:function(){return sS.concatMap}}),cS=Qb,Object.defineProperty(m,"concatMapTo",{enumerable:!0,get:function(){return cS.concatMapTo}}),lS=$b,Object.defineProperty(m,"concatWith",{enumerable:!0,get:function(){return lS.concatWith}}),fS=ly,Object.defineProperty(m,"connect",{enumerable:!0,get:function(){return fS.connect}}),pS=fy,Object.defineProperty(m,"count",{enumerable:!0,get:function(){return pS.count}}),dS=my,Object.defineProperty(m,"debounce",{enumerable:!0,get:function(){return dS.debounce}}),hS=Py,Object.defineProperty(m,"debounceTime",{enumerable:!0,get:function(){return hS.debounceTime}}),bS=Cy,Object.defineProperty(m,"defaultIfEmpty",{enumerable:!0,get:function(){return bS.defaultIfEmpty}}),yS=R,Object.defineProperty(m,"delay",{enumerable:!0,get:function(){return yS.delay}}),_S=Ay,Object.defineProperty(m,"delayWhen",{enumerable:!0,get:function(){return _S.delayWhen}}),vS=Xy,Object.defineProperty(m,"dematerialize",{enumerable:!0,get:function(){return vS.dematerialize}}),mS=t_,Object.defineProperty(m,"distinct",{enumerable:!0,get:function(){return mS.distinct}}),gS=u_,Object.defineProperty(m,"distinctUntilChanged",{enumerable:!0,get:function(){return gS.distinctUntilChanged}}),OS=f_,Object.defineProperty(m,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return OS.distinctUntilKeyChanged}}),wS=d_,Object.defineProperty(m,"elementAt",{enumerable:!0,get:function(){return wS.elementAt}}),ES=P_,Object.defineProperty(m,"endWith",{enumerable:!0,get:function(){return ES.endWith}}),PS=I_,Object.defineProperty(m,"every",{enumerable:!0,get:function(){return PS.every}}),SS=k_,Object.defineProperty(m,"exhaust",{enumerable:!0,get:function(){return SS.exhaust}}),TS=M_,Object.defineProperty(m,"exhaustAll",{enumerable:!0,get:function(){return TS.exhaustAll}}),jS=N_,Object.defineProperty(m,"exhaustMap",{enumerable:!0,get:function(){return jS.exhaustMap}}),CS=W_,Object.defineProperty(m,"expand",{enumerable:!0,get:function(){return CS.expand}}),IS=Xd,Object.defineProperty(m,"filter",{enumerable:!0,get:function(){return IS.filter}}),RS=z_,Object.defineProperty(m,"finalize",{enumerable:!0,get:function(){return RS.finalize}}),AS=G_,Object.defineProperty(m,"find",{enumerable:!0,get:function(){return AS.find}}),kS=Q_,Object.defineProperty(m,"findIndex",{enumerable:!0,get:function(){return kS.findIndex}}),MS=$_,Object.defineProperty(m,"first",{enumerable:!0,get:function(){return MS.first}}),NS=uv,Object.defineProperty(m,"groupBy",{enumerable:!0,get:function(){return NS.groupBy}}),xS=Dy,Object.defineProperty(m,"ignoreElements",{enumerable:!0,get:function(){return xS.ignoreElements}}),DS=pv,Object.defineProperty(m,"isEmpty",{enumerable:!0,get:function(){return DS.isEmpty}}),LS=bv,Object.defineProperty(m,"last",{enumerable:!0,get:function(){return LS.last}}),US=Vf,Object.defineProperty(m,"map",{enumerable:!0,get:function(){return US.map}}),FS=By,Object.defineProperty(m,"mapTo",{enumerable:!0,get:function(){return FS.mapTo}}),BS=jv,Object.defineProperty(m,"materialize",{enumerable:!0,get:function(){return BS.materialize}}),WS=Av,Object.defineProperty(m,"max",{enumerable:!0,get:function(){return WS.max}}),VS=Wv,Object.defineProperty(m,"merge",{enumerable:!0,get:function(){return VS.merge}}),qS=Sp,Object.defineProperty(m,"mergeAll",{enumerable:!0,get:function(){return qS.mergeAll}}),zS=Nv,Object.defineProperty(m,"flatMap",{enumerable:!0,get:function(){return zS.flatMap}}),HS=Tp,Object.defineProperty(m,"mergeMap",{enumerable:!0,get:function(){return HS.mergeMap}}),GS=xv,Object.defineProperty(m,"mergeMapTo",{enumerable:!0,get:function(){return GS.mergeMapTo}}),YS=Uv,Object.defineProperty(m,"mergeScan",{enumerable:!0,get:function(){return YS.mergeScan}}),KS=jp,Object.defineProperty(m,"mergeWith",{enumerable:!0,get:function(){return KS.mergeWith}}),ZS=Jv,Object.defineProperty(m,"min",{enumerable:!0,get:function(){return ZS.min}}),QS=tm,Object.defineProperty(m,"multicast",{enumerable:!0,get:function(){return QS.multicast}}),XS=f,Object.defineProperty(m,"observeOn",{enumerable:!0,get:function(){return XS.observeOn}}),JS=im,Object.defineProperty(m,"onErrorResumeNext",{enumerable:!0,get:function(){return JS.onErrorResumeNext}}),$S=fm,Object.defineProperty(m,"pairwise",{enumerable:!0,get:function(){return $S.pairwise}}),eT=Qr,Object.defineProperty(m,"partition",{enumerable:!0,get:function(){return eT.partition}}),tT=hm,Object.defineProperty(m,"pluck",{enumerable:!0,get:function(){return tT.pluck}}),rT=ym,Object.defineProperty(m,"publish",{enumerable:!0,get:function(){return rT.publish}}),nT=gm,Object.defineProperty(m,"publishBehavior",{enumerable:!0,get:function(){return nT.publishBehavior}}),oT=Em,Object.defineProperty(m,"publishLast",{enumerable:!0,get:function(){return oT.publishLast}}),iT=Tm,Object.defineProperty(m,"publishReplay",{enumerable:!0,get:function(){return iT.publishReplay}}),uT=u,Object.defineProperty(m,"race",{enumerable:!0,get:function(){return uT.race}}),aT=Rm,Object.defineProperty(m,"raceWith",{enumerable:!0,get:function(){return aT.raceWith}}),sT=mb,Object.defineProperty(m,"reduce",{enumerable:!0,get:function(){return sT.reduce}}),cT=Dm,Object.defineProperty(m,"repeat",{enumerable:!0,get:function(){return cT.repeat}}),lT=Vm,Object.defineProperty(m,"repeatWhen",{enumerable:!0,get:function(){return lT.repeatWhen}}),fT=Ym,Object.defineProperty(m,"retry",{enumerable:!0,get:function(){return fT.retry}}),pT=$m,Object.defineProperty(m,"retryWhen",{enumerable:!0,get:function(){return pT.retryWhen}}),dT=Xr,Object.defineProperty(m,"refCount",{enumerable:!0,get:function(){return dT.refCount}}),hT=o0,Object.defineProperty(m,"sample",{enumerable:!0,get:function(){return hT.sample}}),bT=c0,Object.defineProperty(m,"sampleTime",{enumerable:!0,get:function(){return bT.sampleTime}}),yT=d0,Object.defineProperty(m,"scan",{enumerable:!0,get:function(){return yT.scan}}),_T=gb,Object.defineProperty(m,"sequenceEqual",{enumerable:!0,get:function(){return _T.sequenceEqual}}),vT=g0,Object.defineProperty(m,"share",{enumerable:!0,get:function(){return vT.share}}),mT=C0,Object.defineProperty(m,"shareReplay",{enumerable:!0,get:function(){return mT.shareReplay}}),gT=A0,Object.defineProperty(m,"single",{enumerable:!0,get:function(){return gT.single}}),OT=L0,Object.defineProperty(m,"skip",{enumerable:!0,get:function(){return OT.skip}}),wT=F0,Object.defineProperty(m,"skipLast",{enumerable:!0,get:function(){return wT.skipLast}}),ET=q0,Object.defineProperty(m,"skipUntil",{enumerable:!0,get:function(){return ET.skipUntil}}),PT=K0,Object.defineProperty(m,"skipWhile",{enumerable:!0,get:function(){return PT.skipWhile}}),ST=X0,Object.defineProperty(m,"startWith",{enumerable:!0,get:function(){return ST.startWith}}),TT=xl,Object.defineProperty(m,"subscribeOn",{enumerable:!0,get:function(){return TT.subscribeOn}}),jT=tg,Object.defineProperty(m,"switchAll",{enumerable:!0,get:function(){return jT.switchAll}}),CT=rg,Object.defineProperty(m,"switchMap",{enumerable:!0,get:function(){return CT.switchMap}}),IT=sg,Object.defineProperty(m,"switchMapTo",{enumerable:!0,get:function(){return IT.switchMapTo}}),RT=fg,Object.defineProperty(m,"switchScan",{enumerable:!0,get:function(){return RT.switchScan}}),AT=ky,Object.defineProperty(m,"take",{enumerable:!0,get:function(){return AT.take}}),kT=yv,Object.defineProperty(m,"takeLast",{enumerable:!0,get:function(){return kT.takeLast}}),MT=hg,Object.defineProperty(m,"takeUntil",{enumerable:!0,get:function(){return MT.takeUntil}}),NT=mg,Object.defineProperty(m,"takeWhile",{enumerable:!0,get:function(){return NT.takeWhile}}),xT=wg,Object.defineProperty(m,"tap",{enumerable:!0,get:function(){return xT.tap}}),DT=E,Object.defineProperty(m,"throttle",{enumerable:!0,get:function(){return DT.throttle}}),LT=Rg,Object.defineProperty(m,"throttleTime",{enumerable:!0,get:function(){return LT.throttleTime}}),UT=h_,Object.defineProperty(m,"throwIfEmpty",{enumerable:!0,get:function(){return UT.throwIfEmpty}}),FT=Ng,Object.defineProperty(m,"timeInterval",{enumerable:!0,get:function(){return FT.timeInterval}}),BT=il,Object.defineProperty(m,"timeout",{enumerable:!0,get:function(){return BT.timeout}}),WT=Fg,Object.defineProperty(m,"timeoutWith",{enumerable:!0,get:function(){return WT.timeoutWith}}),VT=zl,Object.defineProperty(m,"timestamp",{enumerable:!0,get:function(){return VT.timestamp}}),qT=vb,Object.defineProperty(m,"toArray",{enumerable:!0,get:function(){return qT.toArray}}),zT=l,Object.defineProperty(m,"window",{enumerable:!0,get:function(){return zT.window}}),HT=Qg,Object.defineProperty(m,"windowCount",{enumerable:!0,get:function(){return HT.windowCount}}),GT=tO,Object.defineProperty(m,"windowTime",{enumerable:!0,get:function(){return GT.windowTime}}),YT=Al,Object.defineProperty(m,"windowToggle",{enumerable:!0,get:function(){return YT.windowToggle}}),KT=F,Object.defineProperty(m,"windowWhen",{enumerable:!0,get:function(){return KT.windowWhen}}),ZT=wO,Object.defineProperty(m,"withLatestFrom",{enumerable:!0,get:function(){return ZT.withLatestFrom}}),QT=o,Object.defineProperty(m,"zip",{enumerable:!0,get:function(){return QT.zip}}),XT=j,Object.defineProperty(m,"zipAll",{enumerable:!0,get:function(){return XT.zipAll}}),JT=C,Object.defineProperty(m,"zipWith",{enumerable:!0,get:function(){return JT.zipWith}});var n={},n1=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())})},o1=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},i1=(Object.defineProperty(n,"__esModule",{value:!0}),e),u1=B,a1=S,s1=0,c1=1,l1=2;function f1(e,t){e=e.pipe((0,a1.publishReplay)(1),(0,a1.refCount)());this._result=e,this._keys=e.pipe((0,a1.mergeMap)(function(e){return(0,u1.from)(e.keys())}),(0,a1.publishReplay)(1),(0,a1.refCount)()),this._records=void 0,this._controls=new p1,this._summary=new u1.ReplaySubject,this._state=t||s1}f1.prototype.keys=function(){return this._keys},f1.prototype.records=function(){var r=this,e=this._result.pipe((0,a1.mergeMap)(function(t){return new u1.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},f1.prototype.consume=function(){var r=this;return this._result.pipe((0,a1.mergeMap)(function(t){return new u1.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},f1.prototype.pause=function(){this._controls.pause()},f1.prototype.resume=function(){return this._controls.resume()},f1.prototype.push=function(){return this._controls.push()},f1.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<c1?(this._state=c1,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,i1.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},f1.prototype._toObservable=function(){var n=this;return new u1.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new f1((t=e,new u1.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},f1.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new p1);var a=new u1.Subject,s=function(n){return n1(e,void 0,void 0,function(){var t,r;return o1(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 n1(this,void 0,void 0,function(){return o1(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 n1(t,void 0,void 0,function(){var t,r;return o1(this,function(e){switch(e.label){case 0:return this._state=l1,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=l1,t._summary.error(e)}},this._controls),this._records)},n.default=f1;d1.prototype.pause=function(){this._paused=!0},Object.defineProperty(d1.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(d1.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),d1.prototype.resume=function(){return n1(this,void 0,void 0,function(){var t;return o1(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]}})})},d1.prototype.push=function(){return n1(this,void 0,void 0,function(){return o1(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(d1.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var p1=d1;function d1(e){void 0===e&&(e=function(){return n1(t,void 0,void 0,function(){return o1(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var h={},v=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},h1=(Object.defineProperty(h,"__esModule",{value:!0}),B),b1=v(n);function y1(e){this._txc=e}v(e),y1.prototype.run=function(e,r){var n=this;return new b1.default(new h1.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},y1.prototype.commit=function(){var e=this;return new h1.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},y1.prototype.rollback=function(){var e=this;return new h1.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},y1.prototype.isOpen=function(){return this._txc.isOpen()},y1.prototype.close=function(){var e=this;return new h1.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},h.default=y1;P={},t=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function _1(e){e=e.run;this._run=e}Object.defineProperty(P,"__esModule",{value:!0}),t(n),t(h),_1.fromTransaction=function(e){return new _1({run:e.run.bind(e)})},_1.prototype.run=function(e,t){return this._run(e,t)},P.default=_1;var y={},v1=(Object.defineProperty(y,"__esModule",{value:!0}),e),m1=B,g1=S,O1=(v1.internal.logger.Logger,v1.error.SERVICE_UNAVAILABLE);function w1(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=E1(void 0===t?3e4:t,3e4),this._initialDelay=E1(r,1e3),this._delayMultiplier=E1(n,2),this._delayJitter=E1(o,.2),this._logger=e}function E1(e,t){return e||0===e?e:t}w1.prototype.retry=function(e){var a=this;return e.pipe((0,g1.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,g1.mergeMap)(function(e){if(!(0,v1.isRetriableError)(e))return(0,m1.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,v1.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),O1)).seenErrors=n,(0,m1.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,m1.of)(1).pipe((0,g1.delay)(r))}))}))},w1.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},y.default=w1;var oc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P1=(Object.defineProperty(Z,"__esModule",{value:!0}),B),S1=S,T1=oc(n),hc=e,j1=oc(h),C1=oc(P),I1=oc(y),vc=hc.internal.constants,R1=vc.ACCESS_MODE_READ,A1=vc.ACCESS_MODE_WRITE,k1=vc.TELEMETRY_APIS,M1=hc.internal.txConfig.TxConfig;function N1(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 I1.default({maxRetryTimeout:e})}(r),this._log=e}N1.prototype.run=function(e,r,n){var o=this;return new T1.default(new P1.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},N1.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:k1.UNMANAGED_TRANSACTION})},N1.prototype.readTransaction=function(e,t){return this._runTransaction(R1,e,t)},N1.prototype.writeTransaction=function(e,t){return this._runTransaction(A1,e,t)},N1.prototype.executeRead=function(e,t){return this._executeInTransaction(R1,e,t)},N1.prototype.executeWrite=function(e,t){return this._executeInTransaction(A1,e,t)},N1.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new C1.default({run:e.run.bind(e)})})},N1.prototype.close=function(){var e=this;return new P1.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},N1.prototype[Symbol.asyncDispose]=function(){return this.close()},N1.prototype.lastBookmark=function(){return this.lastBookmarks()},N1.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},N1.prototype._beginTransaction=function(e,t,r){var n=this,o=M1.empty();return t&&(o=new M1(t,this._log)),new P1.Observable(function(t){try{n._session._beginTransaction(e,o,r).then(function(e){t.next(new j1.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},N1.prototype._runTransaction=function(e,r,t,n){var o=this,i=(void 0===n&&(n=function(e){return e}),M1.empty()),u=(t&&(i=new M1(t)),{apiTelemetryConfig:{api:k1.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}});return this._retryLogic.retry((0,P1.of)(1).pipe((0,S1.mergeMap)(function(){return o._beginTransaction(e,i,u.apiTelemetryConfig)}),(0,S1.mergeMap)(function(t){return(0,P1.defer)(function(){try{return r(n(t))}catch(e){return(0,P1.throwError)(function(){return e})}}).pipe((0,S1.catchError)(function(e){return t.rollback().pipe((0,S1.concatWith)((0,P1.throwError)(function(){return e})))}),(0,S1.concatWith)(t.commit()))})))},Z.default=N1;var x1,D1,Bs=r&&r.__extends||(x1=function(e,t){return(x1=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}x1(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}},w=(Object.defineProperty(U,"__esModule",{value:!0}),U.WRITE=U.READ=U.Driver=void 0,e),L1=p(Z),U1=w.internal.constants.FETCH_ALL,Ms=w.driver.READ,F1=w.driver.WRITE,Tt=(U.READ=Ms,U.WRITE=F1,Bs(B1,D1=w.Driver),B1.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 L1.default({session:this._newSession({defaultAccessMode:void 0===t?F1: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===U1)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(U1," 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})},B1);function B1(){return null!==D1&&D1.apply(this,arguments)||this}U.Driver=Tt,U.default=Tt;G={},Object.defineProperty(G,"__esModule",{value:!0}),G.default="6.0.0-alpha01",T={},tl={},Kc={};function W1(){}Object.defineProperty(Kc,"__esModule",{value:!0}),W1.prototype.selectReader=function(e){throw new Error("Abstract function")},W1.prototype.selectWriter=function(e){throw new Error("Abstract function")},Kc.default=W1;Xc={},$c={};function V1(e){this._offset=e||0}Object.defineProperty($c,"__esModule",{value:!0}),V1.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},$c.default=V1;var q1,z1,Gc=r&&r.__extends||(q1=function(e,t){return(q1=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}q1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),$l=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},H1=(Object.defineProperty(Xc,"__esModule",{value:!0}),$l($c)),ft=$l(Kc),Bl=(z1=ft.default,Gc(G1,z1),G1.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},G1.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},G1.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},G1);function G1(e){var t=z1.call(this)||this;return t._readersIndex=new H1.default,t._writersIndex=new H1.default,t._connectionPool=e,t}Xc.default=Bl;b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(tl,"__esModule",{value:!0}),tl.LeastConnectedLoadBalancingStrategy=tl.LoadBalancingStrategy=void 0,el=b(Kc),tl.LoadBalancingStrategy=el.default,op=b(Xc),tl.LeastConnectedLoadBalancingStrategy=op.default,tl.default=op.default,O={},Ep={},Vp={},qp={},Qp={},Vc={},up={},fp={byteLength:function(e){var e=$1(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};fp.toByteArray=function(e){var t,r,n=$1(e),o=n[0],n=n[1],i=new Z1(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=K1[e.charCodeAt(r)]<<18|K1[e.charCodeAt(r+1)]<<12|K1[e.charCodeAt(r+2)]<<6|K1[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=K1[e.charCodeAt(r)]<<2|K1[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=K1[e.charCodeAt(r)]<<10|K1[e.charCodeAt(r+1)]<<4|K1[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},fp.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 Y1[e>>18&63]+Y1[e>>12&63]+Y1[e>>6&63]+Y1[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(Y1[t>>2]+Y1[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(Y1[t>>10]+Y1[t>>4&63]+Y1[t<<2&63]+"="));return o.join("")};for(var Y1=[],K1=[],Z1="undefined"!=typeof Uint8Array?Uint8Array:Array,Q1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",X1=0,J1=Q1.length;X1<J1;++X1)Y1[X1]=Q1[X1],K1[Q1.charCodeAt(X1)]=X1;function $1(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]}K1["-".charCodeAt(0)]=62,K1["_".charCodeAt(0)]=63;Hc={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 ej=up;const zD=fp,HD=Hc,GD=(Gl="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,ej.Buffer=A,ej.SlowBuffer=function(e){+e!=e&&(e=0);return A.alloc(+e)},ej.INSPECT_MAX_BYTES=50,2147483647);function tj(e){if(e>GD)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,A.prototype),e}function A(e,t,r){if("number"!=typeof e)return rj(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return oj(e)}function rj(t,r,e){if("string"==typeof t){var n=t;var o=r;"string"==typeof o&&""!==o||(o="utf8");if(!A.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var i=0|sj(n,o);let e=tj(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return Aj(o=t,Uint8Array)?uj((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):ij(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(Aj(t,ArrayBuffer)||t&&Aj(t.buffer,ArrayBuffer))return uj(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(Aj(t,SharedArrayBuffer)||t&&Aj(t.buffer,SharedArrayBuffer)))return uj(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 A.from(n,r,e);var u=function(e){{var t,r;if(A.isBuffer(e))return t=0|aj(e.length),0===(r=tj(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||kj(e.length)?tj(0):ij(e);if("Buffer"===e.type&&Array.isArray(e.data))return ij(e.data)}(t);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return A.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 nj(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 oj(e){return nj(e),tj(e<0?0:0|aj(e))}function ij(t){var r=t.length<0?0:0|aj(t.length);const n=tj(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function uj(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,A.prototype),n}function aj(e){if(e>=GD)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+GD.toString(16)+" bytes");return 0|e}function sj(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Aj(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 Cj(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ij(e).length;default:if(o)return n?-1:Cj(e).length;t=(""+t).toLowerCase(),o=!0}}function cj(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+=QD[o[e]];return t;return}case"utf8":case"utf-8":return bj(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?zD.fromByteArray(d):zD.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 lj(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function fj(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=kj(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=A.from(t,n)),A.isBuffer(t))return 0===t.length?-1:pj(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):pj(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function pj(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 dj(e,t,r,n){return Rj(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 hj(e,t,r,n){return Rj(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 bj(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<=YD)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=YD));return e}}ej.kMaxLength=GD,(A.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(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}}),Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}}),A.poolSize=8192,A.from=rj,Object.setPrototypeOf(A.prototype,Uint8Array.prototype),Object.setPrototypeOf(A,Uint8Array),A.alloc=function(e,t,r){return t=t,r=r,nj(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?tj(e).fill(t,r):tj(e).fill(t):tj(e)},A.allocUnsafe=oj,A.allocUnsafeSlow=oj,A.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==A.prototype},A.compare=function(r,n){if(Aj(r,Uint8Array)&&(r=A.from(r,r.offset,r.byteLength)),Aj(n,Uint8Array)&&(n=A.from(n,n.offset,n.byteLength)),!A.isBuffer(r)||!A.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},A.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}},A.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return A.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=A.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(Aj(e,Uint8Array))o+e.length>n.length?(e=A.isBuffer(e)?e:A.from(e)).copy(n,o):Uint8Array.prototype.set.call(n,e,o);else{if(!A.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},A.byteLength=sj,A.prototype._isBuffer=!0,A.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)lj(this,e,e+1);return this},A.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)lj(this,e,e+3),lj(this,e+1,e+2);return this},A.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)lj(this,e,e+7),lj(this,e+1,e+6),lj(this,e+2,e+5),lj(this,e+3,e+4);return this},A.prototype.toLocaleString=A.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?bj(this,0,e):cj.apply(this,arguments)},A.prototype.equals=function(e){if(A.isBuffer(e))return this===e||0===A.compare(this,e);throw new TypeError("Argument must be a Buffer")},A.prototype.inspect=function(){let e="";var t=ej.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},Gl&&(A.prototype[Gl]=A.prototype.inspect),A.prototype.compare=function(e,t,r,n,o){if(Aj(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.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},A.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},A.prototype.indexOf=function(e,t,r){return fj(this,e,t,r,!0)},A.prototype.lastIndexOf=function(e,t,r){return fj(this,e,t,r,!1)},A.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(kj(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,Rj(Cj(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return dj(this,t,r,n);case"base64":return i=this,u=r,o=n,Rj(Ij(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return hj(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),s=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const YD=4096;function yj(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 _j(e,t,r,n,o,i){if(!A.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 vj(e,t,r,n,o){Sj(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 mj(e,t,r,n,o){Sj(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 gj(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 Oj(e,t,r,n,o){return t=+t,r>>>=0,o||gj(e,0,r,4),HD.write(e,t,r,n,23,4),r+4}function wj(e,t,r,n,o){return t=+t,r>>>=0,o||gj(e,0,r,8),HD.write(e,t,r,n,52,8),r+8}A.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,A.prototype),r},A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||yj(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},A.prototype.readUintBE=A.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||yj(e,t,this.length);let n=this[e+--t],o=1;for(;0<t&&(o*=256);)n+=this[e+--t]*o;return n},A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e>>>=0,t||yj(e,1,this.length),this[e]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e>>>=0,t||yj(e,2,this.length),this[e]|this[e+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e>>>=0,t||yj(e,2,this.length),this[e]<<8|this[e+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e>>>=0,t||yj(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e>>>=0,t||yj(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},A.prototype.readBigUInt64LE=Mj(function(e){Tj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||jj(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))}),A.prototype.readBigUInt64BE=Mj(function(e){Tj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||jj(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)}),A.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||yj(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},A.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||yj(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},A.prototype.readInt8=function(e,t){return e>>>=0,t||yj(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},A.prototype.readInt16LE=function(e,t){e>>>=0,t||yj(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},A.prototype.readInt16BE=function(e,t){e>>>=0,t||yj(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},A.prototype.readInt32LE=function(e,t){return e>>>=0,t||yj(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},A.prototype.readInt32BE=function(e,t){return e>>>=0,t||yj(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},A.prototype.readBigInt64LE=Mj(function(e){Tj(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||jj(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)}),A.prototype.readBigInt64BE=Mj(function(e){Tj(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||jj(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)}),A.prototype.readFloatLE=function(e,t){return e>>>=0,t||yj(e,4,this.length),HD.read(this,e,!0,23,4)},A.prototype.readFloatBE=function(e,t){return e>>>=0,t||yj(e,4,this.length),HD.read(this,e,!1,23,4)},A.prototype.readDoubleLE=function(e,t){return e>>>=0,t||yj(e,8,this.length),HD.read(this,e,!0,52,8)},A.prototype.readDoubleBE=function(e,t){return e>>>=0,t||yj(e,8,this.length),HD.read(this,e,!1,52,8)},A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||_j(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},A.prototype.writeUintBE=A.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||_j(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},A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||_j(this,e,t,1,255,0),this[t]=255&e,t+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_j(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},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_j(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},A.prototype.writeBigUInt64LE=Mj(function(e,t=0){return vj(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeBigUInt64BE=Mj(function(e,t=0){return mj(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||_j(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},A.prototype.writeIntBE=function(e,t,r,n){e=+e,t>>>=0,n||_j(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},A.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||_j(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},A.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_j(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},A.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_j(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},A.prototype.writeBigInt64LE=Mj(function(e,t=0){return vj(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),A.prototype.writeBigInt64BE=Mj(function(e,t=0){return mj(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),A.prototype.writeFloatLE=function(e,t,r){return Oj(this,e,t,!0,r)},A.prototype.writeFloatBE=function(e,t,r){return Oj(this,e,t,!1,r)},A.prototype.writeDoubleLE=function(e,t,r){return wj(this,e,t,!0,r)},A.prototype.writeDoubleBE=function(e,t,r){return wj(this,e,t,!1,r)},A.prototype.copy=function(e,t,r,n){if(!A.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},A.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&&!A.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=A.isBuffer(e)?e:A.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 KD={};function Ej(e,t,r){KD[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 Pj(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 Sj(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 KD.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,Tj(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||jj(u,r.length-(n+1))}function Tj(e,t){if("number"!=typeof e)throw new KD.ERR_INVALID_ARG_TYPE(t,"number",e)}function jj(e,t,r){if(Math.floor(e)!==e)throw Tj(e,r),new KD.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new KD.ERR_BUFFER_OUT_OF_BOUNDS;throw new KD.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}Ej("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),Ej("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),Ej("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=Pj(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=Pj(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const ZD=/[^+/0-9A-Za-z-_]/g;function Cj(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 Ij(e){return zD.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(ZD,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Rj(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 Aj(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function kj(e){return e!=e}const QD=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 Mj(e){return"undefined"==typeof BigInt?Nj:e}function Nj(){throw new Error("BigInt not supported")}}var xj,Pd={},Lc={},_=r&&r.__extends||(xj=function(e,t){return(xj=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}xj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Fd=(Object.defineProperty(Lc,"__esModule",{value:!0}),k.prototype.getUInt8=function(e){throw new Error("Not implemented")},k.prototype.getInt8=function(e){throw new Error("Not implemented")},k.prototype.getFloat64=function(e){throw new Error("Not implemented")},k.prototype.getVarInt=function(e){throw new Error("Not implemented")},k.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},k.prototype.putInt8=function(e,t){throw new Error("Not implemented")},k.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},k.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},k.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},k.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},k.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},k.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)},k.prototype.getSlice=function(e,t){return new Lj(e,t,this)},k.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},k.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},k.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)},k.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)},k.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)},k.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},k.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},k.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},k.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},k.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},k.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},k.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},k.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},k.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},k.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},k.prototype.readVarInt=function(){var e=this.getVarInt(this.position);return this._updatePos(e.length),e.value},k.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},k.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},k.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},k.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},k.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},k.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},k.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},k.prototype.writeVarInt=function(e){e=this.putVarInt(this.position,e);this._updatePos(e)},k.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},k.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},k.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},k.prototype.remaining=function(){return this.length-this.position},k.prototype.hasRemaining=function(){return 0<this.remaining()},k.prototype.reset=function(){this.position=0},k.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},k.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},k);function k(e){this.position=0,this.length=e}Lc.default=Fd;_(Uj,Dj=Fd),Uj.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},Uj.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},Uj.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},Uj.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},Uj.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},Uj.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var Dj,Lj=Uj;function Uj(e,t,r){t=Dj.call(this,t)||this;return t._start=e,t._inner=r,t}var Fj,Bj,Yd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zd=(Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.BaseBuffer=void 0,Yd(Lc)),nh=(Pd.BaseBuffer=Zd.default,Pd.default=Zd.default,r&&r.__extends||(Fj=function(e,t){return(Fj=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}Fj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),ch=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Wj=(Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.alloc=void 0,ch(up)),zc=ch(Pd),Vj=(Bj=zc.default,nh(qj,Bj),qj.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},qj.prototype.getInt8=function(e){return this._buffer.readInt8(e)},qj.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},qj.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}},qj.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},qj.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},qj.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},qj.prototype.putBytes=function(e,t){var r;t instanceof qj?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):Bj.prototype.putBytes.call(this,e,t)},qj.prototype.getSlice=function(e,t){return new qj(this._buffer.slice(e,e+t))},qj);function qj(e){var t=this,e=(e=e)instanceof Wj.default.Buffer?e:"number"==typeof e&&"function"==typeof Wj.default.Buffer.alloc?Wj.default.Buffer.alloc(e):new Wj.default.Buffer(e);return(t=Bj.call(this,e.length)||this)._buffer=e,t}Vc.default=Vj,Vc.alloc=function(e){return new Vj(e)};var Sd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zj=(Object.defineProperty(Qp,"__esModule",{value:!0}),Sd(Vc)),Hj=e,ph=Hj.internal.util,Gj=ph.ENCRYPTION_OFF,Yj=ph.ENCRYPTION_ON;function Kj(e,t,r){void 0===t&&(t=Zj),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===Yj}(e),n=function(e){return!1===e.encrypted||e.encrypted===Gj}(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,Hj.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:"'+Gj+'"` 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 zj.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function Zj(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}Kj.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,Hj.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,Hj.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))},Kj.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof zj.default))throw(0,Hj.newError)("Don't know how to send buffer: "+e);try{this._ws.send(e._buffer)}catch(e){if(1===this._ws.readyState)throw e;this._handleConnectionError()}}},Kj.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},Kj.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},Kj.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},Kj.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},Kj.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,Hj.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))},Kj.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},Kj.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},Qp.default=Kj;var Qj,yh={},qc=r&&r.__extends||(Qj=function(e,t){return(Qj=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}Qj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(yh,"__esModule",{value:!0});var Xj,i=e.internal.resolver.BaseHostNameResolver,Ud=(qc(Jj,Xj=i),Jj.prototype.resolve=function(e){return this._resolveToItself(e)},Jj);function Jj(){return null!==Xj&&Xj.apply(this,arguments)||this}yh.default=Ud;var $j,g={},eC=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())})},tC=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},Sh=(Object.defineProperty(g,"__esModule",{value:!0}),g.default={load:function(t){return eC(this,void 0,void 0,function(){return tC(this,function(e){return[2,t]})})}},r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}}),Fr=(Object.defineProperty(qp,"__esModule",{value:!0}),qp.ClientCertificatesLoader=qp.HostNameResolver=qp.Channel=void 0,Sh(Qp)),I=Sh(yh),Qd=Sh(g),Bd=(qp.Channel=Fr.default,qp.HostNameResolver=I.default,qp.ClientCertificatesLoader=Qd.default,{}),Th={},Rh=r&&r.__extends||($j=function(e,t){return($j=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}$j(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Th,"__esModule",{value:!0});var rC,nC=Vc,Nh=(rC=Pd.BaseBuffer,Rh(oC,rC),oC.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}},oC.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}},oC.prototype.getFloat64=function(e){for(var t=(0,nC.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},oC);function oC(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=rC.call(this,r)||this)._buffers=e,t}Th.default=Nh;var iC,uC,Fh=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)}),zh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$h=(Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.Dechunker=Bd.Chunker=void 0,zh(Lc)),aC=Vc,sC=zh(Th),ab=(uC=$h.default,Fh(cC,uC),cC.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},cC.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},cC.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},cC.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},cC.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,aC.alloc)(this._bufferSize),this._chunkOpen=!1),this},cC.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},cC.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)},cC.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},cC);function cC(e,t){var r=uC.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,aC.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function lC(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}Bd.Chunker=ab,lC.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},lC.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},lC.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)},lC.prototype.CLOSED=function(e){},lC.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 sC.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},lC.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},Bd.Dechunker=lC;var pb={},fC=(Object.defineProperty(pb,"__esModule",{value:!0}),e),yb=fC.internal.util,_b=yb.ENCRYPTION_OFF,xb=yb.ENCRYPTION_ON,pC=fC.error.SERVICE_UNAVAILABLE,dC=[null,void 0,!0,!1,xb,_b],hC=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];pb.default=function(e,t,r,n){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==dC.indexOf(e))return e;throw(0,fC.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(dC))}(t),this.trust=function(e){e=e.trust;if(-1!==hC.indexOf(e))return e;throw(0,fC.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(hC))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||pC,this.connectionTimeout=t.connectionTimeout,this.clientCertificate=n};var bC,yC,Nb={},ey={},Pp={exports:{}};function _C(e,t){for(var r in e)t[r]=e[r]}function vC(e,t,r){return yC(e,t,r)}Qb=(Wf=Pp).exports,(yC=(bC=up).Buffer).from&&yC.alloc&&yC.allocUnsafe&&yC.allocUnsafeSlow?Wf.exports=bC:(_C(bC,Qb),Qb.Buffer=vC),vC.prototype=Object.create(yC.prototype),_C(yC,vC),vC.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return yC(e,t,r)},vC.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=yC(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},vC.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return yC(e)},vC.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return bC.SlowBuffer(e)};var mC=Pp.exports.Buffer,gC=mC.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 OC(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||mC.isEncoding!==gC&&gC(e))return t||e;throw new Error("Unknown encoding: "+e)}function wC(e){var t;switch(this.encoding=OC(e),this.encoding){case"utf16le":this.text=SC,this.end=TC,t=4;break;case"utf8":this.fillLast=PC,t=4;break;case"base64":this.text=jC,this.end=CC,t=3;break;default:return this.write=IC,void(this.end=RC)}this.lastNeed=0,this.lastTotal=0,this.lastChar=mC.allocUnsafe(t)}function EC(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function PC(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 SC(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 TC(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 jC(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 CC(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function IC(e){return e.toString(this.encoding)}function RC(e){return e&&e.length?this.write(e):""}(ey.StringDecoder=wC).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||""},wC.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},wC.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=EC(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=EC(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=EC(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)},wC.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 AC,kC,MC,NC,xC,$b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},DC=(Object.defineProperty(Nb,"__esModule",{value:!0}),$b(Vc)),LC=e,UC=$b(up),FC=new ey.StringDecoder("utf8");Nb.default={encode:function(e){return new DC.default((e=e,"function"==typeof UC.default.Buffer.from?UC.default.Buffer.from(e,"utf8"):new UC.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 FC.write(e._buffer)},r=function(){return FC.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,LC.newError)("Don't know how to decode strings from '".concat(e,"'"))}},ly=Vp,AC=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]}),fy=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||AC(t,e,r)},kC=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(ly,"__esModule",{value:!0}),ly.utf8=ly.alloc=ly.ChannelConfig=void 0,fy(qp,ly),fy(Bd,ly),MC=pb,Object.defineProperty(ly,"ChannelConfig",{enumerable:!0,get:function(){return kC(MC).default}}),NC=Vc,Object.defineProperty(ly,"alloc",{enumerable:!0,get:function(){return NC.alloc}}),xC=Nb,Object.defineProperty(ly,"utf8",{enumerable:!0,get:function(){return kC(xC).default}}),Object.defineProperty(Ep,"__esModule",{value:!0});var BC=Vp,WC=e,VC=["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"],qC=0;function zC(e,t){return{major:e,minor:t}}function HC(n,o){for(var e=o.readVarInt(),t=[],r=0;r<e;r++)var i=[o.readUInt8(),o.readUInt8(),o.readUInt8(),o.readUInt8()],t=t.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}(i));o.readVarInt();var u=qC,a=0,s=0;t.sort(function(e,t){return Number(e.major)!==Number(t.major)?Number(t.major)-Number(e.major):Number(t.minor)-Number(e.minor)});for(r=0;r<t.length;r++){var c=t[r];if(VC.includes(c.major+"."+c.minor)){a=c.major,s=c.minor;break}}return new Promise(function(e,t){try{var r=(0,BC.alloc)(5);r.writeInt32(s<<8|a),r.writeVarInt(u),n.write(r),e({protocolVersion:Number(a+"."+s),capabilites:u,consumeRemainingBuffer:function(e){o.hasRemaining()&&e(o.readSlice(o.remaining()))}})}catch(e){t(e)}})}function GC(){var e=[zC(255,1),[zC(5,8),zC(5,0)],[zC(4,4),zC(4,2)],zC(3,0)];if(4<e.length)throw(0,WC.newError)("It should not have more than 4 versions of the protocol");var o=(0,BC.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}Ep.default=function(t,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){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw t.error("Handshake failed since server responded with HTTP."),(0,WC.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)");return Number(e[3]+"."+e[2])}(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(GC())})}(t,e).then(function(e){return 255.1===e.protocolVersion?HC(t,e.buffer):e})};var YC,my={},Py={},Cy={},R={},Ay={},Xy=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)}),t_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},u_=(Object.defineProperty(Ay,"__esModule",{value:!0}),t_(e),KC.ofRecord=function(e){return null===e?KC.ofNull():new rI(e)},KC.ofMessageResponse=function(e){return null===e?KC.ofNull():new QC(e)},KC.ofNull=function(){return new $C},Object.defineProperty(KC.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(KC.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(KC.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(KC.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),KC);function KC(){}Ay.default=u_;Xy(XC,ZC=u_),Object.defineProperty(XC.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(XC.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(XC.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(XC.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var ZC,QC=XC;function XC(e){var t=ZC.call(this)||this;return t._response=e,t}Xy(eI,JC=u_),Object.defineProperty(eI.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var JC,$C=eI;function eI(){return null!==JC&&JC.apply(this,arguments)||this}Xy(nI,tI=u_),Object.defineProperty(nI.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(nI.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(nI.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(nI.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var tI,rI=nI;function nI(e){var t=tI.call(this)||this;return t._record=e,t}var f_={},d_={},oI=(Object.defineProperty(d_,"__esModule",{value:!0}),d_.reuseOngoingRequest=d_.identity=void 0,e);d_.identity=function(e){return e},d_.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=oI.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)})}};var P_={},iI=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(P_,"__esModule",{value:!0}),P_.equals=void 0,P_.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=iI(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 uI,aI=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]}),sI=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&aI(t,e,r);return sI(t,e),t},k_=(Object.defineProperty(f_,"__esModule",{value:!0}),f_.object=f_.functional=void 0,f_.functional=I_(d_),f_.object=I_(P_),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)})),M_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cI=(Object.defineProperty(R,"__esModule",{value:!0}),R.TelemetryObserver=R.ProcedureRouteObserver=R.RouteObserver=R.CompletedObserver=R.FailedObserver=R.ResetObserver=R.LogoffObserver=R.LoginObserver=R.ResultStreamObserver=R.StreamObserver=void 0,e),lI=M_(Ay),fI=f_,pI=cI.internal.constants.FETCH_ALL,dI=cI.error.PROTOCOL_ERROR,N_=(hI.prototype.onNext=function(e){},hI.prototype.onError=function(e){},hI.prototype.onCompleted=function(e){},hI);function hI(){}R.StreamObserver=N_;k_(yI,bI=N_),yI.prototype.pause=function(){this._paused=!0},yI.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},yI.prototype.onNext=function(e){this._haveRecordStreamed=!0;var t=new cI.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))},yI.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},yI.prototype.onError=function(e){this._state.onError(this,e)},yI.prototype.cancel=function(){this._discard=!0},yI.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(MI.STREAMING)},yI.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(MI.SUCCEEDED)},yI.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===MI.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===MI.READY&&this._handleStreaming()},yI.prototype._handleHasMore=function(e){this._setState(MI.READY),this._handleStreaming(),delete e.has_more},yI.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(MI.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,cI.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),dI))},yI.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()}},yI.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(MI.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},yI.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},yI.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):(this._pulled=!0,this._moreFunction(this._queryId,this._fetchSize,this)),this._setState(MI.STREAMING)},yI.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},yI.prototype._setState=function(e){this._state=e},yI.prototype._setupAutoPull=function(){this._autoPull=!0};var bI,W_=yI;function yI(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?pI: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=bI.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||fI.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?MI.READY:MI.READY_STREAMING),b._setupAutoPull(),b._paused=!1,b._pulled=!t,b._haveRecordStreamed=!1,b._onDb=e,b}R.ResultStreamObserver=W_;k_(vI,_I=N_),vI.prototype.onNext=function(e){this.onError((0,cI.newError)("Received RECORD when initializing "+cI.json.stringify(e)))},vI.prototype.onError=function(e){this._onError&&this._onError(e)},vI.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var _I,Xd=vI;function vI(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=_I.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.LoginObserver=Xd;k_(gI,mI=N_),gI.prototype.onNext=function(e){this.onError((0,cI.newError)("Received RECORD when logging off "+cI.json.stringify(e)))},gI.prototype.onError=function(e){this._onError&&this._onError(e)},gI.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var mI,z_=gI;function gI(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=mI.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.LogoffObserver=z_;k_(wI,OI=N_),wI.prototype.onNext=function(e){this.onError((0,cI.newError)("Received RECORD when resetting: received record is: "+cI.json.stringify(e),dI))},wI.prototype.onError=function(e){e.code===dI&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},wI.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var OI,G_=wI;function wI(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=OI.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}R.ResetObserver=G_;k_(PI,EI=W_),PI.prototype.onNext=function(e){this.onError((0,cI.newError)("Received RECORD when sending telemetry "+cI.json.stringify(e),dI))},PI.prototype.onError=function(e){this._onError&&this._onError(e)},PI.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var EI,Q_=PI;function PI(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=EI.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.TelemetryObserver=Q_;k_(TI,SI=W_);var SI,$_=TI;function TI(e){var t=e.error,e=e.onError,e=SI.call(this,{beforeError:e})||this;return e.onError(t),e}R.FailedObserver=$_;k_(CI,jI=W_);var jI,uv=CI;function CI(){var e=jI.call(this)||this;return jI.prototype.markCompleted.call(e),e}R.CompletedObserver=uv;k_(RI,II=N_),RI.prototype.onNext=function(e){this._records.push(e)},RI.prototype.onError=function(e){e.code===dI&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},RI.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,cI.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+cI.json.stringify(this._records),dI)):this._onCompleted&&this._onCompleted(lI.default.ofRecord(this._records[0]))};var II,Dy=RI;function RI(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=II.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}R.ProcedureRouteObserver=Dy;k_(kI,AI=N_),kI.prototype.onNext=function(e){this.onError((0,cI.newError)("Received RECORD when resetting: received record is: "+cI.json.stringify(e),dI))},kI.prototype.onError=function(e){e.code===dI&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},kI.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(lI.default.ofMessageResponse(e))};var AI,pv=kI;function kI(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=AI.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}R.RouteObserver=pv;var MI={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(MI.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(){}}},NI=(Object.defineProperty(Cy,"__esModule",{value:!0}),Cy.assertNotificationFilterIsEmpty=Cy.assertImpersonatedUserIsEmpty=Cy.assertTxConfigIsEmpty=Cy.assertDatabaseIsEmpty=void 0,e);Cy.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,NI.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")).message),r.onError(e),e},Cy.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,NI.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")).message),r.onError(e),e},Cy.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,NI.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,"."))).message),r.onError(t),t},Cy.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,NI.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(NI.json.stringify(e),"."))).message),r.onError(t),t};var bv={},Vf={},By={},xI=(Object.defineProperty(By,"__esModule",{value:!0}),By.verifyStructSize=By.Structure=void 0,e),DI=xI.error.PROTOCOL_ERROR,jv=(Object.defineProperty(LI.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),LI.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+"])"},LI);function LI(e,t){this.signature=e,this.fields=t}By.Structure=jv,By.verifyStructSize=function(e,t,r){if(t!==r)throw(0,xI.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),DI)},By.default=jv,Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.Unpacker=Vf.Packer=void 0;var UI=Vp,FI=f_,BI=By,WI=e,VI=WI.error.PROTOCOL_ERROR;function qI(e){this._ch=e,this._byteArraysSupported=!0}function zI(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}qI.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=FI.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,WI.int)(o))};if((0,WI.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 BI.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))},qI.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,WI.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},qI.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},qI.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))},qI.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},qI.prototype.packString=function(e){var e=UI.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,WI.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)}},qI.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,WI.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)}},qI.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,WI.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])},qI.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,WI.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)}},qI.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,WI.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)}},qI.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,WI.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},qI.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},qI.prototype._nonPackableValue=function(e){return function(){throw(0,WI.newError)(e,VI)}},Vf.Packer=qI,zI.prototype.unpack=function(e,t){void 0===t&&(t=FI.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,WI.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,WI.newError)("Unknown packed value with marker "+r.toString(16))},zI.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,WI.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},zI.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},zI.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},zI.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,WI.int)(e):240<=e&&e<256?(0,WI.int)(e-256):200===e?(0,WI.int)(t.readInt8()):201===e?(0,WI.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,WI.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new WI.Integer(e,r)):null},zI.prototype._unpackString=function(e,t,r,n){return 128===t?UI.utf8.decode(n,r):208===e?UI.utf8.decode(n,n.readUInt8()):209===e?UI.utf8.decode(n,n.readUInt16()):210===e?UI.utf8.decode(n,n.readUInt32()):null},zI.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},zI.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},zI.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},zI.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},zI.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},zI.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},zI.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},zI.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new BI.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},Vf.Unpacker=zI;var HI,GI,Av={},Wv=r&&r.__extends||(HI=function(e,t){return(HI=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}HI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),YI=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]}),KI=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Sp=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&YI(t,e,r);return KI(t,e),t},Nv=(Object.defineProperty(Av,"__esModule",{value:!0}),Av.Unpacker=Av.Packer=void 0,Sp(Vf)),Tp=(GI=Nv.Packer,Wv(ZI,GI),ZI.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},ZI);function ZI(){return null!==GI&&GI.apply(this,arguments)||this}Av.Packer=Tp;QI=Nv.Unpacker,Wv(XI,QI);var QI,xv=XI;function XI(e,t){return QI.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}Av.Unpacker=xv;var JI=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.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Uv=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&JI(t,e,r);return $I(t,e),t},jp=(Object.defineProperty(bv,"__esModule",{value:!0}),bv.structure=bv.v2=bv.v1=void 0,Uv(Vf)),Jv=(bv.v1=jp,Uv(Av)),tm=(bv.v2=Jv,Uv(By)),f=(bv.structure=tm,bv.default=Jv,{}),eR=(Object.defineProperty(f,"__esModule",{value:!0}),f.SIGNATURES=void 0,e),im=eR.internal.constants,tR=im.ACCESS_MODE_READ,rR=im.FETCH_ALL,nR=eR.internal.util.assertString,fm=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}),Qr=(f.SIGNATURES=fm,M.init=function(e,t){return new M(1,[e,t],function(){return"INIT ".concat(e," {...}")})},M.run=function(e,t){return new M(16,[e,t],function(){return"RUN ".concat(e," ").concat(eR.json.stringify(t))})},M.pullAll=function(){return sR},M.reset=function(){return cR},M.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 M(1,[t],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},M.hello5x1=function(e,t){var r={user_agent:e};return(t=void 0===t?null:t)&&(r.routing=t),new M(1,[r],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},M.hello5x2=function(e,t,r){void 0===r&&(r=null);var n={user_agent:e};return uR(n,t=void 0===t?null:t),r&&(n.routing=r),new M(1,[n],function(){return"HELLO ".concat(eR.json.stringify(n))})},M.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}),uR(o,r),n&&(o.routing=n),new M(1,[o],function(){return"HELLO ".concat(eR.json.stringify(o))})},M.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}),aR(o,r),n&&(o.routing=n),new M(1,[o],function(){return"HELLO ".concat(eR.json.stringify(o))})},M.logon=function(e){return new M(106,[e],function(){return"LOGON { ... }"})},M.logoff=function(){return new M(107,[],function(){return"LOGOFF"})},M.begin=function(e){var e=void 0===e?{}:e,t=oR(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new M(17,[t],function(){return"BEGIN ".concat(eR.json.stringify(t))})},M.begin5x5=function(e){var e=void 0===e?{}:e,t=oR(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter,{appendNotificationFilter:aR});return new M(17,[t],function(){return"BEGIN ".concat(eR.json.stringify(t))})},M.commit=function(){return lR},M.rollback=function(){return fR},M.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=oR(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new M(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(eR.json.stringify(t)," ").concat(eR.json.stringify(n))})},M.runWithMetadata5x5=function(e,t,r){var r=void 0===r?{}:r,n=oR(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter,{appendNotificationFilter:aR});return new M(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(eR.json.stringify(t)," ").concat(eR.json.stringify(n))})},M.goodbye=function(){return pR},M.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=iR(null==t?-1:t,(void 0===e?rR:e)||rR);return new M(63,[r],function(){return"PULL ".concat(eR.json.stringify(r))})},M.discard=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=iR(null==t?-1:t,(void 0===e?rR:e)||rR);return new M(47,[r],function(){return"DISCARD ".concat(eR.json.stringify(r))})},M.telemetry=function(e){var e=e.api,t=(0,eR.int)(e);return new M(84,[t],function(){return"TELEMETRY ".concat(t.toString())})},M.route=function(e,t,r){return new M(102,[e=void 0===e?{}:e,t=void 0===t?[]:t,r=void 0===r?null:r],function(){return"ROUTE ".concat(eR.json.stringify(e)," ").concat(eR.json.stringify(t)," ").concat(r)})},M.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 M(102,[e,t,n],function(){return"ROUTE ".concat(eR.json.stringify(e)," ").concat(eR.json.stringify(t)," ").concat(eR.json.stringify(n))})},M);function M(e,t,r){this.signature=e,this.fields=t,this.toString=r}function oR(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=nR(r,"database")),o&&(a.imp_user=nR(o,"impersonatedUser")),n===tR&&(a.mode="r"),(null!=(e=u.appendNotificationFilter)?e:uR)(a,i),a}function iR(e,t){t={n:(0,eR.int)(t)};return-1!==e&&(t.qid=(0,eR.int)(e)),t}function uR(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 aR(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 sR=new(f.default=Qr)(63,[],function(){return"PULL_ALL"}),cR=new Qr(15,[],function(){return"RESET"}),lR=new Qr(18,[],function(){return"COMMIT"}),fR=new Qr(19,[],function(){return"ROLLBACK"}),pR=new Qr(2,[],function(){return"GOODBYE"}),hm={},ym={},dR=(Object.defineProperty(ym,"__esModule",{value:!0}),ym.TypeTransformer=void 0,bv),hR=e.internal.objectUtil;function bR(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 yR(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)}bR.prototype.fromStructure=function(e){try{return e instanceof dR.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return hR.createBrokenObject(e)}},bR.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},ym.default=bR,yR.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new yR({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},ym.TypeTransformer=yR;var _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},vR=(Object.defineProperty(hm,"__esModule",{value:!0}),e),mR=bv,gR=ym,OR=vR.error.PROTOCOL_ERROR;hm.default={createNodeTransformer:function(){return new gR.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof vR.Node},toStructure:function(e){throw(0,vR.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),OR)},fromStructure:function(e){mR.structure.verifyStructSize("Node",3,e.size);var e=_R(e.fields,3),t=e[0],r=e[1],e=e[2];return new vR.Node(t,r,e)}})},createRelationshipTransformer:function(){return new gR.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof vR.Relationship},toStructure:function(e){throw(0,vR.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),OR)},fromStructure:function(e){mR.structure.verifyStructSize("Relationship",5,e.size);var e=_R(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new vR.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new gR.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof vR.UnboundRelationship},toStructure:function(e){throw(0,vR.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),OR)},fromStructure:function(e){mR.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=_R(e.fields,3),t=e[0],r=e[1],e=e[2];return new vR.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new gR.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof vR.Path},toStructure:function(e){throw(0,vR.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),OR)},fromStructure:function(e){mR.structure.verifyStructSize("Path",3,e.size);for(var e=_R(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,vR.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof vR.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof vR.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new vR.PathSegment(i,c,a)),i=a}return new vR.Path(t[0],t[t.length-1],o)}})},createVectorTransformer:function(){return new gR.TypeTransformer({signature:86,isTypeInstance:function(e){return e instanceof vR.Vector},toStructure:function(e){throw(0,vR.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,vR.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 wR=r&&r.__assign||function(){return(wR=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)},ER=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]}),PR=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),gm=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ER(t,e,r);return PR(t,e),t},Em=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},SR=(Object.defineProperty(Py,"__esModule",{value:!0}),Cy),TR=bv,jR=gm(f),CR=R,IR=e,RR=Em(hm),AR=Em(ym),kR=IR.internal.bookmarks.Bookmarks,Tm=IR.internal.constants,MR=Tm.ACCESS_MODE_WRITE,NR=Tm.BOLT_PROTOCOL_V1,xR=(IR.internal.logger.Logger,IR.internal.txConfig.TxConfig),DR=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),u=(Object.defineProperty(N.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new AR.default(Object.values(RR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"version",{get:function(){return NR},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),N.prototype.packer=function(){return this._packer},N.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},N.prototype.unpacker=function(){return this._unpacker},N.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},N.prototype.transformMetadata=function(e){return e},N.prototype.enrichErrorMetadata=function(e){return wR(wR({},e),{diagnostic_record:null!==e.diagnostic_record?wR(wR({},DR),e.diagnostic_record):null})},N.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 CR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,SR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(jR.default.init(r,n),e,!0),e},N.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=(e.flush,new CR.LogoffObserver({onCompleted:t,onError:r})),t=(0,IR.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},N.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 CR.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,IR.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},N.prototype.prepareToClose=function(){},N.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})},N.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:kR.empty(),txConfig:xR.empty(),mode:MR,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},N.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:kR.empty(),txConfig:xR.empty(),mode:MR,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},N.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 CR.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,SR.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,SR.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,SR.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,SR.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(jR.default.run(e,t),a,!1),this.write(jR.default.pullAll(),a,d),a},Object.defineProperty(N.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),N.prototype.reset=function(e){var e=void 0===e?{}:e,t=e.onError,e=e.onComplete,t=new CR.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(jR.default.reset(),t,!0),t},N.prototype.telemetry=function(e,t){e.api;e=void 0===t?{}:t,e.onError,t=e.onCompleted,e=new CR.CompletedObserver;return t&&t(),e},N.prototype._createPacker=function(e){return new TR.v1.Packer(e)},N.prototype._createUnpacker=function(e,t){return new TR.v1.Unpacker(e,t)},N.prototype.write=function(e,t,r){this.queueObserverIfProtocolIsNotBroken(t)&&(this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._lastMessageSignature=e.signature,t=new TR.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},N.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===jR.SIGNATURES.HELLO||this._lastMessageSignature===jR.SIGNATURES.LOGON},N.prototype.isLastMessageReset=function(){return this._lastMessageSignature===jR.SIGNATURES.RESET},N.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},N.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},N.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},N.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},N.prototype.isBroken=function(){return!!this._fatalError},N.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},N.prototype.resetFailure=function(){this._responseHandler._resetFailure()},N.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)},N.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},N);function N(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}}Py.default=u;var Rm={},mb={},Dm={},LR=(Object.defineProperty(Dm,"__esModule",{value:!0}),Dm.epochSecondAndNanoToLocalDateTime=Dm.nanoOfDayToLocalTime=Dm.epochDayToDate=void 0,e),Vm=LR.internal.temporalUtil,UR=Vm.DAYS_0000_TO_1970,FR=Vm.DAYS_PER_400_YEAR_CYCLE,BR=Vm.NANOS_PER_HOUR,WR=Vm.NANOS_PER_MINUTE,VR=Vm.NANOS_PER_SECOND,qR=Vm.SECONDS_PER_DAY,zR=Vm.floorDiv,HR=Vm.floorMod;function GR(e){var e=(e=(0,LR.int)(e)).add(UR).subtract(60),t=(0,LR.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(FR).subtract(1)).multiply(400),e=e.add(r.multiply(-FR))),e.multiply(400).add(591).div(FR)),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 LR.Date(r,n,e)}function YR(e){var t=(e=(0,LR.int)(e)).div(BR),r=(e=e.subtract(t.multiply(BR))).div(WR),n=(e=e.subtract(r.multiply(WR))).div(VR),e=e.subtract(n.multiply(VR));return new LR.LocalTime(t,r,n,e)}Dm.epochDayToDate=GR,Dm.nanoOfDayToLocalTime=YR,Dm.epochSecondAndNanoToLocalDateTime=function(e,t){var r=zR(e,qR),e=HR(e,qR).multiply(VR).add(t),t=GR(r),r=YR(e);return new LR.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var KR=r&&r.__assign||function(){return(KR=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)},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},Ym=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},QR=(Object.defineProperty(mb,"__esModule",{value:!0}),e),XR=bv,JR=ym,$R=Dm,$m=Ym(hm),Xr=QR.internal.temporalUtil,eA=Xr.dateToEpochDay,tA=Xr.localDateTimeToEpochSecond,rA=Xr.localTimeToNanoOfDay;function nA(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,QR.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}mb.default=KR(KR({},$m.default),{createPoint2DTransformer:function(){return new JR.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,QR.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new XR.structure.Structure(88,[(0,QR.int)(e.srid),e.x,e.y])},fromStructure:function(e){XR.structure.verifyStructSize("Point2D",3,e.size);var e=ZR(e.fields,3),t=e[0],r=e[1],e=e[2];return new QR.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new JR.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,QR.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new XR.structure.Structure(89,[(0,QR.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){XR.structure.verifyStructSize("Point3D",4,e.size);var e=ZR(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new QR.Point(t,r,n,e)}})},createDurationTransformer:function(){return new JR.TypeTransformer({signature:69,isTypeInstance:QR.isDuration,toStructure:function(e){var t=(0,QR.int)(e.months),r=(0,QR.int)(e.days),n=(0,QR.int)(e.seconds),e=(0,QR.int)(e.nanoseconds);return new XR.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){XR.structure.verifyStructSize("Duration",4,e.size);var e=ZR(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new QR.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new JR.TypeTransformer({signature:116,isTypeInstance:QR.isLocalTime,toStructure:function(e){e=rA(e.hour,e.minute,e.second,e.nanosecond);return new XR.structure.Structure(116,[e])},fromStructure:function(e){XR.structure.verifyStructSize("LocalTime",1,e.size);e=ZR(e.fields,1)[0];return nA((0,$R.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new JR.TypeTransformer({signature:84,isTypeInstance:QR.isTime,toStructure:function(e){var t=rA(e.hour,e.minute,e.second,e.nanosecond),e=(0,QR.int)(e.timeZoneOffsetSeconds);return new XR.structure.Structure(84,[t,e])},fromStructure:function(e){XR.structure.verifyStructSize("Time",2,e.size);var e=ZR(e.fields,2),t=e[0],e=e[1],t=(0,$R.nanoOfDayToLocalTime)(t);return nA(new QR.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new JR.TypeTransformer({signature:68,isTypeInstance:QR.isDate,toStructure:function(e){e=eA(e.year,e.month,e.day);return new XR.structure.Structure(68,[e])},fromStructure:function(e){XR.structure.verifyStructSize("Date",1,e.size);e=ZR(e.fields,1)[0];return nA((0,$R.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new JR.TypeTransformer({signature:100,isTypeInstance:QR.isLocalDateTime,toStructure:function(e){var t=tA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,QR.int)(e.nanosecond);return new XR.structure.Structure(100,[t,e])},fromStructure:function(e){XR.structure.verifyStructSize("LocalDateTime",2,e.size);var e=ZR(e.fields,2),t=e[0],e=e[1];return nA((0,$R.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new JR.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,QR.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=tA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,QR.int)(e.nanosecond),e=e.timeZoneId;return new XR.structure.Structure(102,[t,r,e])},fromStructure:function(e){XR.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=ZR(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,$R.epochSecondAndNanoToLocalDateTime)(t,r);return nA(new QR.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 JR.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,QR.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=tA(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,QR.int)(e.nanosecond),e=(0,QR.int)(e.timeZoneOffsetSeconds);return new XR.structure.Structure(70,[t,r,e])},fromStructure:function(e){XR.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=ZR(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,$R.epochSecondAndNanoToLocalDateTime)(t,r);return nA(new QR.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var oA,iA,o0=r&&r.__extends||(oA=function(e,t){return(oA=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}oA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},d0=(Object.defineProperty(Rm,"__esModule",{value:!0}),c0(Py)),uA=c0(bv),gb=e,aA=c0(mb),sA=c0(ym),cA=gb.internal.constants.BOLT_PROTOCOL_V2,g0=(iA=d0.default,o0(lA,iA),lA.prototype._createPacker=function(e){return new uA.default.Packer(e)},lA.prototype._createUnpacker=function(e,t){return new uA.default.Unpacker(e,t)},Object.defineProperty(lA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new sA.default(Object.values(aA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(lA.prototype,"version",{get:function(){return cA},enumerable:!1,configurable:!0}),lA);function lA(){return null!==iA&&iA.apply(this,arguments)||this}Rm.default=g0;var fA,pA,C0={},A0={},dA=r&&r.__assign||function(){return(dA=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)},L0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},F0=(Object.defineProperty(A0,"__esModule",{value:!0}),L0(mb)),q0=(A0.default=dA({},F0.default),r&&r.__extends||(fA=function(e,t){return(fA=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}fA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),hA=r&&r.__assign||function(){return(hA=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)},K0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},X0=(Object.defineProperty(C0,"__esModule",{value:!0}),K0(Rm)),bA=K0(f),yA=Cy,_A=R,vA=K0(A0),mA=K0(ym),gA=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),OA=e.internal.txConfig.TxConfig,wA="context",EA="CALL dbms.cluster.routing.getRoutingTable($".concat(wA,")"),PA=new _A.StreamObserver,xl=(pA=X0.default,q0(SA,pA),Object.defineProperty(SA.prototype,"version",{get:function(){return gA},enumerable:!1,configurable:!0}),Object.defineProperty(SA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new mA.default(Object.values(vA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),SA.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},SA.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 _A.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,yA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(bA.default.hello(r,n),e,!0),e},SA.prototype.prepareToClose=function(){this.write(bA.default.goodbye(),PA,!0)},SA.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 _A.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,yA.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,yA.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,yA.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(bA.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},SA.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new _A.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(bA.default.commit(),t,!0),t},SA.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new _A.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(bA.default.rollback(),t,!0),t},SA.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 _A.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,yA.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,yA.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,yA.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(bA.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(bA.default.pullAll(),c,b),c},SA.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(EA,((t={})[wA]=void 0===r?{}:r,t),hA(hA({},n),{txConfig:OA.empty()}));return new _A.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},SA);function SA(){return null!==pA&&pA.apply(this,arguments)||this}C0.default=xl;var TA,jA,tg={},rg={},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)},sg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fg=(Object.defineProperty(rg,"__esModule",{value:!0}),sg(A0)),ky=(rg.default=CA({},fg.default),r&&r.__extends||(TA=function(e,t){return(TA=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}TA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),IA=r&&r.__assign||function(){return(IA=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)},yv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hg=(Object.defineProperty(tg,"__esModule",{value:!0}),yv(C0)),RA=yv(f),AA=Cy,kA=R,MA=yv(rg),NA=yv(ym),mg=(e.internal.bookmarks.Bookmarks,e.internal.constants),xA=mg.BOLT_PROTOCOL_V4_0,DA=mg.FETCH_ALL,LA=e.internal.txConfig.TxConfig,UA="context",FA="database",BA="CALL dbms.routing.getRoutingTable($".concat(UA,", $").concat(FA,")"),wg=(jA=hg.default,ky(WA,jA),Object.defineProperty(WA.prototype,"version",{get:function(){return xA},enumerable:!1,configurable:!0}),Object.defineProperty(WA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new NA.default(Object.values(MA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),WA.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 kA.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,AA.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,AA.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(RA.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},WA.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===_?DA:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new kA.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,AA.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,AA.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(RA.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(RA.default.pull({n:_}),c,b),c},WA.prototype._requestMore=function(e,t,r){this.write(RA.default.pull({stmtId:e,n:t}),r,!0)},WA.prototype._requestDiscard=function(e,t){this.write(RA.default.discard({stmtId:e}),t,!0)},WA.prototype._noOp=function(){},WA.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(BA,((t={})[UA]=void 0===r?{}:r,t[FA]=n,t),IA(IA({},o),{txConfig:LA.empty()}));return new kA.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},WA);function WA(){return null!==jA&&jA.apply(this,arguments)||this}tg.default=wg;var VA,qA,E={},Rg={},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)},h_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ng=(Object.defineProperty(Rg,"__esModule",{value:!0}),h_(rg)),il=(Rg.default=zA({},Ng.default),r&&r.__extends||(VA=function(e,t){return(VA=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}VA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Fg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zl=(Object.defineProperty(E,"__esModule",{value:!0}),Fg(tg)),HA=Fg(f),GA=R,vb=e,YA=Cy,KA=Fg(Rg),ZA=Fg(ym),QA=vb.internal.constants.BOLT_PROTOCOL_V4_1,l=(qA=zl.default,il(XA,qA),Object.defineProperty(XA.prototype,"version",{get:function(){return QA},enumerable:!1,configurable:!0}),Object.defineProperty(XA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new ZA.default(Object.values(KA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),XA.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 GA.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,YA.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(HA.default.hello(r,n,this._serversideRouting),e,!0),e},XA);function XA(e,t,r,n,o,i,u){e=qA.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}E.default=l;var JA,$A,Qg={},tO={},ek=r&&r.__assign||function(){return(ek=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}},F=(Object.defineProperty(tO,"__esModule",{value:!0}),Al(Rg)),wO=(tO.default=ek({},F.default),r&&r.__extends||(JA=function(e,t){return(JA=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}JA(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}},j=(Object.defineProperty(Qg,"__esModule",{value:!0}),o(E)),C=e,tk=o(tO),rk=o(ym),nk=C.internal.constants.BOLT_PROTOCOL_V4_2,m=($A=j.default,wO(ok,$A),Object.defineProperty(ok.prototype,"version",{get:function(){return nk},enumerable:!1,configurable:!0}),Object.defineProperty(ok.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new rk.default(Object.values(tk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),ok);function ok(){return null!==$A&&$A.apply(this,arguments)||this}Qg.default=m;var v={},t={},ik=r&&r.__assign||function(){return(ik=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)},B=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},S=(Object.defineProperty(t,"__esModule",{value:!0}),B(tO)),oc=(t.default=ik({},S.default),{}),y={},uk=r&&r.__assign||function(){return(uk=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)},vc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hc=(Object.defineProperty(y,"__esModule",{value:!0}),vc(t)),ak=(y.default=uk({},hc.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}},sk=(Object.defineProperty(oc,"__esModule",{value:!0}),bv),ck=e,lk=p(y),fk=Dm,pk=d_,dk=ck.internal.temporalUtil.localDateTimeToEpochSecond;var hk=new Map;function bk(e,t,r){e=e,hk.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"}),hk.set(e,n));var n=hk.get(e),e=(0,ck.int)(t).multiply(1e3).add((0,ck.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()}:pk.identity:"hour"===t.type?e.hour=(0,ck.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,ck.int)(t.value)),e},{}),e=(r.year=r.adjustEra(r.year),dk(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 yk(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,ck.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}oc.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return lk.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){sk.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=ak(e.fields,3),t=e[0],r=e[1],e=e[2],t=bk(e,t,r);return yk(new ck.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,ck.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=dk(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=bk(r,i,o),n=dk(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=bk(r,i,o),dk(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,ck.int)(e.nanosecond),i=e.timeZoneId;return new sk.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return lk.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=dk(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,ck.int)(e.nanosecond),e=(0,ck.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new sk.structure.Structure(73,[t,r,e])},fromStructure:function(e){sk.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=ak(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,ck.int)(t).add(e),t=(0,fk.epochSecondAndNanoToLocalDateTime)(t,r);return yk(new ck.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var _k,vk,Ms=r&&r.__extends||(_k=function(e,t){return(_k=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}_k(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)},Bs=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},w=(Object.defineProperty(v,"__esModule",{value:!0}),Bs(Qg)),gk=Bs(f),Ok=R,wk=Cy,Ek=Bs(t),Pk=Bs(oc),Sk=Bs(ym),Tk=e.internal.bookmarks.Bookmarks,jk=e.internal.constants.BOLT_PROTOCOL_V4_3,Tt=(vk=w.default,Ms(Ck,vk),Object.defineProperty(Ck.prototype,"version",{get:function(){return jk},enumerable:!1,configurable:!0}),Object.defineProperty(Ck.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Sk.default(Object.values(Ek.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Ck.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 Ok.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||Tk.empty();return this.write(gk.default.route(t,e.values(),r),o,!0),o},Ck.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 Ok.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,wk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(gk.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},Ck.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},Ck.prototype._applyUtcPatch=function(){var t=this;this._transformer=new Sk.default(Object.values(mk(mk({},Ek.default),Pk.default)).map(function(e){return e(t._config,t._log)}))},Ck);function Ck(){return null!==vk&&vk.apply(this,arguments)||this}v.default=Tt;var Ik,Rk,$c={},$l=r&&r.__extends||(Ik=function(e,t){return(Ik=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}Ik(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ak=r&&r.__assign||function(){return(Ak=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)},ft=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Gc=(Object.defineProperty($c,"__esModule",{value:!0}),ft(v)),Bl=e,kk=ft(f),Mk=R,Nk=Cy,xk=ft(y),Dk=ft(oc),Lk=ft(ym),Kc=Bl.internal.constants,Uk=Kc.BOLT_PROTOCOL_V4_4,Fk=Kc.FETCH_ALL,Bk=Bl.internal.bookmarks.Bookmarks,el=(Rk=Gc.default,$l(Wk,Rk),Object.defineProperty(Wk.prototype,"version",{get:function(){return Uk},enumerable:!1,configurable:!0}),Object.defineProperty(Wk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Lk.default(Object.values(xk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Wk.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 Mk.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||Bk.empty();return this.write(kk.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},Wk.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===_?Fk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new Mk.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,Nk.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(kk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(kk.default.pull({n:_}),c,b),c},Wk.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 Mk.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,Nk.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(kk.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},Wk.prototype._applyUtcPatch=function(){var t=this;this._transformer=new Lk.default(Object.values(Ak(Ak({},xk.default),Dk.default)).map(function(e){return e(t._config,t._log)}))},Wk);function Wk(){return null!==Rk&&Rk.apply(this,arguments)||this}$c.default=el;var b={},Xc={},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)},qk=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},op=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zk=(Object.defineProperty(Xc,"__esModule",{value:!0}),bv),Hk=e,Gk=op(y),fp=op(oc);Xc.default=Vk(Vk(Vk({},Gk.default),fp.default),{createNodeTransformer:function(e){return Gk.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){zk.structure.verifyStructSize("Node",4,e.size);var e=qk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new Hk.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return Gk.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){zk.structure.verifyStructSize("Relationship",8,e.size);var e=qk(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 Hk.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return Gk.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){zk.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=qk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new Hk.UnboundRelationship(t,r,n,e)}})}});var Yk,Kk,Hc=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)}),Gl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_=(Object.defineProperty(b,"__esModule",{value:!0}),Gl($c)),Zk=Cy,Qk=Gl(Xc),Xk=Gl(ym),Jk=Gl(f),$k=R,eM=e.internal.constants.BOLT_PROTOCOL_V5_0,Fd=(Kk=_.default,Hc(tM,Kk),Object.defineProperty(tM.prototype,"version",{get:function(){return eM},enumerable:!1,configurable:!0}),Object.defineProperty(tM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Xk.default(Object.values(Qk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),tM.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 $k.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,Zk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(Jk.default.hello(r,n,this._serversideRouting),e,!0),e},tM);function tM(){return null!==Kk&&Kk.apply(this,arguments)||this}b.default=Fd;var rM,nM,Yd={},Zd={},oM=r&&r.__assign||function(){return(oM=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)},ch=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zc=(Object.defineProperty(Zd,"__esModule",{value:!0}),ch(Xc)),nh=(Zd.default=oM({},zc.default),r&&r.__extends||(rM=function(e,t){return(rM=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}rM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),iM=r&&r.__assign||function(){return(iM=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)},Sd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ph=(Object.defineProperty(Yd,"__esModule",{value:!0}),Sd(b)),uM=Cy,aM=Sd(Zd),sM=Sd(ym),cM=Sd(f),lM=R,fM=e.internal.constants.BOLT_PROTOCOL_V5_1,qc=(nM=ph.default,nh(pM,nM),Object.defineProperty(pM.prototype,"version",{get:function(){return fM},enumerable:!1,configurable:!0}),Object.defineProperty(pM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new sM.default(Object.values(aM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(pM.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),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,a={},e=new lM.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,uM.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(cM.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(iM(iM({},e),a.metadata))},onError:i,flush:!0})},pM.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 lM.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(cM.default.logon(r),i,e),i},pM.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new lM.LogoffObserver({onCompleted:t,onError:r});return this.write(cM.default.logoff(),t,e),t},pM);function pM(){return null!==nM&&nM.apply(this,arguments)||this}Yd.default=qc;var dM,hM,i={},Ud={},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)},Qp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},yh=(Object.defineProperty(Ud,"__esModule",{value:!0}),Qp(Zd)),Sh=(Ud.default=bM({},yh.default),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)})),yM=r&&r.__assign||function(){return(yM=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)},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fr=(Object.defineProperty(i,"__esModule",{value:!0}),g(Yd)),_M=g(Ud),vM=g(ym),mM=g(f),gM=R,I=e.internal.constants,OM=I.BOLT_PROTOCOL_V5_2,wM=I.FETCH_ALL,Qd=(hM=Fr.default,Sh(EM,hM),Object.defineProperty(EM.prototype,"version",{get:function(){return OM},enumerable:!1,configurable:!0}),Object.defineProperty(EM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new vM.default(Object.values(_M.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(EM.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),EM.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 gM.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write(mM.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(yM(yM({},e),a.metadata))},onError:i,flush:!0})},EM.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 gM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(mM.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},EM.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===_?wM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new gM.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(mM.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(mM.default.pull({n:_}),c,b),c},EM);function EM(){return null!==hM&&hM.apply(this,arguments)||this}i.default=Qd;var PM,SM,Rh={},Nh={},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)},Lc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Lc(Ud)),Th=(Nh.default=TM({},zh.default),r&&r.__extends||(PM=function(e,t){return(PM=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}PM(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)},$h=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fh=(Object.defineProperty(Rh,"__esModule",{value:!0}),$h(i)),CM=$h(Nh),IM=$h(ym),RM=$h(f),AM=R,kM=e.internal.constants.BOLT_PROTOCOL_V5_3,ab=(SM=Fh.default,Th(MM,SM),Object.defineProperty(MM.prototype,"version",{get:function(){return kM},enumerable:!1,configurable:!0}),Object.defineProperty(MM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new IM.default(Object.values(CM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),MM.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 AM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(RM.default.hello5x3(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(jM(jM({},e),s.metadata))},onError:u,flush:!0})},MM);function MM(){return null!==SM&&SM.apply(this,arguments)||this}Rh.default=ab;var NM,xM,yb={},xb={},DM=r&&r.__assign||function(){return(DM=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)},_b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Wf=(Object.defineProperty(xb,"__esModule",{value:!0}),_b(Nh)),Qb=(xb.default=DM({},Wf.default),r&&r.__extends||(NM=function(e,t){return(NM=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}NM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Pp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$b=(Object.defineProperty(yb,"__esModule",{value:!0}),Pp(Rh)),LM=Pp(xb),UM=Pp(f),FM=R,BM=Pp(ym),WM=e.internal.constants.BOLT_PROTOCOL_V5_4,up=(xM=$b.default,Qb(VM,xM),Object.defineProperty(VM.prototype,"version",{get:function(){return WM},enumerable:!1,configurable:!0}),Object.defineProperty(VM.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new BM.default(Object.values(LM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),VM.prototype.telemetry=function(e,t){var e=e.api,t=void 0===t?{}:t,r=t.onError,t=t.onCompleted,t=new FM.TelemetryObserver({onCompleted:t,onError:r});return this.write(UM.default.telemetry({api:e}),t,!1),t},VM);function VM(){return null!==xM&&xM.apply(this,arguments)||this}yb.default=up;var qM,zM,ey={},qp={},HM=r&&r.__assign||function(){return(HM=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}},Bd=(Object.defineProperty(qp,"__esModule",{value:!0}),fy(xb)),pb=(qp.default=HM({},Bd.default),r&&r.__extends||(qM=function(e,t){return(qM=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}qM(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)},Vc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nb=(Object.defineProperty(ey,"__esModule",{value:!0}),Vc(yb)),YM=Vc(qp),KM=Vc(ym),ZM=Vc(f),QM=R,ly=e.internal.constants,XM=ly.BOLT_PROTOCOL_V5_5,JM=ly.FETCH_ALL,$M=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),t_=(zM=Nb.default,pb(e2,zM),Object.defineProperty(e2.prototype,"version",{get:function(){return XM},enumerable:!1,configurable:!0}),Object.defineProperty(e2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new KM.default(Object.values(YM.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),e2.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 QM.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(ZM.default.hello5x5(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(GM(GM({},e),s.metadata))},onError:u,flush:!0})},e2.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 QM.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(ZM.default.begin5x5({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},e2.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===_?JM:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new QM.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(ZM.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(ZM.default.pull({n:_}),c,b),c},e2.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return GM(GM({},e),{description:null!=e.neo4j_code?e.status_description:e.description,diagnostic_record:null!==e.diagnostic_record?GM(GM({},$M),e.diagnostic_record):null})})),e},e2);function e2(){return null!==zM&&zM.apply(this,arguments)||this}ey.default=t_;var t2,r2,Xy={},u_={},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)},I_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P_=(Object.defineProperty(u_,"__esModule",{value:!0}),I_(qp)),M_=(u_.default=n2({},P_.default),r&&r.__extends||(t2=function(e,t){return(t2=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}t2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),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)},Xd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},z_=(Object.defineProperty(Xy,"__esModule",{value:!0}),Xd(ey)),i2=Xd(u_),u2=Xd(ym),a2=e.internal.constants.BOLT_PROTOCOL_V5_6,s2=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),G_=(r2=z_.default,M_(c2,r2),Object.defineProperty(c2.prototype,"version",{get:function(){return a2},enumerable:!1,configurable:!0}),Object.defineProperty(c2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new u2.default(Object.values(i2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),c2.prototype._enrichMetadata=function(e){return Array.isArray(e.statuses)&&(e.statuses=e.statuses.map(function(e){return o2(o2({},e),{diagnostic_record:null!==e.diagnostic_record?o2(o2({},s2),e.diagnostic_record):null})})),e},c2);function c2(){return null!==r2&&r2.apply(this,arguments)||this}Xy.default=G_;var l2,f2,Q_={},$_={},p2=r&&r.__assign||function(){return(p2=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)},W_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},uv=(Object.defineProperty($_,"__esModule",{value:!0}),W_(u_)),Dy=($_.default=p2({},uv.default),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)})),d2=r&&r.__assign||function(){return(d2=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)},k_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},N_=(Object.defineProperty(Q_,"__esModule",{value:!0}),k_(Xy)),h2=k_($_),b2=k_(ym),y2=e.internal.constants.BOLT_PROTOCOL_V5_7,_2=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),pv=(f2=N_.default,Dy(v2,f2),Object.defineProperty(v2.prototype,"version",{get:function(){return y2},enumerable:!1,configurable:!0}),Object.defineProperty(v2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new b2.default(Object.values(h2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),v2.prototype.enrichErrorMetadata=function(e){return d2(d2({},e),{cause:null!==e.cause&&void 0!==e.cause?this.enrichErrorMetadata(e.cause):null,code:e.neo4j_code,diagnostic_record:null!==e.diagnostic_record?d2(d2({},_2),e.diagnostic_record):null})},v2);function v2(){return null!==f2&&f2.apply(this,arguments)||this}Q_.default=pv;var m2,g2,jv={},Sp={},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)},Tp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Nv=(Object.defineProperty(Sp,"__esModule",{value:!0}),Tp($_)),Wv=(Sp.default=O2({},Nv.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)})),xv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Vf=(Object.defineProperty(jv,"__esModule",{value:!0}),xv(Q_)),w2=xv(Sp),E2=xv(ym),P2=xv(f),S2=R,jp=e.internal.constants,T2=jp.BOLT_PROTOCOL_V5_8,j2=jp.FETCH_ALL,Av=(g2=Vf.default,Wv(C2,g2),Object.defineProperty(C2.prototype,"version",{get:function(){return T2},enumerable:!1,configurable:!0}),Object.defineProperty(C2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new E2.default(Object.values(w2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),C2.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===_?j2:_,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 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:m,enrichMetadata:this._enrichMetadata,onDb:r}),l=y;return this.write(P2.default.runWithMetadata5x5(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(P2.default.pull({n:_}),c,b),c},C2);function C2(){return null!==g2&&g2.apply(this,arguments)||this}jv.default=Av;var Uv={},By={},I2=r&&r.__assign||function(){return(I2=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.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Jv=(Object.defineProperty(By,"__esModule",{value:!0}),tm(Sp)),R2=ym,A2=bv,k2=e,M2=198,N2=193,x2=200,D2=201,L2=202,U2=203,F2={INT8:x2,INT16:D2,INT32:L2,INT64:U2,FLOAT32:M2,FLOAT64:N2};function B2(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 x2:s=1,u=o.setInt8.bind(o),a=i.getInt8.bind(i);break;case D2:s=2,u=o.setInt16.bind(o),a=i.getInt16.bind(i);break;case L2:s=4,u=o.setInt32.bind(o),a=i.getInt32.bind(i);break;case U2:s=8,u=o.setBigInt64.bind(o),a=i.getBigInt64.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;default:throw(0,k2.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}By.default=I2(I2({},Jv.default),{createVectorTransformer:function(){return new R2.TypeTransformer({signature:86,isTypeInstance:function(e){return e instanceof k2.Vector},toStructure:function(e){var t=F2[e.getType()];if(void 0===t)throw(0,k2.newError)("Vector object has unknown type: ".concat(e.getType()));e=B2(t,e.asTypedArray().buffer);return new A2.structure.Structure(86,[Int8Array.from([t]),new Int8Array(e)])},fromStructure:function(e){var t=Uint8Array.from(e.fields[0])[0],r=B2(t,e.fields[1].buffer);switch(t){case x2:return new k2.Vector(new Int8Array(r));case D2:return new k2.Vector(new Int16Array(r));case L2:return new k2.Vector(new Int32Array(r));case U2:return new k2.Vector(new BigInt64Array(r));case M2:return new k2.Vector(new Float32Array(r));case N2:return new k2.Vector(new Float64Array(r));default:throw(0,k2.newError)("Received Vector structure with unsupported type marker: ".concat(t))}}})}});var W2,V2,im=r&&r.__extends||(W2=function(e,t){return(W2=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}W2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),fm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qr=(Object.defineProperty(Uv,"__esModule",{value:!0}),fm(jv)),q2=fm(By),z2=fm(ym),H2=e.internal.constants.BOLT_PROTOCOL_V6_0,gm=(V2=Qr.default,im(G2,V2),Object.defineProperty(G2.prototype,"version",{get:function(){return H2},enumerable:!1,configurable:!0}),Object.defineProperty(G2.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new z2.default(Object.values(q2.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),G2);function G2(){return null!==V2&&V2.apply(this,arguments)||this}Uv.default=gm;var Em={},Y2=(Object.defineProperty(Em,"__esModule",{value:!0}),e);function K2(){}function Z2(e){return e}var Q2={onNext:K2,onCompleted:K2,onError:K2};function X2(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||Z2,this._enrichErrorMetadata=r||Z2,this._observer=Object.assign({onObserversCountChange:K2,onError:K2,onFailure:K2,onErrorApplyTransformation:Z2},e)}Object.defineProperty(X2.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),X2.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(Y2.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(Y2.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(Y2.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(Y2.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,Y2.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,Y2.newError)("Unknown Bolt protocol message: "+e))}},X2.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(X2.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),X2.prototype._queueObserver=function(e){return(e=e||Q2).onCompleted=e.onCompleted||K2,e.onError=e.onError||K2,e.onNext=e.onNext||K2,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},X2.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)}},X2.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},X2.prototype._resetFailure=function(){this._currentFailure=null},X2.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,Y2.newError)(e.message,t,r,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},X2.prototype._handleErrorCause=function(e){var t=null!=e.cause?this._handleErrorCause(e.cause):void 0,t=(0,Y2.newGQLError)(e.message,t,e.gql_status,e.description,e.diagnostic_record);return this._observer.onErrorApplyTransformation(t)},Em.default=X2;var J2,Tm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$2=(Object.defineProperty(my,"__esModule",{value:!0}),e),eN=Tm(Py),tN=Tm(Rm),rN=Tm(C0),nN=Tm(tg),oN=Tm(E),iN=Tm(Qg),uN=Tm(v),aN=Tm($c),sN=Tm(b),cN=Tm(Yd),lN=Tm(i),fN=Tm(Rh),pN=Tm(yb),dN=Tm(ey),hN=Tm(Xy),bN=Tm(Q_),yN=Tm(jv),_N=Tm(Uv),vN=Tm(Em);my.default=function(e){var t=(e=void 0===e?{}: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,f=t,p=s,d=r,h={disableLosslessIntegers:i,useBigInt:u},b=a,y=function(t){var r=new vN.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),v=c;switch(f){case 1:return new eN.default(p,d,h,y,v,_);case 2:return new tN.default(p,d,h,y,v,_);case 3:return new rN.default(p,d,h,y,v,_);case 4:return new nN.default(p,d,h,y,v,_);case 4.1:return new oN.default(p,d,h,y,v,_,b);case 4.2:return new iN.default(p,d,h,y,v,_,b);case 4.3:return new uN.default(p,d,h,y,v,_,b);case 4.4:return new aN.default(p,d,h,y,v,_,b);case 5:return new sN.default(p,d,h,y,v,_,b);case 5.1:return new cN.default(p,d,h,y,v,_,b);case 5.2:return new lN.default(p,d,h,y,v,_,b);case 5.3:return new fN.default(p,d,h,y,v,_,b);case 5.4:return new pN.default(p,d,h,y,v,_,b);case 5.5:return new dN.default(p,d,h,y,v,_,b);case 5.6:return new hN.default(p,d,h,y,v,_,b);case 5.7:return new bN.default(p,d,h,y,v,_,b);case 5.8:return new yN.default(p,d,h,y,v,_,b);case 6:return new _N.default(p,d,h,y,v,_,b);default:throw(0,$2.newError)("Unknown Bolt protocol version: "+f)}},u=O,J2=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]}),Vm=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||J2(t,e,r)},Ym=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(u,"__esModule",{value:!0}),u.RawRoutingTable=u.BoltProtocol=void 0,hm=Ym(Ep),Xr=Ym(my),$m=Ym(v),Ym=Ym(Ay),Vm(R,u),u.BoltProtocol=$m.default,u.RawRoutingTable=Ym.default,u.default={handshake:hm.default,create:Xr.default};var mN,c0={},gb={},d0=r&&r.__extends||(mN=function(e,t){return(mN=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}mN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(gb,"__esModule",{value:!0});d0(ON,gN=e.ConnectionProvider),ON.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 gN,o0=ON;function ON(e){var t=gN.call(this)||this;return t._connection=e,t}gb.default=o0;var wN,g0={},L0={},mb={},F0=r&&r.__extends||(wN=function(e,t){return(wN=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}wN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(mb,"__esModule",{value:!0});F0(PN,EN=e.Connection),Object.defineProperty(PN.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(PN.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(PN.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(PN.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(PN.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(PN.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),PN.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(PN.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(PN.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(PN.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),PN.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},PN.prototype.write=function(e,t,r){throw new Error("not implemented")},PN.prototype.close=function(){throw new Error("not implemented")},PN.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e};var EN,K0=PN;function PN(e){var t=EN.call(this)||this;return t._errorHandler=e,t}mb.default=K0;var SN,X0={},q0=r&&r.__extends||(SN=function(e,t){return(SN=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}SN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),TN=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())})},jN=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},xl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},CN=(Object.defineProperty(X0,"__esModule",{value:!0}),X0.createChannelConnection=void 0,Vp),IN=e,sg=xl(mb),RN=xl(O),AN=IN.error.PROTOCOL_ERROR,kN=IN.internal.logger.Logger,MN=0;X0.createChannelConnection=function(i,u,a,s,e,c,l,t){void 0===c&&(c=null);var f=(t=void 0===t?function(e){return new CN.Channel(e)}:t)(new CN.ChannelConfig(i,u,a.errorCode(),e));return RN.default.handshake(f,s).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new CN.Chunker(f),o=new CN.Dechunker,t=new xN(f,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return RN.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})})};NN=sg.default,q0(DN,NN),DN.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},DN.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},DN.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})},DN.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},DN.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},DN.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(DN.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(DN.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(DN.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(DN.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(DN.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(DN.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),DN.prototype.connect=function(t,n,o,i){return TN(this,void 0,void 0,function(){var r=this;return jN(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,IN.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]}})})},DN.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,IN.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)}})})},DN.prototype.protocol=function(){return this._protocol},Object.defineProperty(DN.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(DN.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(DN.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(DN.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),DN.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(IN.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},DN.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},DN.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},DN.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},DN.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},DN.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()}})})},DN.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},DN.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()})}}))},DN.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},DN.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},DN.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},DN.prototype.close=function(){var t;return TN(this,void 0,void 0,function(){return jN(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]}})})},DN.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},DN.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,IN.newError)(e,AN);return this._handleFatalError(e),e};var NN,xN=DN;function DN(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=NN.call(this,t)||this;return t._authToken=null,t._idle=!1,t._reseting=!1,t._resetObservers=[],t._id=MN++,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 kN((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}X0.default=xN;var LN,UN,A0={},fg=r&&r.__extends||(LN=function(e,t){return(LN=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}LN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),yv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mg=(Object.defineProperty(A0,"__esModule",{value:!0}),yv(mb)),hg=(UN=mg.default,fg(FN,UN),FN.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},FN.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},FN.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},FN.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},FN.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(FN.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(FN.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(FN.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(FN.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(FN.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(FN.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(FN.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(FN.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(FN.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),FN.prototype.isOpen=function(){return this._delegate.isOpen()},FN.prototype.protocol=function(){return this._delegate.protocol()},FN.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},FN.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},FN.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},FN.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},FN.prototype.close=function(){return this._delegate.close()},FN.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},FN);function FN(e,t){var r=UN.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}A0.default=hg;ky={};Object.defineProperty(ky,"__esModule",{value:!0});var BN,WN,VN,qN=e.error.SERVICE_UNAVAILABLE,zN=e.error.SESSION_EXPIRED;function HN(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||GN,this._handleWriteFailure=r||GN,this._handleSecurityError=n||GN}function GN(e){return e}HN.create=function(e){return new HN(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleSecurityError)},HN.prototype.errorCode=function(){return this._errorCode},HN.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===zN||e.code===qN||"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},ky.default=HN,wg=L0,BN=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}),h_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&BN(t,e,r);return WN(t,e),t},rg=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(wg,"__esModule",{value:!0}),wg.createChannelConnection=wg.ConnectionErrorHandler=wg.DelegateConnection=wg.ChannelConnection=wg.Connection=void 0,Ng=rg(mb),wg.Connection=Ng.default,VN=h_(X0),wg.ChannelConnection=VN.default,Object.defineProperty(wg,"createChannelConnection",{enumerable:!0,get:function(){return VN.createChannelConnection}}),h_=rg(A0),wg.DelegateConnection=h_.default,h_=rg(ky),wg.ConnectionErrorHandler=h_.default,wg.default=Ng.default;var Fg={},YN=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())})},KN=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},ZN=(Object.defineProperty(Fg,"__esModule",{value:!0}),e),QN=f_;function XN(e){var t=e.authTokenManager,r=e.userAgent,e=e.boltAgent;this._authTokenManager=t||(0,ZN.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=e}XN.prototype.authenticate=function(e){var r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return YN(this,void 0,void 0,function(){var t;return KN(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!QN.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(),QN.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]}})})},XN.prototype.handleError=function(e){var t=e.connection,e=e.code;return!(!t||!e.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,e)},Fg.default=XN;var vb={},JN=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())})},$N=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={next:e(0),throw:e(1),return:e(2)};return"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 ex(e){e=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=e}Object.defineProperty(vb,"__esModule",{value:!0}),ex.prototype.check=function(r){return JN(this,void 0,void 0,function(){var t;return $N(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(ex.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),ex.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},vb.default=ex;var zl={},tx=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())})},rx=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},nx=(Object.defineProperty(zl,"__esModule",{value:!0}),Vp);function ox(e){var t=e.clientCertificateProvider,e=e.loader;this._clientCertificateProvider=t,this._loader=e||nx.ClientCertificatesLoader,this._clientCertificate=null}ox.prototype.getClientCertificate=function(){return tx(this,void 0,void 0,function(){var t,r,n=this;return rx(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]}})})},zl.default=ox;var ix,ux,il=r&&r.__extends||(ix=function(e,t){return(ix=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}ix(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ax=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())})},sx=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},cx=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},lx=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))},l=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fx=(Object.defineProperty(g0,"__esModule",{value:!0}),L0),px=e,dx=l(Fg),hx=f_,bx=l(vb),yx=l(zl),_x=px.error.SERVICE_UNAVAILABLE,vx=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],Al=px.internal.pool,mx=Al.Pool,gx=Al.PoolConfig,Rg=(ux=px.ConnectionProvider,il(Ox,ux),Ox.prototype._createConnectionErrorHandler=function(){return new fx.ConnectionErrorHandler(_x)},Ox.prototype._getClientCertificate=function(){return ax(this,void 0,void 0,function(){return sx(this,function(e){return[2,this._config.clientCertificate.getClientCertificate()]})})},Ox.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})})},Ox.prototype._validateConnectionOnAcquire=function(e,r){var n=e.auth,o=e.skipReAuth;return ax(this,void 0,void 0,function(){var t;return sx(this,function(e){switch(e.label){case 0:if(!this._validateConnection(r))return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(r)];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not alive because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 4:return e.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:r,auth:n,skipReAuth:o})];case 5:return e.sent(),[2,!0];case 6:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not valid because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 7:return[2]}})})},Ox.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},Ox.prototype._validateConnection=function(e){return!!e.isOpen()&&!(this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},Ox.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},Ox.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return ax(this,void 0,void 0,function(){var t,r;return sx(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new px.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]}})})},Ox.prototype._verifyAuthentication=function(e){var u=e.getAddress,a=e.auth;return ax(this,void 0,void 0,function(){var t,r,n,o,i;return sx(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,px.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(),vx.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]}})})},Ox.prototype._verifyStickyConnection=function(e){var n=e.auth,o=e.connection;return e.address,ax(this,void 0,void 0,function(){var t,r;return sx(this,function(e){switch(e.label){case 0:return(t=hx.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,px.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},Ox.prototype.close=function(){return ax(this,void 0,void 0,function(){return sx(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]}})})},Ox._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},Ox._removeIdleObserverOnConnection=function(e){e._unsetIdle()},Ox.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),e},Ox);function Ox(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(mx.bind.apply(mx,lx([void 0],cx(e),!1)))}:e,s=(void 0===t&&(t=null),ux.call(this)||this);return s._id=r,s._config=n,s._log=o,s._clientCertificateHolder=new yx.default({clientCertificateProvider:s._config.clientCertificate}),s._authenticationProvider=new dx.default({authTokenManager:a,userAgent:i,boltAgent:u}),s._livenessCheckProvider=new bx.default({connectionLivenessCheckTimeout:n.connectionLivenessCheckTimeout}),s._userAgent=i,s._boltAgent=u,s._createChannelConnection=t||function(n){return ax(s,void 0,void 0,function(){var t,r;return sx(this,function(e){switch(e.label){case 0:return t=fx.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:Ox._installIdleObserverOnConnection.bind(s),removeIdleObserver:Ox._removeIdleObserverOnConnection.bind(s),config:gx.fromDriverConfig(n),log:s._log}),s._openConnections={},s}g0.default=Rg;var wx,Ex,F={},o=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)}),Px=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())})},Sx=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},C=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},j=(Object.defineProperty(F,"__esModule",{value:!0}),C(g0)),Tx=L0,wO=e.internal.constants,jx=wO.BOLT_PROTOCOL_V3,Cx=wO.BOLT_PROTOCOL_V4_0,Ix=wO.BOLT_PROTOCOL_V4_4,Rx=wO.BOLT_PROTOCOL_V5_1,Ax=e.error.SERVICE_UNAVAILABLE,m=(Ex=j.default,o(kx,Ex),kx.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,o=(e.accessMode,e.database),i=(e.bookmarks,e.auth),u=e.forceReAuth;return Px(this,void 0,void 0,function(){var t,r,n=this;return Sx(this,function(e){switch(e.label){case 0:return t=Tx.ConnectionErrorHandler.create({errorCode:Ax,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 Tx.DelegateConnection(r,t)]}})})},kx.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,"'")),Ex.prototype._handleSecurityError.call(this,e,t,r)},kx.prototype._hasProtocolVersion=function(n){return Px(this,void 0,void 0,function(){var t,r;return Sx(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]}})})},kx.prototype.supportsMultiDb=function(){return Px(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return Cx<=e})];case 1:return[2,e.sent()]}})})},kx.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},kx.prototype.supportsTransactionConfig=function(){return Px(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return jx<=e})];case 1:return[2,e.sent()]}})})},kx.prototype.supportsUserImpersonation=function(){return Px(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return Ix<=e})];case 1:return[2,e.sent()]}})})},kx.prototype.supportsSessionAuth=function(){return Px(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return Rx<=e})];case 1:return[2,e.sent()]}})})},kx.prototype.verifyAuthentication=function(e){var r=e.auth;return Px(this,void 0,void 0,function(){var t=this;return Sx(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},kx.prototype.verifyConnectivityAndGetServerInfo=function(){return Px(this,void 0,void 0,function(){return Sx(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},kx);function kx(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=Ex.call(this,{id:t,config:r,log:n,userAgent:i,boltAgent:u,authTokenManager:a,newPool:e})||this;return t._address=o,t}F.default=m;var B={},tO={},S={},vc={},Mx=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},Nx=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))},xx=(Object.defineProperty(vc,"__esModule",{value:!0}),vc.createValidRoutingTable=void 0,e),hc=xx.internal.constants,Dx=hc.ACCESS_MODE_WRITE,Lx=hc.ACCESS_MODE_READ,Ux=xx.internal.serverAddress.ServerAddress,Fx=xx.error.PROTOCOL_ERROR,Bx=(Wx.fromRawRoutingTable=qx,Wx.prototype.forget=function(e){this.readers=Vx(this.readers,e),this.writers=Vx(this.writers,e)},Wx.prototype.forgetRouter=function(e){this.routers=Vx(this.routers,e)},Wx.prototype.forgetWriter=function(e){this.writers=Vx(this.writers,e)},Wx.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===Lx&&0===this.readers.length||e===Dx&&0===this.writers.length},Wx.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},Wx.prototype.allServers=function(){return Nx(Nx(Nx([],Mx(this.routers),!1),Mx(this.readers),!1),Mx(this.writers),!1)},Wx.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,"]]")},Wx);function Wx(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,xx.int)(0),this.ttl=e}function Vx(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function qx(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,xx.int)(Date.now()),n=(0,xx.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?xx.Integer.MAX_VALUE:n}catch(e){throw(0,xx.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(xx.json.stringify(t),"\nError message: ").concat(e.message),Fx)}}(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=Hx(e).map(function(e){return Ux.fromUrl(e)}):"WRITE"===t?i=Hx(e).map(function(e){return Ux.fromUrl(e)}):"READ"===t&&(o=Hx(e).map(function(e){return Ux.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,xx.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(xx.json.stringify(t.servers),"\nError message: ").concat(e.message),Fx)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return zx(u,"routers",t),zx(a,"readers",t),new Bx({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function zx(e,t,r){if(0===e.length)throw(0,xx.newError)("Received no "+t+" from router "+r,Fx)}function Hx(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}vc.default=Bx,vc.createValidRoutingTable=qx;var p=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Gx=(Object.defineProperty(S,"__esModule",{value:!0}),p(vc));function Yx(e){this._routingContext=e}Yx.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:Gx.default.fromRawRoutingTable(r,n,e)})})},Yx.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})})},S.default=Yx;var Kx,Zx,Dm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},d_=(Object.defineProperty(tO,"__esModule",{value:!0}),tO.RoutingTable=tO.Rediscovery=void 0,Dm(S)),t=(tO.Rediscovery=d_.default,Dm(vc)),Bs=(tO.RoutingTable=t.default,tO.default=d_.default,r&&r.__extends||(Kx=function(e,t){return(Kx=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}Kx(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Qx=r&&r.__assign||function(){return(Qx=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)},Xx=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]}),Jx=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Xx(t,e,r);return Jx(t,e),t},$x=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())})},eD=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},tD=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.")},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},Ms=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},nD=(Object.defineProperty(B,"__esModule",{value:!0}),e),oD=w(tO),iD=Vp,uD=Ms(gb),Tt=Ms(g0),aD=tl,sD=L0,cD=f_,lD=nD.error.SERVICE_UNAVAILABLE,fD=nD.error.SESSION_EXPIRED,pD=nD.internal.bookmarks.Bookmarks,ft=nD.internal.constants,dD=ft.ACCESS_MODE_READ,hD=ft.ACCESS_MODE_WRITE,bD=ft.BOLT_PROTOCOL_V3,yD=ft.BOLT_PROTOCOL_V4_0,_D=ft.BOLT_PROTOCOL_V4_4,vD=ft.BOLT_PROTOCOL_V5_1,mD=null,gD=(0,nD.int)(3e4),Kc=(Zx=Tt.default,Bs(OD,Zx),OD.prototype._createConnectionErrorHandler=function(){return new sD.ConnectionErrorHandler(fD)},OD.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||mD),e},OD.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,"'")),Zx.prototype._handleSecurityError.call(this,e,t,r,n)},OD.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||mD),(0,nD.newError)("No longer possible to write to server at "+t,fD,e)},OD.prototype.acquireConnection=function(e){var 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 $x(this,void 0,void 0,function(){var n,t,r,o,i=this;return eD(this,function(e){switch(e.label){case 0:return(n={database:a||mD},t=new sD.ConnectionErrorHandler(fD,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 oD.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)]}})})},OD.prototype._getConnectionFromRoutingTable=function(i,u,a,s){return $x(this,void 0,void 0,function(){var t,r,n,o;return eD(this,function(e){switch(e.label){case 0:if(a===dD)r=this._loadBalancingStrategy.selectReader(i.readers),t="read";else{if(a!==hD)throw(0,nD.newError)("Illegal mode "+a);r=this._loadBalancingStrategy.selectWriter(i.writers),t="write"}if(!r)throw(0,nD.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(i),fD);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 sD.DelegateConnection(n,s)];case 5:throw o=e.sent(),s.handleAndTransformError(o,r);case 6:return[2]}})})},OD.prototype._hasProtocolVersion=function(u){return $x(this,void 0,void 0,function(){var t,r,n,o,i;return eD(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]}})})},OD.prototype.supportsMultiDb=function(){return $x(this,void 0,void 0,function(){return eD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return yD<=e})];case 1:return[2,e.sent()]}})})},OD.prototype.supportsTransactionConfig=function(){return $x(this,void 0,void 0,function(){return eD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return bD<=e})];case 1:return[2,e.sent()]}})})},OD.prototype.supportsUserImpersonation=function(){return $x(this,void 0,void 0,function(){return eD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return _D<=e})];case 1:return[2,e.sent()]}})})},OD.prototype.supportsSessionAuth=function(){return $x(this,void 0,void 0,function(){return eD(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return vD<=e})];case 1:return[2,e.sent()]}})})},OD.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},OD.prototype.verifyAuthentication=function(e){var n=e.database,o=e.accessMode,i=e.auth;return $x(this,void 0,void 0,function(){var t=this;return eD(this,function(e){return this._startTime=(new Date).getTime(),[2,this._verifyAuthentication({auth:i,getAddress:function(){return $x(t,void 0,void 0,function(){var t,r;return eD(this,function(e){switch(e.label){case 0:return t={database:n||mD},[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===hD?r.writers:r.readers).length)throw(0,nD.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),lD);return[2,r[0]]}})})}})]})})},OD.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return $x(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return eD(this,function(e){switch(e.label){case 0:return t={database:l||mD},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===hD?r.writers:r.readers,n=(0,nD.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),lD),e.label=2;case 2:e.trys.push([2,9,10,11]),o=tD(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}})})},OD.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},OD.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},OD.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 oD.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},OD.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)},OD.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return $x(this,void 0,void 0,function(){var t,r,n,o,i;return eD(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,l)];case 1:return(t=rD.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=rD.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()]}})})},OD.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return $x(this,void 0,void 0,function(){var t,r,n;return eD(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,s)];case 1:return r=rD.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=rD.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()]}})})},OD.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return $x(this,void 0,void 0,function(){var t,r;return eD(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=rD.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,OD._forgetRouter(o,n,r),[2,[null,t]])}})})},OD.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return $x(this,void 0,void 0,function(){var t;return eD(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()]}})})},OD.prototype._resolveSeedRouter=function(n){return $x(this,void 0,void 0,function(){var t,r=this;return eD(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)]}})})},OD.prototype._fetchRoutingTable=function(s,c,l,f,p){return $x(this,void 0,void 0,function(){var t=this;return eD(this,function(e){return[2,s.reduce(function(i,u,a){return $x(t,void 0,void 0,function(){var t,r,n,o;return eD(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=rD.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(OD._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=rD.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]))]})})},OD.prototype._createSessionForRediscovery=function(o,i,u,a){return $x(this,void 0,void 0,function(){var t,r,n=this;return eD(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=sD.ConnectionErrorHandler.create({errorCode:fD,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r)}}),r=t._sticky?new sD.DelegateConnection(t):new sD.DelegateConnection(t,r),r=new uD.default(r),t.protocol().version<4?[2,[new nD.Session({mode:hD,bookmarks:pD.empty(),connectionProvider:r}),null]]:[2,[new nD.Session({mode:dD,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},OD.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)||(r=e).code.startsWith("Neo.ClientError.Security.")&&!["Neo.ClientError.Security.AuthorizationExpired"].includes(r.code))throw e;if("Neo.ClientError.Procedure.ProcedureNotFound"===e.code)throw(0,nD.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),lD,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},OD.prototype._applyRoutingTableIfPossible=function(t,r,n){return $x(this,void 0,void 0,function(){return eD(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r)];throw(0,nD.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),lD,n);case 1:return e.sent(),[2,r]}})})},OD.prototype._updateRoutingTable=function(t){return $x(this,void 0,void 0,function(){return eD(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]}})})},OD._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},OD.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,nD.newError)("Channel SSR Callback invoked with action other than 'OPEN' or 'CLOSE'");!0===e?this._withSSR=this._withSSR-1:this._withoutSSR=this._withoutSSR-1}},OD.prototype.SSREnabled=function(){return 0<this._withSSR&&0===this._withoutSSR},OD);function OD(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=Zx.call(this,{id:t,config:i,log:u,userAgent:a,boltAgent:s,authTokenManager:c,newPool:e},function(n){return $x(f,void 0,void 0,function(){var t,r;return eD(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(),this._routingContext,this._channelSsrCallback.bind(this)]))]}})})})||this;return f._routingContext=Qx(Qx({},n),{address:r.toString()}),f._seedRouter=r,f._rediscovery=new oD.default(f._routingContext),f._loadBalancingStrategy=new aD.LeastConnectedLoadBalancingStrategy(f._connectionPool),f._startTime=0,f._hostNameResolver=o,f._dnsResolver=new iD.HostNameResolver,f._log=u,f._useSeedRouter=!0,f._routingTableRegistry=new BD(l?(0,nD.int)(l):gD),f._refreshRoutingTable=cD.functional.reuseOngoingRequest(f._refreshRoutingTable,f),f._withSSR=0,f._withoutSSR=0,f}B.default=Kc;WD.prototype.register=function(e){return this._tables.set(e.database,e),this},WD.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},WD.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},WD.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},WD.prototype._forEach=function(e){var t,r;try{for(var n=tD(this._tables),o=n.next();!o.done;o=n.next())e(rD(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},WD.prototype._remove=function(e){return this._tables.delete(e),this},WD.prototype._removeIf=function(e){var t,r;try{for(var n=tD(this._tables),o=n.next();!o.done;o=n.next()){var i=rD(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 wD,ED,PD,SD,TD,jD,CD,ID,RD,AD,kD,x,MD,ND,xD,DD,LD,UD,FD,BD=WD;function WD(e){this._tables=new Map,this._routingTablePurgeDelay=e}function VD(e,t,r){void 0===r&&(r={}),xD(e,"Bolt URL");var n,o=UD.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=ND,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||FD,r.boltAgent=x.internal.boltAgent.fromVersion(kD.default),LD.fromUrl(o.hostAndPort)),t={address:s,typename:i?"Routing":"Direct",routing:i};return new AD.Driver(t,r,function(){{if(i)return function(e,t,r,n){return new MD.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if(DD(o.query))return function(e,t,r){return new MD.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 qD(r,n){return ID(this,void 0,void 0,function(){var t;return RD(this,function(e){switch(e.label){case 0:t=VD(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 Bl=c0,wD=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.RoutingConnectionProvider=Bl.DirectConnectionProvider=Bl.PooledConnectionProvider=Bl.SingleConnectionProvider=void 0,ED=gb,Object.defineProperty(Bl,"SingleConnectionProvider",{enumerable:!0,get:function(){return wD(ED).default}}),PD=g0,Object.defineProperty(Bl,"PooledConnectionProvider",{enumerable:!0,get:function(){return wD(PD).default}}),SD=F,Object.defineProperty(Bl,"DirectConnectionProvider",{enumerable:!0,get:function(){return wD(SD).default}}),TD=B,Object.defineProperty(Bl,"RoutingConnectionProvider",{enumerable:!0,get:function(){return wD(TD).default}}),Gc=T,jD=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]}),CD=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||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&jD(t,e,r);return CD(t,e),t},el=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||jD(t,e,r)},Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.packstream=Gc.channel=Gc.buf=Gc.bolt=Gc.loadBalancing=void 0,Gc.loadBalancing=$l(tl),Gc.bolt=$l(O),Gc.buf=$l(Pd),Gc.channel=$l(Vp),Gc.packstream=$l(bv),el(c0,Gc),y=L,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())})},RD=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={next:e(0),throw:e(1),return:e(2)};return"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}}}},op=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(y,"__esModule",{value:!0}),y.UnboundRelationship=y.Relationship=y.Node=y.Record=y.ServerInfo=y.GqlStatusObject=y.Notification=y.QueryStatistics=y.ProfiledPlan=y.Plan=y.ResultSummary=y.RxResult=y.RxManagedTransaction=y.RxTransaction=y.RxSession=y.EagerResult=y.Result=y.ManagedTransaction=y.Transaction=y.Session=y.Driver=y.temporal=y.spatial=y.graph=y.error=y.routing=y.session=y.types=y.logging=y.auth=y.isRetryableError=y.Neo4jError=y.integer=y.isUnboundRelationship=y.isRelationship=y.isPathSegment=y.isPath=y.isNode=y.isDateTime=y.isLocalDateTime=y.isDate=y.isTime=y.isLocalTime=y.isDuration=y.isPoint=y.isInt=y.int=y.hasReachableServer=y.driver=y.authTokenManagers=void 0,y.VectorType=y.Vector=y.vector=y.clientCertificateProviders=y.notificationFilterMinimumSeverityLevel=y.notificationFilterDisabledClassification=y.notificationFilterDisabledCategory=y.notificationSeverityLevel=y.notificationClassification=y.notificationCategory=y.resultTransformers=y.bookmarkManager=y.DateTime=y.LocalDateTime=y.Date=y.Time=y.LocalTime=y.Duration=y.Integer=y.Point=y.PathSegment=y.Path=void 0,AD=U,Object.defineProperty(y,"Driver",{enumerable:!0,get:function(){return AD.Driver}}),kD=op(G),x=e,Object.defineProperty(y,"authTokenManagers",{enumerable:!0,get:function(){return x.authTokenManagers}}),Object.defineProperty(y,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(y,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(y,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(y,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(y,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(y,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(y,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(y,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(y,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(y,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(y,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(y,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(y,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(y,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(y,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(y,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(y,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(y,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(y,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(y,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(y,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(y,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(y,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(y,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(y,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(y,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(y,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(y,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(y,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(y,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(y,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(y,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(y,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(y,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(y,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(y,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(y,"GqlStatusObject",{enumerable:!0,get:function(){return x.GqlStatusObject}}),Object.defineProperty(y,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(y,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(y,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(y,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(y,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(y,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(y,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(y,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(y,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(y,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(y,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(y,"notificationClassification",{enumerable:!0,get:function(){return x.notificationClassification}}),Object.defineProperty(y,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(y,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(y,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return x.notificationFilterDisabledClassification}}),Object.defineProperty(y,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(y,"clientCertificateProviders",{enumerable:!0,get:function(){return x.clientCertificateProviders}}),Object.defineProperty(y,"Vector",{enumerable:!0,get:function(){return x.Vector}}),Object.defineProperty(y,"VectorType",{enumerable:!0,get:function(){return x.VectorType}}),Object.defineProperty(y,"vector",{enumerable:!0,get:function(){return x.vector}}),MD=T,oc=op(Z),y.RxSession=oc.default,fp=op(h),y.RxTransaction=fp.default,Gl=op(P),y.RxManagedTransaction=Gl.default,op=op(n),y.RxResult=op.default,_=x.internal.util,ND=_.ENCRYPTION_ON,xD=_.assertString,DD=_.isEmptyObjectOrNull,LD=x.internal.serverAddress.ServerAddress,UD=x.internal.urlUtil,FD="neo4j-javascript/"+kD.default,y.driver=VD,y.hasReachableServer=qD,_={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},y.logging=_,Hc={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},y.types=Hc,Fd={READ:AD.READ,WRITE:AD.WRITE},y.session=Fd,ch={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},y.integer=ch,Xc={isPoint:x.isPoint},y.spatial=Xc,zc={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},y.temporal=zc,Cy={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},y.graph=Cy,ch={authTokenManagers:x.authTokenManagers,driver:VD,hasReachableServer:qD,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,integer:ch,Neo4jError:x.Neo4jError,isRetryableError:x.isRetryableError,auth:x.auth,logging:_,types:Hc,session:Fd,routing:x.routing,error:x.error,graph:Cy,spatial:Xc,temporal:zc,Driver:AD.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:oc.default,RxTransaction:fp.default,RxManagedTransaction:Gl.default,RxResult:op.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,vector:x.vector},y.default=ch,D(L)});