neo4j-driver 5.7.0 → 5.7.1
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 U(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D,L,F={},B={},e={},t={},n=r&&r.__extends||(D=function(e,t){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}D(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),W=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.Neo4jError=t.isRetriableError=t.newError=void 0,"ServiceUnavailable"),z=(t.SERVICE_UNAVAILABLE=W,"SessionExpired"),q=(t.SESSION_EXPIRED=z,t.PROTOCOL_ERROR="ProtocolError",L=Error,n(V,L),V.isRetriable=function(e){return null!=e&&e instanceof V&&e.retriable},V);function V(e,t,r){e=L.call(this,e,null!=r?{cause:r}:void 0)||this;return e.constructor=V,e.__proto__=V.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===W||r===z||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=q,t.newError=function(e,t,r){return new q(e,null!=t?t:"N/A",r)};n=q.isRetriable;t.isRetriableError=n;var n={},H=(Object.defineProperty(n,"__esModule",{value:!0}),n.toString=n.toNumber=n.inSafeRange=n.isInt=n.int=void 0,t),G=new Map,o=(d.prototype.inSafeRange=function(){return this.greaterThanOrEqual(d.MIN_SAFE_VALUE)&&this.lessThanOrEqual(d.MAX_SAFE_VALUE)},d.prototype.toInt=function(){return this.low},d.prototype.toNumber=function(){return this.high*Y+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(Y)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(Y)+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(Z)&&e.lessThan(Z))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,H.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);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=G.get(e)))return t;var t=new d(e,e<0?-1:0);return-128<=e&&e<128&&G.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<=-K?d.MIN_VALUE:K<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%Y|0,e/Y|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,H.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,H.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,H.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,H.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?d.fromNumber(e):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(o.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var Y=4294967296,K=Y*Y/2,Z=o.fromInt(1<<24),i=o.fromValue,i=(n.int=i,o.isInteger),i=(n.isInt=i,o.inSafeRange),i=(n.inSafeRange=i,o.toNumber),i=(n.toNumber=i,o.toString),i=(n.toString=i,n.default=o,{}),o={},u={},Q={},X={},J=(Object.defineProperty(X,"__esModule",{value:!0}),X.getBrokenObjectReason=X.isBrokenObject=X.createBrokenObject=void 0,"__isBrokenObject__"),$="__reason__";X.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===J||(t===$?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})},X.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[J]},X.getBrokenObjectReason=function(e){return e[$]},Object.defineProperty(Q,"__esModule",{value:!0}),Q.stringify=void 0;var ee=X;Q.stringify=function(e){return JSON.stringify(e,function(e,t){return(0,ee.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,ee.getBrokenObjectReason)(t)}:"bigint"==typeof t?"".concat(t,"n"):t})},Object.defineProperty(u,"__esModule",{value:!0}),u.ENCRYPTION_OFF=u.ENCRYPTION_ON=u.validateQueryAndParameters=u.assertValidDate=u.assertNumberOrInteger=u.assertNumber=u.assertString=u.assertObject=u.isString=u.isObject=u.isEmptyObjectOrNull=void 0;var a,te,re,ne,oe,ie,ue=n,ae=Q;u.ENCRYPTION_ON="ENCRYPTION_ON";function se(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function ce(e,t){if(le(e))return e;throw new TypeError((0,ae.stringify)(t)+" expected to be string but was: "+(0,ae.stringify)(e))}function le(e){return"[object String]"===Object.prototype.toString.call(e)}function fe(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,ne.int)(e),this._maxInteger=(0,ne.int)(t)}function pe(e,t,r){e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.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,ne.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 de(e,t,r){if((0,ie.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,oe.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function he(e,t){e=(0,ne.int)(e),t=(0,ne.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function be(e,t){return e=(0,ne.int)(e),t=(0,ne.int)(t),e.subtract(he(e,t).multiply(t))}function ye(e){return(e=(0,ne.int)(e)).equals(0)?"":"."+_e(e,9)}function _e(e,t,r){var n=(e=(0,ne.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}u.ENCRYPTION_OFF="ENCRYPTION_OFF",u.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!se(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},u.isObject=se,u.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(ce(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!se(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}},u.assertObject=function(e,t){if(se(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,ae.stringify)(e))},u.assertString=ce,u.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,ae.stringify)(e));return e},u.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,ue.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,ae.stringify)(e))},u.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,ae.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,ae.stringify)(e));return e},u.isString=le,a=o,te=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]}),re=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=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)&&te(t,e,r);return re(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,ne=s(n),oe=t,ie=u,fe.prototype.contains=function(e){var t;return(0,ne.isInt)(e)&&e instanceof ne.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,ne.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},fe.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},s=fe,a.YEAR_RANGE=new s(-999999999,999999999),a.MONTH_OF_YEAR_RANGE=new s(1,12),a.DAY_OF_MONTH_RANGE=new s(1,31),a.HOUR_OF_DAY_RANGE=new s(0,23),a.MINUTE_OF_HOUR_RANGE=new s(0,59),a.SECOND_OF_MINUTE_RANGE=new s(0,59),a.NANOSECOND_OF_SECOND_RANGE=new s(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,ne.int)(e).add(he(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return be(e,a.NANOS_PER_SECOND)},a.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.int)(r),n=(0,ne.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,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.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=_e(e),t=_e(t),r=function(e,t){e=(0,ne.int)(e),t=(0,ne.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=ye((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=_e(e,2),t=_e(t,2),r=_e(r,2),n=ye(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},a.timeZoneOffsetToIsoString=function(e){if((e=(0,ne.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=_e((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=_e(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:_e(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,ne.int)(e);if(e.isNegative()||e.greaterThan(9999))return _e(e,6,{usePositiveSign:!0});return _e(e,4)}(e),t=_e(t,2),r=_e(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 ne.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},a.timeZoneOffsetInSeconds=function(e){var t=e.getSeconds()>=e.getUTCSeconds()?e.getSeconds()-e.getUTCSeconds():e.getSeconds()-e.getUTCSeconds()+60;return 0===(e=e.getTimezoneOffset())?0+t:-1*e*a.SECONDS_PER_MINUTE+t},a.assertValidYear=function(e){return de(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return de(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return de(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return de(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return de(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return de(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return de(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},a.assertValidZoneId=function(t,r){try{Intl.DateTimeFormat(void 0,{timeZone:r})}catch(e){throw(0,oe.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(r,'"'))}},a.floorDiv=he,a.floorMod=be;var ve=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}),s=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)&&ve(t,e,r);return me(t,e),t},ge=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(i,"__esModule",{value:!0}),i.isDateTime=i.DateTime=i.isLocalDateTime=i.LocalDateTime=i.isDate=i.Date=i.isTime=i.Time=i.isLocalTime=i.LocalTime=i.isDuration=i.Duration=void 0,s(o)),Oe=u,we=t,Ee=s(n),s={value:!0,enumerable:!1,configurable:!1,writable:!1},Pe="__isDuration__",Se="__isLocalTime__",Te="__isTime__",je="__isDate__",Ce="__isLocalDateTime__",Ie="__isDateTime__",l=(Re.prototype.toString=function(){return c.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},Re);function Re(e,t,r,n){this.months=(0,Oe.assertNumberOrInteger)(e,"Months"),this.days=(0,Oe.assertNumberOrInteger)(t,"Days"),(0,Oe.assertNumberOrInteger)(r,"Seconds"),(0,Oe.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=c.normalizeSecondsForDuration(r,n),this.nanoseconds=c.normalizeNanosecondsForDuration(n),Object.freeze(this)}i.Duration=l,Object.defineProperty(l.prototype,Pe,s),i.isDuration=function(e){return Ue(e,Pe)};ke.fromStandardDate=function(e,t){Le(e,t);t=c.totalNanoseconds(e,t);return new ke(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof Ee.default?t.toInt():"bigint"==typeof t?(0,Ee.int)(t).toInt():t)},ke.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};l=ke;function ke(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)}i.LocalTime=l,Object.defineProperty(l.prototype,Se,s),i.isLocalTime=function(e){return Ue(e,Se)};Ae.fromStandardDate=function(e,t){return Le(e,t),new Ae(e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e))},Ae.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+c.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};l=Ae;function Ae(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,Oe.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}i.Time=l,Object.defineProperty(l.prototype,Te,s),i.isTime=function(e){return Ue(e,Te)};Me.fromStandardDate=function(e){return Le(e),new Me(e.getFullYear(),e.getMonth()+1,e.getDate())},Me.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Me.prototype.toString=function(){return c.dateToIsoString(this.year,this.month,this.day)};l=Me;function Me(e,t,r){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),Object.freeze(this)}i.Date=l,Object.defineProperty(l.prototype,je,s),i.isDate=function(e){return Ue(e,je)};Ne.fromStandardDate=function(e,t){return Le(e,t),new Ne(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(c.totalNanoseconds(e,t)))},Ne.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Ne.prototype.toString=function(){return De(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};l=Ne;function Ne(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)}i.LocalDateTime=l,Object.defineProperty(l.prototype,Ce,s),i.isLocalDateTime=function(e){return Ue(e,Ce)};xe.fromStandardDate=function(e,t){return Le(e,t),new xe(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e),null)},xe.prototype.toStandardDate=function(){return c.toStandardDate(this._toUTC())},xe.prototype.toString=function(){var e;return De(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,"]"):"")},xe.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,Ee.int)(e).multiply(1e3).add((0,Ee.int)(this.nanosecond).div(1e6)).toNumber()};l=xe;function xe(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=ge(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,Oe.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,Oe.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 Ue(e,t){return null!=e&&!0===e[t]}function De(e,t,r,n,o,i,u){return c.dateToIsoString(e,t,r)+"T"+c.timeToIsoString(n,o,i,u)}function Le(e,t){(0,Oe.assertValidDate)(e,"Standard date"),null!=t&&(0,Oe.assertNumberOrInteger)(t,"Nanosecond")}i.DateTime=l,Object.defineProperty(l.prototype,Ie,s),i.isDateTime=function(e){return Ue(e,Ie)};var l={},Fe=(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,Q),s={value:!0,enumerable:!1,configurable:!1,writable:!1},Be="__isNode__",We="__isRelationship__",ze="__isUnboundRelationship__",qe="__isPath__",Ve="__isPathSegment__";function He(e,t){return null!=e&&!0===e[t]}Ge.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,Fe.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var f=Ge;function Ge(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=Je(n,function(){return e.toString()})}l.Node=f,Object.defineProperty(f.prototype,Be,s),l.isNode=function(e){return He(e,Be)};Ke.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,Fe.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var Ye=Ke;function Ke(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=Je(i,function(){return e.toString()}),this.startNodeElementId=Je(u,function(){return t.toString()}),this.endNodeElementId=Je(a,function(){return r.toString()})}l.Relationship=Ye,Object.defineProperty(Ye.prototype,We,s),l.isRelationship=function(e){return He(e,We)};Ze.prototype.bind=function(e,t){return new Ye(this.identity,e,t,this.type,this.properties,this.elementId)},Ze.prototype.bindTo=function(e,t){return new Ye(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},Ze.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,Fe.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};f=Ze;function Ze(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=Je(n,function(){return e.toString()})}l.UnboundRelationship=f,Object.defineProperty(f.prototype,ze,s),l.isUnboundRelationship=function(e){return He(e,ze)};function Qe(e,t,r){this.start=e,this.relationship=t,this.end=r}l.PathSegment=Qe,Object.defineProperty(Qe.prototype,Ve,s),l.isPathSegment=function(e){return He(e,Ve)};function Xe(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function Je(e,t){return null==e?t():e}l.Path=Xe,Object.defineProperty(Xe.prototype,qe,s),l.isPath=function(e){return He(e,qe)};var f={},$e=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}}}},et=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.")},tt=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},rt=(Object.defineProperty(f,"__esModule",{value:!0}),t);function nt(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)}nt.prototype.forEach=function(e){var t,r;try{for(var n=et(this.entries()),o=n.next();!o.done;o=n.next()){var i=tt(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}}},nt.prototype.map=function(e){var t,r,n=[];try{for(var o=et(this.entries()),i=o.next();!i.done;i=o.next()){var u=tt(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},nt.prototype.entries=function(){var t;return $e(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]}})},nt.prototype.values=function(){var t;return $e(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]}})},nt.prototype[Symbol.iterator]=function(){var t;return $e(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]}})},nt.prototype.toObject=function(){var t,e,r={};try{for(var n=et(this.entries()),o=n.next();!o.done;o=n.next()){var i=tt(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},nt.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,rt.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,rt.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]},nt.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},f.default=nt;var s={},ot=(Object.defineProperty(s,"__esModule",{value:!0}),s.isPoint=s.Point=void 0,u),it="__isPoint__",p=(ut.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(at(this.srid),", x=").concat(at(this.x),", y=").concat(at(this.y),"}"):"Point{srid=".concat(at(this.srid),", x=").concat(at(this.x),", y=").concat(at(this.y),", z=").concat(at(this.z),"}")},ut);function ut(e,t,r,n){this.srid=(0,ot.assertNumberOrInteger)(e,"SRID"),this.x=(0,ot.assertNumber)(t,"X coordinate"),this.y=(0,ot.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,ot.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function at(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}s.Point=p,Object.defineProperty(p.prototype,it,{value:!0,enumerable:!1,configurable:!1,writable:!1}),s.isPoint=function(e){return null!=e&&!0===e[it]};var p={},st=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}),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)&&st(t,e,r);return ct(t,e),t},lt=(Object.defineProperty(p,"__esModule",{value:!0}),p.notificationCategory=p.notificationSeverityLevel=p.Stats=p.QueryStatistics=p.ProfiledPlan=p.Plan=p.Notification=p.ServerInfo=p.queryType=void 0,h(n)),h=(ft.prototype._buildNotifications=function(e){return null==e?[]:e.map(function(e){return new Ot(e)})},ft.prototype.hasPlan=function(){return this.plan instanceof pt},ft.prototype.hasProfile=function(){return this.profile instanceof dt},ft);function ft(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new bt(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new pt(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new dt(r.profile),this.notifications=this._buildNotifications(r.notifications),this.server=new Et(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 pt=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)}):[]},dt=(p.Plan=pt,ht.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},ht);function ht(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=St("dbHits",e),this.rows=St("rows",e),this.pageCacheMisses=St("pageCacheMisses",e),this.pageCacheHits=St("pageCacheHits",e),this.pageCacheHitRatio=St("pageCacheHitRatio",e),this.time=St("time",e),this.children=null!=e.children?e.children.map(function(e){return new ht(e)}):[]}p.ProfiledPlan=dt;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},yt.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)},yt.prototype.updates=function(){return this._stats},yt.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},yt.prototype.systemUpdates=function(){return this._systemUpdates};var bt=yt;function yt(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]=Pt(r[e]):"systemUpdates"===t?n._systemUpdates=Pt(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}p.QueryStatistics=bt;var _t={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},vt=(p.notificationSeverityLevel=_t,Object.freeze(_t),Object.values(_t)),mt={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",UNKNOWN:"UNKNOWN"},gt=(p.notificationCategory=mt,Object.freeze(mt),Object.values(mt)),Ot=(wt._constructPosition=function(e){return null==e?{}:{offset:Pt(e.offset),line:Pt(e.line),column:Pt(e.column)}},wt);function wt(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=wt._constructPosition(e.position),this.severityLevel=vt.includes(e.severity)?e.severity:_t.UNKNOWN,this.rawSeverityLevel=e.severity,this.category=gt.includes(e.category)?e.category:mt.UNKNOWN,this.rawCategory=e.category}p.Notification=Ot;var Et=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Pt(e){return e instanceof lt.default?e.toInt():"bigint"==typeof e?(0,lt.int)(e).toInt():e}function St(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?Pt(t[e]):r}p.ServerInfo=Et;function Tt(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,new Error("Not implemented")}p.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},p.default=h;var h={},jt=(Object.defineProperty(h,"__esModule",{value:!0}),h.notificationFilterDisabledCategory=h.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),jt=(h.notificationFilterMinimumSeverityLevel=jt,Object.freeze(jt),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC"}),jt=(h.notificationFilterDisabledCategory=jt,Object.freeze(jt),h.default=Tt,{}),b={},y={},Ct=(Object.defineProperty(y,"__esModule",{value:!0}),y.FailedObserver=y.CompletedObserver=void 0,It.prototype.subscribe=function(e){kt(e,e.onKeys,[]),kt(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 Error("CompletedObserver not supposed to call onError")},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 kt(e,t,r){null!=t&&t.bind(e)(r)}y.CompletedObserver=Ct,Rt.prototype.subscribe=function(e){kt(e,e.onError,this._error),this._observers.push(e)},Rt.prototype.onError=function(t){kt(this,this._beforeError,t),this._observers.forEach(function(e){return kt(e,e.onError,t)})},Rt.prototype.cancel=function(){},Rt.prototype.pause=function(){},Rt.prototype.resume=function(){},Rt.prototype.markCompleted=function(){},Rt.prototype.prepareToHandleSingleResponse=function(){},y.FailedObserver=Rt;var Ct={},At=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}),_=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)&&At(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))},Ut=(Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.Bookmarks=void 0,_(u)),_=(Dt.empty=function(){return Lt},Dt.prototype.isEmpty=function(){return 0===this._values.length},Dt.prototype.values=function(){return this._values},Dt.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},Dt.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},Dt);function Dt(e){this._values=function(e){if(null==e||""===e)return[];if(Ut.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(!Ut.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 Lt=new(Ct.Bookmarks=_)(null);var Ft,_={},v=(Object.defineProperty(_,"__esModule",{value:!0}),_.BOLT_PROTOCOL_V5_2=_.BOLT_PROTOCOL_V5_1=_.BOLT_PROTOCOL_V5_0=_.BOLT_PROTOCOL_V4_4=_.BOLT_PROTOCOL_V4_3=_.BOLT_PROTOCOL_V4_2=_.BOLT_PROTOCOL_V4_1=_.BOLT_PROTOCOL_V4_0=_.BOLT_PROTOCOL_V3=_.BOLT_PROTOCOL_V2=_.BOLT_PROTOCOL_V1=_.DEFAULT_POOL_MAX_SIZE=_.DEFAULT_POOL_ACQUISITION_TIMEOUT=_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=_.ACCESS_MODE_WRITE=_.ACCESS_MODE_READ=_.FETCH_ALL=void 0,_.FETCH_ALL=-1,_.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,_.DEFAULT_POOL_MAX_SIZE=100,_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,_.ACCESS_MODE_READ="READ",_.ACCESS_MODE_WRITE="WRITE",_.BOLT_PROTOCOL_V1=1,_.BOLT_PROTOCOL_V2=2,_.BOLT_PROTOCOL_V3=3,_.BOLT_PROTOCOL_V4_0=4,_.BOLT_PROTOCOL_V4_1=4.1,_.BOLT_PROTOCOL_V4_2=4.2,_.BOLT_PROTOCOL_V4_3=4.3,_.BOLT_PROTOCOL_V4_4=4.4,_.BOLT_PROTOCOL_V5_0=5,_.BOLT_PROTOCOL_V5_1=5.1,_.BOLT_PROTOCOL_V5_2=5.2,{}),Bt=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=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(v,"__esModule",{value:!0}),v.EMPTY_CONNECTION_HOLDER=v.ReadOnlyConnectionHolder=v.ConnectionHolder=void 0,t),Vt=u,Ht=_,Gt=Ct,m=(Yt.prototype.mode=function(){return this._mode},Yt.prototype.database=function(){return this._database},Yt.prototype.setDatabase=function(e){this._database=e},Yt.prototype.bookmarks=function(){return this._bookmarks},Yt.prototype.connectionProvider=function(){return this._connectionProvider},Yt.prototype.referenceCount=function(){return this._referenceCount},Yt.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},Yt.prototype._createConnectionPromise=function(o){return Wt(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)])];case 2:return[2,e.sent()]}})})},Yt.prototype._getBookmarks=function(){return Wt(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()]}})})},Yt.prototype.getConnection=function(){return this._connectionPromise},Yt.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},Yt.prototype.close=function(e){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},Yt.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(Jt).then(function(){return e._release().then(function(){return null})}):e._release().then(function(){return null}):Promise.resolve(null)}).catch(Jt),this._connectionPromise},Yt);function Yt(e){var e=void 0===e?{}:e,t=e.mode,t=void 0===t?Ht.ACCESS_MODE_WRITE:t,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,e=e.getConnectionAcquistionBookmarks;this._mode=t,this._database=null!=r?(0,Vt.assertString)(r,"database"):"",this._bookmarks=null!=n?n:Gt.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._getConnectionAcquistionBookmarks=null!=e?e:function(){return Promise.resolve(Gt.Bookmarks.empty())}}v.ConnectionHolder=m;Bt(Qt,Kt=m),Qt.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},Qt.prototype.getConnection=function(){return this._connectionHolder.getConnection()},Qt.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},Qt.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var Kt,Zt,g=Qt;function Qt(e){var t=Kt.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider()})||this;return t._connectionHolder=e,t}function Xt(){return null!==Zt&&Zt.apply(this,arguments)||this}v.ReadOnlyConnectionHolder=g,v.default=g,Bt(Xt,Zt=m),Xt.prototype.mode=function(){},Xt.prototype.database=function(){},Xt.prototype.initializeConnection=function(){return!0},Xt.prototype.getConnection=function(){return Wt(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()]}})})},Xt.prototype.releaseConnection=function(){return Wt(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()]}})})},Xt.prototype.close=function(){return Wt(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 Xt;function Jt(e){return null}v.EMPTY_CONNECTION_HOLDER=g;var Bt={},$t=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),er=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),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)&&$t(t,e,r);return er(t,e),t},tr=(Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.TxConfig=void 0,m(u)),rr=t,nr=n,g=(or.empty=function(){return ir},or.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},or);function or(e){var t;null!=(t=e)&&tr.assertObject(t,"Transaction config"),this.timeout=function(e){if(tr.isObject(e)&&null!=e.timeout){tr.assertNumberOrInteger(e.timeout,"Transaction timeout");e=(0,nr.int)(e.timeout);if(e.isNegative())throw(0,rr.newError)("Transaction timeout should not be negative");return e}return null}(e),this.metadata=function(e){if(tr.isObject(e)&&null!=e.metadata){e=e.metadata;if(tr.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var ir=new(Bt.TxConfig=g)({});var m={},ur=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())})},ar=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}}}},sr=(Object.defineProperty(m,"__esModule",{value:!0}),m.TransactionExecutor=void 0,t);function cr(e,t,r,n){this._maxRetryTimeMs=lr(e,3e4),this._initialRetryDelayMs=lr(t,1e3),this._multiplier=lr(r,2),this._jitterFactor=lr(n,.2),this._inFlightTimeoutIds=[],this._verifyAfterConstruction()}function lr(e,t){return null!=e?e:t}cr.prototype.execute=function(n,o,i){var u=this;return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i)})},cr.prototype.close=function(){this._inFlightTimeoutIds.forEach(function(e){return clearTimeout(e)}),this._inFlightTimeoutIds=[]},cr.prototype._retryTransactionPromise=function(o,i,e,r,u,a){var s=this;return Date.now()-r>this._maxRetryTimeMs||!(0,sr.isRetriableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=s._computeDelayWithJitter(u),n=setTimeout(function(){s._inFlightTimeoutIds=s._inFlightTimeoutIds.filter(function(e){return e!==n}),s._executeTransactionInsidePromise(o,i,e,t,a).catch(t)},r);s._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*s._multiplier;return s._retryTransactionPromise(o,i,e,r,t,a)})},cr.prototype._executeTransactionInsidePromise=function(o,i,u,a,s){return ur(this,void 0,void 0,function(){var t,r,n=this;return ar(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,o()];case 1:return t=e.sent(),[3,3];case 2:return r=e.sent(),a(r),[2];case 3:return r=(null!=s?s:function(e){return e})(t),this._safeExecuteTransactionWork(r,i).then(function(e){return n._handleTransactionWorkSuccess(e,t,u,a)}).catch(function(e){return n._handleTransactionWorkFailure(e,t,a)}),[2]}})})},cr.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},cr.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},cr.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},cr.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},cr.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,sr.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,sr.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,sr.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,sr.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},m.TransactionExecutor=cr;var fr,pr,g={},O=r&&r.__extends||(fr=function(e,t){return(fr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}fr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),dr=(Object.defineProperty(g,"__esModule",{value:!0}),g.Logger=void 0,t),hr="error",br="warn",yr="info",_r="debug",vr=((w={})[hr]=0,w[br]=1,w[yr]=2,w[_r]=3,w),w=(mr.create=function(e){return null!=(null==e?void 0:e.logging)?new mr(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=vr[e];if(null!=t||0===t)return e;throw(0,dr.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(vr).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,dr.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},mr.noOp=function(){return Or},mr.prototype.isErrorEnabled=function(){return wr(this._level,hr)},mr.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(hr,e)},mr.prototype.isWarnEnabled=function(){return wr(this._level,br)},mr.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(br,e)},mr.prototype.isInfoEnabled=function(){return wr(this._level,yr)},mr.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(yr,e)},mr.prototype.isDebugEnabled=function(){return wr(this._level,_r)},mr.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(_r,e)},mr);function mr(e,t){this._level=e,this._loggerFunction=t}function gr(){return pr.call(this,yr,function(e,t){})||this}g.Logger=w,O(gr,pr=w),gr.prototype.isErrorEnabled=function(){return!1},gr.prototype.error=function(e){},gr.prototype.isWarnEnabled=function(){return!1},gr.prototype.warn=function(e){},gr.prototype.isInfoEnabled=function(){return!1},gr.prototype.info=function(e){},gr.prototype.isDebugEnabled=function(){return!1},gr.prototype.debug=function(e){};var Or=new gr;function wr(e,t){return vr[e]>=vr[t]}var O={},Er=r&&r.__assign||function(){return(Er=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)},Pr=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},Sr=(Object.defineProperty(O,"__esModule",{value:!0}),O.Url=O.formatIPv6Address=O.formatIPv4Address=O.defaultPortForScheme=O.parseDatabaseUrl=void 0,u),Tr=7687,jr=7474,Cr=7473,Ir=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Rr(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function kr(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 Ar(e){return"http"===e?jr:"https"===e?Cr:Tr}O.Url=Ir,O.parseDatabaseUrl=function(e){(0,Sr.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]),Pr((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=Er(Er({},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(":")?kr(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)?Ar(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=Rr(e[0],"key",r),e=Rr(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)?Pr(t.split("?"),2)[1]:null,e);return new Ir(n,o,u,i,r)},O.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},O.formatIPv6Address=function(e,t){return e=kr(e),"".concat(e,":").concat(t)},O.defaultPortForScheme=Ar;var w={},Mr=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]}),Nr=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)&&Mr(t,e,r);return Nr(t,e),t},xr=(Object.defineProperty(w,"__esModule",{value:!0}),w.ServerAddress=void 0,u),Ur=E(O);function Dr(e,t,r,n){this._host=(0,xr.assertString)(e,"host"),this._resolved=null!=t?(0,xr.assertString)(t,"resolved"):null,this._port=(0,xr.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Dr.prototype.host=function(){return this._host},Dr.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Dr.prototype.port=function(){return this._port},Dr.prototype.resolveWith=function(e){return new Dr(this._host,e,this._port,this._hostPort)},Dr.prototype.asHostPort=function(){return this._hostPort},Dr.prototype.asKey=function(){return this._hostPort},Dr.prototype.toString=function(){return this._stringValue},Dr.fromUrl=function(e){e=Ur.parseDatabaseUrl(e);return new Dr(e.host,null,e.port,e.hostAndPort)},w.ServerAddress=Dr;var E={},Lr={};function Fr(){}Object.defineProperty(Lr,"__esModule",{value:!0}),Fr.prototype.resolve=function(){throw new Error("Abstract function")},Fr.prototype._resolveToItself=function(e){return Promise.resolve([e])},Lr.default=Fr;var P={},Br=(Object.defineProperty(P,"__esModule",{value:!0}),w);function Wr(e){return Promise.resolve([e])}function zr(e){this._resolverFunction=null!=e?e:Wr}zr.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 Br.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))})},P.default=zr;function qr(e){console.log("Uncaught error when processing result: "+e)}function Vr(e){}function Hr(e){}var Gr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Lr=(Object.defineProperty(E,"__esModule",{value:!0}),E.ConfiguredCustomResolver=E.BaseHostNameResolver=void 0,Gr(Lr)),Lr=(E.BaseHostNameResolver=Lr.default,Gr(P)),Yr=(E.ConfiguredCustomResolver=Lr.default,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]})),Kr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Gr=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)&&Yr(t,e,r);return Kr(t,e),t},Lr=(Object.defineProperty(b,"__esModule",{value:!0}),b.objectUtil=b.resolver=b.serverAddress=b.urlUtil=b.logger=b.transactionExecutor=b.txConfig=b.connectionHolder=b.constants=b.bookmarks=b.observer=b.temporalUtil=b.util=void 0,Gr(u)),Lr=(b.util=Lr,Gr(o)),o=(b.temporalUtil=Lr,Gr(y)),Lr=(b.observer=o,Gr(Ct)),o=(b.bookmarks=Lr,Gr(_)),Lr=(b.constants=o,Gr(v)),o=(b.connectionHolder=Lr,Gr(Bt)),Lr=(b.txConfig=o,Gr(m)),o=(b.transactionExecutor=Lr,Gr(g)),Lr=(b.logger=o,Gr(O)),o=(b.urlUtil=Lr,Gr(w)),O=(b.serverAddress=o,Gr(E)),Lr=(b.resolver=O,Gr(X)),Zr=(b.objectUtil=Lr,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}}}},w=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xr=(Object.defineProperty(jt,"__esModule",{value:!0}),w(p)),Jr=b,$r=t,en=Jr.connectionHolder.EMPTY_CONNECTION_HOLDER;function tn(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),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:en,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}tn.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)})},tn.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)})},tn.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},tn.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,$r.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return Zr(n,void 0,void 0,function(){var t;return Qr(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,$r.newError)("InvalidState: Result stream finished without Summary",$r.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 Zr(n,void 0,void 0,function(){var t;return Qr(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 Zr(n,void 0,void 0,function(){var t;return Qr(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 Zr(n,void 0,void 0,function(){return Qr(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()]}})})}}},tn.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},tn.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},tn.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},tn.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},tn.prototype.isOpen=function(){return null===this._summary&&null===this._error},tn.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)})},tn.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:Vr,i=null!=(e=n.onError)?e:qr,r=null!=(e=n.onKeys)?e:Hr;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)}}},tn.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},tn.prototype._releaseConnectionAndGetSummary=function(t){var e=Jr.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(t){return o.releaseConnection().then(function(){var e;return null==(e=null==t?void 0:t.protocol())?void 0:e.version})},function(e){}).then(function(e){return new Xr.default(r,n,t,e)})},tn.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 Zr(this,void 0,void 0,function(){var t;return Qr(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,$r.newError)("Unexpected empty buffer",$r.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 Zr(e,void 0,void 0,function(){var t;return Qr(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 Zr(e,void 0,void 0,function(){var t,r;return Qr(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},jt.default=tn;o={};Object.defineProperty(o,"__esModule",{value:!0});o.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};E={};function rn(){}Object.defineProperty(E,"__esModule",{value:!0}),rn.prototype.acquireConnection=function(e){throw Error("Not implemented")},rn.prototype.supportsMultiDb=function(){throw Error("Not implemented")},rn.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},rn.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},rn.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},rn.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},rn.prototype.close=function(){throw Error("Not implemented")},E.default=rn;O={};function nn(){}Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(nn.prototype,"id",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"databaseId",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"server",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"address",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"version",{get:function(){},enumerable:!1,configurable:!0}),nn.prototype.isOpen=function(){return!1},nn.prototype.protocol=function(){throw Error("Not implemented")},nn.prototype.connect=function(e,t){throw Error("Not implemented")},nn.prototype.write=function(e,t,r){throw Error("Not implemented")},nn.prototype.resetAndFlush=function(){throw Error("Not implemented")},nn.prototype.hasOngoingObservableRequests=function(){throw Error("Not implemented")},nn.prototype.close=function(){throw Error("Not implemented")},nn.prototype._release=function(){return Promise.resolve()},O.default=nn;var Gr={},on=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},un=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={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}}}},X=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},an=(Object.defineProperty(Gr,"__esModule",{value:!0}),u),sn=v,cn=Ct,ln=Bt,fn=y,pn=t,dn=X(jt);function hn(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,e=e.notificationFilter,l=this;this._connectionHolder=t,this._reactive=i,this._state=bn.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=cn.Bookmarks.empty(),this._notificationFilter=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){l._acceptActive=e})}hn.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return on(t,void 0,void 0,function(){var t,r=this;return un(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.protocol().beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,beforeError:function(e){return null!=u&&u.onError(e),r._onError(e)},afterComplete:function(e){return null!=u&&u.onComplete(e),r._onComplete(e)}})];case 2:throw(0,pn.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},hn.prototype.run=function(e,t){e=(0,an.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},hn.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)}})})},hn.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)}})})},hn.prototype.isOpen=function(){return this._state===bn.ACTIVE},hn.prototype.close=function(){return on(this,void 0,void 0,function(){return un(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]}})})},hn.prototype._onErrorCallback=function(){return this._state=bn.FAILED,this._onClose(),this._connectionHolder.releaseConnection()},hn.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new cn.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:cn.Bookmarks.empty(),null==e?void 0:e.db)};var bn={ACTIVE:{commit:function(e){return{result:yn(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:bn.SUCCEEDED}},rollback:function(e){return{result:yn(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:bn.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 _n(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.protocol().run(t,r,{bookmarks:cn.Bookmarks.empty(),txConfig:ln.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,pn.newError)("No connection available")}).catch(function(e){return new fn.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:_n(new fn.FailedObserver({error:(0,pn.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:bn.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:_n(new fn.CompletedObserver,"ROLLBACK",{},t,0,0),state:bn.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,_n(new fn.FailedObserver({error:(0,pn.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:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},sn.EMPTY_CONNECTION_HOLDER,0,0),state:bn.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},sn.EMPTY_CONNECTION_HOLDER,0,0),state:bn.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,_n(new fn.FailedObserver({error:(0,pn.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:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:bn.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:bn.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function yn(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.protocol().commitTransaction({beforeError:n,afterComplete:o}):t.protocol().rollbackTransaction({beforeError:n,afterComplete:o});throw(0,pn.newError)("No connection available")})}).catch(function(e){return new fn.FailedObserver({error:e,onError:n})});return new dn.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function _n(e,t,r,n,o,i){return void 0===n&&(n=sn.EMPTY_CONNECTION_HOLDER),new dn.default(Promise.resolve(e),t,r,new sn.ReadOnlyConnectionHolder(null!=n?n:sn.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}Gr.default=hn;Lr={};function vn(e){e=e.run;this._run=e}Object.defineProperty(Lr,"__esModule",{value:!0}),vn.fromTransaction=function(e){return new vn({run:e.run.bind(e)})},vn.prototype.run=function(e,t){return this._run(e,t)},Lr.default=vn;var mn,gn,On,w={},X=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)}),wn=r&&r.__assign||function(){return(wn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},S=(Object.defineProperty(w,"__esModule",{value:!0}),S(Gr)),S=(On=S.default,X(En,On),En.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},En.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},En.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},En.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},En.prototype._toTransaction=function(){return wn(wn({},this),{run:On.prototype.run.bind(this),commit:On.prototype.commit.bind(this),rollback:On.prototype.rollback.bind(this),close:On.prototype.close.bind(this),isOpen:On.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},En.prototype._begin=function(e,t){return On.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},En.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},En.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},En);function En(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,e=e.notificationFilter,t=On.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:e})||this;return t[gn]="TransactionPromise",t}gn=Symbol.toStringTag,w.default=S;var X={},Pn=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Sn=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}}}},Tn=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},jn=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))},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cn=(Object.defineProperty(X,"__esModule",{value:!0}),y),In=u,Rn=_,kn=t,An=S(jt),Mn=v,Nn=m,xn=Ct,Un=Bt,Dn=S(w),Ln=S(Lr);function Fn(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,e=e.notificationFilter,t=(this._mode=t,this._database=o,this._reactive=u,this._fetchSize=a,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new Mn.ConnectionHolder({mode:Rn.ACCESS_MODE_READ,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks}),this._writeConnectionHolder=new Mn.ConnectionHolder({mode:Rn.ACCESS_MODE_WRITE,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:xn.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Nn.TransactionExecutor(e)}(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=e}Fn.prototype.run=function(e,t,r){var o=this,e=(0,In.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Un.TxConfig(r):Un.TxConfig.empty(),t=this._run(i,u,function(n){return Pn(o,void 0,void 0,function(){var t,r=this;return Sn(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.protocol().run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,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})]}})})});return this._results.push(t),t},Fn.prototype._run=function(e,t,r){var n=this._connectionHolderWithMode(this._mode),o=this._open?!this._hasTx&&n.initializeConnection()?n.getConnection().then(function(e){return r(e)}).catch(function(e){return Promise.resolve(new Cn.FailedObserver({error:e}))}):Promise.resolve(new Cn.FailedObserver({error:(0,kn.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.resolve(new Cn.FailedObserver({error:(0,kn.newError)("Cannot run query in a closed session.")})),i={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new An.default(o,e,t,n,i)},Fn.prototype._acquireConnection=function(t){var e=this,r=this._connectionHolderWithMode(this._mode),n=this._open?!this._hasTx&&r.initializeConnection()?r.getConnection().then(function(e){return t(e)}).then(function(t){return Pn(e,void 0,void 0,function(){return Sn(this,function(e){switch(e.label){case 0:return[4,r.releaseConnection()];case 1:return e.sent(),[2,t]}})})}):Promise.reject((0,kn.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,kn.newError)("Cannot run query in a closed session."));return n},Fn.prototype.beginTransaction=function(e){var t=Un.TxConfig.empty();return null!=e&&(t=new Un.TxConfig(e)),this._beginTransaction(this._mode,t)},Fn.prototype._beginTransaction=function(e,t){var n=this;if(!this._open)throw(0,kn.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,kn.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=Fn._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(),this._hasTx=!0,e=new Dn.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});return e._begin(function(){return n._bookmarks()},t),e},Fn.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,kn.newError)("You cannot run more transactions on a closed session.")},Fn.prototype._transactionClosed=function(){this._hasTx=!1},Fn.prototype.lastBookmark=function(){return this.lastBookmarks()},Fn.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},Fn.prototype._bookmarks=function(){var r;return Pn(this,void 0,void 0,function(){var t;return Sn(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 xn.Bookmarks(jn(jn([],Tn(t),!1),Tn(this._configuredBookmarks),!1))]}})})},Fn.prototype.readTransaction=function(e,t){t=new Un.TxConfig(t);return this._runTransaction(Rn.ACCESS_MODE_READ,t,e)},Fn.prototype.writeTransaction=function(e,t){t=new Un.TxConfig(t);return this._runTransaction(Rn.ACCESS_MODE_WRITE,t,e)},Fn.prototype._runTransaction=function(e,t,r){var n=this;return this._transactionExecutor.execute(function(){return n._beginTransaction(e,t)},r)},Fn.prototype.executeRead=function(e,t){t=new Un.TxConfig(t);return this._executeInTransaction(Rn.ACCESS_MODE_READ,t,e)},Fn.prototype.executeWrite=function(e,t){t=new Un.TxConfig(t);return this._executeInTransaction(Rn.ACCESS_MODE_WRITE,t,e)},Fn.prototype._executeInTransaction=function(e,t,r){var n=this;return this._transactionExecutor.execute(function(){return n._beginTransaction(e,t)},r,Ln.default.fromTransaction)},Fn.prototype._onDatabaseNameResolved=function(e){this._databaseNameResolved||(this._database=e=null!=e?e:"",this._readConnectionHolder.setDatabase(e),this._writeConnectionHolder.setDatabase(e),this._databaseNameResolved=!0)},Fn.prototype._getConnectionAcquistionBookmarks=function(){var r;return Pn(this,void 0,void 0,function(){var t;return Sn(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 xn.Bookmarks(jn(jn([],Tn(this._configuredBookmarks),!1),Tn(t),!1))]}})})},Fn.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:[]),this._lastBookmarks=e,this._configuredBookmarks=xn.Bookmarks.empty())},Fn.prototype.close=function(){return Pn(this,void 0,void 0,function(){return Sn(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]}})})},Fn.prototype._connectionHolderWithMode=function(e){if(e===Rn.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===Rn.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,kn.newError)("Unknown access mode: "+e)},Fn.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new xn.Bookmarks(e.bookmark),t,e.db)},Fn.prototype._calculateWatermaks=function(){return this._fetchSize===Rn.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},Fn._validateSessionMode=function(e){e=null!=e?e:Rn.ACCESS_MODE_WRITE;if(e!==Rn.ACCESS_MODE_READ&&e!==Rn.ACCESS_MODE_WRITE)throw(0,kn.newError)("Illegal session mode "+e);return e},X.default=Fn;var y={},v={},Bn=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())})},Wn=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=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.")},qn=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},Vn=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))},m=(Object.defineProperty(v,"__esModule",{value:!0}),v.bookmarkManager=void 0,Hn.prototype.updateBookmarks=function(e,t){return Bn(this,void 0,void 0,function(){return Wn(this,function(e){throw new Error("Not implemented")})})},Hn.prototype.getBookmarks=function(){return Bn(this,void 0,void 0,function(){return Wn(this,function(e){throw new Error("Not implemented")})})},Hn);function Hn(){throw new Error("Not implemented")}v.default=m,v.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new Gn(t,e.bookmarksSupplier,e.bookmarksConsumer)};Yn.prototype.updateBookmarks=function(f,p){return Bn(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return Wn(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=zn(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=zn(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(Vn([],qn(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Yn.prototype.getBookmarks=function(){var s;return Bn(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return Wn(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=zn(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,Vn([],qn(t),!1)]}})})};var Gn=Yn;function Yn(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var Bt={},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())})},Zn=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}},Qn=(Object.defineProperty(Bt,"__esModule",{value:!0}),S(o)),Xn=t;function Jn(o){return Kn(this,void 0,void 0,function(){var t,r,n;return Zn(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 Qn.default(n,r,t)]}})})}function $n(){}$n.prototype.eagerResultTransformer=function(){return Jn},$n.prototype.mappedResultTransformer=function(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,Xn.newError)("Requires a map or/and a collect functions.");return function(o){return Kn(e,void 0,void 0,function(){return Zn(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()]}})})}};var m=new $n,S=(Object.freeze(m),Bt.default=m,{}),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}}}};function ro(e){this._createSession=e}Object.defineProperty(S,"__esModule",{value:!0}),ro.prototype.execute=function(o,i,u){return eo(this,void 0,void 0,function(){var t,n=this;return to(this,function(e){switch(e.label){case 0:t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser}),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READERS"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return eo(n,void 0,void 0,function(){var t;return to(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})})];case 2:return[2,e.sent()];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},S.default=ro;function no(){this.routing=wo.WRITERS,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0}var 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}}}},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},uo=(Object.defineProperty(y,"__esModule",{value:!0}),y.QueryConfig=y.SessionConfig=y.routing=y.WRITE=y.READ=y.Driver=void 0,Ct),ao=m(P),so=_,co=g,lo=m(X),fo=u,po=v,ho=m(Bt),bo=m(S),yo=t,_o=36e5,vo=1e3,mo=so.ACCESS_MODE_READ,go=(y.READ=mo,so.ACCESS_MODE_WRITE),Oo=(y.WRITE=go,0),wo=(y.SessionConfig=function(){this.defaultAccessMode=go,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0},{WRITERS:"WRITERS",READERS:"READERS"}),Ct=(y.routing=wo,Object.freeze(wo),y.QueryConfig=no,Object.defineProperty(Eo.prototype,"defaultExecuteQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Eo.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),oo(this,void 0,void 0,function(){var t,r,n;return io(this,function(e){switch(e.label){case 0:if(t=null===u.bookmarkManager?void 0:null!=(a=u.bookmarkManager)?a:this.defaultExecuteQueryBookmarkManager,r=null!=(a=u.resultTransformer)?a:ho.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:wo.WRITERS)!==wo.READERS&&n!==wo.WRITERS)throw(0,yo.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser},o,i)];case 1:return[2,e.sent()]}})})},Eo.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:mo})},Eo.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:mo})},Eo.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Eo.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Eo.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Eo.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Eo.prototype.isEncrypted=function(){return this._isEncrypted()},Eo.prototype._supportsRouting=function(){return this._meta.routing},Eo.prototype._isEncrypted=function(){return this._config.encrypted===fo.ENCRYPTION_ON||!0===this._config.encrypted},Eo.prototype._getTrust=function(){return this._config.trust},Eo.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,e=e.notificationFilter;return this._newSession({defaultAccessMode:void 0===t?go:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:So(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:e})},Eo.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Eo.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Eo.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,e=e.notificationFilter,t=lo.default._validateSessionMode(t),s=this._getOrCreateConnectionProvider(),r=null!=r?new uo.Bookmarks(r):uo.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:s,bookmarks:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:e})},Eo.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new ao.default(e.resolver)))),this._connectionProvider},Eo);function Eo(e,t,r,n,o){void 0===n&&(n=function(e){return new lo.default(e)}),void 0===o&&(o=function(e){return new bo.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=Po(i.maxConnectionLifetime,_o),i.maxConnectionPoolSize=Po(i.maxConnectionPoolSize,so.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=Po(i.connectionAcquisitionTimeout,so.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=So(i.fetchSize,vo),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?so.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i);var i=co.Logger.create(t),u=t,a=i,s=u.resolver;if(null!=s&&"function"!=typeof s)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof s));u.connectionAcquisitionTimeout<u.connectionTimeout&&a.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'),this._id=Oo++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,po.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}function Po(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function So(e,t){e=parseInt(e,10);if(0<e||e===so.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(so.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}y.Driver=Ct,y.default=Ct;P={};function To(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Object.defineProperty(P,"__esModule",{value:!0}),P.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}},custom:function(e,t,r,n,o){n={scheme:n,principal:e};return To(t)&&(n.credentials=t),To(r)&&(n.realm=r),To(o)&&(n.parameters=o),n}};var jo,Co,Io,Ro,ko,Ao,Mo,No,xo,Uo,Do,_={},Gr=(Object.defineProperty(_,"__esModule",{value:!0}),g=e,jo=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]}),Co=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)&&jo(t,e,r);return Co(t,e),t},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(g,"__esModule",{value:!0}),g.ManagedTransaction=g.Transaction=g.Connection=g.ConnectionProvider=g.EagerResult=g.Result=g.Stats=g.QueryStatistics=g.ProfiledPlan=g.Plan=g.Notification=g.ServerInfo=g.queryType=g.ResultSummary=g.Record=g.isPathSegment=g.PathSegment=g.isPath=g.Path=g.isUnboundRelationship=g.UnboundRelationship=g.isRelationship=g.Relationship=g.isNode=g.Node=g.Time=g.LocalTime=g.LocalDateTime=g.isTime=g.isLocalTime=g.isLocalDateTime=g.isDuration=g.isDateTime=g.isDate=g.Duration=g.DateTime=g.Date=g.Point=g.isPoint=g.internal=g.toString=g.toNumber=g.inSafeRange=g.isInt=g.int=g.Integer=g.error=g.isRetriableError=g.Neo4jError=g.newError=void 0,g.notificationFilterMinimumSeverityLevel=g.notificationFilterDisabledCategory=g.notificationSeverityLevel=g.notificationCategory=g.resultTransformers=g.routing=g.bookmarkManager=g.auth=g.json=g.driver=g.types=g.Driver=g.Session=g.TransactionPromise=void 0,Io=t,Object.defineProperty(g,"newError",{enumerable:!0,get:function(){return Io.newError}}),Object.defineProperty(g,"Neo4jError",{enumerable:!0,get:function(){return Io.Neo4jError}}),Object.defineProperty(g,"isRetriableError",{enumerable:!0,get:function(){return Io.isRetriableError}}),Ro=u(n),g.Integer=Ro.default,Object.defineProperty(g,"int",{enumerable:!0,get:function(){return Ro.int}}),Object.defineProperty(g,"isInt",{enumerable:!0,get:function(){return Ro.isInt}}),Object.defineProperty(g,"inSafeRange",{enumerable:!0,get:function(){return Ro.inSafeRange}}),Object.defineProperty(g,"toNumber",{enumerable:!0,get:function(){return Ro.toNumber}}),Object.defineProperty(g,"toString",{enumerable:!0,get:function(){return Ro.toString}}),ko=i,Object.defineProperty(g,"Date",{enumerable:!0,get:function(){return ko.Date}}),Object.defineProperty(g,"DateTime",{enumerable:!0,get:function(){return ko.DateTime}}),Object.defineProperty(g,"Duration",{enumerable:!0,get:function(){return ko.Duration}}),Object.defineProperty(g,"isDate",{enumerable:!0,get:function(){return ko.isDate}}),Object.defineProperty(g,"isDateTime",{enumerable:!0,get:function(){return ko.isDateTime}}),Object.defineProperty(g,"isDuration",{enumerable:!0,get:function(){return ko.isDuration}}),Object.defineProperty(g,"isLocalDateTime",{enumerable:!0,get:function(){return ko.isLocalDateTime}}),Object.defineProperty(g,"isLocalTime",{enumerable:!0,get:function(){return ko.isLocalTime}}),Object.defineProperty(g,"isTime",{enumerable:!0,get:function(){return ko.isTime}}),Object.defineProperty(g,"LocalDateTime",{enumerable:!0,get:function(){return ko.LocalDateTime}}),Object.defineProperty(g,"LocalTime",{enumerable:!0,get:function(){return ko.LocalTime}}),Object.defineProperty(g,"Time",{enumerable:!0,get:function(){return ko.Time}}),Ao=l,Object.defineProperty(g,"Node",{enumerable:!0,get:function(){return Ao.Node}}),Object.defineProperty(g,"isNode",{enumerable:!0,get:function(){return Ao.isNode}}),Object.defineProperty(g,"Relationship",{enumerable:!0,get:function(){return Ao.Relationship}}),Object.defineProperty(g,"isRelationship",{enumerable:!0,get:function(){return Ao.isRelationship}}),Object.defineProperty(g,"UnboundRelationship",{enumerable:!0,get:function(){return Ao.UnboundRelationship}}),Object.defineProperty(g,"isUnboundRelationship",{enumerable:!0,get:function(){return Ao.isUnboundRelationship}}),Object.defineProperty(g,"Path",{enumerable:!0,get:function(){return Ao.Path}}),Object.defineProperty(g,"isPath",{enumerable:!0,get:function(){return Ao.isPath}}),Object.defineProperty(g,"PathSegment",{enumerable:!0,get:function(){return Ao.PathSegment}}),Object.defineProperty(g,"isPathSegment",{enumerable:!0,get:function(){return Ao.isPathSegment}}),S=m(f),g.Record=S.default,Mo=s,Object.defineProperty(g,"isPoint",{enumerable:!0,get:function(){return Mo.isPoint}}),Object.defineProperty(g,"Point",{enumerable:!0,get:function(){return Mo.Point}}),No=u(p),g.ResultSummary=No.default,Object.defineProperty(g,"queryType",{enumerable:!0,get:function(){return No.queryType}}),Object.defineProperty(g,"ServerInfo",{enumerable:!0,get:function(){return No.ServerInfo}}),Object.defineProperty(g,"Notification",{enumerable:!0,get:function(){return No.Notification}}),Object.defineProperty(g,"Plan",{enumerable:!0,get:function(){return No.Plan}}),Object.defineProperty(g,"ProfiledPlan",{enumerable:!0,get:function(){return No.ProfiledPlan}}),Object.defineProperty(g,"QueryStatistics",{enumerable:!0,get:function(){return No.QueryStatistics}}),Object.defineProperty(g,"Stats",{enumerable:!0,get:function(){return No.Stats}}),Object.defineProperty(g,"notificationCategory",{enumerable:!0,get:function(){return No.notificationCategory}}),Object.defineProperty(g,"notificationSeverityLevel",{enumerable:!0,get:function(){return No.notificationSeverityLevel}}),xo=h,Object.defineProperty(g,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return xo.notificationFilterDisabledCategory}}),Object.defineProperty(g,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return xo.notificationFilterMinimumSeverityLevel}}),Ct=m(jt),g.Result=Ct.default,t=m(o),g.EagerResult=t.default,n=m(E),g.ConnectionProvider=n.default,n=m(O),g.Connection=n.default,i=m(Gr),g.Transaction=i.default,l=m(Lr),g.ManagedTransaction=l.default,f=m(w),g.TransactionPromise=f.default,s=m(X),g.Session=s.default,p=u(y),h=p,g.Driver=p.default,g.driver=h,jt=m(P),g.auth=jt.default,Uo=v,Object.defineProperty(g,"bookmarkManager",{enumerable:!0,get:function(){return Uo.bookmarkManager}}),Do=y,Object.defineProperty(g,"routing",{enumerable:!0,get:function(){return Do.routing}}),o=u(_),g.types=o,E=u(Q),g.json=E,m=m(Bt),g.resultTransformers=m.default,u=u(b),g.internal=u,O={SERVICE_UNAVAILABLE:Io.SERVICE_UNAVAILABLE,SESSION_EXPIRED:Io.SESSION_EXPIRED,PROTOCOL_ERROR:Io.PROTOCOL_ERROR},g.error=O,O={newError:Io.newError,Neo4jError:Io.Neo4jError,isRetriableError:Io.isRetriableError,error:O,Integer:Ro.default,int:Ro.int,isInt:Ro.isInt,inSafeRange:Ro.inSafeRange,toNumber:Ro.toNumber,toString:Ro.toString,internal:u,isPoint:Mo.isPoint,Point:Mo.Point,Date:ko.Date,DateTime:ko.DateTime,Duration:ko.Duration,isDate:ko.isDate,isDateTime:ko.isDateTime,isDuration:ko.isDuration,isLocalDateTime:ko.isLocalDateTime,isLocalTime:ko.isLocalTime,isTime:ko.isTime,LocalDateTime:ko.LocalDateTime,LocalTime:ko.LocalTime,Time:ko.Time,Node:Ao.Node,isNode:Ao.isNode,Relationship:Ao.Relationship,isRelationship:Ao.isRelationship,UnboundRelationship:Ao.UnboundRelationship,isUnboundRelationship:Ao.isUnboundRelationship,Path:Ao.Path,isPath:Ao.isPath,PathSegment:Ao.PathSegment,isPathSegment:Ao.isPathSegment,Record:S.default,ResultSummary:No.default,queryType:No.queryType,ServerInfo:No.ServerInfo,Notification:No.Notification,Plan:No.Plan,ProfiledPlan:No.ProfiledPlan,QueryStatistics:No.QueryStatistics,Stats:No.Stats,Result:Ct.default,EagerResult:t.default,Transaction:i.default,ManagedTransaction:l.default,TransactionPromise:f.default,Session:s.default,Driver:p.default,Connection:n.default,types:o,driver:h,json:E,auth:jt.default,bookmarkManager:Uo.bookmarkManager,routing:Do.routing,resultTransformers:m.default,notificationCategory:No.notificationCategory,notificationSeverityLevel:No.notificationSeverityLevel,notificationFilterDisabledCategory:xo.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:xo.notificationFilterMinimumSeverityLevel},g.default=O,{}),Lr={},w={},X={},P={};Object.defineProperty(P,"__esModule",{value:!0}),P.isFunction=void 0,P.isFunction=function(e){return"function"==typeof e};v={},y={},_={};Object.defineProperty(_,"__esModule",{value:!0}),_.createErrorClass=void 0,_.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(y,"__esModule",{value:!0}),y.UnsubscriptionError=void 0;Q=_,y.UnsubscriptionError=Q.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}}),Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.arrRemove=void 0,Bt.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var 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=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},Bo=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},Wo=(Object.defineProperty(v,"__esModule",{value:!0}),v.isSubscription=v.EMPTY_SUBSCRIPTION=v.Subscription=void 0,P),zo=y,qo=Bt,Vo=(Ho.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=Lo(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(Wo.isFunction(u))try{u()}catch(e){r=e instanceof zo.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=Lo(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{Go(l)}catch(e){r=null!=r?r:[],e instanceof zo.UnsubscriptionError?r=Bo(Bo([],Fo(r)),Fo(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 zo.UnsubscriptionError(r)}},Ho.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Go(e);else{if(e instanceof Ho){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},Ho.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},Ho.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},Ho.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&qo.arrRemove(t,e)},Ho.prototype.remove=function(e){var t=this._finalizers;t&&qo.arrRemove(t,e),e instanceof Ho&&e._removeParent(this)},Ho.EMPTY=((b=new Ho).closed=!0,b),Ho);function Ho(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function Go(e){Wo.isFunction(e)?e():e.unsubscribe()}v.Subscription=Vo,v.EMPTY_SUBSCRIPTION=Vo.EMPTY,v.isSubscription=function(e){return e instanceof Vo||e&&"closed"in e&&Wo.isFunction(e.remove)&&Wo.isFunction(e.add)&&Wo.isFunction(e.unsubscribe)};var Yo,Ko,Zo,u={},S=(Object.defineProperty(u,"__esModule",{value:!0}),u.config=void 0,u.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),Ct={},Qo=(Yo=Ct,Ko=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},Zo=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(Yo,"__esModule",{value:!0}),Yo.timeoutProvider=void 0,Yo.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Yo.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,Zo([e,t],Ko(r))):setTimeout.apply(void 0,Zo([e,t],Ko(r)))},clearTimeout:function(e){var t=Yo.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(S,"__esModule",{value:!0}),S.reportUnhandledError=void 0,u),Xo=Ct;S.reportUnhandledError=function(t){Xo.timeoutProvider.setTimeout(function(){var e=Qo.config.onUnhandledError;if(!e)throw t;e(t)})};t={};Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){};i={};function Jo(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(i,"__esModule",{value:!0}),i.createNotification=i.nextNotification=i.errorNotification=i.COMPLETE_NOTIFICATION=void 0,i.COMPLETE_NOTIFICATION=Jo("C",void 0,void 0),i.errorNotification=function(e){return Jo("E",void 0,e)},i.nextNotification=function(e){return Jo("N",e,void 0)},i.createNotification=Jo;var $o,ei,ti,ri,ni,oi,ii,ui,ai,si,ci,li,fi,pi,l={},di=(Object.defineProperty(l,"__esModule",{value:!0}),l.captureError=l.errorContext=void 0,u),hi=null;function bi(e){var t=ti.call(this)||this;return t.isStopped=!1,e?(t.destination=e,ni.isSubscription(e)&&e.add(t)):t.destination=$o.EMPTY_OBSERVER,t}function yi(e,t){return ci.call(e,t)}function _i(e){this.partialObserver=e}function vi(e,t,r){var n=fi.call(this)||this;return r=ri.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&oi.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&yi(e.next,t),error:e.error&&yi(e.error,t),complete:e.complete&&yi(e.complete,t)}):e,n.destination=new li(r),n}function mi(e){oi.config.useDeprecatedSynchronousErrorHandling?si.captureError(e):ii.reportUnhandledError(e)}function gi(e,t){var r=oi.config.onStoppedNotification;r&&ai.timeoutProvider.setTimeout(function(){return r(e,t)})}l.errorContext=function(e){if(di.config.useDeprecatedSynchronousErrorHandling){var t=!hi;if(t&&(hi={errorThrown:!1,error:null}),e(),t){var t=hi,r=t.errorThrown,t=t.error;if(hi=null,r)throw t}}else e()},l.captureError=function(e){di.config.useDeprecatedSynchronousErrorHandling&&hi&&(hi.errorThrown=!0,hi.error=e)},$o=X,f=r&&r.__extends||(ei=function(e,t){return(ei=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}ei(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty($o,"__esModule",{value:!0}),$o.EMPTY_OBSERVER=$o.SafeSubscriber=$o.Subscriber=void 0,ri=P,oi=u,ii=S,s=t,ui=i,ai=Ct,si=l,ti=(ni=v).Subscription,f(bi,ti),bi.create=function(e,t,r){return new pi(e,t,r)},bi.prototype.next=function(e){this.isStopped?gi(ui.nextNotification(e),this):this._next(e)},bi.prototype.error=function(e){this.isStopped?gi(ui.errorNotification(e),this):(this.isStopped=!0,this._error(e))},bi.prototype.complete=function(){this.isStopped?gi(ui.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},bi.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,ti.prototype.unsubscribe.call(this),this.destination=null)},bi.prototype._next=function(e){this.destination.next(e)},bi.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},bi.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},p=bi,$o.Subscriber=p,ci=Function.prototype.bind,_i.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){mi(e)}},_i.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){mi(e)}else mi(e)},_i.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){mi(e)}},li=_i,f(vi,fi=p),pi=vi,$o.SafeSubscriber=pi,$o.EMPTY_OBSERVER={closed:!0,next:s.noop,error:function(e){throw e},complete:s.noop};n={},Object.defineProperty(n,"__esModule",{value:!0}),n.observable=void 0,n.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",o={},h={};Object.defineProperty(h,"__esModule",{value:!0}),h.identity=void 0,h.identity=function(e){return e},Object.defineProperty(o,"__esModule",{value:!0}),o.pipeFromArray=o.pipe=void 0;var Oi=h;function wi(t){return 0===t.length?Oi.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}o.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wi(e)},o.pipeFromArray=wi,Object.defineProperty(w,"__esModule",{value:!0}),w.Observable=void 0;var Ei=X,Pi=v,E=n,Si=o,Ti=u,ji=P,Ci=l;function Ii(e){e&&(this._subscribe=e)}function Ri(e){return null!=(e=null!=e?e:Ti.config.Promise)?e:Promise}Ii.prototype.lift=function(e){var t=new Ii;return t.source=this,t.operator=e,t},Ii.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof Ei.Subscriber||function(e){return e&&ji.isFunction(e.next)&&ji.isFunction(e.error)&&ji.isFunction(e.complete)}(n)&&Pi.isSubscription(n)?e:new Ei.SafeSubscriber(e,t,r);return Ci.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},Ii.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},Ii.prototype.forEach=function(n,e){var o=this;return new(e=Ri(e))(function(e,t){var r=new Ei.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},Ii.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},Ii.prototype[E.observable]=function(){return this},Ii.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Si.pipeFromArray(e)(this)},Ii.prototype.toPromise=function(e){var n=this;return new(e=Ri(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},Ii.create=function(e){return new Ii(e)},w.Observable=Ii;var jt={},m={},g={},ki=(Object.defineProperty(g,"__esModule",{value:!0}),g.operate=g.hasLift=void 0,P);function Ai(e){return ki.isFunction(null==e?void 0:e.lift)}g.hasLift=Ai,g.operate=function(t){return function(e){if(Ai(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 Mi,O={},Q=r&&r.__extends||(Mi=function(e,t){return(Mi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Mi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),b=(Object.defineProperty(O,"__esModule",{value:!0}),O.OperatorSubscriber=O.createOperatorSubscriber=void 0,X);O.createOperatorSubscriber=function(e,t,r,n,o){return new xi(e,t,r,n,o)};Q(Ui,Ni=b.Subscriber),Ui.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,Ni.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var Ni,xi=Ui;function Ui(t,r,e,n,o,i){var u=Ni.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:Ni.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:Ni.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:Ni.prototype._complete,u}O.OperatorSubscriber=xi,Object.defineProperty(m,"__esModule",{value:!0}),m.refCount=void 0;var Di=g,Li=O;m.refCount=function(){return Di.operate(function(r,n){var o=null,e=(r._refCount++,Li.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 Fi,i=r&&r.__extends||(Fi=function(e,t){return(Fi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Fi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(jt,"__esModule",{value:!0}),jt.ConnectableObservable=void 0;var Bi,Wi=v,zi=m,qi=O,Vi=g,Ct=(Bi=w.Observable,i(Hi,Bi),Hi.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},Hi.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},Hi.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},Hi.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new Wi.Subscription,t=this.getSubject(),e.add(this.source.subscribe(qi.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=Wi.Subscription.EMPTY)),e},Hi.prototype.refCount=function(){return zi.refCount()(this)},Hi);function Hi(e,t){var r=Bi.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,Vi.hasLift(e)&&(r.lift=e.lift),r}jt.ConnectableObservable=Ct;var Gi,Yi,Ki,Zi,Qi,f={},p={},s=(Gi=p,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.performanceTimestampProvider=void 0,Gi.performanceTimestampProvider={now:function(){return(Gi.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),Xi=(Yi=s,Ki=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},Zi=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(Yi,"__esModule",{value:!0}),Yi.animationFrameProvider=void 0,Qi=v,Yi.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=Yi.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new Qi.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=Yi.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Zi([],Ki(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Yi.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,Zi([],Ki(e)))},delegate:void 0},Object.defineProperty(f,"__esModule",{value:!0}),f.animationFrames=void 0,w),Ji=p,$i=s;function eu(a){return new Xi.Observable(function(r){var n=a||Ji.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=$i.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&$i.animationFrameProvider.cancelAnimationFrame(i)}})}f.animationFrames=function(e){return e?eu(e):nu};var tu,ru,nu=eu(),E={},Q={},b=(Object.defineProperty(Q,"__esModule",{value:!0}),Q.ObjectUnsubscribedError=void 0,_),i=(Q.ObjectUnsubscribedError=b.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(tu=function(e,t){return(tu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}tu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),ou=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.")},iu=(Object.defineProperty(E,"__esModule",{value:!0}),E.AnonymousSubject=E.Subject=void 0,w),uu=v,au=Q,su=Bt,cu=l,Ct=(ru=iu.Observable,i(lu,ru),lu.prototype.lift=function(e){var t=new pu(this,this);return t.operator=e,t},lu.prototype._throwIfClosed=function(){if(this.closed)throw new au.ObjectUnsubscribedError},lu.prototype.next=function(o){var i=this;cu.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=ou(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}}}})},lu.prototype.error=function(t){var r=this;cu.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)}})},lu.prototype.complete=function(){var t=this;cu.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},lu.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(lu.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),lu.prototype._trySubscribe=function(e){return this._throwIfClosed(),ru.prototype._trySubscribe.call(this,e)},lu.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},lu.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?uu.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new uu.Subscription(function(){t.currentObservers=null,su.arrRemove(o,e)}))},lu.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},lu.prototype.asObservable=function(){var e=new iu.Observable;return e.source=this,e},lu.create=function(e,t){return new pu(e,t)},lu);function lu(){var e=ru.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}E.Subject=Ct;i(du,fu=Ct),du.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},du.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},du.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},du.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:uu.EMPTY_SUBSCRIPTION};var fu,pu=du;function du(e,t){var r=fu.call(this)||this;return r.destination=e,r.source=t,r}E.AnonymousSubject=pu;var hu,p={},b=r&&r.__extends||(hu=function(e,t){return(hu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}hu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(p,"__esModule",{value:!0}),p.BehaviorSubject=void 0;bu=E.Subject,b(yu,bu),Object.defineProperty(yu.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),yu.prototype._subscribe=function(e){var t=bu.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},yu.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},yu.prototype.next=function(e){bu.prototype.next.call(this,this._value=e)};var bu,l=yu;function yu(e){var t=bu.call(this)||this;return t._value=e,t}p.BehaviorSubject=l;var _u,vu,i={},Ct={},b=(_u=Ct,Object.defineProperty(_u,"__esModule",{value:!0}),_u.dateTimestampProvider=void 0,_u.dateTimestampProvider={now:function(){return(_u.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(vu=function(e,t){return(vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}vu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(i,"__esModule",{value:!0}),i.ReplaySubject=void 0;var mu,gu=Ct,l=(mu=E.Subject,b(Ou,mu),Ou.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(),mu.prototype.next.call(this,e)},Ou.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},Ou.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)}},Ou);function Ou(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=gu.dateTimestampProvider);var n=mu.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}i.ReplaySubject=l;var wu,b={},l=r&&r.__extends||(wu=function(e,t){return(wu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}wu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(b,"__esModule",{value:!0}),b.AsyncSubject=void 0;Eu=E.Subject,l(Pu,Eu),Pu.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())},Pu.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},Pu.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&Eu.prototype.next.call(this,t),Eu.prototype.complete.call(this))};var Eu,l=Pu;function Pu(){var e=null!==Eu&&Eu.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}b.AsyncSubject=l;var Su,l={},T={},Tu={},ju={},Cu=r&&r.__extends||(Su=function(e,t){return(Su=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Su(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ju,"__esModule",{value:!0}),ju.Action=void 0;Iu=v.Subscription,Cu(Ru,Iu),Ru.prototype.schedule=function(e,t){return this};var Iu,Cu=Ru;function Ru(e,t){return Iu.call(this)||this}ju.Action=Cu;var ku,Au,Mu,Nu,Cu={},xu=(ku=Cu,Au=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},Mu=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(ku,"__esModule",{value:!0}),ku.intervalProvider=void 0,ku.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=ku.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,Mu([e,t],Au(r))):setInterval.apply(void 0,Mu([e,t],Au(r)))},clearInterval:function(e){var t=ku.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},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)}));Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.AsyncAction=void 0;var Uu,Du=Cu,Lu=Bt,Cu=(Uu=ju.Action,xu(Fu,Uu),Fu.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},Fu.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Du.intervalProvider.setInterval(e.flush.bind(e,this),r)},Fu.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&Du.intervalProvider.clearInterval(t)},Fu.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))},Fu.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},Fu.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,Lu.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,Uu.prototype.unsubscribe.call(this))},Fu);function Fu(e,t){var r=Uu.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}Tu.AsyncAction=Cu;var Bu,Wu,zu,qu,Vu,Hu,ju={},xu={},Gu=(Object.defineProperty(xu,"__esModule",{value:!0}),xu.TestTools=xu.Immediate=void 0,1),Yu={};function Ku(e){return e in Yu&&(delete Yu[e],!0)}xu.Immediate={setImmediate:function(e){var t=Gu++;return Yu[t]=!0,(Bu=Bu||Promise.resolve()).then(function(){return Ku(t)&&e()}),t},clearImmediate:function(e){Ku(e)}},xu.TestTools={pending:function(){return Object.keys(Yu).length}},Wu=ju,zu=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},qu=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(Wu,"__esModule",{value:!0}),Wu.immediateProvider=void 0,Vu=xu.Immediate.setImmediate,Hu=xu.Immediate.clearImmediate,Wu.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Wu.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||Vu).apply(void 0,qu([],zu(e)))},clearImmediate:function(e){var t=Wu.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||Hu)(e)},delegate:void 0};var Zu,Cu=r&&r.__extends||(Zu=function(e,t){return(Zu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Zu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(T,"__esModule",{value:!0}),T.AsapAction=void 0;var Qu,Xu=ju,xu=(Qu=Tu.AsyncAction,Cu(Ju,Qu),Ju.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Qu.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Xu.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},Ju.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Qu.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Xu.immediateProvider.clearImmediate(t),e._scheduled=void 0)},Ju);function Ju(e,t){var r=Qu.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.AsapAction=xu;var ju={},Cu={},xu={},$u=(Object.defineProperty(xu,"__esModule",{value:!0}),xu.Scheduler=void 0,Ct);function ea(e,t){void 0===t&&(t=ea.now),this.schedulerActionCtor=e,this.now=t}ea.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},ea.now=$u.dateTimestampProvider.now,xu.Scheduler=ea;var ta,ra,$u=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)}),na=(Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.AsyncScheduler=void 0,xu),$u=(ra=na.Scheduler,$u(oa,ra),oa.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}}},oa);function oa(e,t){void 0===t&&(t=na.Scheduler.now);e=ra.call(this,e,t)||this;return e.actions=[],e._active=!1,e}Cu.AsyncScheduler=$u;var ia,$u=r&&r.__extends||(ia=function(e,t){return(ia=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}ia(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ju,"__esModule",{value:!0}),ju.AsapScheduler=void 0;ua=Cu.AsyncScheduler,$u(aa,ua),aa.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 ua,$u=aa;function aa(){return null!==ua&&ua.apply(this,arguments)||this}ju.AsapScheduler=$u,$u=l,Object.defineProperty($u,"__esModule",{value:!0}),$u.asap=$u.asapScheduler=void 0,$u.asapScheduler=new ju.AsapScheduler(T.AsapAction),$u.asap=$u.asapScheduler;var sa,ju={},$u=(T=ju,Object.defineProperty(T,"__esModule",{value:!0}),T.async=T.asyncScheduler=void 0,T.asyncScheduler=new Cu.AsyncScheduler(Tu.AsyncAction),T.async=T.asyncScheduler,{}),T={},ca=r&&r.__extends||(sa=function(e,t){return(sa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}sa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(T,"__esModule",{value:!0}),T.QueueAction=void 0;la=Tu.AsyncAction,ca(fa,la),fa.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?la.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},fa.prototype.execute=function(e,t){return 0<t||this.closed?la.prototype.execute.call(this,e,t):this._execute(e,t)},fa.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?la.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var la,ca=fa;function fa(e,t){var r=la.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.QueueAction=ca;var pa,ca={},da=r&&r.__extends||(pa=function(e,t){return(pa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}pa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ca,"__esModule",{value:!0}),ca.QueueScheduler=void 0;ha=Cu.AsyncScheduler,da(ba,ha);var ha,da=ba;function ba(){return null!==ha&&ha.apply(this,arguments)||this}ca.QueueScheduler=da,da=$u,Object.defineProperty(da,"__esModule",{value:!0}),da.queue=da.queueScheduler=void 0,da.queueScheduler=new ca.QueueScheduler(T.QueueAction),da.queue=da.queueScheduler;var ya,ca={},T={},da=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)});Object.defineProperty(T,"__esModule",{value:!0}),T.AnimationFrameAction=void 0;var _a,va=s,s=(_a=Tu.AsyncAction,da(ma,_a),ma.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?_a.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=va.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},ma.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return _a.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(va.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},ma);function ma(e,t){var r=_a.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.AnimationFrameAction=s;var ga,da={},s=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(da,"__esModule",{value:!0}),da.AnimationFrameScheduler=void 0;Oa=Cu.AsyncScheduler,s(wa,Oa),wa.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 Oa,s=wa;function wa(){return null!==Oa&&Oa.apply(this,arguments)||this}da.AnimationFrameScheduler=s,s=ca,Object.defineProperty(s,"__esModule",{value:!0}),s.animationFrame=s.animationFrameScheduler=void 0,s.animationFrameScheduler=new da.AnimationFrameScheduler(T.AnimationFrameAction),s.animationFrame=s.animationFrameScheduler;var Ea,Pa,da={},T=r&&r.__extends||(Ea=function(e,t){return(Ea=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Ea(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(da,"__esModule",{value:!0}),da.VirtualAction=da.VirtualTimeScheduler=void 0,Tu),Sa=v,Tu=(Pa=Cu.AsyncScheduler,T(Ta,Pa),Ta.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}},Ta.frameTimeFactor=10,Ta);function Ta(e,t){void 0===t&&(t=1/0);var r=Pa.call(this,e=void 0===e?Ca:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}da.VirtualTimeScheduler=Tu;ja=s.AsyncAction,T(Ia,ja),Ia.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return ja.prototype.schedule.call(this,e,t);this.active=!1;var r=new Ia(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return Sa.Subscription.EMPTY},Ia.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(Ia.sortActions),1},Ia.prototype.recycleAsyncId=function(e,t,r){},Ia.prototype._execute=function(e,t){if(!0===this.active)return ja.prototype._execute.call(this,e,t)},Ia.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 ja,Ca=Ia;function Ia(e,t,r){void 0===r&&(r=e.index+=1);var n=ja.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}da.VirtualAction=Ca;var Ra,ka,Cu={},Tu={},s=(Ra=Tu,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.empty=Ra.EMPTY=void 0,ka=w,Ra.EMPTY=new ka.Observable(function(e){return e.complete()}),Ra.empty=function(e){return e?(t=e,new ka.Observable(function(e){return t.schedule(function(){return e.complete()})})):Ra.EMPTY;var t},{}),T={},Aa={},Ma=(Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.isScheduler=void 0,P);Aa.isScheduler=function(e){return e&&Ma.isFunction(e.schedule)},Object.defineProperty(T,"__esModule",{value:!0}),T.popNumber=T.popScheduler=T.popResultSelector=void 0;var Na=P,xa=Aa;function Ua(e){return e[e.length-1]}T.popResultSelector=function(e){return Na.isFunction(Ua(e))?e.pop():void 0},T.popScheduler=function(e){return xa.isScheduler(Ua(e))?e.pop():void 0},T.popNumber=function(e,t){return"number"==typeof Ua(e)?e.pop():t};var Da={},La={},Fa={},j={},Ba={},Wa=(Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.isArrayLike=void 0,Ba.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),za=(Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.isPromise=void 0,P);Wa.isPromise=function(e){return za.isFunction(null==e?void 0:e.then)};var qa={},Va=(Object.defineProperty(qa,"__esModule",{value:!0}),qa.isInteropObservable=void 0,n),Ha=P;qa.isInteropObservable=function(e){return Ha.isFunction(e[Va.observable])};var Ga={},Ya=(Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.isAsyncIterable=void 0,P);Ga.isAsyncIterable=function(e){return Symbol.asyncIterator&&Ya.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Ka={};Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.createInvalidObservableTypeError=void 0,Ka.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 Za={},Qa={};function Xa(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.iterator=Qa.getSymbolIterator=void 0,Qa.getSymbolIterator=Xa,Qa.iterator=Xa(),Object.defineProperty(Za,"__esModule",{value:!0}),Za.isIterable=void 0;var Ja=Qa,$a=P;Za.isIterable=function(e){return $a.isFunction(null==e?void 0:e[Ja.iterator])};var es={},ts=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}}}},rs=r&&r.__await||function(e){return this instanceof rs?(this.v=e,this):new rs(e)},ns=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 rs?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])}},os=(Object.defineProperty(es,"__esModule",{value:!0}),es.isReadableStreamLike=es.readableStreamLikeToAsyncGenerator=void 0,P);es.readableStreamLikeToAsyncGenerator=function(o){return ns(this,arguments,function(){var t,r,n;return ts(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,rs(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,rs(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,rs(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]}})})},es.isReadableStreamLike=function(e){return os.isFunction(null==e?void 0:e.getReader)};var is=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())})},us=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}}}},as=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 ss?ss(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)})}}},ss=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.")},cs=(Object.defineProperty(j,"__esModule",{value:!0}),j.fromReadableStreamLike=j.fromAsyncIterable=j.fromIterable=j.fromPromise=j.fromArrayLike=j.fromInteropObservable=j.innerFrom=void 0,Ba),ls=Wa,fs=w,ps=qa,ds=Ga,hs=Ka,bs=Za,ys=es,_s=P,vs=S,ms=n;function gs(r){return new fs.Observable(function(e){var t=r[ms.observable]();if(_s.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Os(r){return new fs.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function ws(e){return new fs.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,vs.reportUnhandledError)})}function Es(u){return new fs.Observable(function(e){var t,r;try{for(var n=ss(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 Ps(e){return new fs.Observable(function(t){!function(r,n){var o,i,u,a;return is(this,void 0,void 0,function(){var t;return us(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=as(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 Ss(e){return Ps(ys.readableStreamLikeToAsyncGenerator(e))}j.innerFrom=function(e){if(e instanceof fs.Observable)return e;if(null!=e){if(ps.isInteropObservable(e))return gs(e);if(cs.isArrayLike(e))return Os(e);if(ls.isPromise(e))return ws(e);if(ds.isAsyncIterable(e))return Ps(e);if(bs.isIterable(e))return Es(e);if(ys.isReadableStreamLike(e))return Ss(e)}throw hs.createInvalidObservableTypeError(e)},j.fromInteropObservable=gs,j.fromArrayLike=Os,j.fromPromise=ws,j.fromIterable=Es,j.fromAsyncIterable=Ps,j.fromReadableStreamLike=Ss;var S={},Ts={};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.executeSchedule=void 0,Ts.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(S,"__esModule",{value:!0}),S.observeOn=void 0;var js=Ts,Cs=g,Is=O;S.observeOn=function(r,n){return void 0===n&&(n=0),Cs.operate(function(e,t){e.subscribe(Is.createOperatorSubscriber(t,function(e){return js.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return js.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return js.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var Rs={},ks=(Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.subscribeOn=void 0,g);Rs.subscribeOn=function(r,n){return void 0===n&&(n=0),ks.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.scheduleObservable=void 0;var As=j,Ms=S,Ns=Rs;Fa.scheduleObservable=function(e,t){return As.innerFrom(e).pipe(Ns.subscribeOn(t),Ms.observeOn(t))};var xs={},Us=(Object.defineProperty(xs,"__esModule",{value:!0}),xs.schedulePromise=void 0,j),Ds=S,Ls=Rs;xs.schedulePromise=function(e,t){return Us.innerFrom(e).pipe(Ls.subscribeOn(t),Ds.observeOn(t))};var Fs={},Bs=(Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.scheduleArray=void 0,w);Fs.scheduleArray=function(r,n){return new Bs.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var Ws={},zs=(Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.scheduleIterable=void 0,w),qs=Qa,Vs=P,Hs=Ts;Ws.scheduleIterable=function(e,t){return new zs.Observable(function(n){var o;return Hs.executeSchedule(n,t,function(){o=e[qs.iterator](),Hs.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 Vs.isFunction(null==o?void 0:o.return)&&o.return()}})};var Qa={},Gs=(Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.scheduleAsyncIterable=void 0,w),Ys=Ts;Qa.scheduleAsyncIterable=function(r,n){if(r)return new Gs.Observable(function(t){Ys.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();Ys.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 Ks={},Zs=(Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.scheduleReadableStreamLike=void 0,Qa),Qs=es;Ks.scheduleReadableStreamLike=function(e,t){return Zs.scheduleAsyncIterable(Qs.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(La,"__esModule",{value:!0}),La.scheduled=void 0;var Xs=Fa,Js=xs,$s=Fs,ec=Ws,tc=Qa,rc=qa,nc=Wa,oc=Ba,ic=Za,uc=Ga,ac=Ka,sc=es,cc=Ks;La.scheduled=function(e,t){if(null!=e){if(rc.isInteropObservable(e))return Xs.scheduleObservable(e,t);if(oc.isArrayLike(e))return $s.scheduleArray(e,t);if(nc.isPromise(e))return Js.schedulePromise(e,t);if(uc.isAsyncIterable(e))return tc.scheduleAsyncIterable(e,t);if(ic.isIterable(e))return ec.scheduleIterable(e,t);if(sc.isReadableStreamLike(e))return cc.scheduleReadableStreamLike(e,t)}throw ac.createInvalidObservableTypeError(e)},Object.defineProperty(Da,"__esModule",{value:!0}),Da.from=void 0;var lc=La,fc=j;Da.from=function(e,t){return t?lc.scheduled(e,t):fc.innerFrom(e)},Object.defineProperty(s,"__esModule",{value:!0}),s.of=void 0;var pc=T,dc=Da;s.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pc.popScheduler(e);return dc.from(e,r)};var hc,bc,yc,_c,Fa={},vc=(Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.throwError=void 0,w),mc=P;function gc(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function Oc(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)}Fa.throwError=function(e,t){function r(e){return e.error(n())}var n=mc.isFunction(e)?e:function(){return e};return new vc.Observable(t?function(e){return t.schedule(r,0,e)}:r)},xs=Cu,Object.defineProperty(xs,"__esModule",{value:!0}),xs.observeNotification=xs.Notification=xs.NotificationKind=void 0,hc=Tu,bc=s,yc=Fa,_c=P,(Fs=xs.NotificationKind||(xs.NotificationKind={})).NEXT="N",Fs.ERROR="E",Fs.COMPLETE="C",gc.prototype.observe=function(e){return Oc(this,e)},gc.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()},gc.prototype.accept=function(e,t,r){var n;return _c.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},gc.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?bc.of(t):"E"===e?yc.throwError(function(){return r}):"C"===e?hc.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},gc.createNext=function(e){return new gc("N",e)},gc.createError=function(e){return new gc("E",void 0,e)},gc.createComplete=function(){return gc.completeNotification},gc.completeNotification=new gc("C"),Fs=gc,xs.Notification=Fs,xs.observeNotification=Oc;var Qa={},wc=(Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.isObservable=void 0,w),Ec=P;Qa.isObservable=function(e){return!!e&&(e instanceof wc.Observable||Ec.isFunction(e.lift)&&Ec.isFunction(e.subscribe))};var qa={},Wa={},Za=(Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.EmptyError=void 0,_),Pc=(Wa.EmptyError=Za.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(qa,"__esModule",{value:!0}),qa.lastValueFrom=void 0,Wa);qa.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 Pc.EmptyError)}})})};var Ga={},Sc=(Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.firstValueFrom=void 0,Wa),Tc=X;Ga.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new Tc.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new Sc.EmptyError)}});n.subscribe(r)})};var jc,Cc,Ic,Rc,kc,Ac,Mc,Ka={},es=(Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.ArgumentOutOfRangeError=void 0,_),Ks=(Ka.ArgumentOutOfRangeError=es.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),Fs=(Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.NotFoundError=void 0,_),xs=(Ks.NotFoundError=Fs.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),Za=(Object.defineProperty(xs,"__esModule",{value:!0}),xs.SequenceError=void 0,_),es=(xs.SequenceError=Za.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),Fs={};function Nc(e){throw new jc.TimeoutError(e)}Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.isValidDate=void 0,Fs.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},jc=es,Object.defineProperty(jc,"__esModule",{value:!0}),jc.timeout=jc.TimeoutError=void 0,Cc=ju,Ic=Fs,Rc=g,kc=j,Ac=O,Mc=Ts,jc.TimeoutError=_.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),jc.timeout=function(e,t){var a=(e=Ic.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?Nc:r,l=void 0===(r=e.scheduler)?null!=t?t:Cc.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return Rc.operate(function(e,t){function r(e){n=Mc.executeSchedule(t,l,function(){try{u.unsubscribe(),kc.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(Ac.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 Za={},_={},xc={},Uc={},Dc=(Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.map=void 0,g),Lc=O;Uc.map=function(n,o){return Dc.operate(function(e,t){var r=0;e.subscribe(Lc.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var Fc=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},Bc=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},Wc=(Object.defineProperty(xc,"__esModule",{value:!0}),xc.mapOneOrManyArgs=void 0,Uc),zc=Array.isArray;xc.mapOneOrManyArgs=function(r){return Wc.map(function(e){return t=r,zc(e=e)?t.apply(void 0,Bc([],Fc(e))):t(e);var t})};var qc=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},Vc=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},Hc=(Object.defineProperty(_,"__esModule",{value:!0}),_.bindCallbackInternals=void 0,Aa),Gc=w,Yc=Rs,Kc=xc,Zc=S,Qc=b;_.bindCallbackInternals=function r(a,s,n,o){if(n){if(!Hc.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(Kc.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(Yc.subscribeOn(o),Zc.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new Qc.AsyncSubject,u=!0;return new Gc.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,Vc(Vc([],qc(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(Za,"__esModule",{value:!0}),Za.bindCallback=void 0;var Xc=_;Za.bindCallback=function(e,t,r){return Xc.bindCallbackInternals(!1,e,t,r)};var Jc={},$c=(Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.bindNodeCallback=void 0,_);Jc.bindNodeCallback=function(e,t,r){return $c.bindCallbackInternals(!0,e,t,r)};var _={},el={},tl=(Object.defineProperty(el,"__esModule",{value:!0}),el.argsArgArrayOrObject=void 0,Array.isArray),rl=Object.getPrototypeOf,nl=Object.prototype,ol=Object.keys;el.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(tl(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&rl(r)===nl)return{args:(r=ol(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var il={};Object.defineProperty(il,"__esModule",{value:!0}),il.createObject=void 0,il.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(_,"__esModule",{value:!0}),_.combineLatestInit=_.combineLatest=void 0;var ul=w,al=el,sl=Da,cl=h,ll=xc,fl=T,pl=il,dl=O,hl=Ts;function bl(a,s,c){return void 0===c&&(c=cl.identity),function(u){yl(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){yl(s,function(){var e=sl.from(a[r],s),t=!1;e.subscribe(dl.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 yl(e,t,r){e?hl.executeSchedule(r,e,t):t()}_.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=fl.popScheduler(e),n=fl.popResultSelector(e),o=al.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?sl.from([],r):(o=new ul.Observable(bl(i,r,u?function(e){return pl.createObject(u,e)}:cl.identity)),n?o.pipe(ll.mapOneOrManyArgs(n)):o)},_.combineLatestInit=bl;var _l={},vl={},ml={},gl={},Ol={},wl=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.mergeInternals=void 0,j),El=Ts,Pl=O;Ol.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;wl.innerFrom(n(e,l++)).subscribe(Pl.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?El.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(Pl.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(gl,"__esModule",{value:!0}),gl.mergeMap=void 0;var Sl=Uc,Tl=j,jl=g,Cl=Ol,Il=P;gl.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),Il.isFunction(i)?e(function(r,n){return Sl.map(function(e,t){return i(r,e,n,t)})(Tl.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),jl.operate(function(e,t){return Cl.mergeInternals(e,t,o,r)}))},Object.defineProperty(ml,"__esModule",{value:!0}),ml.mergeAll=void 0;var Rl=gl,kl=h;ml.mergeAll=function(e){return Rl.mergeMap(kl.identity,e=void 0===e?1/0:e)},Object.defineProperty(vl,"__esModule",{value:!0}),vl.concatAll=void 0;var Al=ml;vl.concatAll=function(){return Al.mergeAll(1)},Object.defineProperty(_l,"__esModule",{value:!0}),_l.concat=void 0;var Ml=vl,Nl=T,xl=Da;_l.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ml.concatAll()(xl.from(e,Nl.popScheduler(e)))};var Ul={},Dl={},Ll=(Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.defer=void 0,w),Fl=j;Dl.defer=function(t){return new Ll.Observable(function(e){Fl.innerFrom(t()).subscribe(e)})},Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.connectable=void 0;var Bl=E,Wl=w,zl=Dl,ql={connector:function(){return new Bl.Subject},resetOnDisconnect:!0};Ul.connectable=function(e,t){var r=null,n=(t=void 0===t?ql:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new Wl.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=zl.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var Vl={},Hl=(Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.forkJoin=void 0,w),Gl=el,Yl=j,Kl=T,Zl=O,Ql=xc,Xl=il;Vl.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Kl.popResultSelector(e),u=(n=Gl.argsArgArrayOrObject(e)).args,a=n.keys,n=new Hl.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;Yl.innerFrom(u[t]).subscribe(Zl.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?Xl.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(Ql.mapOneOrManyArgs(r)):n};var el={},Jl=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(el,"__esModule",{value:!0}),el.fromEvent=void 0,j),ef=w,tf=gl,rf=Ba,nf=P,of=xc,uf=["addListener","removeListener"],af=["addEventListener","removeEventListener"],sf=["on","off"];function cf(r,n){return function(t){return function(e){return r[t](n,e)}}}el.fromEvent=function t(r,n,o,e){if(nf.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(of.mapOneOrManyArgs(e));var e=Jl((e=r,nf.isFunction(e.addEventListener)&&nf.isFunction(e.removeEventListener)?af.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,nf.isFunction(e.addListener)&&nf.isFunction(e.removeListener)?uf.map(cf(r,n)):(e=r,nf.isFunction(e.on)&&nf.isFunction(e.off)?sf.map(cf(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&rf.isArrayLike(r))return tf.mergeMap(function(e){return t(e,n,o)})($l.innerFrom(r));if(i)return new ef.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 il={},lf=(Object.defineProperty(il,"__esModule",{value:!0}),il.fromEventPattern=void 0,w),ff=P,pf=xc;il.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(pf.mapOneOrManyArgs(t)):new lf.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 ff.isFunction(o)?function(){return o(e,t)}:void 0})};var Ba={},df=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}}}},hf=(Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.generate=void 0,h),bf=Aa,yf=Dl,_f=Ws;Ba.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return df(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?hf.identity:i,o=e.scheduler):(a=e,!t||bf.isScheduler(t)?(u=hf.identity,o=t):u=t),yf.defer(o?function(){return _f.scheduleIterable(s(),o)}:s)};var Ws={},vf=(Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.iif=void 0,Dl);Ws.iif=function(e,t,r){return vf.defer(function(){return e()?t:r})};var mf={},gf={},Of=(Object.defineProperty(gf,"__esModule",{value:!0}),gf.timer=void 0,w),wf=ju,Ef=Aa,Pf=Fs;gf.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=wf.async);var i=-1;return null!=e&&(Ef.isScheduler(e)?o=e:i=e),new Of.Observable(function(e){var t=Pf.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(mf,"__esModule",{value:!0}),mf.interval=void 0;var Sf=ju,Tf=gf;mf.interval=function(e,t){return Tf.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?Sf.asyncScheduler:t)};var Aa={},jf=(Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.merge=void 0,ml),Cf=j,If=Tu,Rf=T,kf=Da;Aa.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Rf.popScheduler(e),n=Rf.popNumber(e,1/0),o=e;return o.length?1===o.length?Cf.innerFrom(o[0]):jf.mergeAll(n)(kf.from(o,r)):If.EMPTY};var Af,Mf={},Nf=(Af=Mf,Object.defineProperty(Af,"__esModule",{value:!0}),Af.never=Af.NEVER=void 0,Af.NEVER=new w.Observable(t.noop),Af.never=function(){return Af.NEVER},{}),xf={},Uf=(Object.defineProperty(xf,"__esModule",{value:!0}),xf.argsOrArgArray=void 0,Array.isArray);xf.argsOrArgArray=function(e){return 1===e.length&&Uf(e[0])?e[0]:e},Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.onErrorResumeNext=void 0;var Df=w,Lf=xf,Ff=O,Bf=t,Wf=j;Nf.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Lf.argsOrArgArray(e);return new Df.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=Wf.innerFrom(i[n++])}catch(e){return void o()}var t=new Ff.OperatorSubscriber(r,void 0,Bf.noop,Bf.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var zf={},qf=(Object.defineProperty(zf,"__esModule",{value:!0}),zf.pairs=void 0,Da);zf.pairs=function(e,t){return qf.from(Object.entries(e),t)};var Vf={},Hf={};Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.not=void 0,Hf.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var Gf={},Yf=(Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.filter=void 0,g),Kf=O;Gf.filter=function(n,o){return Yf.operate(function(e,t){var r=0;e.subscribe(Kf.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.partition=void 0;var Zf=Hf,Qf=Gf,Xf=j;Vf.partition=function(e,t,r){return[Qf.filter(t,r)(Xf.innerFrom(e)),Qf.filter(Zf.not(t,r))(Xf.innerFrom(e))]};var Jf={},$f=(Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.raceInit=Jf.race=void 0,w),ep=j,tp=xf,rp=O;function np(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(ep.innerFrom(t[r]).subscribe(rp.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)}}Jf.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=tp.argsOrArgArray(e)).length?ep.innerFrom(e[0]):new $f.Observable(np(e))},Jf.raceInit=np;var op={},ip=(Object.defineProperty(op,"__esModule",{value:!0}),op.range=void 0,w),up=Tu;op.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return up.EMPTY;var o=e+r;return new ip.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 ap={},sp=(Object.defineProperty(ap,"__esModule",{value:!0}),ap.using=void 0,w),cp=j,lp=Tu;ap.using=function(n,o){return new sp.Observable(function(e){var t=n(),r=o(t);return(r?cp.innerFrom(r):lp.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var fp={},pp=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},dp=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(fp,"__esModule",{value:!0}),fp.zip=void 0,w),bp=j,yp=xf,_p=Tu,vp=O,mp=T;fp.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=mp.popResultSelector(e),u=yp.argsOrArgArray(e);return u.length?new hp.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){bp.innerFrom(u[t]).subscribe(vp.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,dp([],pp(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}}):_p.EMPTY};var gp={},Op=(Object.defineProperty(gp,"__esModule",{value:!0}),{}),wp=(Object.defineProperty(Op,"__esModule",{value:!0}),Op.audit=void 0,g),Ep=j,Pp=O;Op.audit=function(s){return wp.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(Pp.createOperatorSubscriber(t,function(e){o=!0,i=e,u||Ep.innerFrom(s(e)).subscribe(u=Pp.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var Sp={},Tp=(Object.defineProperty(Sp,"__esModule",{value:!0}),Sp.auditTime=void 0,ju),jp=Op,Cp=gf;Sp.auditTime=function(e,t){return void 0===t&&(t=Tp.asyncScheduler),jp.audit(function(){return Cp.timer(e,t)})};var Ip={},Rp=(Object.defineProperty(Ip,"__esModule",{value:!0}),Ip.buffer=void 0,g),kp=t,Ap=O,Mp=j;Ip.buffer=function(n){return Rp.operate(function(e,t){var r=[];return e.subscribe(Ap.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),Mp.innerFrom(n).subscribe(Ap.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},kp.noop)),function(){r=null}})};var Np={},xp=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.")},Up=(Object.defineProperty(Np,"__esModule",{value:!0}),Np.bufferCount=void 0,g),Dp=O,Lp=Bt;Np.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,Up.operate(function(e,f){var p=[],d=0;e.subscribe(Dp.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=xp(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=xp(i),c=s.next();!c.done;c=s.next()){var l=c.value;Lp.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=xp(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 Fp={},Bp=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.")},Wp=(Object.defineProperty(Fp,"__esModule",{value:!0}),Fp.bufferTime=void 0,v),zp=g,qp=O,Vp=Bt,Hp=ju,Gp=T,Yp=Ts;Fp.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=Gp.popScheduler(t))?e:Hp.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return zp.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),Vp.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new Wp.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),Yp.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?Yp.executeSchedule(r,u,o,a,!0):n=!0,o(),qp.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=Bp(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 Kp={},Zp=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.")},Qp=(Object.defineProperty(Kp,"__esModule",{value:!0}),Kp.bufferToggle=void 0,v),Xp=g,Jp=j,$p=O,ed=t,td=Bt;Kp.bufferToggle=function(t,o){return Xp.operate(function(e,n){var i=[];Jp.innerFrom(t).subscribe($p.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new Qp.Subscription);r.add(Jp.innerFrom(o(e)).subscribe($p.createOperatorSubscriber(n,function(){td.arrRemove(i,t),n.next(t),r.unsubscribe()},ed.noop)))},ed.noop)),e.subscribe($p.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=Zp(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 rd={},nd=(Object.defineProperty(rd,"__esModule",{value:!0}),rd.bufferWhen=void 0,g),od=t,id=O,ud=j;rd.bufferWhen=function(i){return nd.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),ud.innerFrom(i()).subscribe(n=id.createOperatorSubscriber(t,o,od.noop))};o(),e.subscribe(id.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 ad={},sd=(Object.defineProperty(ad,"__esModule",{value:!0}),ad.catchError=void 0,j),cd=O,ld=g;ad.catchError=function u(a){return ld.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(cd.createOperatorSubscriber(r,void 0,void 0,function(e){n=sd.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 fd={},pd={},C={},dd={},I={},hd={},bd=(Object.defineProperty(hd,"__esModule",{value:!0}),hd.scanInternals=void 0,O);hd.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(bd.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(I,"__esModule",{value:!0}),I.reduce=void 0;var yd=hd,_d=g;I.reduce=function(e,t){return _d.operate(yd.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(dd,"__esModule",{value:!0}),dd.toArray=void 0;function vd(e,t){return e.push(t),e}var md=I,gd=g;dd.toArray=function(){return gd.operate(function(e,t){md.reduce(vd,[])(e).subscribe(t)})},Object.defineProperty(C,"__esModule",{value:!0}),C.joinAllInternals=void 0;var Od=h,wd=xc,Ed=o,Pd=gl,Sd=dd;C.joinAllInternals=function(t,e){return Ed.pipe(Sd.toArray(),Pd.mergeMap(function(e){return t(e)}),e?wd.mapOneOrManyArgs(e):Od.identity)},Object.defineProperty(pd,"__esModule",{value:!0}),pd.combineLatestAll=void 0;var Td=_,jd=C;pd.combineLatestAll=function(e){return jd.joinAllInternals(Td.combineLatest,e)},Object.defineProperty(fd,"__esModule",{value:!0}),fd.combineAll=void 0;fd.combineAll=pd.combineLatestAll;var Cd={},Id={},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},kd=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},Ad=(Object.defineProperty(Id,"__esModule",{value:!0}),Id.combineLatest=void 0,_),Md=g,Nd=xf,xd=xc,Ud=o,Dd=T;function Ld(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Dd.popResultSelector(r);return t?Ud.pipe(Ld.apply(void 0,kd([],Rd(r))),xd.mapOneOrManyArgs(t)):Md.operate(function(e,t){Ad.combineLatestInit(kd([e],Rd(Nd.argsOrArgArray(r))))(t)})}Id.combineLatest=Ld;var Fd=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},Bd=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},Wd=(Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.combineLatestWith=void 0,Id);Cd.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Wd.combineLatest.apply(void 0,Bd([],Fd(e)))};var xc={},zd=(Object.defineProperty(xc,"__esModule",{value:!0}),xc.concatMap=void 0,gl),qd=P;xc.concatMap=function(e,t){return qd.isFunction(t)?zd.mergeMap(e,t,1):zd.mergeMap(e,1)};var Vd={},Hd=(Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.concatMapTo=void 0,xc),Gd=P;Vd.concatMapTo=function(e,t){return Gd.isFunction(t)?Hd.concatMap(function(){return e},t):Hd.concatMap(function(){return e})};var Yd={},Kd={},Zd=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},Qd=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},Xd=(Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.concat=void 0,g),Jd=vl,$d=T,eh=Da;Kd.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=$d.popScheduler(r);return Xd.operate(function(e,t){Jd.concatAll()(eh.from(Qd([e],Zd(r)),n)).subscribe(t)})};var th=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},rh=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},nh=(Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.concatWith=void 0,Kd);Yd.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nh.concat.apply(void 0,rh([],th(e)))};var oh={},ih={},uh=(Object.defineProperty(ih,"__esModule",{value:!0}),ih.fromSubscribable=void 0,w);ih.fromSubscribable=function(t){return new uh.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(oh,"__esModule",{value:!0}),oh.connect=void 0;var ah=E,sh=j,ch=g,lh=ih,fh={connector:function(){return new ah.Subject}};oh.connect=function(n,e){var o=(e=void 0===e?fh:e).connector;return ch.operate(function(e,t){var r=o();sh.innerFrom(n(lh.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var ih={},ph=(Object.defineProperty(ih,"__esModule",{value:!0}),ih.count=void 0,I);ih.count=function(n){return ph.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var dh={},hh=(Object.defineProperty(dh,"__esModule",{value:!0}),dh.debounce=void 0,g),bh=t,yh=O,_h=j;dh.debounce=function(u){return hh.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(yh.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=yh.createOperatorSubscriber(t,r,bh.noop),_h.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var R={},vh=(Object.defineProperty(R,"__esModule",{value:!0}),R.debounceTime=void 0,ju),mh=g,gh=O;R.debounceTime=function(a,s){return void 0===s&&(s=vh.asyncScheduler),mh.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(gh.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 Oh={},wh=(Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.defaultIfEmpty=void 0,g),Eh=O;Oh.defaultIfEmpty=function(n){return wh.operate(function(e,t){var r=!1;e.subscribe(Eh.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var Ph={},Sh={},Th={},jh=(Object.defineProperty(Th,"__esModule",{value:!0}),Th.take=void 0,Tu),Ch=g,Ih=O;Th.take=function(n){return n<=0?function(){return jh.EMPTY}:Ch.operate(function(e,t){var r=0;e.subscribe(Ih.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var Rh={},kh=(Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.ignoreElements=void 0,g),Ah=O,Mh=t;Rh.ignoreElements=function(){return kh.operate(function(e,t){e.subscribe(Ah.createOperatorSubscriber(t,Mh.noop))})};var Nh={},xh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.mapTo=void 0,Uc);Nh.mapTo=function(e){return xh.map(function(){return e})},Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.delayWhen=void 0;var Uh=_l,Dh=Th,Lh=Rh,Fh=Nh,Bh=gl,Wh=j;Sh.delayWhen=function t(r,n){return n?function(e){return Uh.concat(n.pipe(Dh.take(1),Lh.ignoreElements()),e.pipe(t(r)))}:Bh.mergeMap(function(e,t){return Wh.innerFrom(r(e,t)).pipe(Dh.take(1),Fh.mapTo(e))})},Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.delay=void 0;var zh=ju,qh=Sh,Vh=gf;Ph.delay=function(e,t){var r=Vh.timer(e,t=void 0===t?zh.asyncScheduler:t);return qh.delayWhen(function(){return r})};var Hh={},Gh=(Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.dematerialize=void 0,Cu),Yh=g,Kh=O;Hh.dematerialize=function(){return Yh.operate(function(e,t){e.subscribe(Kh.createOperatorSubscriber(t,function(e){return Gh.observeNotification(e,t)}))})};var Zh={},Qh=(Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.distinct=void 0,g),Xh=O,Jh=t,$h=j;Zh.distinct=function(o,t){return Qh.operate(function(e,r){var n=new Set;e.subscribe(Xh.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&$h.innerFrom(t).subscribe(Xh.createOperatorSubscriber(r,function(){return n.clear()},Jh.noop))})};var eb={},tb=(Object.defineProperty(eb,"__esModule",{value:!0}),eb.distinctUntilChanged=void 0,h),rb=g,nb=O;function ob(e,t){return e===t}eb.distinctUntilChanged=function(i,u){return void 0===u&&(u=tb.identity),i=null!=i?i:ob,rb.operate(function(e,r){var n,o=!0;e.subscribe(nb.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var ib={},ub=(Object.defineProperty(ib,"__esModule",{value:!0}),ib.distinctUntilKeyChanged=void 0,eb);ib.distinctUntilKeyChanged=function(r,n){return ub.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var ab={},sb={},cb=(Object.defineProperty(sb,"__esModule",{value:!0}),sb.throwIfEmpty=void 0,Wa),lb=g,fb=O;function pb(){return new cb.EmptyError}sb.throwIfEmpty=function(n){return void 0===n&&(n=pb),lb.operate(function(e,t){var r=!1;e.subscribe(fb.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(ab,"__esModule",{value:!0}),ab.elementAt=void 0;var db=Ka,hb=Gf,bb=sb,yb=Oh,_b=Th;ab.elementAt=function(r,t){if(r<0)throw new db.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(hb.filter(function(e,t){return t===r}),_b.take(1),n?yb.defaultIfEmpty(t):bb.throwIfEmpty(function(){return new db.ArgumentOutOfRangeError}))}};var vb={},mb=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},Ob=(Object.defineProperty(vb,"__esModule",{value:!0}),vb.endWith=void 0,_l),wb=s;vb.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Ob.concat(e,wb.of.apply(void 0,gb([],mb(t))))}};var Eb={},Pb=(Object.defineProperty(Eb,"__esModule",{value:!0}),Eb.every=void 0,g),Sb=O;Eb.every=function(o,i){return Pb.operate(function(t,r){var n=0;t.subscribe(Sb.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var Tb={},jb={},Cb={},Ib=(Object.defineProperty(Cb,"__esModule",{value:!0}),Cb.exhaustMap=void 0,Uc),Rb=j,kb=g,Ab=O;Cb.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return Rb.innerFrom(i(r,n)).pipe(Ib.map(function(e,t){return o(r,e,n,t)}))}))}:kb.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(Ab.createOperatorSubscriber(t,function(e){n||(n=Ab.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),Rb.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(jb,"__esModule",{value:!0}),jb.exhaustAll=void 0;var Mb=Cb,Nb=h;jb.exhaustAll=function(){return Mb.exhaustMap(Nb.identity)},Object.defineProperty(Tb,"__esModule",{value:!0}),Tb.exhaust=void 0;Tb.exhaust=jb.exhaustAll;var xb={},Ub=(Object.defineProperty(xb,"__esModule",{value:!0}),xb.expand=void 0,g),Db=Ol;xb.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,Ub.operate(function(e,t){return Db.mergeInternals(e,t,r,n,void 0,!0,o)})};var Lb={},Fb=(Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.finalize=void 0,g);Lb.finalize=function(r){return Fb.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var Bb={},Wb=(Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.createFind=Bb.find=void 0,g),zb=O;function qb(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(zb.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()}))}}Bb.find=function(e,t){return Wb.operate(qb(e,t,"value"))},Bb.createFind=qb;var Vb={},Hb=(Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.findIndex=void 0,g),Gb=Bb;Vb.findIndex=function(e,t){return Hb.operate(Gb.createFind(e,t,"index"))};var Yb={},Kb=(Object.defineProperty(Yb,"__esModule",{value:!0}),Yb.first=void 0,Wa),Zb=Gf,Qb=Th,Xb=Oh,Jb=sb,$b=h;Yb.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?Zb.filter(function(e,t){return n(e,t,r)}):$b.identity,Qb.take(1),t?Xb.defaultIfEmpty(e):Jb.throwIfEmpty(function(){return new Kb.EmptyError}))}};var ey={},ty=(Object.defineProperty(ey,"__esModule",{value:!0}),ey.groupBy=void 0,w),ry=j,ny=E,oy=g,iy=O;ey.groupBy=function(b,t,y,_){return oy.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 iy.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new ny.Subject),i=n,u=o,(a=new ty.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=iy.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(ry.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 uy={},ay=(Object.defineProperty(uy,"__esModule",{value:!0}),uy.isEmpty=void 0,g),sy=O;uy.isEmpty=function(){return ay.operate(function(e,t){e.subscribe(sy.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var cy={},ly={},fy=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.")},py=(Object.defineProperty(ly,"__esModule",{value:!0}),ly.takeLast=void 0,Tu),dy=g,hy=O;ly.takeLast=function(t){return t<=0?function(){return py.EMPTY}:dy.operate(function(e,i){var u=[];e.subscribe(hy.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=fy(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(cy,"__esModule",{value:!0}),cy.last=void 0;var by=Wa,yy=Gf,_y=ly,vy=sb,my=Oh,gy=h;cy.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?yy.filter(function(e,t){return n(e,t,r)}):gy.identity,_y.takeLast(1),t?my.defaultIfEmpty(e):vy.throwIfEmpty(function(){return new by.EmptyError}))}};var Oy={},wy=(Object.defineProperty(Oy,"__esModule",{value:!0}),Oy.materialize=void 0,Cu),Ey=g,Py=O;Oy.materialize=function(){return Ey.operate(function(e,t){e.subscribe(Py.createOperatorSubscriber(t,function(e){t.next(wy.Notification.createNext(e))},function(){t.next(wy.Notification.createComplete()),t.complete()},function(e){t.next(wy.Notification.createError(e)),t.complete()}))})};var Sy={},Ty=(Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.max=void 0,I),jy=P;Sy.max=function(r){return Ty.reduce(jy.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var Cy={},Iy=(Object.defineProperty(Cy,"__esModule",{value:!0}),Cy.flatMap=void 0,gl),Iy=(Cy.flatMap=Iy.mergeMap,{}),Ry=(Object.defineProperty(Iy,"__esModule",{value:!0}),Iy.mergeMapTo=void 0,gl),ky=P;Iy.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),ky.isFunction(t)?Ry.mergeMap(function(){return e},t,r):Ry.mergeMap(function(){return e},r="number"==typeof t?t:r)};var Ay={},My=(Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.mergeScan=void 0,g),Ny=Ol;Ay.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),My.operate(function(e,t){var r=o;return Ny.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var Ol={},xy={},Uy=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},Dy=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},Ly=(Object.defineProperty(xy,"__esModule",{value:!0}),xy.merge=void 0,g),Fy=xf,By=ml,Wy=T,zy=Da;xy.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Wy.popScheduler(r),o=Wy.popNumber(r,1/0),r=Fy.argsOrArgArray(r);return Ly.operate(function(e,t){By.mergeAll(o)(zy.from(Dy([e],Uy(r)),n)).subscribe(t)})};var qy=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},Vy=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},Hy=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.mergeWith=void 0,xy);Ol.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Hy.merge.apply(void 0,Vy([],qy(e)))};var Gy={},Yy=(Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.min=void 0,I),Ky=P;Gy.min=function(r){return Yy.reduce(Ky.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var Zy={},Qy=(Object.defineProperty(Zy,"__esModule",{value:!0}),Zy.multicast=void 0,jt),Xy=P,Jy=oh;Zy.multicast=function(e,t){var r=Xy.isFunction(e)?e:function(){return e};return Xy.isFunction(t)?Jy.connect(t,{connector:r}):function(e){return new Qy.ConnectableObservable(e,r)}};var $y={},e_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},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},r_=(Object.defineProperty($y,"__esModule",{value:!0}),$y.onErrorResumeNext=$y.onErrorResumeNextWith=void 0,xf),n_=Nf;function o_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=r_.argsOrArgArray(e);return function(e){return n_.onErrorResumeNext.apply(void 0,t_([e],e_(r)))}}$y.onErrorResumeNextWith=o_,$y.onErrorResumeNext=o_;var i_={},u_=(Object.defineProperty(i_,"__esModule",{value:!0}),i_.pairwise=void 0,g),a_=O;i_.pairwise=function(){return u_.operate(function(e,r){var n,o=!1;e.subscribe(a_.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var s_={},c_=(Object.defineProperty(s_,"__esModule",{value:!0}),s_.pluck=void 0,Uc);s_.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 c_.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 l_={},f_=(Object.defineProperty(l_,"__esModule",{value:!0}),l_.publish=void 0,E),p_=Zy,d_=oh;l_.publish=function(t){return t?function(e){return d_.connect(t)(e)}:function(e){return p_.multicast(new f_.Subject)(e)}};var h_={},b_=(Object.defineProperty(h_,"__esModule",{value:!0}),h_.publishBehavior=void 0,p),y_=jt;h_.publishBehavior=function(r){return function(e){var t=new b_.BehaviorSubject(r);return new y_.ConnectableObservable(e,function(){return t})}};var __={},v_=(Object.defineProperty(__,"__esModule",{value:!0}),__.publishLast=void 0,b),m_=jt;__.publishLast=function(){return function(e){var t=new v_.AsyncSubject;return new m_.ConnectableObservable(e,function(){return t})}};var g_={},O_=(Object.defineProperty(g_,"__esModule",{value:!0}),g_.publishReplay=void 0,i),w_=Zy,E_=P;g_.publishReplay=function(t,r,e,n){e&&!E_.isFunction(e)&&(n=e);var o=E_.isFunction(e)?e:void 0;return function(e){return w_.multicast(new O_.ReplaySubject(t,r,n),o)(e)}};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_.raceWith=void 0,Jf),C_=g,I_=h;P_.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?C_.operate(function(e,t){j_.raceInit(T_([e],S_(r)))(t)}):I_.identity};var R_={},k_=(Object.defineProperty(R_,"__esModule",{value:!0}),R_.repeat=void 0,Tu),A_=g,M_=O,N_=j,x_=gf;R_.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 k_.EMPTY}:A_.operate(function(t,r){function n(){var e=!1;o=t.subscribe(M_.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?x_.timer(a):N_.innerFrom(a(i)),t=M_.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var U_={},D_=(Object.defineProperty(U_,"__esModule",{value:!0}),U_.repeatWhen=void 0,j),L_=E,F_=g,B_=O;U_.repeatWhen=function(l){return F_.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 L_.Subject,D_.innerFrom(l(n)).subscribe(B_.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(B_.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var W_={},z_=(Object.defineProperty(W_,"__esModule",{value:!0}),W_.retry=void 0,g),q_=O,V_=h,H_=gf,G_=j;W_.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?V_.identity:z_.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(q_.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?H_.timer(l):G_.innerFrom(l(e,a)),n=q_.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var Y_={},K_=(Object.defineProperty(Y_,"__esModule",{value:!0}),Y_.retryWhen=void 0,j),Z_=E,Q_=g,X_=O;Y_.retryWhen=function(u){return Q_.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(X_.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new Z_.Subject,K_.innerFrom(u(n)).subscribe(X_.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var J_={},$_=(Object.defineProperty(J_,"__esModule",{value:!0}),J_.sample=void 0,j),ev=g,tv=t,rv=O;J_.sample=function(o){return ev.operate(function(e,t){var r=!1,n=null;e.subscribe(rv.createOperatorSubscriber(t,function(e){r=!0,n=e})),$_.innerFrom(o).subscribe(rv.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},tv.noop))})};var nv={},ov=(Object.defineProperty(nv,"__esModule",{value:!0}),nv.sampleTime=void 0,ju),iv=J_,uv=mf;nv.sampleTime=function(e,t){return iv.sample(uv.interval(e,t=void 0===t?ov.asyncScheduler:t))};var av={},sv=(Object.defineProperty(av,"__esModule",{value:!0}),av.scan=void 0,g),cv=hd;av.scan=function(e,t){return sv.operate(cv.scanInternals(e,t,2<=arguments.length,!0))};var hd={},lv=(Object.defineProperty(hd,"__esModule",{value:!0}),hd.sequenceEqual=void 0,g),fv=O,pv=j;function dv(){return{buffer:[],complete:!1}}hd.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),lv.operate(function(e,t){function r(n,o){var r=fv.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=dv(),o=dv(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),pv.innerFrom(u).subscribe(r(o,n))})};var hv={},bv=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},yv=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},_v=(Object.defineProperty(hv,"__esModule",{value:!0}),hv.share=void 0,j),vv=E,mv=X,gv=g;function Ov(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 mv.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),_v.innerFrom(t.apply(void 0,yv([],bv(n)))).subscribe(r)}hv.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new vv.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 gv.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=Ov(n,b))}),r.subscribe(t),!o&&0<a&&(o=new mv.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=Ov(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=Ov(f,h),r.complete()}}),_v.innerFrom(e).subscribe(o))})(e)}};var wv={},Ev=(Object.defineProperty(wv,"__esModule",{value:!0}),wv.shareReplay=void 0,i),Pv=hv;wv.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,Pv.share({connector:function(){return new Ev.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var Sv={},Tv=(Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.single=void 0,Wa),jv=xs,Cv=Ks,Iv=g,Rv=O;Sv.single=function(a){return Iv.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(Rv.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new jv.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new Cv.NotFoundError("No matching values"):new Tv.EmptyError)}))})};var kv={},Av=(Object.defineProperty(kv,"__esModule",{value:!0}),kv.skip=void 0,Gf);kv.skip=function(r){return Av.filter(function(e,t){return r<=t})};var Mv={},Nv=(Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.skipLast=void 0,h),xv=g,Uv=O;Mv.skipLast=function(u){return u<=0?Nv.identity:xv.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(Uv.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 Dv={},Lv=(Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.skipUntil=void 0,g),Fv=O,Bv=j,Wv=t;Dv.skipUntil=function(o){return Lv.operate(function(e,t){var r=!1,n=Fv.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},Wv.noop);Bv.innerFrom(o).subscribe(n),e.subscribe(Fv.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var zv={},qv=(Object.defineProperty(zv,"__esModule",{value:!0}),zv.skipWhile=void 0,g),Vv=O;zv.skipWhile=function(o){return qv.operate(function(e,t){var r=!1,n=0;e.subscribe(Vv.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var Hv={},Gv=(Object.defineProperty(Hv,"__esModule",{value:!0}),Hv.startWith=void 0,_l),Yv=T,Kv=g;Hv.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Yv.popScheduler(r);return Kv.operate(function(e,t){(n?Gv.concat(r,e,n):Gv.concat(r,e)).subscribe(t)})};var Zv={},Qv={},Xv=(Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.switchMap=void 0,j),Jv=g,$v=O;Qv.switchMap=function(s,c){return Jv.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe($v.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;Xv.innerFrom(s(t,n)).subscribe(u=$v.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(Zv,"__esModule",{value:!0}),Zv.switchAll=void 0;var em=Qv,tm=h;Zv.switchAll=function(){return em.switchMap(tm.identity)};var rm={},nm=(Object.defineProperty(rm,"__esModule",{value:!0}),rm.switchMapTo=void 0,Qv),om=P;rm.switchMapTo=function(e,t){return om.isFunction(t)?nm.switchMap(function(){return e},t):nm.switchMap(function(){return e})};var im={},um=(Object.defineProperty(im,"__esModule",{value:!0}),im.switchScan=void 0,Qv),am=g;im.switchScan=function(n,o){return am.operate(function(e,t){var r=o;return um.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var sm={},cm=(Object.defineProperty(sm,"__esModule",{value:!0}),sm.takeUntil=void 0,g),lm=O,fm=j,pm=t;sm.takeUntil=function(r){return cm.operate(function(e,t){fm.innerFrom(r).subscribe(lm.createOperatorSubscriber(t,function(){return t.complete()},pm.noop)),t.closed||e.subscribe(t)})};var dm={},hm=(Object.defineProperty(dm,"__esModule",{value:!0}),dm.takeWhile=void 0,g),bm=O;dm.takeWhile=function(o,i){return void 0===i&&(i=!1),hm.operate(function(e,r){var n=0;e.subscribe(bm.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var ym={},_m=(Object.defineProperty(ym,"__esModule",{value:!0}),ym.tap=void 0,P),vm=g,mm=O,gm=h;ym.tap=function(e,t,r){var o=_m.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?vm.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(mm.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)}))}):gm.identity};var Om,wm,Em,Pm,P={},Sm=(Om=P,Object.defineProperty(Om,"__esModule",{value:!0}),Om.throttle=Om.defaultThrottleConfig=void 0,wm=g,Em=O,Pm=j,Om.defaultThrottleConfig={leading:!0,trailing:!1},Om.throttle=function(p,d){return void 0===d&&(d=Om.defaultThrottleConfig),wm.operate(function(e,t){function r(){var e;i&&(i=!1,e=u,u=null,t.next(e),s||f(e))}var n=d.leading,o=d.trailing,i=!1,u=null,a=null,s=!1,c=function(){null!=a&&a.unsubscribe(),a=null,o&&(r(),s&&t.complete())},l=function(){a=null,s&&t.complete()},f=function(e){return a=Pm.innerFrom(p(e)).subscribe(Em.createOperatorSubscriber(t,c,l))};e.subscribe(Em.createOperatorSubscriber(t,function(e){i=!0,u=e,a&&!a.closed||(n?r():f(e))},function(){s=!0,o&&i&&a&&!a.closed||t.complete()}))})},{}),Tm=(Object.defineProperty(Sm,"__esModule",{value:!0}),Sm.throttleTime=void 0,ju),jm=P,Cm=gf;Sm.throttleTime=function(e,t,r){void 0===r&&(r=jm.defaultThrottleConfig);var n=Cm.timer(e,t=void 0===t?Tm.asyncScheduler:t);return jm.throttle(function(){return n},r)};var Im={},Rm=(Object.defineProperty(Im,"__esModule",{value:!0}),Im.TimeInterval=Im.timeInterval=void 0,ju),km=g,Am=O;Im.timeInterval=function(i){return void 0===i&&(i=Rm.asyncScheduler),km.operate(function(e,n){var o=i.now();e.subscribe(Am.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new Mm(e,r))}))})};var Mm=function(e,t){this.value=e,this.interval=t},Nm=(Im.TimeInterval=Mm,{}),xm=(Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.timeoutWith=void 0,ju),Um=Fs,Dm=es;Nm.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:xm.async,Um.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 Dm.timeout({first:n,each:o,scheduler:r,with:e})};var Fs={},Lm=(Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.timestamp=void 0,Ct),Fm=Uc;Fs.timestamp=function(t){return void 0===t&&(t=Lm.dateTimestampProvider),Fm.map(function(e){return{value:e,timestamp:t.now()}})};var Ct={},Bm=(Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.window=void 0,E),Wm=g,zm=O,qm=t,Vm=j;Ct.window=function(o){return Wm.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new Bm.Subject;t.next(n.asObservable());return e.subscribe(zm.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),Vm.innerFrom(o).subscribe(zm.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new Bm.Subject)},qm.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var Hm={},Gm=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ym=(Object.defineProperty(Hm,"__esModule",{value:!0}),Hm.windowCount=void 0,E),Km=g,Zm=O;Hm.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return Km.operate(function(e,i){var u=[new Ym.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(Zm.createOperatorSubscriber(i,function(e){try{for(var t=Gm(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 Ym.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 Qm={},Xm=(Object.defineProperty(Qm,"__esModule",{value:!0}),Qm.windowTime=void 0,E),Jm=ju,$m=v,e0=g,t0=O,r0=Bt,n0=T,o0=Ts;Qm.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=n0.popScheduler(t))?e:Jm.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return e0.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(),r0.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new $m.Subscription,n.add(e),t=new Xm.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),o0.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?o0.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(t0.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 Ts={},i0=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.")},u0=(Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.windowToggle=void 0,E),a0=v,s0=g,c0=j,l0=O,f0=t,p0=Bt;Ts.windowToggle=function(t,a){return s0.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];c0.innerFrom(t).subscribe(l0.createOperatorSubscriber(o,function(e){var t,r=new u0.Subject,n=(u.push(r),new a0.Subscription);try{t=c0.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(l0.createOperatorSubscriber(o,function(){p0.arrRemove(u,r),r.complete(),n.unsubscribe()},f0.noop,i)))},f0.noop)),e.subscribe(l0.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=i0(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 Bt={},d0=(Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.windowWhen=void 0,E),h0=g,b0=O,y0=j;Bt.windowWhen=function(u){return h0.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 d0.Subject,t.next(r.asObservable());try{e=y0.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=b0.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(b0.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var _0={},v0=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},m0=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},g0=(Object.defineProperty(_0,"__esModule",{value:!0}),_0.withLatestFrom=void 0,g),O0=O,w0=j,E0=h,P0=t,S0=T;_0.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=S0.popResultSelector(a);return g0.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){w0.innerFrom(a[t]).subscribe(O0.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(E0.identity))&&(o=null))},P0.noop))}(u);e.subscribe(O0.createOperatorSubscriber(r,function(e){i&&(e=m0([e],v0(n)),r.next(s?s.apply(void 0,m0([],v0(e))):e))}))})};var O={},T0=(Object.defineProperty(O,"__esModule",{value:!0}),O.zipAll=void 0,fp),j0=C;O.zipAll=function(e){return j0.joinAllInternals(T0.zip,e)};var j={},T={},C0=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},I0=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},R0=(Object.defineProperty(T,"__esModule",{value:!0}),T.zip=void 0,fp),k0=g;T.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return k0.operate(function(e,t){R0.zip.apply(void 0,I0([e],C0(r))).subscribe(t)})};var A0,M0,N0,x0,U0,D0,L0,F0,B0,W0,z0,q0,V0,H0,G0,Y0,K0,Z0,Q0,X0,J0,$0,eg,tg,rg,ng,og,ig,ug,ag,sg,cg,lg,fg,pg,dg,hg,bg,yg,_g,vg,mg,gg,Og,wg,Eg,Pg,Sg,Tg,jg,Cg,Ig,Rg,kg,Ag,Mg,Ng,xg,Ug,Dg,Lg,Fg,Bg,Wg,zg,qg,Vg,Hg,Gg,Yg,Kg,Zg,Qg,Xg,Jg,$g,eO,tO,rO,nO,oO,iO,uO,aO,sO,cO,lO,fO,pO,dO,hO,bO,yO,_O,vO,mO,gO,OO,wO,EO,PO,SO,TO,jO,CO,IO,RO,kO,AO,MO,NO,xO,UO,DO,LO,FO,BO,WO,zO,qO,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,Iw,Rw,kw,Aw,Mw,Nw,xw,Uw,Dw,Lw=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},Fw=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},Bw=(Object.defineProperty(j,"__esModule",{value:!0}),j.zipWith=void 0,T);j.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Bw.zip.apply(void 0,Fw([],Lw(e)))},C=Lr,A0=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)||A0(t,e,r)},Object.defineProperty(C,"__esModule",{value:!0}),C.interval=C.iif=C.generate=C.fromEventPattern=C.fromEvent=C.from=C.forkJoin=C.empty=C.defer=C.connectable=C.concat=C.combineLatest=C.bindNodeCallback=C.bindCallback=C.UnsubscriptionError=C.TimeoutError=C.SequenceError=C.ObjectUnsubscribedError=C.NotFoundError=C.EmptyError=C.ArgumentOutOfRangeError=C.firstValueFrom=C.lastValueFrom=C.isObservable=C.identity=C.noop=C.pipe=C.NotificationKind=C.Notification=C.Subscriber=C.Subscription=C.Scheduler=C.VirtualAction=C.VirtualTimeScheduler=C.animationFrameScheduler=C.animationFrame=C.queueScheduler=C.queue=C.asyncScheduler=C.async=C.asapScheduler=C.asap=C.AsyncSubject=C.ReplaySubject=C.BehaviorSubject=C.Subject=C.animationFrames=C.observable=C.ConnectableObservable=C.Observable=void 0,C.filter=C.expand=C.exhaustMap=C.exhaustAll=C.exhaust=C.every=C.endWith=C.elementAt=C.distinctUntilKeyChanged=C.distinctUntilChanged=C.distinct=C.dematerialize=C.delayWhen=C.delay=C.defaultIfEmpty=C.debounceTime=C.debounce=C.count=C.connect=C.concatWith=C.concatMapTo=C.concatMap=C.concatAll=C.combineLatestWith=C.combineLatestAll=C.combineAll=C.catchError=C.bufferWhen=C.bufferToggle=C.bufferTime=C.bufferCount=C.buffer=C.auditTime=C.audit=C.config=C.NEVER=C.EMPTY=C.scheduled=C.zip=C.using=C.timer=C.throwError=C.range=C.race=C.partition=C.pairs=C.onErrorResumeNext=C.of=C.never=C.merge=void 0,C.switchMap=C.switchAll=C.subscribeOn=C.startWith=C.skipWhile=C.skipUntil=C.skipLast=C.skip=C.single=C.shareReplay=C.share=C.sequenceEqual=C.scan=C.sampleTime=C.sample=C.refCount=C.retryWhen=C.retry=C.repeatWhen=C.repeat=C.reduce=C.raceWith=C.publishReplay=C.publishLast=C.publishBehavior=C.publish=C.pluck=C.pairwise=C.onErrorResumeNextWith=C.observeOn=C.multicast=C.min=C.mergeWith=C.mergeScan=C.mergeMapTo=C.mergeMap=C.flatMap=C.mergeAll=C.max=C.materialize=C.mapTo=C.map=C.last=C.isEmpty=C.ignoreElements=C.groupBy=C.first=C.findIndex=C.find=C.finalize=void 0,C.zipWith=C.zipAll=C.withLatestFrom=C.windowWhen=C.windowToggle=C.windowTime=C.windowCount=C.window=C.toArray=C.timestamp=C.timeoutWith=C.timeout=C.timeInterval=C.throwIfEmpty=C.throttleTime=C.throttle=C.tap=C.takeWhile=C.takeUntil=C.takeLast=C.take=C.switchScan=C.switchMapTo=void 0,M0=w,Object.defineProperty(C,"Observable",{enumerable:!0,get:function(){return M0.Observable}}),N0=jt,Object.defineProperty(C,"ConnectableObservable",{enumerable:!0,get:function(){return N0.ConnectableObservable}}),x0=n,Object.defineProperty(C,"observable",{enumerable:!0,get:function(){return x0.observable}}),U0=f,Object.defineProperty(C,"animationFrames",{enumerable:!0,get:function(){return U0.animationFrames}}),D0=E,Object.defineProperty(C,"Subject",{enumerable:!0,get:function(){return D0.Subject}}),L0=p,Object.defineProperty(C,"BehaviorSubject",{enumerable:!0,get:function(){return L0.BehaviorSubject}}),F0=i,Object.defineProperty(C,"ReplaySubject",{enumerable:!0,get:function(){return F0.ReplaySubject}}),B0=b,Object.defineProperty(C,"AsyncSubject",{enumerable:!0,get:function(){return B0.AsyncSubject}}),W0=l,Object.defineProperty(C,"asap",{enumerable:!0,get:function(){return W0.asap}}),Object.defineProperty(C,"asapScheduler",{enumerable:!0,get:function(){return W0.asapScheduler}}),z0=ju,Object.defineProperty(C,"async",{enumerable:!0,get:function(){return z0.async}}),Object.defineProperty(C,"asyncScheduler",{enumerable:!0,get:function(){return z0.asyncScheduler}}),q0=$u,Object.defineProperty(C,"queue",{enumerable:!0,get:function(){return q0.queue}}),Object.defineProperty(C,"queueScheduler",{enumerable:!0,get:function(){return q0.queueScheduler}}),V0=ca,Object.defineProperty(C,"animationFrame",{enumerable:!0,get:function(){return V0.animationFrame}}),Object.defineProperty(C,"animationFrameScheduler",{enumerable:!0,get:function(){return V0.animationFrameScheduler}}),H0=da,Object.defineProperty(C,"VirtualTimeScheduler",{enumerable:!0,get:function(){return H0.VirtualTimeScheduler}}),Object.defineProperty(C,"VirtualAction",{enumerable:!0,get:function(){return H0.VirtualAction}}),G0=xu,Object.defineProperty(C,"Scheduler",{enumerable:!0,get:function(){return G0.Scheduler}}),Y0=v,Object.defineProperty(C,"Subscription",{enumerable:!0,get:function(){return Y0.Subscription}}),K0=X,Object.defineProperty(C,"Subscriber",{enumerable:!0,get:function(){return K0.Subscriber}}),Z0=Cu,Object.defineProperty(C,"Notification",{enumerable:!0,get:function(){return Z0.Notification}}),Object.defineProperty(C,"NotificationKind",{enumerable:!0,get:function(){return Z0.NotificationKind}}),Q0=o,Object.defineProperty(C,"pipe",{enumerable:!0,get:function(){return Q0.pipe}}),X0=t,Object.defineProperty(C,"noop",{enumerable:!0,get:function(){return X0.noop}}),J0=h,Object.defineProperty(C,"identity",{enumerable:!0,get:function(){return J0.identity}}),$0=Qa,Object.defineProperty(C,"isObservable",{enumerable:!0,get:function(){return $0.isObservable}}),eg=qa,Object.defineProperty(C,"lastValueFrom",{enumerable:!0,get:function(){return eg.lastValueFrom}}),tg=Ga,Object.defineProperty(C,"firstValueFrom",{enumerable:!0,get:function(){return tg.firstValueFrom}}),rg=Ka,Object.defineProperty(C,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return rg.ArgumentOutOfRangeError}}),ng=Wa,Object.defineProperty(C,"EmptyError",{enumerable:!0,get:function(){return ng.EmptyError}}),og=Ks,Object.defineProperty(C,"NotFoundError",{enumerable:!0,get:function(){return og.NotFoundError}}),ig=Q,Object.defineProperty(C,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return ig.ObjectUnsubscribedError}}),ug=xs,Object.defineProperty(C,"SequenceError",{enumerable:!0,get:function(){return ug.SequenceError}}),ag=es,Object.defineProperty(C,"TimeoutError",{enumerable:!0,get:function(){return ag.TimeoutError}}),sg=y,Object.defineProperty(C,"UnsubscriptionError",{enumerable:!0,get:function(){return sg.UnsubscriptionError}}),cg=Za,Object.defineProperty(C,"bindCallback",{enumerable:!0,get:function(){return cg.bindCallback}}),lg=Jc,Object.defineProperty(C,"bindNodeCallback",{enumerable:!0,get:function(){return lg.bindNodeCallback}}),fg=_,Object.defineProperty(C,"combineLatest",{enumerable:!0,get:function(){return fg.combineLatest}}),pg=_l,Object.defineProperty(C,"concat",{enumerable:!0,get:function(){return pg.concat}}),dg=Ul,Object.defineProperty(C,"connectable",{enumerable:!0,get:function(){return dg.connectable}}),hg=Dl,Object.defineProperty(C,"defer",{enumerable:!0,get:function(){return hg.defer}}),bg=Tu,Object.defineProperty(C,"empty",{enumerable:!0,get:function(){return bg.empty}}),yg=Vl,Object.defineProperty(C,"forkJoin",{enumerable:!0,get:function(){return yg.forkJoin}}),_g=Da,Object.defineProperty(C,"from",{enumerable:!0,get:function(){return _g.from}}),vg=el,Object.defineProperty(C,"fromEvent",{enumerable:!0,get:function(){return vg.fromEvent}}),mg=il,Object.defineProperty(C,"fromEventPattern",{enumerable:!0,get:function(){return mg.fromEventPattern}}),gg=Ba,Object.defineProperty(C,"generate",{enumerable:!0,get:function(){return gg.generate}}),Og=Ws,Object.defineProperty(C,"iif",{enumerable:!0,get:function(){return Og.iif}}),wg=mf,Object.defineProperty(C,"interval",{enumerable:!0,get:function(){return wg.interval}}),Eg=Aa,Object.defineProperty(C,"merge",{enumerable:!0,get:function(){return Eg.merge}}),Pg=Mf,Object.defineProperty(C,"never",{enumerable:!0,get:function(){return Pg.never}}),Sg=s,Object.defineProperty(C,"of",{enumerable:!0,get:function(){return Sg.of}}),Tg=Nf,Object.defineProperty(C,"onErrorResumeNext",{enumerable:!0,get:function(){return Tg.onErrorResumeNext}}),jg=zf,Object.defineProperty(C,"pairs",{enumerable:!0,get:function(){return jg.pairs}}),Cg=Vf,Object.defineProperty(C,"partition",{enumerable:!0,get:function(){return Cg.partition}}),Ig=Jf,Object.defineProperty(C,"race",{enumerable:!0,get:function(){return Ig.race}}),Rg=op,Object.defineProperty(C,"range",{enumerable:!0,get:function(){return Rg.range}}),kg=Fa,Object.defineProperty(C,"throwError",{enumerable:!0,get:function(){return kg.throwError}}),Ag=gf,Object.defineProperty(C,"timer",{enumerable:!0,get:function(){return Ag.timer}}),Mg=ap,Object.defineProperty(C,"using",{enumerable:!0,get:function(){return Mg.using}}),Ng=fp,Object.defineProperty(C,"zip",{enumerable:!0,get:function(){return Ng.zip}}),xg=La,Object.defineProperty(C,"scheduled",{enumerable:!0,get:function(){return xg.scheduled}}),Ug=Tu,Object.defineProperty(C,"EMPTY",{enumerable:!0,get:function(){return Ug.EMPTY}}),Dg=Mf,Object.defineProperty(C,"NEVER",{enumerable:!0,get:function(){return Dg.NEVER}}),g(gp,C),Lg=u,Object.defineProperty(C,"config",{enumerable:!0,get:function(){return Lg.config}}),Fg=Op,Object.defineProperty(C,"audit",{enumerable:!0,get:function(){return Fg.audit}}),Bg=Sp,Object.defineProperty(C,"auditTime",{enumerable:!0,get:function(){return Bg.auditTime}}),Wg=Ip,Object.defineProperty(C,"buffer",{enumerable:!0,get:function(){return Wg.buffer}}),zg=Np,Object.defineProperty(C,"bufferCount",{enumerable:!0,get:function(){return zg.bufferCount}}),qg=Fp,Object.defineProperty(C,"bufferTime",{enumerable:!0,get:function(){return qg.bufferTime}}),Vg=Kp,Object.defineProperty(C,"bufferToggle",{enumerable:!0,get:function(){return Vg.bufferToggle}}),Hg=rd,Object.defineProperty(C,"bufferWhen",{enumerable:!0,get:function(){return Hg.bufferWhen}}),Gg=ad,Object.defineProperty(C,"catchError",{enumerable:!0,get:function(){return Gg.catchError}}),Yg=fd,Object.defineProperty(C,"combineAll",{enumerable:!0,get:function(){return Yg.combineAll}}),Kg=pd,Object.defineProperty(C,"combineLatestAll",{enumerable:!0,get:function(){return Kg.combineLatestAll}}),Zg=Cd,Object.defineProperty(C,"combineLatestWith",{enumerable:!0,get:function(){return Zg.combineLatestWith}}),Qg=vl,Object.defineProperty(C,"concatAll",{enumerable:!0,get:function(){return Qg.concatAll}}),Xg=xc,Object.defineProperty(C,"concatMap",{enumerable:!0,get:function(){return Xg.concatMap}}),Jg=Vd,Object.defineProperty(C,"concatMapTo",{enumerable:!0,get:function(){return Jg.concatMapTo}}),$g=Yd,Object.defineProperty(C,"concatWith",{enumerable:!0,get:function(){return $g.concatWith}}),eO=oh,Object.defineProperty(C,"connect",{enumerable:!0,get:function(){return eO.connect}}),tO=ih,Object.defineProperty(C,"count",{enumerable:!0,get:function(){return tO.count}}),rO=dh,Object.defineProperty(C,"debounce",{enumerable:!0,get:function(){return rO.debounce}}),nO=R,Object.defineProperty(C,"debounceTime",{enumerable:!0,get:function(){return nO.debounceTime}}),oO=Oh,Object.defineProperty(C,"defaultIfEmpty",{enumerable:!0,get:function(){return oO.defaultIfEmpty}}),iO=Ph,Object.defineProperty(C,"delay",{enumerable:!0,get:function(){return iO.delay}}),uO=Sh,Object.defineProperty(C,"delayWhen",{enumerable:!0,get:function(){return uO.delayWhen}}),aO=Hh,Object.defineProperty(C,"dematerialize",{enumerable:!0,get:function(){return aO.dematerialize}}),sO=Zh,Object.defineProperty(C,"distinct",{enumerable:!0,get:function(){return sO.distinct}}),cO=eb,Object.defineProperty(C,"distinctUntilChanged",{enumerable:!0,get:function(){return cO.distinctUntilChanged}}),lO=ib,Object.defineProperty(C,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return lO.distinctUntilKeyChanged}}),fO=ab,Object.defineProperty(C,"elementAt",{enumerable:!0,get:function(){return fO.elementAt}}),pO=vb,Object.defineProperty(C,"endWith",{enumerable:!0,get:function(){return pO.endWith}}),dO=Eb,Object.defineProperty(C,"every",{enumerable:!0,get:function(){return dO.every}}),hO=Tb,Object.defineProperty(C,"exhaust",{enumerable:!0,get:function(){return hO.exhaust}}),bO=jb,Object.defineProperty(C,"exhaustAll",{enumerable:!0,get:function(){return bO.exhaustAll}}),yO=Cb,Object.defineProperty(C,"exhaustMap",{enumerable:!0,get:function(){return yO.exhaustMap}}),_O=xb,Object.defineProperty(C,"expand",{enumerable:!0,get:function(){return _O.expand}}),vO=Gf,Object.defineProperty(C,"filter",{enumerable:!0,get:function(){return vO.filter}}),mO=Lb,Object.defineProperty(C,"finalize",{enumerable:!0,get:function(){return mO.finalize}}),gO=Bb,Object.defineProperty(C,"find",{enumerable:!0,get:function(){return gO.find}}),OO=Vb,Object.defineProperty(C,"findIndex",{enumerable:!0,get:function(){return OO.findIndex}}),wO=Yb,Object.defineProperty(C,"first",{enumerable:!0,get:function(){return wO.first}}),EO=ey,Object.defineProperty(C,"groupBy",{enumerable:!0,get:function(){return EO.groupBy}}),PO=Rh,Object.defineProperty(C,"ignoreElements",{enumerable:!0,get:function(){return PO.ignoreElements}}),SO=uy,Object.defineProperty(C,"isEmpty",{enumerable:!0,get:function(){return SO.isEmpty}}),TO=cy,Object.defineProperty(C,"last",{enumerable:!0,get:function(){return TO.last}}),jO=Uc,Object.defineProperty(C,"map",{enumerable:!0,get:function(){return jO.map}}),CO=Nh,Object.defineProperty(C,"mapTo",{enumerable:!0,get:function(){return CO.mapTo}}),IO=Oy,Object.defineProperty(C,"materialize",{enumerable:!0,get:function(){return IO.materialize}}),RO=Sy,Object.defineProperty(C,"max",{enumerable:!0,get:function(){return RO.max}}),kO=ml,Object.defineProperty(C,"mergeAll",{enumerable:!0,get:function(){return kO.mergeAll}}),AO=Cy,Object.defineProperty(C,"flatMap",{enumerable:!0,get:function(){return AO.flatMap}}),MO=gl,Object.defineProperty(C,"mergeMap",{enumerable:!0,get:function(){return MO.mergeMap}}),NO=Iy,Object.defineProperty(C,"mergeMapTo",{enumerable:!0,get:function(){return NO.mergeMapTo}}),xO=Ay,Object.defineProperty(C,"mergeScan",{enumerable:!0,get:function(){return xO.mergeScan}}),UO=Ol,Object.defineProperty(C,"mergeWith",{enumerable:!0,get:function(){return UO.mergeWith}}),DO=Gy,Object.defineProperty(C,"min",{enumerable:!0,get:function(){return DO.min}}),LO=Zy,Object.defineProperty(C,"multicast",{enumerable:!0,get:function(){return LO.multicast}}),FO=S,Object.defineProperty(C,"observeOn",{enumerable:!0,get:function(){return FO.observeOn}}),BO=$y,Object.defineProperty(C,"onErrorResumeNextWith",{enumerable:!0,get:function(){return BO.onErrorResumeNextWith}}),WO=i_,Object.defineProperty(C,"pairwise",{enumerable:!0,get:function(){return WO.pairwise}}),zO=s_,Object.defineProperty(C,"pluck",{enumerable:!0,get:function(){return zO.pluck}}),qO=l_,Object.defineProperty(C,"publish",{enumerable:!0,get:function(){return qO.publish}}),VO=h_,Object.defineProperty(C,"publishBehavior",{enumerable:!0,get:function(){return VO.publishBehavior}}),HO=__,Object.defineProperty(C,"publishLast",{enumerable:!0,get:function(){return HO.publishLast}}),GO=g_,Object.defineProperty(C,"publishReplay",{enumerable:!0,get:function(){return GO.publishReplay}}),YO=P_,Object.defineProperty(C,"raceWith",{enumerable:!0,get:function(){return YO.raceWith}}),KO=I,Object.defineProperty(C,"reduce",{enumerable:!0,get:function(){return KO.reduce}}),ZO=R_,Object.defineProperty(C,"repeat",{enumerable:!0,get:function(){return ZO.repeat}}),QO=U_,Object.defineProperty(C,"repeatWhen",{enumerable:!0,get:function(){return QO.repeatWhen}}),XO=W_,Object.defineProperty(C,"retry",{enumerable:!0,get:function(){return XO.retry}}),JO=Y_,Object.defineProperty(C,"retryWhen",{enumerable:!0,get:function(){return JO.retryWhen}}),$O=m,Object.defineProperty(C,"refCount",{enumerable:!0,get:function(){return $O.refCount}}),ew=J_,Object.defineProperty(C,"sample",{enumerable:!0,get:function(){return ew.sample}}),tw=nv,Object.defineProperty(C,"sampleTime",{enumerable:!0,get:function(){return tw.sampleTime}}),rw=av,Object.defineProperty(C,"scan",{enumerable:!0,get:function(){return rw.scan}}),nw=hd,Object.defineProperty(C,"sequenceEqual",{enumerable:!0,get:function(){return nw.sequenceEqual}}),ow=hv,Object.defineProperty(C,"share",{enumerable:!0,get:function(){return ow.share}}),iw=wv,Object.defineProperty(C,"shareReplay",{enumerable:!0,get:function(){return iw.shareReplay}}),uw=Sv,Object.defineProperty(C,"single",{enumerable:!0,get:function(){return uw.single}}),aw=kv,Object.defineProperty(C,"skip",{enumerable:!0,get:function(){return aw.skip}}),sw=Mv,Object.defineProperty(C,"skipLast",{enumerable:!0,get:function(){return sw.skipLast}}),cw=Dv,Object.defineProperty(C,"skipUntil",{enumerable:!0,get:function(){return cw.skipUntil}}),lw=zv,Object.defineProperty(C,"skipWhile",{enumerable:!0,get:function(){return lw.skipWhile}}),fw=Hv,Object.defineProperty(C,"startWith",{enumerable:!0,get:function(){return fw.startWith}}),pw=Rs,Object.defineProperty(C,"subscribeOn",{enumerable:!0,get:function(){return pw.subscribeOn}}),dw=Zv,Object.defineProperty(C,"switchAll",{enumerable:!0,get:function(){return dw.switchAll}}),hw=Qv,Object.defineProperty(C,"switchMap",{enumerable:!0,get:function(){return hw.switchMap}}),bw=rm,Object.defineProperty(C,"switchMapTo",{enumerable:!0,get:function(){return bw.switchMapTo}}),yw=im,Object.defineProperty(C,"switchScan",{enumerable:!0,get:function(){return yw.switchScan}}),_w=Th,Object.defineProperty(C,"take",{enumerable:!0,get:function(){return _w.take}}),vw=ly,Object.defineProperty(C,"takeLast",{enumerable:!0,get:function(){return vw.takeLast}}),mw=sm,Object.defineProperty(C,"takeUntil",{enumerable:!0,get:function(){return mw.takeUntil}}),gw=dm,Object.defineProperty(C,"takeWhile",{enumerable:!0,get:function(){return gw.takeWhile}}),Ow=ym,Object.defineProperty(C,"tap",{enumerable:!0,get:function(){return Ow.tap}}),ww=P,Object.defineProperty(C,"throttle",{enumerable:!0,get:function(){return ww.throttle}}),Ew=Sm,Object.defineProperty(C,"throttleTime",{enumerable:!0,get:function(){return Ew.throttleTime}}),Pw=sb,Object.defineProperty(C,"throwIfEmpty",{enumerable:!0,get:function(){return Pw.throwIfEmpty}}),Sw=Im,Object.defineProperty(C,"timeInterval",{enumerable:!0,get:function(){return Sw.timeInterval}}),Tw=es,Object.defineProperty(C,"timeout",{enumerable:!0,get:function(){return Tw.timeout}}),jw=Nm,Object.defineProperty(C,"timeoutWith",{enumerable:!0,get:function(){return jw.timeoutWith}}),Cw=Fs,Object.defineProperty(C,"timestamp",{enumerable:!0,get:function(){return Cw.timestamp}}),Iw=dd,Object.defineProperty(C,"toArray",{enumerable:!0,get:function(){return Iw.toArray}}),Rw=Ct,Object.defineProperty(C,"window",{enumerable:!0,get:function(){return Rw.window}}),kw=Hm,Object.defineProperty(C,"windowCount",{enumerable:!0,get:function(){return kw.windowCount}}),Aw=Qm,Object.defineProperty(C,"windowTime",{enumerable:!0,get:function(){return Aw.windowTime}}),Mw=Ts,Object.defineProperty(C,"windowToggle",{enumerable:!0,get:function(){return Mw.windowToggle}}),Nw=Bt,Object.defineProperty(C,"windowWhen",{enumerable:!0,get:function(){return Nw.windowWhen}}),xw=_0,Object.defineProperty(C,"withLatestFrom",{enumerable:!0,get:function(){return xw.withLatestFrom}}),Uw=O,Object.defineProperty(C,"zipAll",{enumerable:!0,get:function(){return Uw.zipAll}}),Dw=j,Object.defineProperty(C,"zipWith",{enumerable:!0,get:function(){return Dw.zipWith}});var w={},jt={},Ww=(Object.defineProperty(jt,"__esModule",{value:!0}),jt.partition=void 0,Hf),zw=Gf;jt.partition=function(t,r){return function(e){return[zw.filter(t,r)(e),zw.filter(Ww.not(t,r))(e)]}};var qw,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,IE,RE,kE,AE,ME,NE,xE,UE,DE,LE,FE,BE,WE,zE,qE,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,IP,RP,kP,AP,MP,NP,xP,UP,DP,LP,FP,BP,WP,zP,qP,VP,HP,GP,YP,n={},KP=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ZP=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},QP=(Object.defineProperty(n,"__esModule",{value:!0}),n.race=void 0,xf),XP=P_;n.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return XP.raceWith.apply(void 0,ZP([],KP(QP.argsOrArgArray(e))))},f=w,Object.defineProperty(f,"__esModule",{value:!0}),f.mergeAll=f.merge=f.max=f.materialize=f.mapTo=f.map=f.last=f.isEmpty=f.ignoreElements=f.groupBy=f.first=f.findIndex=f.find=f.finalize=f.filter=f.expand=f.exhaustMap=f.exhaustAll=f.exhaust=f.every=f.endWith=f.elementAt=f.distinctUntilKeyChanged=f.distinctUntilChanged=f.distinct=f.dematerialize=f.delayWhen=f.delay=f.defaultIfEmpty=f.debounceTime=f.debounce=f.count=f.connect=f.concatWith=f.concatMapTo=f.concatMap=f.concatAll=f.concat=f.combineLatestWith=f.combineLatest=f.combineLatestAll=f.combineAll=f.catchError=f.bufferWhen=f.bufferToggle=f.bufferTime=f.bufferCount=f.buffer=f.auditTime=f.audit=void 0,f.timeInterval=f.throwIfEmpty=f.throttleTime=f.throttle=f.tap=f.takeWhile=f.takeUntil=f.takeLast=f.take=f.switchScan=f.switchMapTo=f.switchMap=f.switchAll=f.subscribeOn=f.startWith=f.skipWhile=f.skipUntil=f.skipLast=f.skip=f.single=f.shareReplay=f.share=f.sequenceEqual=f.scan=f.sampleTime=f.sample=f.refCount=f.retryWhen=f.retry=f.repeatWhen=f.repeat=f.reduce=f.raceWith=f.race=f.publishReplay=f.publishLast=f.publishBehavior=f.publish=f.pluck=f.partition=f.pairwise=f.onErrorResumeNext=f.observeOn=f.multicast=f.min=f.mergeWith=f.mergeScan=f.mergeMapTo=f.mergeMap=f.flatMap=void 0,f.zipWith=f.zipAll=f.zip=f.withLatestFrom=f.windowWhen=f.windowToggle=f.windowTime=f.windowCount=f.window=f.toArray=f.timestamp=f.timeoutWith=f.timeout=void 0,qw=Op,Object.defineProperty(f,"audit",{enumerable:!0,get:function(){return qw.audit}}),Vw=Sp,Object.defineProperty(f,"auditTime",{enumerable:!0,get:function(){return Vw.auditTime}}),Hw=Ip,Object.defineProperty(f,"buffer",{enumerable:!0,get:function(){return Hw.buffer}}),Gw=Np,Object.defineProperty(f,"bufferCount",{enumerable:!0,get:function(){return Gw.bufferCount}}),Yw=Fp,Object.defineProperty(f,"bufferTime",{enumerable:!0,get:function(){return Yw.bufferTime}}),Kw=Kp,Object.defineProperty(f,"bufferToggle",{enumerable:!0,get:function(){return Kw.bufferToggle}}),Zw=rd,Object.defineProperty(f,"bufferWhen",{enumerable:!0,get:function(){return Zw.bufferWhen}}),Qw=ad,Object.defineProperty(f,"catchError",{enumerable:!0,get:function(){return Qw.catchError}}),Xw=fd,Object.defineProperty(f,"combineAll",{enumerable:!0,get:function(){return Xw.combineAll}}),Jw=pd,Object.defineProperty(f,"combineLatestAll",{enumerable:!0,get:function(){return Jw.combineLatestAll}}),$w=Id,Object.defineProperty(f,"combineLatest",{enumerable:!0,get:function(){return $w.combineLatest}}),eE=Cd,Object.defineProperty(f,"combineLatestWith",{enumerable:!0,get:function(){return eE.combineLatestWith}}),tE=Kd,Object.defineProperty(f,"concat",{enumerable:!0,get:function(){return tE.concat}}),rE=vl,Object.defineProperty(f,"concatAll",{enumerable:!0,get:function(){return rE.concatAll}}),nE=xc,Object.defineProperty(f,"concatMap",{enumerable:!0,get:function(){return nE.concatMap}}),oE=Vd,Object.defineProperty(f,"concatMapTo",{enumerable:!0,get:function(){return oE.concatMapTo}}),iE=Yd,Object.defineProperty(f,"concatWith",{enumerable:!0,get:function(){return iE.concatWith}}),uE=oh,Object.defineProperty(f,"connect",{enumerable:!0,get:function(){return uE.connect}}),aE=ih,Object.defineProperty(f,"count",{enumerable:!0,get:function(){return aE.count}}),sE=dh,Object.defineProperty(f,"debounce",{enumerable:!0,get:function(){return sE.debounce}}),cE=R,Object.defineProperty(f,"debounceTime",{enumerable:!0,get:function(){return cE.debounceTime}}),lE=Oh,Object.defineProperty(f,"defaultIfEmpty",{enumerable:!0,get:function(){return lE.defaultIfEmpty}}),fE=Ph,Object.defineProperty(f,"delay",{enumerable:!0,get:function(){return fE.delay}}),pE=Sh,Object.defineProperty(f,"delayWhen",{enumerable:!0,get:function(){return pE.delayWhen}}),dE=Hh,Object.defineProperty(f,"dematerialize",{enumerable:!0,get:function(){return dE.dematerialize}}),hE=Zh,Object.defineProperty(f,"distinct",{enumerable:!0,get:function(){return hE.distinct}}),bE=eb,Object.defineProperty(f,"distinctUntilChanged",{enumerable:!0,get:function(){return bE.distinctUntilChanged}}),yE=ib,Object.defineProperty(f,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return yE.distinctUntilKeyChanged}}),_E=ab,Object.defineProperty(f,"elementAt",{enumerable:!0,get:function(){return _E.elementAt}}),vE=vb,Object.defineProperty(f,"endWith",{enumerable:!0,get:function(){return vE.endWith}}),mE=Eb,Object.defineProperty(f,"every",{enumerable:!0,get:function(){return mE.every}}),gE=Tb,Object.defineProperty(f,"exhaust",{enumerable:!0,get:function(){return gE.exhaust}}),OE=jb,Object.defineProperty(f,"exhaustAll",{enumerable:!0,get:function(){return OE.exhaustAll}}),wE=Cb,Object.defineProperty(f,"exhaustMap",{enumerable:!0,get:function(){return wE.exhaustMap}}),EE=xb,Object.defineProperty(f,"expand",{enumerable:!0,get:function(){return EE.expand}}),PE=Gf,Object.defineProperty(f,"filter",{enumerable:!0,get:function(){return PE.filter}}),SE=Lb,Object.defineProperty(f,"finalize",{enumerable:!0,get:function(){return SE.finalize}}),TE=Bb,Object.defineProperty(f,"find",{enumerable:!0,get:function(){return TE.find}}),jE=Vb,Object.defineProperty(f,"findIndex",{enumerable:!0,get:function(){return jE.findIndex}}),CE=Yb,Object.defineProperty(f,"first",{enumerable:!0,get:function(){return CE.first}}),IE=ey,Object.defineProperty(f,"groupBy",{enumerable:!0,get:function(){return IE.groupBy}}),RE=Rh,Object.defineProperty(f,"ignoreElements",{enumerable:!0,get:function(){return RE.ignoreElements}}),kE=uy,Object.defineProperty(f,"isEmpty",{enumerable:!0,get:function(){return kE.isEmpty}}),AE=cy,Object.defineProperty(f,"last",{enumerable:!0,get:function(){return AE.last}}),ME=Uc,Object.defineProperty(f,"map",{enumerable:!0,get:function(){return ME.map}}),NE=Nh,Object.defineProperty(f,"mapTo",{enumerable:!0,get:function(){return NE.mapTo}}),xE=Oy,Object.defineProperty(f,"materialize",{enumerable:!0,get:function(){return xE.materialize}}),UE=Sy,Object.defineProperty(f,"max",{enumerable:!0,get:function(){return UE.max}}),DE=xy,Object.defineProperty(f,"merge",{enumerable:!0,get:function(){return DE.merge}}),LE=ml,Object.defineProperty(f,"mergeAll",{enumerable:!0,get:function(){return LE.mergeAll}}),FE=Cy,Object.defineProperty(f,"flatMap",{enumerable:!0,get:function(){return FE.flatMap}}),BE=gl,Object.defineProperty(f,"mergeMap",{enumerable:!0,get:function(){return BE.mergeMap}}),WE=Iy,Object.defineProperty(f,"mergeMapTo",{enumerable:!0,get:function(){return WE.mergeMapTo}}),zE=Ay,Object.defineProperty(f,"mergeScan",{enumerable:!0,get:function(){return zE.mergeScan}}),qE=Ol,Object.defineProperty(f,"mergeWith",{enumerable:!0,get:function(){return qE.mergeWith}}),VE=Gy,Object.defineProperty(f,"min",{enumerable:!0,get:function(){return VE.min}}),HE=Zy,Object.defineProperty(f,"multicast",{enumerable:!0,get:function(){return HE.multicast}}),GE=S,Object.defineProperty(f,"observeOn",{enumerable:!0,get:function(){return GE.observeOn}}),YE=$y,Object.defineProperty(f,"onErrorResumeNext",{enumerable:!0,get:function(){return YE.onErrorResumeNext}}),KE=i_,Object.defineProperty(f,"pairwise",{enumerable:!0,get:function(){return KE.pairwise}}),ZE=jt,Object.defineProperty(f,"partition",{enumerable:!0,get:function(){return ZE.partition}}),QE=s_,Object.defineProperty(f,"pluck",{enumerable:!0,get:function(){return QE.pluck}}),XE=l_,Object.defineProperty(f,"publish",{enumerable:!0,get:function(){return XE.publish}}),JE=h_,Object.defineProperty(f,"publishBehavior",{enumerable:!0,get:function(){return JE.publishBehavior}}),$E=__,Object.defineProperty(f,"publishLast",{enumerable:!0,get:function(){return $E.publishLast}}),eP=g_,Object.defineProperty(f,"publishReplay",{enumerable:!0,get:function(){return eP.publishReplay}}),tP=n,Object.defineProperty(f,"race",{enumerable:!0,get:function(){return tP.race}}),rP=P_,Object.defineProperty(f,"raceWith",{enumerable:!0,get:function(){return rP.raceWith}}),nP=I,Object.defineProperty(f,"reduce",{enumerable:!0,get:function(){return nP.reduce}}),oP=R_,Object.defineProperty(f,"repeat",{enumerable:!0,get:function(){return oP.repeat}}),iP=U_,Object.defineProperty(f,"repeatWhen",{enumerable:!0,get:function(){return iP.repeatWhen}}),uP=W_,Object.defineProperty(f,"retry",{enumerable:!0,get:function(){return uP.retry}}),aP=Y_,Object.defineProperty(f,"retryWhen",{enumerable:!0,get:function(){return aP.retryWhen}}),sP=m,Object.defineProperty(f,"refCount",{enumerable:!0,get:function(){return sP.refCount}}),cP=J_,Object.defineProperty(f,"sample",{enumerable:!0,get:function(){return cP.sample}}),lP=nv,Object.defineProperty(f,"sampleTime",{enumerable:!0,get:function(){return lP.sampleTime}}),fP=av,Object.defineProperty(f,"scan",{enumerable:!0,get:function(){return fP.scan}}),pP=hd,Object.defineProperty(f,"sequenceEqual",{enumerable:!0,get:function(){return pP.sequenceEqual}}),dP=hv,Object.defineProperty(f,"share",{enumerable:!0,get:function(){return dP.share}}),hP=wv,Object.defineProperty(f,"shareReplay",{enumerable:!0,get:function(){return hP.shareReplay}}),bP=Sv,Object.defineProperty(f,"single",{enumerable:!0,get:function(){return bP.single}}),yP=kv,Object.defineProperty(f,"skip",{enumerable:!0,get:function(){return yP.skip}}),_P=Mv,Object.defineProperty(f,"skipLast",{enumerable:!0,get:function(){return _P.skipLast}}),vP=Dv,Object.defineProperty(f,"skipUntil",{enumerable:!0,get:function(){return vP.skipUntil}}),mP=zv,Object.defineProperty(f,"skipWhile",{enumerable:!0,get:function(){return mP.skipWhile}}),gP=Hv,Object.defineProperty(f,"startWith",{enumerable:!0,get:function(){return gP.startWith}}),OP=Rs,Object.defineProperty(f,"subscribeOn",{enumerable:!0,get:function(){return OP.subscribeOn}}),wP=Zv,Object.defineProperty(f,"switchAll",{enumerable:!0,get:function(){return wP.switchAll}}),EP=Qv,Object.defineProperty(f,"switchMap",{enumerable:!0,get:function(){return EP.switchMap}}),PP=rm,Object.defineProperty(f,"switchMapTo",{enumerable:!0,get:function(){return PP.switchMapTo}}),SP=im,Object.defineProperty(f,"switchScan",{enumerable:!0,get:function(){return SP.switchScan}}),TP=Th,Object.defineProperty(f,"take",{enumerable:!0,get:function(){return TP.take}}),jP=ly,Object.defineProperty(f,"takeLast",{enumerable:!0,get:function(){return jP.takeLast}}),CP=sm,Object.defineProperty(f,"takeUntil",{enumerable:!0,get:function(){return CP.takeUntil}}),IP=dm,Object.defineProperty(f,"takeWhile",{enumerable:!0,get:function(){return IP.takeWhile}}),RP=ym,Object.defineProperty(f,"tap",{enumerable:!0,get:function(){return RP.tap}}),kP=P,Object.defineProperty(f,"throttle",{enumerable:!0,get:function(){return kP.throttle}}),AP=Sm,Object.defineProperty(f,"throttleTime",{enumerable:!0,get:function(){return AP.throttleTime}}),MP=sb,Object.defineProperty(f,"throwIfEmpty",{enumerable:!0,get:function(){return MP.throwIfEmpty}}),NP=Im,Object.defineProperty(f,"timeInterval",{enumerable:!0,get:function(){return NP.timeInterval}}),xP=es,Object.defineProperty(f,"timeout",{enumerable:!0,get:function(){return xP.timeout}}),UP=Nm,Object.defineProperty(f,"timeoutWith",{enumerable:!0,get:function(){return UP.timeoutWith}}),DP=Fs,Object.defineProperty(f,"timestamp",{enumerable:!0,get:function(){return DP.timestamp}}),LP=dd,Object.defineProperty(f,"toArray",{enumerable:!0,get:function(){return LP.toArray}}),FP=Ct,Object.defineProperty(f,"window",{enumerable:!0,get:function(){return FP.window}}),BP=Hm,Object.defineProperty(f,"windowCount",{enumerable:!0,get:function(){return BP.windowCount}}),WP=Qm,Object.defineProperty(f,"windowTime",{enumerable:!0,get:function(){return WP.windowTime}}),zP=Ts,Object.defineProperty(f,"windowToggle",{enumerable:!0,get:function(){return zP.windowToggle}}),qP=Bt,Object.defineProperty(f,"windowWhen",{enumerable:!0,get:function(){return qP.windowWhen}}),VP=_0,Object.defineProperty(f,"withLatestFrom",{enumerable:!0,get:function(){return VP.withLatestFrom}}),HP=T,Object.defineProperty(f,"zip",{enumerable:!0,get:function(){return HP.zip}}),GP=O,Object.defineProperty(f,"zipAll",{enumerable:!0,get:function(){return GP.zipAll}}),YP=j,Object.defineProperty(f,"zipWith",{enumerable:!0,get:function(){return YP.zipWith}});var E={},JP=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())})},$P=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}}}},eS=(Object.defineProperty(E,"__esModule",{value:!0}),e),tS=Lr,rS=w,nS=0,oS=1,iS=2;function uS(e,t){e=e.pipe((0,rS.publishReplay)(1),(0,rS.refCount)());this._result=e,this._keys=e.pipe((0,rS.mergeMap)(function(e){return(0,tS.from)(e.keys())}),(0,rS.publishReplay)(1),(0,rS.refCount)()),this._records=void 0,this._controls=new aS,this._summary=new tS.ReplaySubject,this._state=t||nS}uS.prototype.keys=function(){return this._keys},uS.prototype.records=function(){var r=this,e=this._result.pipe((0,rS.mergeMap)(function(t){return new tS.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},uS.prototype.consume=function(){var r=this;return this._result.pipe((0,rS.mergeMap)(function(t){return new tS.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},uS.prototype.pause=function(){this._controls.pause()},uS.prototype.resume=function(){return this._controls.resume()},uS.prototype.push=function(){return this._controls.push()},uS.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<oS?(this._state=oS,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,eS.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},uS.prototype._toObservable=function(){var n=this;return new tS.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new uS((t=e,new tS.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},uS.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new aS);var a=new tS.Subject,s=function(n){return JP(e,void 0,void 0,function(){var t,r;return $P(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 JP(this,void 0,void 0,function(){return $P(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 JP(t,void 0,void 0,function(){var t,r;return $P(this,function(e){switch(e.label){case 0:return this._state=iS,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=iS,t._summary.error(e)}},this._controls),this._records)},E.default=uS;sS.prototype.pause=function(){this._paused=!0},Object.defineProperty(sS.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(sS.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),sS.prototype.resume=function(){return JP(this,void 0,void 0,function(){var t;return $P(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]}})})},sS.prototype.push=function(){return JP(this,void 0,void 0,function(){return $P(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(sS.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var aS=sS;function sS(e){void 0===e&&(e=function(){return JP(t,void 0,void 0,function(){return $P(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var p={},i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cS=(Object.defineProperty(p,"__esModule",{value:!0}),Lr),lS=i(E);function fS(e){this._txc=e}i(e),fS.prototype.run=function(e,r){var n=this;return new lS.default(new cS.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},fS.prototype.commit=function(){var e=this;return new cS.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},fS.prototype.rollback=function(){var e=this;return new cS.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},fS.prototype.isOpen=function(){return this._txc.isOpen()},fS.prototype.close=function(){var e=this;return new cS.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},p.default=fS;b={},l=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function pS(e){e=e.run;this._run=e}Object.defineProperty(b,"__esModule",{value:!0}),l(E),l(p),pS.fromTransaction=function(e){return new pS({run:e.run.bind(e)})},pS.prototype.run=function(e,t){return this._run(e,t)},b.default=pS;var ju={},dS=(Object.defineProperty(ju,"__esModule",{value:!0}),e),hS=Lr,bS=w,yS=(dS.internal.logger.Logger,dS.error.SERVICE_UNAVAILABLE);function _S(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=vS(void 0===t?3e4:t,3e4),this._initialDelay=vS(r,1e3),this._delayMultiplier=vS(n,2),this._delayJitter=vS(o,.2),this._logger=e}function vS(e,t){return e||0===e?e:t}_S.prototype.retry=function(e){var a=this;return e.pipe((0,bS.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,bS.mergeMap)(function(e){if(!(0,dS.isRetriableError)(e))return(0,hS.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,dS.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),yS)).seenErrors=n,(0,hS.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,hS.of)(1).pipe((0,bS.delay)(r))}))}))},_S.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},ju.default=_S;var $u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mS=(Object.defineProperty(Gr,"__esModule",{value:!0}),Lr),gS=w,OS=$u(E),ca=e,wS=$u(p),ES=$u(b),PS=$u(ju),da=ca.internal.constants,SS=da.ACCESS_MODE_READ,TS=da.ACCESS_MODE_WRITE,jS=ca.internal.txConfig.TxConfig;function CS(e){var e=void 0===e?{}:e,t=e.session,e=e.config;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new PS.default({maxRetryTimeout:e})}(e)}CS.prototype.run=function(e,r,n){var o=this;return new OS.default(new mS.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},CS.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e)},CS.prototype.readTransaction=function(e,t){return this._runTransaction(SS,e,t)},CS.prototype.writeTransaction=function(e,t){return this._runTransaction(TS,e,t)},CS.prototype.executeRead=function(e,t){return this._executeInTransaction(SS,e,t)},CS.prototype.executeWrite=function(e,t){return this._executeInTransaction(TS,e,t)},CS.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new ES.default({run:e.run.bind(e)})})},CS.prototype.close=function(){var e=this;return new mS.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},CS.prototype.lastBookmark=function(){return this.lastBookmarks()},CS.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},CS.prototype._beginTransaction=function(e,t){var r=this,n=jS.empty();return t&&(n=new jS(t)),new mS.Observable(function(t){try{r._session._beginTransaction(e,n).then(function(e){t.next(new wS.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},CS.prototype._runTransaction=function(e,r,t,n){void 0===n&&(n=function(e){return e});var o=jS.empty();return t&&(o=new jS(t)),this._retryLogic.retry(this._beginTransaction(e,o).pipe((0,gS.mergeMap)(function(t){return(0,mS.defer)(function(){try{return r(n(t))}catch(e){return(0,mS.throwError)(function(){return e})}}).pipe((0,gS.catchError)(function(e){return t.rollback().pipe((0,gS.concatWith)((0,mS.throwError)(function(){return e})))}),(0,gS.concatWith)(t.commit()))})))},Gr.default=CS;var IS,RS,xu=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)}),v=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},X=(Object.defineProperty(B,"__esModule",{value:!0}),B.WRITE=B.READ=B.Driver=void 0,e),kS=v(Gr),AS=X.internal.constants.FETCH_ALL,Cu=X.driver.READ,MS=X.driver.WRITE,o=(B.READ=Cu,B.WRITE=MS,xu(NS,RS=X.Driver),NS.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,e=e.notificationFilter;return new kS.default({session:this._newSession({defaultAccessMode:void 0===t?MS:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,impersonatedUser:i,reactive:!1,fetchSize:function(e,t){e=parseInt(e,10);{if(0<e||e===AS)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(AS," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:e}),config:this._config})},NS);function NS(){return null!==RS&&RS.apply(this,arguments)||this}B.Driver=o,B.default=o;t={},Object.defineProperty(t,"__esModule",{value:!0}),t.default="5.7.0",h={},Qa={},qa={};function xS(){}Object.defineProperty(qa,"__esModule",{value:!0}),xS.prototype.selectReader=function(e){throw new Error("Abstract function")},xS.prototype.selectWriter=function(e){throw new Error("Abstract function")},qa.default=xS;Ga={},Ka={};function US(e){this._offset=e||0}Object.defineProperty(Ka,"__esModule",{value:!0}),US.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},Ka.default=US;var DS,LS,Wa=r&&r.__extends||(DS=function(e,t){return(DS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}DS(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ks=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},FS=(Object.defineProperty(Ga,"__esModule",{value:!0}),Ks(Ka)),Q=Ks(qa),xs=(LS=Q.default,Wa(BS,LS),BS.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},BS.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},BS.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},BS);function BS(e){var t=LS.call(this)||this;return t._readersIndex=new FS.default,t._writersIndex=new FS.default,t._connectionPool=e,t}Ga.default=xs;y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.LeastConnectedLoadBalancingStrategy=Qa.LoadBalancingStrategy=void 0,Za=y(qa),Qa.LoadBalancingStrategy=Za.default,Jc=y(Ga),Qa.LeastConnectedLoadBalancingStrategy=Jc.default,Qa.default=Jc.default,_={},_l={},Ul={},Dl={},Vl={},Da={},el={},il={byteLength:function(e){var e=YS(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};il.toByteArray=function(e){var t,r,n=YS(e),o=n[0],n=n[1],i=new qS(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=zS[e.charCodeAt(r)]<<18|zS[e.charCodeAt(r+1)]<<12|zS[e.charCodeAt(r+2)]<<6|zS[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=zS[e.charCodeAt(r)]<<2|zS[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=zS[e.charCodeAt(r)]<<10|zS[e.charCodeAt(r+1)]<<4|zS[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},il.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 WS[e>>18&63]+WS[e>>12&63]+WS[e>>6&63]+WS[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(WS[t>>2]+WS[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(WS[t>>10]+WS[t>>4&63]+WS[t<<2&63]+"="));return o.join("")};for(var WS=[],zS=[],qS="undefined"!=typeof Uint8Array?Uint8Array:Array,VS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",HS=0,GS=VS.length;HS<GS;++HS)WS[HS]=VS[HS],zS[VS.charCodeAt(HS)]=HS;function YS(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]}zS["-".charCodeAt(0)]=62,zS["_".charCodeAt(0)]=63;Ba={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 KS=el;const BM=il,WM=Ba,zM=(Ws="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,KS.Buffer=k,KS.SlowBuffer=function(e){+e!=e&&(e=0);return k.alloc(+e)},KS.INSPECT_MAX_BYTES=50,2147483647);function ZS(e){if(e>zM)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 QS(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return JS(e)}function QS(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|r1(n,o);let e=ZS(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return S1(o=t,Uint8Array)?e1((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):$S(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(S1(t,ArrayBuffer)||t&&S1(t.buffer,ArrayBuffer))return e1(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(S1(t,SharedArrayBuffer)||t&&S1(t.buffer,SharedArrayBuffer)))return e1(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|t1(e.length),0===(r=ZS(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||T1(e.length)?ZS(0):$S(e);if("Buffer"===e.type&&Array.isArray(e.data))return $S(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 XS(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 JS(e){return XS(e),ZS(e<0?0:0|t1(e))}function $S(t){var r=t.length<0?0:0|t1(t.length);const n=ZS(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function e1(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 t1(e){if(e>=zM)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+zM.toString(16)+" bytes");return 0|e}function r1(e,t){if(k.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||S1(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 w1(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return E1(e).length;default:if(o)return n?-1:w1(e).length;t=(""+t).toLowerCase(),o=!0}}function n1(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+=GM[o[e]];return t;return}case"utf8":case"utf-8":return c1(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?BM.fromByteArray(d):BM.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 o1(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i1(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=T1(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:u1(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):u1(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function u1(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 a1(e,t,r,n){return P1(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 s1(e,t,r,n){return P1(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 c1(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<=qM)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=qM));return e}}KS.kMaxLength=zM,(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=QS,Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(e,t,r){return t=t,r=r,XS(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?ZS(e).fill(t,r):ZS(e).fill(t):ZS(e)},k.allocUnsafe=JS,k.allocUnsafeSlow=JS,k.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==k.prototype},k.compare=function(r,n){if(S1(r,Uint8Array)&&(r=k.from(r,r.offset,r.byteLength)),S1(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(S1(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=r1,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)o1(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)o1(this,e,e+3),o1(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)o1(this,e,e+7),o1(this,e+1,e+6),o1(this,e+2,e+5),o1(this,e+3,e+4);return this},k.prototype.toLocaleString=k.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?c1(this,0,e):n1.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=KS.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},Ws&&(k.prototype[Ws]=k.prototype.inspect),k.prototype.compare=function(e,t,r,n,o){if(S1(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 i1(this,e,t,r,!0)},k.prototype.lastIndexOf=function(e,t,r){return i1(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(T1(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,P1(w1(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return a1(this,t,r,n);case"base64":return i=this,u=r,o=n,P1(E1(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s1(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 qM=4096;function l1(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 f1(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 p1(e,t,r,n,o){m1(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 d1(e,t,r,n,o){m1(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 h1(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 b1(e,t,r,n,o){return t=+t,r>>>=0,o||h1(e,0,r,4),WM.write(e,t,r,n,23,4),r+4}function y1(e,t,r,n,o){return t=+t,r>>>=0,o||h1(e,0,r,8),WM.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||l1(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||l1(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||l1(e,1,this.length),this[e]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(e,t){return e>>>=0,t||l1(e,2,this.length),this[e]|this[e+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(e,t){return e>>>=0,t||l1(e,2,this.length),this[e]<<8|this[e+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(e,t){return e>>>=0,t||l1(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||l1(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},k.prototype.readBigUInt64LE=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||O1(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=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||O1(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||l1(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||l1(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||l1(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},k.prototype.readInt16LE=function(e,t){e>>>=0,t||l1(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||l1(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||l1(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||l1(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},k.prototype.readBigInt64LE=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||O1(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=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||O1(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||l1(e,4,this.length),WM.read(this,e,!0,23,4)},k.prototype.readFloatBE=function(e,t){return e>>>=0,t||l1(e,4,this.length),WM.read(this,e,!1,23,4)},k.prototype.readDoubleLE=function(e,t){return e>>>=0,t||l1(e,8,this.length),WM.read(this,e,!0,52,8)},k.prototype.readDoubleBE=function(e,t){return e>>>=0,t||l1(e,8,this.length),WM.read(this,e,!1,52,8)},k.prototype.writeUintLE=k.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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=j1(function(e,t=0){return p1(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=j1(function(e,t=0){return d1(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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=j1(function(e,t=0){return p1(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=j1(function(e,t=0){return d1(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeFloatLE=function(e,t,r){return b1(this,e,t,!0,r)},k.prototype.writeFloatBE=function(e,t,r){return b1(this,e,t,!1,r)},k.prototype.writeDoubleLE=function(e,t,r){return y1(this,e,t,!0,r)},k.prototype.writeDoubleBE=function(e,t,r){return y1(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 VM={};function _1(e,t,r){VM[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 v1(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 m1(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 VM.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,g1(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||O1(u,r.length-(n+1))}function g1(e,t){if("number"!=typeof e)throw new VM.ERR_INVALID_ARG_TYPE(t,"number",e)}function O1(e,t,r){if(Math.floor(e)!==e)throw g1(e,r),new VM.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new VM.ERR_BUFFER_OUT_OF_BOUNDS;throw new VM.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}_1("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),_1("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),_1("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=v1(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=v1(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const HM=/[^+/0-9A-Za-z-_]/g;function w1(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 E1(e){return BM.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(HM,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function P1(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 S1(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function T1(e){return e!=e}const GM=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 j1(e){return"undefined"==typeof BigInt?C1:e}function C1(){throw new Error("BigInt not supported")}}var I1,mf={},Aa={},s=r&&r.__extends||(I1=function(e,t){return(I1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}I1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Nf=(Object.defineProperty(Aa,"__esModule",{value:!0}),A.prototype.getUInt8=function(e){throw new Error("Not implemented")},A.prototype.getInt8=function(e){throw new Error("Not implemented")},A.prototype.getFloat64=function(e){throw new Error("Not implemented")},A.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},A.prototype.putInt8=function(e,t){throw new Error("Not implemented")},A.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},A.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},A.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},A.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},A.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},A.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)},A.prototype.getSlice=function(e,t){return new k1(e,t,this)},A.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},A.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},A.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)},A.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)},A.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)},A.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},A.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},A.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},A.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},A.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},A.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},A.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},A.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},A.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},A.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},A.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},A.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},A.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},A.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},A.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},A.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},A.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},A.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},A.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},A.prototype.remaining=function(){return this.length-this.position},A.prototype.hasRemaining=function(){return 0<this.remaining()},A.prototype.reset=function(){this.position=0},A.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},A.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},A);function A(e){this.position=0,this.length=e}Aa.default=Nf;s(A1,R1=Nf),A1.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},A1.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},A1.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},A1.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},A1.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},A1.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var R1,k1=A1;function A1(e,t,r){t=R1.call(this,t)||this;return t._start=e,t._inner=r,t}var M1,N1,zf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Vf=(Object.defineProperty(mf,"__esModule",{value:!0}),mf.BaseBuffer=void 0,zf(Aa)),Jf=(mf.BaseBuffer=Vf.default,mf.default=Vf.default,r&&r.__extends||(M1=function(e,t){return(M1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}M1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),op=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},x1=(Object.defineProperty(Da,"__esModule",{value:!0}),Da.alloc=void 0,op(el)),Fa=op(mf),U1=(N1=Fa.default,Jf(D1,N1),D1.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},D1.prototype.getInt8=function(e){return this._buffer.readInt8(e)},D1.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},D1.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},D1.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},D1.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},D1.prototype.putBytes=function(e,t){var r;t instanceof D1?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):N1.prototype.putBytes.call(this,e,t)},D1.prototype.getSlice=function(e,t){return new D1(this._buffer.slice(e,e+t))},D1);function D1(e){var t=this,e=(e=e)instanceof x1.default.Buffer?e:"number"==typeof e&&"function"==typeof x1.default.Buffer.alloc?x1.default.Buffer.alloc(e):new x1.default.Buffer(e);return(t=N1.call(this,e.length)||this)._buffer=e,t}Da.default=U1,Da.alloc=function(e){return new U1(e)};var gf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},L1=(Object.defineProperty(Vl,"__esModule",{value:!0}),gf(Da)),F1=e,ap=F1.internal.util,B1=ap.ENCRYPTION_OFF,W1=ap.ENCRYPTION_ON;function z1(e,t,r){void 0===t&&(t=q1),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,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===W1}(e),n=function(e){return!1===e.encrypted||e.encrypted===B1}(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,F1.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:"'+B1+'"` 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 L1.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function q1(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}z1.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,F1.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,F1.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))},z1.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof L1.default))throw(0,F1.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()}}},z1.prototype.close=function(){var r=this;return new Promise(function(e,t){r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._clearConnectionTimeout(),r._ws.onclose=function(){return e()},r._ws.close()):e()})},z1.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},z1.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},z1.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},z1.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,F1.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))},z1.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},z1.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},Vl.default=z1;var V1,fp={},La=r&&r.__extends||(V1=function(e,t){return(V1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}V1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(fp,"__esModule",{value:!0});var H1,Tu=e.internal.resolver.BaseHostNameResolver,Mf=(La(G1,H1=Tu),G1.prototype.resolve=function(e){return this._resolveToItself(e)},G1);function G1(){return null!==H1&&H1.apply(this,arguments)||this}fp.default=Mf;var Y1,g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gp=(Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.HostNameResolver=Dl.Channel=void 0,g(Vl)),u=g(fp),C=(Dl.Channel=gp.default,Dl.HostNameResolver=u.default,{}),Hf={},xf=r&&r.__extends||(Y1=function(e,t){return(Y1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Y1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Hf,"__esModule",{value:!0});var K1,Z1=Da,Op=(K1=mf.BaseBuffer,xf(Q1,K1),Q1.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}},Q1.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}},Q1.prototype.getFloat64=function(e){for(var t=(0,Z1.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},Q1);function Q1(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=K1.call(this,r)||this)._buffers=e,t}Hf.default=Op;var X1,J1,Sp=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)}),Ip=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Np=(Object.defineProperty(C,"__esModule",{value:!0}),C.Dechunker=C.Chunker=void 0,Ip(Aa)),$1=Da,eT=Ip(Hf),Fp=(J1=Np.default,Sp(tT,J1),tT.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},tT.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},tT.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},tT.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},tT.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,$1.alloc)(this._bufferSize),this._chunkOpen=!1),this},tT.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},tT.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)},tT.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},tT);function tT(e,t){var r=J1.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,$1.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function rT(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}C.Chunker=Fp,rT.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},rT.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},rT.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)},rT.prototype.CLOSED=function(e){},rT.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 eT.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},rT.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},C.Dechunker=rT;var Kp={},nT=(Object.defineProperty(Kp,"__esModule",{value:!0}),e),rd=nT.internal.util,ad=rd.ENCRYPTION_OFF,fd=rd.ENCRYPTION_ON,oT=nT.error.SERVICE_UNAVAILABLE,iT=[null,void 0,!0,!1,fd,ad],uT=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];Kp.default=function(e,t,r){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==iT.indexOf(e))return e;throw(0,nT.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(iT))}(t),this.trust=function(e){e=e.trust;if(-1!==uT.indexOf(e))return e;throw(0,nT.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(uT))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||oT,this.connectionTimeout=t.connectionTimeout};var aT,sT,pd={},Id={},Cd={exports:{}};function cT(e,t){for(var r in e)t[r]=e[r]}function lT(e,t,r){return sT(e,t,r)}vl=(Kd=Cd).exports,(sT=(aT=el).Buffer).from&&sT.alloc&&sT.allocUnsafe&&sT.allocUnsafeSlow?Kd.exports=aT:(cT(aT,vl),vl.Buffer=lT),lT.prototype=Object.create(sT.prototype),cT(sT,lT),lT.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return sT(e,t,r)},lT.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=sT(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},lT.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return sT(e)},lT.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return aT.SlowBuffer(e)};var fT=Cd.exports.Buffer,pT=fT.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 dT(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||fT.isEncoding!==pT&&pT(e))return t||e;throw new Error("Unknown encoding: "+e)}function hT(e){var t;switch(this.encoding=dT(e),this.encoding){case"utf16le":this.text=_T,this.end=vT,t=4;break;case"utf8":this.fillLast=yT,t=4;break;case"base64":this.text=mT,this.end=gT,t=3;break;default:return this.write=OT,void(this.end=wT)}this.lastNeed=0,this.lastTotal=0,this.lastChar=fT.allocUnsafe(t)}function bT(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function yT(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 _T(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 vT(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 mT(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 gT(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function OT(e){return e.toString(this.encoding)}function wT(e){return e&&e.length?this.write(e):""}(Id.StringDecoder=hT).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||""},hT.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},hT.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=bT(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=bT(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=bT(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)},hT.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 ET,PT,ST,TT,jT,xc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},CT=(Object.defineProperty(pd,"__esModule",{value:!0}),xc(Da)),IT=e,RT=xc(el),kT=new Id.StringDecoder("utf8");pd.default={encode:function(e){return new CT.default((e=e,"function"==typeof RT.default.Buffer.from?RT.default.Buffer.from(e,"utf8"):new RT.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 kT.write(e._buffer)},r=function(){return kT.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,IT.newError)("Don't know how to decode strings from '".concat(e,"'"))}},Vd=Ul,ET=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]}),Yd=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||ET(t,e,r)},PT=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.utf8=Vd.alloc=Vd.ChannelConfig=void 0,Yd(Dl,Vd),Yd(C,Vd),ST=Kp,Object.defineProperty(Vd,"ChannelConfig",{enumerable:!0,get:function(){return PT(ST).default}}),TT=Da,Object.defineProperty(Vd,"alloc",{enumerable:!0,get:function(){return TT.alloc}}),jT=pd,Object.defineProperty(Vd,"utf8",{enumerable:!0,get:function(){return PT(jT).default}}),Object.defineProperty(_l,"__esModule",{value:!0});var AT=Ul,MT=e,NT=1616949271;function xT(e,t){return{major:e,minor:t}}function UT(){var e=[[xT(5,2),xT(5,0)],[xT(4,4),xT(4,2)],xT(4,1),xT(3,0)];if(4<e.length)throw(0,MT.newError)("It should not have more than 4 versions of the protocol");var o=(0,AT.alloc)(20);return o.writeInt32(NT),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}_l.default=function(t){var o=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(o),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw(0,MT.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);r({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(UT())})};var DT,oh={},ih={},dh={},R={},Oh={},Ph=r&&r.__extends||(DT=function(e,t){return(DT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}DT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Sh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Hh=(Object.defineProperty(Oh,"__esModule",{value:!0}),Sh(e),LT.ofRecord=function(e){return null===e?LT.ofNull():new GT(e)},LT.ofMessageResponse=function(e){return null===e?LT.ofNull():new BT(e)},LT.ofNull=function(){return new qT},Object.defineProperty(LT.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(LT.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(LT.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(LT.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),LT);function LT(){}Oh.default=Hh;Ph(WT,FT=Hh),Object.defineProperty(WT.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(WT.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(WT.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(WT.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var FT,BT=WT;function WT(e){var t=FT.call(this)||this;return t._response=e,t}Ph(VT,zT=Hh),Object.defineProperty(VT.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var zT,qT=VT;function VT(){return null!==zT&&zT.apply(this,arguments)||this}Ph(YT,HT=Hh),Object.defineProperty(YT.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(YT.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(YT.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(YT.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var HT,GT=YT;function YT(e){var t=HT.call(this)||this;return t._record=e,t}var KT,Zh=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)}),eb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ZT=(Object.defineProperty(R,"__esModule",{value:!0}),R.ProcedureRouteObserver=R.RouteObserver=R.CompletedObserver=R.FailedObserver=R.ResetObserver=R.LogoffObserver=R.LoginObserver=R.ResultStreamObserver=R.StreamObserver=void 0,e),QT=eb(Oh),XT=ZT.internal.constants.FETCH_ALL,JT=ZT.error.PROTOCOL_ERROR,ib=($T.prototype.onNext=function(e){},$T.prototype.onError=function(e){},$T.prototype.onCompleted=function(e){},$T);function $T(){}R.StreamObserver=ib;Zh(tj,ej=ib),tj.prototype.pause=function(){this._paused=!0},tj.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},tj.prototype.onNext=function(e){var t=new ZT.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))},tj.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},tj.prototype.onError=function(e){this._state.onError(this,e)},tj.prototype.cancel=function(){this._discard=!0},tj.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(yj.STREAMING)},tj.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(yj.SUCCEEDED)},tj.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===yj.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===yj.READY&&this._handleStreaming()},tj.prototype._handleHasMore=function(e){this._setState(yj.READY),this._handleStreaming(),delete e.has_more},tj.prototype._handlePullSuccess=function(e){var t,r=this,n=Object.assign(this._server?{server:this._server}:{},this._meta,e);[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(yj.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,ZT.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),JT))},tj.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;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()}},tj.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(yj.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},tj.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},tj.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):this._moreFunction(this._queryId,this._fetchSize,this),this._setState(yj.STREAMING)},tj.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},tj.prototype._setState=function(e){this._state=e},tj.prototype._setupAutoPull=function(){this._autoPull=!0};var ej,ab=tj;function tj(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?XT: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,e=e.lowRecordWatermark,e=void 0===e?Number.MAX_VALUE:e,d=ej.call(this)||this;return d._fieldKeys=null,d._fieldLookup=null,d._head=null,d._queuedRecords=[],d._tail=null,d._error=null,d._observers=[],d._meta={},d._server=f,d._beforeError=i,d._afterError=u,d._beforeKeys=a,d._afterKeys=s,d._beforeComplete=c,d._afterComplete=l,d._queryId=null,d._moreFunction=r,d._discardFunction=n,d._discard=!1,d._fetchSize=o,d._lowRecordWatermark=e,d._highRecordWatermark=p,d._setState(t?yj.READY:yj.READY_STREAMING),d._setupAutoPull(),d._paused=!1,d}R.ResultStreamObserver=ab;Zh(nj,rj=ib),nj.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when initializing "+ZT.json.stringify(e)))},nj.prototype.onError=function(e){this._onError&&this._onError(e)},nj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var rj,vb=nj;function nj(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=rj.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.LoginObserver=vb;Zh(ij,oj=ib),ij.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when logging off "+ZT.json.stringify(e)))},ij.prototype.onError=function(e){this._onError&&this._onError(e)},ij.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var oj,Eb=ij;function ij(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=oj.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.LogoffObserver=Eb;Zh(aj,uj=ib),aj.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when resetting: received record is: "+ZT.json.stringify(e),JT))},aj.prototype.onError=function(e){e.code===JT&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},aj.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var uj,Tb=aj;function aj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=uj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}R.ResetObserver=Tb;Zh(cj,sj=ab);var sj,jb=cj;function cj(e){var t=e.error,e=e.onError,e=sj.call(this,{beforeError:e})||this;return e.onError(t),e}R.FailedObserver=jb;Zh(fj,lj=ab);var lj,Cb=fj;function fj(){var e=lj.call(this)||this;return lj.prototype.markCompleted.call(e),e}R.CompletedObserver=Cb;Zh(dj,pj=ib),dj.prototype.onNext=function(e){this._records.push(e)},dj.prototype.onError=function(e){e.code===JT&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},dj.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,ZT.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+ZT.json.stringify(this._records),JT)):this._onCompleted&&this._onCompleted(QT.default.ofRecord(this._records[0]))};var pj,xb=dj;function dj(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=pj.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}R.ProcedureRouteObserver=xb;Zh(bj,hj=ib),bj.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when resetting: received record is: "+ZT.json.stringify(e),JT))},bj.prototype.onError=function(e){e.code===JT&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},bj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(QT.default.ofMessageResponse(e))};var hj,Gf=bj;function bj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=hj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}R.RouteObserver=Gf;var yj={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(yj.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(){}}},_j=(Object.defineProperty(dh,"__esModule",{value:!0}),dh.assertNotificationFilterIsEmpty=dh.assertImpersonatedUserIsEmpty=dh.assertTxConfigIsEmpty=dh.assertDatabaseIsEmpty=void 0,e);dh.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,_j.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},dh.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,_j.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},dh.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,_j.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},dh.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,_j.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(_j.json.stringify(e),"."))).message),r.onError(t),t};Lb={},Bb={},Vb={},Yb={};Object.defineProperty(Yb,"__esModule",{value:!0}),Yb.identity=void 0,Yb.identity=function(e){return e};var vj=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]}),mj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ey=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)&&vj(t,e,r);return mj(t,e),t},Rh=(Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.functional=void 0,Vb.functional=ey(Yb),{}),gj=(Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.verifyStructSize=Rh.Structure=void 0,e),Oj=gj.error.PROTOCOL_ERROR,uy=(Object.defineProperty(wj.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),wj.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+"])"},wj);function wj(e,t){this.signature=e,this.fields=t}Rh.Structure=uy,Rh.verifyStructSize=function(e,t,r){if(t!==r)throw(0,gj.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),Oj)},Rh.default=uy,Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.Unpacker=Bb.Packer=void 0;var Ej=Ul,Pj=Vb,Sj=Rh,Tj=e,jj=Tj.error.PROTOCOL_ERROR;function Cj(e){this._ch=e,this._byteArraysSupported=!0}function Ij(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}Cj.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=Pj.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,Tj.int)(o))};if((0,Tj.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 Sj.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))},Cj.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,Tj.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},Cj.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},Cj.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))},Cj.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},Cj.prototype.packString=function(e){var e=Ej.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,Tj.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)}},Cj.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,Tj.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)}},Cj.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,Tj.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])},Cj.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,Tj.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)}},Cj.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,Tj.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)}},Cj.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,Tj.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},Cj.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},Cj.prototype._nonPackableValue=function(e){return function(){throw(0,Tj.newError)(e,jj)}},Bb.Packer=Cj,Ij.prototype.unpack=function(e,t){void 0===t&&(t=Pj.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,Tj.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,Tj.newError)("Unknown packed value with marker "+r.toString(16))},Ij.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,Tj.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},Ij.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},Ij.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},Ij.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,Tj.int)(e):240<=e&&e<256?(0,Tj.int)(e-256):200===e?(0,Tj.int)(t.readInt8()):201===e?(0,Tj.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,Tj.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new Tj.Integer(e,r)):null},Ij.prototype._unpackString=function(e,t,r,n){return 128===t?Ej.utf8.decode(n,r):208===e?Ej.utf8.decode(n,n.readUInt8()):209===e?Ej.utf8.decode(n,n.readUInt16()):210===e?Ej.utf8.decode(n,n.readUInt32()):null},Ij.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},Ij.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},Ij.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},Ij.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},Ij.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},Ij.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},Ij.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},Ij.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new Sj.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},Bb.Unpacker=Ij;var Rj,kj,cy={},Uc=r&&r.__extends||(Rj=function(e,t){return(Rj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Rj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Aj=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]}),Mj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nh=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)&&Aj(t,e,r);return Mj(t,e),t},Oy=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.Unpacker=cy.Packer=void 0,Nh(Bb)),Sy=(kj=Oy.Packer,Uc(Nj,kj),Nj.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},Nj);function Nj(){return null!==kj&&kj.apply(this,arguments)||this}cy.Packer=Sy;xj=Oy.Unpacker,Uc(Uj,xj);var xj,xy=Uj;function Uj(e,t){return xj.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}cy.Unpacker=xy;var Dj=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]}),Lj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ml=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)&&Dj(t,e,r);return Lj(t,e),t},Cy=(Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.structure=Lb.v2=Lb.v1=void 0,ml(Bb)),gl=(Lb.v1=Cy,ml(cy)),Iy=(Lb.v2=gl,ml(Rh)),Ay=(Lb.structure=Iy,Lb.default=gl,{}),Fj=(Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.SIGNATURES=void 0,e),Ol=Fj.internal.constants,Bj=Ol.ACCESS_MODE_READ,Wj=Ol.FETCH_ALL,zj=Fj.internal.util.assertString,Gy=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),Zy=(Ay.SIGNATURES=Gy,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(Fj.json.stringify(t))})},M.pullAll=function(){return Hj},M.reset=function(){return Gj},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(t=void 0===t?null:t)&&(t.minimumSeverityLevel&&(n.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(n.notifications_disabled_categories=t.disabledCategories)),r&&(n.routing=r),new M(1,[n],function(){return"HELLO ".concat(Fj.json.stringify(n))})},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=qj(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new M(17,[t],function(){return"BEGIN ".concat(Fj.json.stringify(t))})},M.commit=function(){return Yj},M.rollback=function(){return Kj},M.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=qj(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(Fj.json.stringify(t)," ").concat(Fj.json.stringify(n))})},M.goodbye=function(){return Zj},M.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=Vj(null==t?-1:t,(void 0===e?Wj:e)||Wj);return new M(63,[r],function(){return"PULL ".concat(Fj.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=Vj(null==t?-1:t,(void 0===e?Wj:e)||Wj);return new M(47,[r],function(){return"DISCARD ".concat(Fj.json.stringify(r))})},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(Fj.json.stringify(e)," ").concat(Fj.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(Fj.json.stringify(e)," ").concat(Fj.json.stringify(t)," ").concat(Fj.json.stringify(n))})},M);function M(e,t,r){this.signature=e,this.fields=t,this.toString=r}function qj(e,t,r,n,o,i){var u={};return e.isEmpty()||(u.bookmarks=e.values()),null!==t.timeout&&(u.tx_timeout=t.timeout),t.metadata&&(u.tx_metadata=t.metadata),r&&(u.db=zj(r,"database")),o&&(u.imp_user=zj(o,"impersonatedUser")),n===Bj&&(u.mode="r"),i&&(i.minimumSeverityLevel&&(u.notifications_minimum_severity=i.minimumSeverityLevel),i.disabledCategories&&(u.notifications_disabled_categories=i.disabledCategories)),u}function Vj(e,t){t={n:(0,Fj.int)(t)};return-1!==e&&(t.qid=(0,Fj.int)(e)),t}var Hj=new(Ay.default=Zy)(63,[],function(){return"PULL_ALL"}),Gj=new Zy(15,[],function(){return"RESET"}),Yj=new Zy(18,[],function(){return"COMMIT"}),Kj=new Zy(19,[],function(){return"ROLLBACK"}),Zj=new Zy(2,[],function(){return"GOODBYE"}),S={},$y={},Qj=(Object.defineProperty($y,"__esModule",{value:!0}),$y.TypeTransformer=void 0,Lb),Xj=e.internal.objectUtil;function Jj(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 $j(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)}Jj.prototype.fromStructure=function(e){try{return e instanceof Qj.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return Xj.createBrokenObject(e)}},Jj.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},$y.default=Jj,$j.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new $j({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},$y.TypeTransformer=$j;var eC=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},tC=(Object.defineProperty(S,"__esModule",{value:!0}),e),rC=Lb,nC=$y,oC=tC.error.PROTOCOL_ERROR;S.default={createNodeTransformer:function(){return new nC.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof tC.Node},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("Node",3,e.size);var e=eC(e.fields,3),t=e[0],r=e[1],e=e[2];return new tC.Node(t,r,e)}})},createRelationshipTransformer:function(){return new nC.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof tC.Relationship},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("Relationship",5,e.size);var e=eC(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new tC.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new nC.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof tC.UnboundRelationship},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=eC(e.fields,3),t=e[0],r=e[1],e=e[2];return new tC.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new nC.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof tC.Path},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("Path",3,e.size);for(var e=eC(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,tC.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof tC.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof tC.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new tC.PathSegment(i,c,a)),i=a}return new tC.Path(t[0],t[t.length-1],o)}})}};var iC=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]}),uC=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)&&iC(t,e,r);return uC(t,e),t},jt=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},aC=(Object.defineProperty(ih,"__esModule",{value:!0}),dh),sC=Lb,cC=i_(Ay),lC=R,fC=e,pC=jt(S),dC=jt($y),hC=fC.internal.bookmarks.Bookmarks,s_=fC.internal.constants,bC=s_.ACCESS_MODE_WRITE,yC=s_.BOLT_PROTOCOL_V1,_C=(fC.internal.logger.Logger,fC.internal.txConfig.TxConfig),l_=(Object.defineProperty(N.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new dC.default(Object.values(pC.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"version",{get:function(){return yC},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.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new lC.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,aC.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(cC.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 lC.LogoffObserver({onCompleted:t,onError:r})),t=(0,fC.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 lC.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,fC.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:hC.empty(),txConfig:_C.empty(),mode:bC,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:hC.empty(),txConfig:_C.empty(),mode:bC,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 lC.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,aC.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,aC.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,aC.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,aC.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(cC.default.run(e,t),a,!1),this.write(cC.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 lC.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(cC.default.reset(),t,!0),t},N.prototype._createPacker=function(e){return new sC.v1.Packer(e)},N.prototype._createUnpacker=function(e,t){return new sC.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 sC.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},N.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===cC.SIGNATURES.HELLO||this._lastMessageSignature===cC.SIGNATURES.LOGON},N.prototype.isLastMessageReset=function(){return this._lastMessageSignature===cC.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}}ih.default=l_;var h_={},__={},g_={},vC=(Object.defineProperty(g_,"__esModule",{value:!0}),g_.epochSecondAndNanoToLocalDateTime=g_.nanoOfDayToLocalTime=g_.epochDayToDate=void 0,e),n=vC.internal.temporalUtil,mC=n.DAYS_0000_TO_1970,gC=n.DAYS_PER_400_YEAR_CYCLE,OC=n.NANOS_PER_HOUR,wC=n.NANOS_PER_MINUTE,EC=n.NANOS_PER_SECOND,PC=n.SECONDS_PER_DAY,SC=n.floorDiv,TC=n.floorMod;function jC(e){var e=(e=(0,vC.int)(e)).add(mC).subtract(60),t=(0,vC.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(gC).subtract(1)).multiply(400),e=e.add(r.multiply(-gC))),e.multiply(400).add(591).div(gC)),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 vC.Date(r,n,e)}function CC(e){var t=(e=(0,vC.int)(e)).div(OC),r=(e=e.subtract(t.multiply(OC))).div(wC),n=(e=e.subtract(r.multiply(wC))).div(EC),e=e.subtract(n.multiply(EC));return new vC.LocalTime(t,r,n,e)}g_.epochDayToDate=jC,g_.nanoOfDayToLocalTime=CC,g_.epochSecondAndNanoToLocalDateTime=function(e,t){var r=SC(e,PC),e=TC(e,PC).multiply(EC).add(t),t=jC(r),r=CC(e);return new vC.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var IC=r&&r.__assign||function(){return(IC=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)},RC=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}},kC=(Object.defineProperty(__,"__esModule",{value:!0}),e),AC=Lb,MC=$y,NC=g_,I=P_(S),R_=kC.internal.temporalUtil,xC=R_.dateToEpochDay,UC=R_.localDateTimeToEpochSecond,DC=R_.localTimeToNanoOfDay;function LC(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,kC.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}__.default=IC(IC({},I.default),{createPoint2DTransformer:function(){return new MC.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,kC.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new AC.structure.Structure(88,[(0,kC.int)(e.srid),e.x,e.y])},fromStructure:function(e){AC.structure.verifyStructSize("Point2D",3,e.size);var e=RC(e.fields,3),t=e[0],r=e[1],e=e[2];return new kC.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new MC.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,kC.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new AC.structure.Structure(89,[(0,kC.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){AC.structure.verifyStructSize("Point3D",4,e.size);var e=RC(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new kC.Point(t,r,n,e)}})},createDurationTransformer:function(){return new MC.TypeTransformer({signature:69,isTypeInstance:kC.isDuration,toStructure:function(e){var t=(0,kC.int)(e.months),r=(0,kC.int)(e.days),n=(0,kC.int)(e.seconds),e=(0,kC.int)(e.nanoseconds);return new AC.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){AC.structure.verifyStructSize("Duration",4,e.size);var e=RC(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new kC.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new MC.TypeTransformer({signature:116,isTypeInstance:kC.isLocalTime,toStructure:function(e){e=DC(e.hour,e.minute,e.second,e.nanosecond);return new AC.structure.Structure(116,[e])},fromStructure:function(e){AC.structure.verifyStructSize("LocalTime",1,e.size);e=RC(e.fields,1)[0];return LC((0,NC.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new MC.TypeTransformer({signature:84,isTypeInstance:kC.isTime,toStructure:function(e){var t=DC(e.hour,e.minute,e.second,e.nanosecond),e=(0,kC.int)(e.timeZoneOffsetSeconds);return new AC.structure.Structure(84,[t,e])},fromStructure:function(e){AC.structure.verifyStructSize("Time",2,e.size);var e=RC(e.fields,2),t=e[0],e=e[1],t=(0,NC.nanoOfDayToLocalTime)(t);return LC(new kC.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new MC.TypeTransformer({signature:68,isTypeInstance:kC.isDate,toStructure:function(e){e=xC(e.year,e.month,e.day);return new AC.structure.Structure(68,[e])},fromStructure:function(e){AC.structure.verifyStructSize("Date",1,e.size);e=RC(e.fields,1)[0];return LC((0,NC.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new MC.TypeTransformer({signature:100,isTypeInstance:kC.isLocalDateTime,toStructure:function(e){var t=UC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,kC.int)(e.nanosecond);return new AC.structure.Structure(100,[t,e])},fromStructure:function(e){AC.structure.verifyStructSize("LocalDateTime",2,e.size);var e=RC(e.fields,2),t=e[0],e=e[1];return LC((0,NC.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new MC.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,kC.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=UC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,kC.int)(e.nanosecond),e=e.timeZoneId;return new AC.structure.Structure(102,[t,r,e])},fromStructure:function(e){AC.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=RC(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,NC.epochSecondAndNanoToLocalDateTime)(t,r);return LC(new kC.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 MC.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,kC.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=UC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,kC.int)(e.nanosecond),e=(0,kC.int)(e.timeZoneOffsetSeconds);return new AC.structure.Structure(70,[t,r,e])},fromStructure:function(e){AC.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=RC(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,NC.epochSecondAndNanoToLocalDateTime)(t,r);return LC(new kC.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var FC,BC,U_=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)}),W_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Y_=(Object.defineProperty(h_,"__esModule",{value:!0}),W_(ih)),WC=W_(Lb),m=e,zC=W_(__),qC=W_($y),VC=m.internal.constants.BOLT_PROTOCOL_V2,J_=(BC=Y_.default,U_(HC,BC),HC.prototype._createPacker=function(e){return new WC.default.Packer(e)},HC.prototype._createUnpacker=function(e,t){return new WC.default.Unpacker(e,t)},Object.defineProperty(HC.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new qC.default(Object.values(zC.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(HC.prototype,"version",{get:function(){return VC},enumerable:!1,configurable:!0}),HC);function HC(){return null!==BC&&BC.apply(this,arguments)||this}h_.default=J_;var GC,YC,nv={},av={},KC=r&&r.__assign||function(){return(KC=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)},hd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hv=(Object.defineProperty(av,"__esModule",{value:!0}),hd(__)),wv=(av.default=KC({},hv.default),r&&r.__extends||(GC=function(e,t){return(GC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}GC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),ZC=r&&r.__assign||function(){return(ZC=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Sv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kv=(Object.defineProperty(nv,"__esModule",{value:!0}),Sv(h_)),QC=Sv(Ay),XC=dh,JC=R,$C=Sv(av),eI=Sv($y),tI=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),rI=e.internal.txConfig.TxConfig,nI="context",oI="CALL dbms.cluster.routing.getRoutingTable($".concat(nI,")"),iI=new JC.StreamObserver,Mv=(YC=kv.default,wv(uI,YC),Object.defineProperty(uI.prototype,"version",{get:function(){return tI},enumerable:!1,configurable:!0}),Object.defineProperty(uI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new eI.default(Object.values($C.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),uI.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},uI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new JC.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,XC.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(QC.default.hello(r,n),e,!0),e},uI.prototype.prepareToClose=function(){this.write(QC.default.goodbye(),iI,!0)},uI.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 JC.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,XC.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,XC.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,XC.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(QC.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},uI.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new JC.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(QC.default.commit(),t,!0),t},uI.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new JC.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(QC.default.rollback(),t,!0),t},uI.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 JC.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,XC.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,XC.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,XC.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(QC.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(QC.default.pullAll(),c,b),c},uI.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(oI,((t={})[nI]=void 0===r?{}:r,t),ZC(ZC({},n),{txConfig:rI.empty()}));return new JC.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},uI);function uI(){return null!==YC&&YC.apply(this,arguments)||this}nv.default=Mv;var aI,sI,Dv={},zv={},cI=r&&r.__assign||function(){return(cI=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)},Hv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Rs=(Object.defineProperty(zv,"__esModule",{value:!0}),Hv(av)),Zv=(zv.default=cI({},Rs.default),r&&r.__extends||(aI=function(e,t){return(aI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}aI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),lI=r&&r.__assign||function(){return(lI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Qv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rm=(Object.defineProperty(Dv,"__esModule",{value:!0}),Qv(nv)),fI=Qv(Ay),pI=dh,dI=R,hI=Qv(zv),bI=Qv($y),im=(e.internal.bookmarks.Bookmarks,e.internal.constants),yI=im.BOLT_PROTOCOL_V4_0,_I=im.FETCH_ALL,vI=e.internal.txConfig.TxConfig,mI="context",gI="database",OI="CALL dbms.routing.getRoutingTable($".concat(mI,", $").concat(gI,")"),Th=(sI=rm.default,Zv(wI,sI),Object.defineProperty(wI.prototype,"version",{get:function(){return yI},enumerable:!1,configurable:!0}),Object.defineProperty(wI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new bI.default(Object.values(hI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),wI.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 dI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,pI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,pI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(fI.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},wI.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===_?_I:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new dI.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,pI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,pI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(fI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(fI.default.pull({n:_}),c,b),c},wI.prototype._requestMore=function(e,t,r){this.write(fI.default.pull({stmtId:e,n:t}),r,!0)},wI.prototype._requestDiscard=function(e,t){this.write(fI.default.discard({stmtId:e}),t,!0)},wI.prototype._noOp=function(){},wI.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(OI,((t={})[mI]=void 0===r?{}:r,t[gI]=n,t),lI(lI({},o),{txConfig:vI.empty()}));return new dI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},wI);function wI(){return null!==sI&&sI.apply(this,arguments)||this}Dv.default=Th;var EI,PI,ly={},sm={},SI=r&&r.__assign||function(){return(SI=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)},dm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ym=(Object.defineProperty(sm,"__esModule",{value:!0}),dm(zv)),P=(sm.default=SI({},ym.default),r&&r.__extends||(EI=function(e,t){return(EI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}EI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Sm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sb=(Object.defineProperty(ly,"__esModule",{value:!0}),Sm(Dv)),TI=Sm(Ay),jI=R,Im=e,CI=dh,II=Sm(sm),RI=Sm($y),kI=Im.internal.constants.BOLT_PROTOCOL_V4_1,es=(PI=sb.default,P(AI,PI),Object.defineProperty(AI.prototype,"version",{get:function(){return kI},enumerable:!1,configurable:!0}),Object.defineProperty(AI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new RI.default(Object.values(II.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),AI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new jI.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,CI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(TI.default.hello(r,n,this._serversideRouting),e,!0),e},AI);function AI(e,t,r,n,o,i,u){e=PI.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}ly.default=es;var MI,NI,Nm={},Fs={},xI=r&&r.__assign||function(){return(xI=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)},dd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ct=(Object.defineProperty(Fs,"__esModule",{value:!0}),dd(sm)),Hm=(Fs.default=xI({},Ct.default),r&&r.__extends||(MI=function(e,t){return(MI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}MI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Qm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ts=(Object.defineProperty(Nm,"__esModule",{value:!0}),Qm(ly)),Bt=e,UI=Qm(Fs),DI=Qm($y),LI=Bt.internal.constants.BOLT_PROTOCOL_V4_2,_0=(NI=Ts.default,Hm(FI,NI),Object.defineProperty(FI.prototype,"version",{get:function(){return LI},enumerable:!1,configurable:!0}),Object.defineProperty(FI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new DI.default(Object.values(UI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),FI);function FI(){return null!==NI&&NI.apply(this,arguments)||this}Nm.default=_0;var T={},O={},BI=r&&r.__assign||function(){return(BI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},j=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},f=(Object.defineProperty(O,"__esModule",{value:!0}),j(Fs)),i=(O.default=BI({},f.default),{}),l={},WI=r&&r.__assign||function(){return(WI=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)},Lr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},w=(Object.defineProperty(l,"__esModule",{value:!0}),Lr(O)),zI=(l.default=WI({},w.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}),$u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qI=(Object.defineProperty(i,"__esModule",{value:!0}),Lb),VI=e,HI=$u(l),GI=g_,YI=Yb,KI=VI.internal.temporalUtil.localDateTimeToEpochSecond;function ZI(e,t,r){e=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),r=(0,VI.int)(t).multiply(1e3).add((0,VI.int)(r).div(1e6)).toNumber(),e=e.formatToParts(r).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:YI.identity:"literal"!==t.type&&(e[t.type]=(0,VI.int)(t.value)),e},{}),e.year=e.adjustEra(e.year),r=KI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond);return e.timeZoneOffsetSeconds=r.subtract(t),e.hour=e.hour.modulo(24),e}function QI(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,VI.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}i.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return HI.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){qI.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=zI(e.fields,3),t=e[0],r=e[1],e=e[2],t=ZI(e,t,r);return QI(new VI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,VI.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=KI(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=ZI(r,i,o),n=KI(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=ZI(r,i,o),KI(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,VI.int)(e.nanosecond),i=e.timeZoneId;return new qI.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return HI.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=KI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,VI.int)(e.nanosecond),e=(0,VI.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new qI.structure.Structure(73,[t,r,e])},fromStructure:function(e){qI.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=zI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,VI.int)(t).add(e),t=(0,GI.epochSecondAndNanoToLocalDateTime)(t,r);return QI(new VI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var XI,JI,ju=r&&r.__extends||(XI=function(e,t){return(XI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}XI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),$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)},da=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ca=(Object.defineProperty(T,"__esModule",{value:!0}),da(Nm)),eR=da(Ay),tR=R,rR=dh,nR=da(O),oR=da(i),iR=da($y),uR=e.internal.bookmarks.Bookmarks,aR=e.internal.constants.BOLT_PROTOCOL_V4_3,v=(JI=ca.default,ju(sR,JI),Object.defineProperty(sR.prototype,"version",{get:function(){return aR},enumerable:!1,configurable:!0}),Object.defineProperty(sR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new iR.default(Object.values(nR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),sR.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 tR.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||uR.empty();return this.write(eR.default.route(t,e.values(),r),o,!0),o},sR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new tR.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,rR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(eR.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},sR.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},sR.prototype._applyUtcPatch=function(){var t=this;this._transformer=new iR.default(Object.values($I($I({},nR.default),oR.default)).map(function(e){return e(t._config,t._log)}))},sR);function sR(){return null!==JI&&JI.apply(this,arguments)||this}T.default=v;var cR,lR,Cu={},xu=r&&r.__extends||(cR=function(e,t){return(cR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}cR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),fR=r&&r.__assign||function(){return(fR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},X=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(Cu,"__esModule",{value:!0}),X(T)),Ka=e,pR=X(Ay),dR=R,hR=dh,bR=X(l),yR=X(i),_R=X($y),Ks=Ka.internal.constants,vR=Ks.BOLT_PROTOCOL_V4_4,mR=Ks.FETCH_ALL,gR=Ka.internal.bookmarks.Bookmarks,Q=(lR=o.default,xu(OR,lR),Object.defineProperty(OR.prototype,"version",{get:function(){return vR},enumerable:!1,configurable:!0}),Object.defineProperty(OR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new _R.default(Object.values(bR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),OR.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 dR.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||gR.empty();return this.write(pR.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},OR.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===_?mR:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new dR.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,hR.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(pR.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(pR.default.pull({n:_}),c,b),c},OR.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 dR.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,hR.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(pR.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},OR.prototype._applyUtcPatch=function(){var t=this;this._transformer=new _R.default(Object.values(fR(fR({},bR.default),yR.default)).map(function(e){return e(t._config,t._log)}))},OR);function OR(){return null!==lR&&lR.apply(this,arguments)||this}Cu.default=Q;var Wa={},xs={},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.__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},qa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},PR=(Object.defineProperty(xs,"__esModule",{value:!0}),Lb),SR=e,TR=qa(l),Za=qa(i);xs.default=wR(wR(wR({},TR.default),Za.default),{createNodeTransformer:function(e){return TR.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){PR.structure.verifyStructSize("Node",4,e.size);var e=ER(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new SR.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return TR.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){PR.structure.verifyStructSize("Relationship",8,e.size);var e=ER(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 SR.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return TR.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){PR.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=ER(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new SR.UnboundRelationship(t,r,n,e)}})}});var jR,CR,y=r&&r.__extends||(jR=function(e,t){return(jR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}jR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ga=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Jc=(Object.defineProperty(Wa,"__esModule",{value:!0}),Ga(Cu)),IR=dh,RR=Ga(xs),kR=Ga($y),AR=Ga(Ay),MR=R,NR=e.internal.constants.BOLT_PROTOCOL_V5_0,il=(CR=Jc.default,y(xR,CR),Object.defineProperty(xR.prototype,"version",{get:function(){return NR},enumerable:!1,configurable:!0}),Object.defineProperty(xR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new kR.default(Object.values(RR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),xR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new MR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,IR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(AR.default.hello(r,n,this._serversideRouting),e,!0),e},xR);function xR(){return null!==CR&&CR.apply(this,arguments)||this}Wa.default=il;var UR,DR,Ba={},Ws={},LR=r&&r.__assign||function(){return(LR=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}},Nf=(Object.defineProperty(Ws,"__esModule",{value:!0}),s(xs)),zf=(Ws.default=LR({},Nf.default),r&&r.__extends||(UR=function(e,t){return(UR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}UR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),FR=r&&r.__assign||function(){return(FR=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)},Vf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},op=(Object.defineProperty(Ba,"__esModule",{value:!0}),Vf(Wa)),BR=dh,WR=Vf(Ws),zR=Vf($y),qR=Vf(Ay),VR=R,HR=e.internal.constants.BOLT_PROTOCOL_V5_1,Fa=(DR=op.default,zf(GR,DR),Object.defineProperty(GR.prototype,"version",{get:function(){return HR},enumerable:!1,configurable:!0}),Object.defineProperty(GR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new zR.default(Object.values(WR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(GR.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),GR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new VR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,BR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(qR.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(FR(FR({},e),a.metadata))},onError:i,flush:!0})},GR.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 VR.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(qR.default.logon(r),i,e),i},GR.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new VR.LogoffObserver({onCompleted:t,onError:r});return this.write(qR.default.logoff(),t,e),t},GR);function GR(){return null!==DR&&DR.apply(this,arguments)||this}Ba.default=Fa;var YR,KR,Jf={},gf={},ZR=r&&r.__assign||function(){return(ZR=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)},ap=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},La=(Object.defineProperty(gf,"__esModule",{value:!0}),ap(Ws)),Tu=(gf.default=ZR({},La.default),r&&r.__extends||(YR=function(e,t){return(YR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}YR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),QR=r&&r.__assign||function(){return(QR=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)},Mf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Vl=(Object.defineProperty(Jf,"__esModule",{value:!0}),Mf(Ba)),XR=Mf(gf),JR=Mf($y),$R=Mf(Ay),ek=R,g=e.internal.constants,tk=g.BOLT_PROTOCOL_V5_2,rk=g.FETCH_ALL,fp=(KR=Vl.default,Tu(nk,KR),Object.defineProperty(nk.prototype,"version",{get:function(){return tk},enumerable:!1,configurable:!0}),Object.defineProperty(nk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new JR.default(Object.values(XR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(nk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),nk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new ek.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write($R.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(QR(QR({},e),a.metadata))},onError:i,flush:!0})},nk.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(),this.write($R.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},nk.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=y;return this.write($R.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write($R.default.pull({n:_}),c,b),c},nk);function nk(){return null!==KR&&KR.apply(this,arguments)||this}Jf.default=fp;var gp={},ok=(Object.defineProperty(gp,"__esModule",{value:!0}),e);function ik(){}function uk(e){return e}var ak={onNext:ik,onCompleted:ik,onError:ik};function sk(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.log,e=e.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=t||uk,this._observer=Object.assign({onPendingObserversChange:ik,onError:ik,onFailure:ik,onErrorApplyTransformation:uk},e)}Object.defineProperty(sk.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),sk.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(ok.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(ok.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(ok.json.stringify(e)));try{var n=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}(t.code),o=(0,ok.newError)(t.message,n);this._currentFailure=this._observer.onErrorApplyTransformation(o),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(ok.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,ok.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,ok.newError)("Unknown Bolt protocol message: "+e))}},sk.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onPendingObserversChange(this._pendingObservers.length)},sk.prototype._queueObserver=function(e){return(e=e||ak).onCompleted=e.onCompleted||ik,e.onError=e.onError||ik,e.onNext=e.onNext||ik,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onPendingObserversChange(this._pendingObservers.length),!0},sk.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)}},sk.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},sk.prototype._resetFailure=function(){this._currentFailure=null},gp.default=sk;var ck,u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lk=(Object.defineProperty(oh,"__esModule",{value:!0}),e),fk=u(ih),pk=u(h_),dk=u(nv),hk=u(Dv),bk=u(ly),yk=u(Nm),_k=u(T),vk=u(Cu),mk=u(Wa),gk=u(Ba),Ok=u(Jf),wk=u(gp);oh.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 wk.default({transformMetadata:t.transformMetadata.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 fk.default(p,d,h,y,v,_);case 2:return new pk.default(p,d,h,y,v,_);case 3:return new dk.default(p,d,h,y,v,_);case 4:return new hk.default(p,d,h,y,v,_);case 4.1:return new bk.default(p,d,h,y,v,_,b);case 4.2:return new yk.default(p,d,h,y,v,_,b);case 4.3:return new _k.default(p,d,h,y,v,_,b);case 4.4:return new vk.default(p,d,h,y,v,_,b);case 5:return new mk.default(p,d,h,y,v,_,b);case 5.1:return new gk.default(p,d,h,y,v,_,b);case 5.2:return new Ok.default(p,d,h,y,v,_,b);default:throw(0,lk.newError)("Unknown Bolt protocol version: "+f)}},xf=_,ck=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]}),Op=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||ck(t,e,r)},Aa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(xf,"__esModule",{value:!0}),xf.RawRoutingTable=xf.BoltProtocol=void 0,Ip=Aa(_l),Hf=Aa(oh),Np=Aa(T),Aa=Aa(Oh),Op(R,xf),xf.BoltProtocol=Np.default,xf.RawRoutingTable=Aa.default,xf.default={handshake:Ip.default,create:Hf.default};Sp={},Fp={},Object.defineProperty(Fp,"__esModule",{value:!0}),Fp.DEFAULT_ACQUISITION_TIMEOUT=Fp.DEFAULT_MAX_SIZE=void 0,Fp.DEFAULT_MAX_SIZE=100,Fp.DEFAULT_ACQUISITION_TIMEOUT=6e4,Ek.defaultConfig=function(){return new Ek(100,6e4)},Ek.fromDriverConfig=function(e){return new Ek(Sk(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,Sk(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},rd=Ek;function Ek(e,t){this.maxSize=Pk(e,100),this.acquisitionTimeout=Pk(t,6e4)}function Pk(e,t){return 0===e||e?e:t}function Sk(e){return 0===e||e}Fp.default=rd;var fd={},Tk=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())})},jk=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}}}},ad=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ck=(Object.defineProperty(fd,"__esModule",{value:!0}),ad(Fp)),Ik=e,Rk=Ik.internal.logger.Logger,Kd=(kk.prototype.acquire=function(o){var i=this,u=o.asKey(),a=this._acquireRequests;return a[u]||(a[u]=[]),new Promise(function(e,t){var r=null,n=setTimeout(function(){var e,t=a[u];t&&(a[u]=t.filter(function(e){return e!==r})),r.isCompleted()||(t=i.activeResourceCount(o),e=i.has(o)?i._pools[u].length:0,r.reject((0,Ik.newError)("Connection acquisition timed out in ".concat(i._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},i._acquisitionTimeout),r=new Mk(u,e,t,n,i._log);a[u].push(r),i._processPendingAcquireRequests(o)})},kk.prototype.purge=function(e){return this._purgeKey(e.asKey())},kk.prototype.close=function(){return Tk(this,void 0,void 0,function(){var t=this;return jk(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(e){return t._purgeKey(e)}))];case 1:return[2,e.sent()]}})})},kk.prototype.keepAll=function(e){var t=this,r=e.map(function(e){return e.asKey()}),e=Object.keys(this._pools).filter(function(e){return-1===r.indexOf(e)});return Promise.all(e.map(function(e){return t._purgeKey(e)}))},kk.prototype.has=function(e){return e.asKey()in this._pools},kk.prototype.activeResourceCount=function(e){return this._activeResourceCounts[e.asKey()]||0},kk.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return t||(t=new Lk,this._pools[e]=t,this._pendingCreates[e]=0),t},kk.prototype._acquire=function(u){return Tk(this,void 0,void 0,function(){var t,r,n,o,i=this;return jk(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,Ik.newError)("Pool is closed, it is no more able to serve requests.");t=u.asKey(),r=this._getOrInitializePoolFor(t),e.label=1;case 1:return r.length?(n=r.pop(),this._validate(n)?(this._removeIdleObserver&&this._removeIdleObserver(n),Ak(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(n," acquired from the pool ").concat(t)),[2,{resource:n,pool:r}]):[3,2]):[3,5];case 2:return[4,this._destroy(n)];case 3:e.sent(),e.label=4;case 4:return[3,1];case 5:if(0<this._maxSize&&this.activeResourceCount(u)+this._pendingCreates[t]>=this._maxSize)return[2,{resource:null,pool:r}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=6;case 6:return e.trys.push([6,,8,9]),[4,this._create(u,function(e,t){return i._release(e,t,r)})];case 7:return o=e.sent(),Ak(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(o," created for the pool ").concat(t)),[3,9];case 8:return this._pendingCreates[t]=this._pendingCreates[t]-1,[7];case 9:return[2,{resource:o,pool:r}]}})})},kk.prototype._release=function(u,a,s){return Tk(this,void 0,void 0,function(){var o,i=this;return jk(this,function(e){switch(e.label){case 0:return(o=u.asKey(),s.isActive())?this._validate(a)?[3,2]:(this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because it is not functional")),[4,this._destroy(a)]):[3,4];case 1:return e.sent(),[3,3];case 2:this._installIdleObserver&&this._installIdleObserver(a,{onError:function(e){i._log.debug("Idle connection ".concat(a," destroyed because of error: ").concat(e));e=i._pools[o];e&&(i._pools[o]=e.filter(function(e){return e!==a})),i._destroy(a).catch(function(){})}}),s.push(a),this._log.isDebugEnabled()&&this._log.debug("".concat(a," released to the pool ").concat(o)),e.label=3;case 3:return[3,6];case 4:return this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because pool has been purged")),[4,this._destroy(a)];case 5:e.sent(),e.label=6;case 6:return t=o,r=this._activeResourceCounts,0<(n=(r[t]||0)-1)?r[t]=n:delete r[t],this._processPendingAcquireRequests(u),[2]}var t,r,n})})},kk.prototype._purgeKey=function(o){return Tk(this,void 0,void 0,function(){var t,r,n;return jk(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],!t)return[3,2];for(;t.length;)n=t.pop(),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]}})})},kk.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];e&&((n=e.shift())?this._acquire(r).catch(function(e){return n.reject(e),{resource:null}}).then(function(e){var t=e.resource,e=e.pool;t?n.isCompleted()?o._release(r,t,e):n.resolve(t):n.isCompleted()||(o._acquireRequests[i]||(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}):delete this._acquireRequests[i])},kk);function kk(e){var e=void 0===e?{}:e,t=e.create,t=void 0===t?function(e,t){return Promise.resolve()}:t,r=e.destroy,r=void 0===r?function(e){return Promise.resolve()}:r,n=e.validate,n=void 0===n?function(e){return!0}:n,o=e.installIdleObserver,o=void 0===o?function(e,t){}:o,i=e.removeIdleObserver,i=void 0===i?function(e){}:i,u=e.config,u=void 0===u?Ck.default.defaultConfig():u,e=e.log,e=void 0===e?Rk.noOp():e;this._create=t,this._destroy=r,this._validate=n,this._installIdleObserver=o,this._removeIdleObserver=i,this._maxSize=u.maxSize,this._acquisitionTimeout=u.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function Ak(e,t){var r=t[e]||0;t[e]=r+1}Nk.prototype.isCompleted=function(){return this._completed},Nk.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))},Nk.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var Mk=Nk;function Nk(e,t,r,n,o){this._key=e,this._resolve=t,this._reject=r,this._timeoutId=n,this._log=o,this._completed=!1}Fk.prototype.isActive=function(){return this._active},Fk.prototype.close=function(){this._active=!1},Fk.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},Object.defineProperty(Fk.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),Fk.prototype.pop=function(){return this._elements.pop()},Fk.prototype.push=function(e){return this._elements.push(e)};var xk,Uk,Dk,Lk=Fk;function Fk(){this._active=!0,this._elements=[]}fd.default=Kd,vl=Sp,xk=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]}),Uk=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cd=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)&&xk(t,e,r);return Uk(t,e),t},xc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(vl,"__esModule",{value:!0}),vl.DEFAULT_MAX_SIZE=vl.DEFAULT_ACQUISITION_TIMEOUT=vl.PoolConfig=vl.Pool=void 0,Dk=Cd(Fp),vl.PoolConfig=Dk.default,Object.defineProperty(vl,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return Dk.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(vl,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return Dk.DEFAULT_MAX_SIZE}}),Cd=xc(fd),vl.Pool=Cd.default,vl.default=Cd.default;var Bk,el={},Id={},Dl=r&&r.__extends||(Bk=function(e,t){return(Bk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Bk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Id,"__esModule",{value:!0});Dl(zk,Wk=e.ConnectionProvider),zk.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 Wk,Yd=zk;function zk(e){var t=Wk.call(this)||this;return t._connection=e,t}Id.default=Yd;C={},Kp={},Da={};function qk(e){this._errorHandler=e}Object.defineProperty(Da,"__esModule",{value:!0}),Object.defineProperty(qk.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),qk.prototype.isOpen=function(){throw new Error("not implemented")},qk.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(qk.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),qk.prototype.connect=function(e,t){throw new Error("not implemented")},qk.prototype.write=function(e,t,r){throw new Error("not implemented")},qk.prototype.resetAndFlush=function(){throw new Error("not implemented")},qk.prototype.hasOngoingObservableRequests=function(){throw new Error("not implemented")},qk.prototype.close=function(){throw new Error("not implemented")},qk.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t):e},Da.default=qk;var Vk,pd={},Vd=r&&r.__extends||(Vk=function(e,t){return(Vk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Vk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Hk=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())})},Gk=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=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Yk=(Object.defineProperty(pd,"__esModule",{value:!0}),pd.createChannelConnection=void 0,Ul),Kk=e,Ph=Sh(Da),Zk=Sh(_),Qk=Kk.error.PROTOCOL_ERROR,Xk=Kk.internal.logger.Logger,Jk=0;pd.createChannelConnection=function(i,u,a,s,c,e){void 0===c&&(c=null);var l=(e=void 0===e?function(e){return new Yk.Channel(e)}:e)(new Yk.ChannelConfig(i,u,a.errorCode()));return Zk.default.handshake(l).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new Yk.Chunker(l),o=new Yk.Dechunker,t=new eA(l,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return Zk.default.create({version:r,channel:l,chunker:n,dechunker:o,disableLosslessIntegers:u.disableLosslessIntegers,useBigInt:u.useBigInt,serversideRouting:c,server:t.server,log:t.logger,observer:{onPendingObserversChange: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)}}})});return e(function(e){return o.write(e)}),t}).catch(function(e){return l.close().then(function(){throw e})})};$k=Ph.default,Vd(tA,$k),Object.defineProperty(tA.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),tA.prototype.connect=function(e,t){return this._initialize(e,t)},tA.prototype._initialize=function(e,n){var o=this,i=this;return new Promise(function(r,t){o._protocol.initialize({userAgent:e,authToken:n,notificationFilter:o._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,o.version&&!t||(o.version=t),t=e.connection_id,o.databaseId||(o.databaseId=t),e.hints&&null!=(t=e.hints["connection.recv_timeout_seconds"])&&(e=(0,Kk.toNumber)(t),Number.isInteger(e)&&0<e?o._ch.setupReceiveTimeout(1e3*e):o._log.info("Server located at ".concat(o._address," supplied an invalid connection receive timeout value (").concat(e,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue."))),r(i)}})})},tA.prototype.protocol=function(){return this._protocol},Object.defineProperty(tA.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),tA.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(Kk.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},tA.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},tA.prototype.hasOngoingObservableRequests=function(){return this._protocol.hasOngoingObservableRequests()},tA.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: "+e),t(e))},onComplete:function(){e()}})})},tA.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},tA.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()})}}))},tA.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},tA.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},tA.prototype._handleOngoingRequestsNumberChange=function(e){0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout()},tA.prototype.close=function(){return Hk(this,void 0,void 0,function(){return Gk(this,function(e){switch(e.label){case 0:return 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]}})})},tA.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},tA.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,Kk.newError)(e,Qk);return this._handleFatalError(e),e};var $k,eA=tA;function tA(e,t,r,n,o,i,u,a,s){void 0===o&&(o=!1),void 0===i&&(i=null);var c,l,t=$k.call(this,t)||this;return t._reseting=!1,t._resetObservers=[],t._id=Jk++,t._address=r,t._server={address:r.asHostPort()},t.creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(c=t,new Xk((l=n)._level,function(e,t){return l._loggerFunction(e,"".concat(c," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}pd.default=eA;var rA,nA,Hh={},eb=r&&r.__extends||(rA=function(e,t){return(rA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}rA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),vb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Eb=(Object.defineProperty(Hh,"__esModule",{value:!0}),vb(Da)),Tb=(nA=Eb.default,eb(oA,nA),Object.defineProperty(oA.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),oA.prototype.isOpen=function(){return this._delegate.isOpen()},oA.prototype.protocol=function(){return this._delegate.protocol()},oA.prototype.connect=function(e,t){return this._delegate.connect(e,t)},oA.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},oA.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},oA.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},oA.prototype.close=function(){return this._delegate.close()},oA.prototype._release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate._release()},oA);function oA(e,t){var r=nA.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}Hh.default=Tb;jb={};Object.defineProperty(jb,"__esModule",{value:!0});var iA,uA,aA,sA=e.error.SERVICE_UNAVAILABLE,cA=e.error.SESSION_EXPIRED;function lA(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||fA,this._handleWriteFailure=r||fA,this._handleAuthorizationExpired=n||fA}function fA(e){return e}lA.create=function(e){return new lA(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleAuthorizationExpired)},lA.prototype.errorCode=function(){return this._errorCode},lA.prototype.handleAndTransformError=function(e,t){return!(r=e)||"Neo.ClientError.Security.AuthorizationExpired"!==r.code&&"Neo.ClientError.Security.TokenExpired"!==r.code?function(e){if(e)return e.code===cA||e.code===sA||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return}(e)?this._handleUnavailability(e,t):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return}(e)?this._handleWriteFailure(e,t):e:this._handleAuthorizationExpired(e,t);var r},jb.default=lA,ab=Kp,iA=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]}),uA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cb=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)&&iA(t,e,r);return uA(t,e),t},xb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(ab,"__esModule",{value:!0}),ab.createChannelConnection=ab.ConnectionErrorHandler=ab.DelegateConnection=ab.ChannelConnection=ab.Connection=void 0,Zh=xb(Da),ab.Connection=Zh.default,aA=Cb(pd),ab.ChannelConnection=aA.default,Object.defineProperty(ab,"createChannelConnection",{enumerable:!0,get:function(){return aA.createChannelConnection}}),Cb=xb(Hh),ab.DelegateConnection=Cb.default,Cb=xb(jb),ab.ConnectionErrorHandler=Cb.default,ab.default=Zh.default;var pA,dA,ib=r&&r.__extends||(pA=function(e,t){return(pA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}pA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),hA=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]}),bA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Gf=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)&&hA(t,e,r);return bA(t,e),t},yA=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())})},_A=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}}}},vA=(Object.defineProperty(C,"__esModule",{value:!0}),Kp),mA=Gf(Sp),gA=e,OA=gA.error.SERVICE_UNAVAILABLE,ey=(dA=gA.ConnectionProvider,ib(wA,dA),wA.prototype._createConnectionErrorHandler=function(){return new vA.ConnectionErrorHandler(OA)},wA.prototype._createConnection=function(e,r){var n=this;return this._createChannelConnection(e).then(function(t){return t._release=function(){return r(e,t)},(n._openConnections[t.id]=t).connect(n._userAgent,n._authToken).catch(function(e){throw n._destroyConnection(t),e})})},wA.prototype._validateConnection=function(e){if(!e.isOpen())return!1;var t=this._config.maxConnectionLifetime;return Date.now()-e.creationTimestamp<=t},wA.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},wA.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return yA(this,void 0,void 0,function(){var t,r;return _A(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire(n)];case 1:t=e.sent(),r=new gA.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]}})})},wA.prototype.close=function(){return yA(this,void 0,void 0,function(){return _A(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]}})})},wA._installIdleObserverOnConnection=function(e,t){e._queueObserver(t)},wA._removeIdleObserverOnConnection=function(e){e._updateCurrentObserver()},wA);function wA(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,e=e.authToken,u=(void 0===t&&(t=null),dA.call(this)||this);return u._id=r,u._config=n,u._log=o,u._userAgent=i,u._authToken=e,u._createChannelConnection=t||function(e){return(0,vA.createChannelConnection)(e,u._config,u._createConnectionErrorHandler(),u._log)},u._connectionPool=new mA.default({create:u._createConnection.bind(u),destroy:u._destroyConnection.bind(u),validate:u._validateConnection.bind(u),installIdleObserver:wA._installIdleObserverOnConnection.bind(u),removeIdleObserver:wA._removeIdleObserverOnConnection.bind(u),config:mA.PoolConfig.fromDriverConfig(n),log:u._log}),u._openConnections={},u}C.default=ey;var EA,PA,uy={},Vb=r&&r.__extends||(EA=function(e,t){return(EA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}EA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),SA=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())})},TA=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}}}},Nh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sy=(Object.defineProperty(uy,"__esModule",{value:!0}),Nh(C)),jA=Kp,Oy=e.internal.constants,CA=Oy.BOLT_PROTOCOL_V3,IA=Oy.BOLT_PROTOCOL_V4_0,RA=Oy.BOLT_PROTOCOL_V4_4,kA=e.error.SERVICE_UNAVAILABLE,Uc=(PA=Sy.default,Vb(AA,PA),AA.prototype.acquireConnection=function(e){var r=this,e=void 0===e?{}:e,n=(e.accessMode,e.database),t=(e.bookmarks,jA.ConnectionErrorHandler.create({errorCode:kA,handleAuthorizationExpired:function(e,t){return r._handleAuthorizationExpired(e,t,n)}}));return this._connectionPool.acquire(this._address).then(function(e){return new jA.DelegateConnection(e,t)})},AA.prototype._handleAuthorizationExpired=function(e,t,r){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this._connectionPool.purge(t).catch(function(){}),e},AA.prototype._hasProtocolVersion=function(n){return SA(this,void 0,void 0,function(){var t,r;return TA(this,function(e){switch(e.label){case 0:return[4,(0,jA.createChannelConnection)(this._address,this._config,this._createConnectionErrorHandler(),this._log)];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]}})})},AA.prototype.supportsMultiDb=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return IA<=e})];case 1:return[2,e.sent()]}})})},AA.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},AA.prototype.supportsTransactionConfig=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return CA<=e})];case 1:return[2,e.sent()]}})})},AA.prototype.supportsUserImpersonation=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return RA<=e})];case 1:return[2,e.sent()]}})})},AA.prototype.verifyConnectivityAndGetServerInfo=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},AA);function AA(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,e=e.authToken,t=PA.call(this,{id:t,config:r,log:n,userAgent:i,authToken:e})||this;return t._address=o,t}uy.default=Uc;var xy={},Bb={},Cy={},cy={},MA=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},NA=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))},xA=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.createValidRoutingTable=void 0,e),ml=xA.internal.constants,UA=ml.ACCESS_MODE_WRITE,DA=ml.ACCESS_MODE_READ,LA=xA.internal.serverAddress.ServerAddress,FA=xA.error.PROTOCOL_ERROR,BA=(WA.fromRawRoutingTable=qA,WA.prototype.forget=function(e){this.readers=zA(this.readers,e),this.writers=zA(this.writers,e)},WA.prototype.forgetRouter=function(e){this.routers=zA(this.routers,e)},WA.prototype.forgetWriter=function(e){this.writers=zA(this.writers,e)},WA.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===DA&&0===this.readers.length||e===UA&&0===this.writers.length},WA.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},WA.prototype.allServers=function(){return NA(NA(NA([],MA(this.routers),!1),MA(this.readers),!1),MA(this.writers),!1)},WA.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,"]]")},WA);function WA(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,xA.int)(0),this.ttl=e}function zA(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function qA(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,xA.int)(Date.now()),n=(0,xA.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?xA.Integer.MAX_VALUE:n}catch(e){throw(0,xA.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(xA.json.stringify(t),"\nError message: ").concat(e.message),FA)}}(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=HA(e).map(function(e){return LA.fromUrl(e)}):"WRITE"===t?i=HA(e).map(function(e){return LA.fromUrl(e)}):"READ"===t&&(o=HA(e).map(function(e){return LA.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,xA.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(xA.json.stringify(t.servers),"\nError message: ").concat(e.message),FA)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return VA(u,"routers",t),VA(a,"readers",t),new BA({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function VA(e,t,r){if(0===e.length)throw(0,xA.newError)("Received no "+t+" from router "+r,FA)}function HA(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}cy.default=BA,cy.createValidRoutingTable=qA;var Rh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},GA=(Object.defineProperty(Cy,"__esModule",{value:!0}),Rh(cy));function YA(e){this._routingContext=e}YA.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:GA.default.fromRawRoutingTable(r,n,e)})})},YA.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})})},Cy.default=YA;var KA,ZA,Iy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gl=(Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.RoutingTable=Bb.Rediscovery=void 0,Iy(Cy)),Ol=(Bb.Rediscovery=gl.default,Iy(cy)),Gy=(Bb.RoutingTable=Ol.default,Bb.default=gl.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)})),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)},XA=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]}),JA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zy=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)&&XA(t,e,r);return JA(t,e),t},$A=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())})},eM=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}}}},tM=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.")},rM=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},i_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},nM=(Object.defineProperty(xy,"__esModule",{value:!0}),e),oM=Zy(Bb),iM=Ul,uM=i_(Id),jt=i_(C),aM=Qa,sM=Kp,cM=nM.error.SERVICE_UNAVAILABLE,lM=nM.error.SESSION_EXPIRED,fM=nM.internal.bookmarks.Bookmarks,s_=nM.internal.constants,pM=s_.ACCESS_MODE_READ,dM=s_.ACCESS_MODE_WRITE,hM=s_.BOLT_PROTOCOL_V3,bM=s_.BOLT_PROTOCOL_V4_0,yM=s_.BOLT_PROTOCOL_V4_4,_M=(0,nM.int)(3e4),l_=(ZA=jt.default,Gy(vM,ZA),vM.prototype._createConnectionErrorHandler=function(){return new sM.ConnectionErrorHandler(lM)},vM.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||null),e},vM.prototype._handleAuthorizationExpired=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this._connectionPool.purge(t).catch(function(){}),e},vM.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||null),(0,nM.newError)("No longer possible to write to server at "+t,lM,e)},vM.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,s=e.accessMode,c=e.database,l=e.bookmarks,f=e.impersonatedUser,p=e.onDatabaseNameResolved;return $A(this,void 0,void 0,function(){var t,r,n,o,i,u,a=this;return eM(this,function(e){switch(e.label){case 0:return n={database:c||null},o=new sM.ConnectionErrorHandler(lM,function(e,t){return a._handleUnavailability(e,t,n.database)},function(e,t){return a._handleWriteFailure(e,t,n.database)},function(e,t){return a._handleAuthorizationExpired(e,t,n.database)}),[4,this._freshRoutingTable({accessMode:s,database:n.database,bookmarks:l,impersonatedUser:f,onDatabaseNameResolved:function(e){n.database=n.database||e,p&&p(e)}})];case 1:if(i=e.sent(),s===pM)r=this._loadBalancingStrategy.selectReader(i.readers),t="read";else{if(s!==dM)throw(0,nM.newError)("Illegal mode "+s);r=this._loadBalancingStrategy.selectWriter(i.writers),t="write"}if(!r)throw(0,nM.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(i),lM);e.label=2;case 2:return e.trys.push([2,4,,5]),[4,this._acquireConnectionToServer(r,t,i)];case 3:return u=e.sent(),[2,new sM.DelegateConnection(u,o)];case 4:throw u=e.sent(),o.handleAndTransformError(u,r);case 5:return[2]}})})},vM.prototype._hasProtocolVersion=function(u){return $A(this,void 0,void 0,function(){var t,r,n,o,i;return eM(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,(0,sM.createChannelConnection)(t[n],this._config,this._createConnectionErrorHandler(),this._log)];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]}})})},vM.prototype.supportsMultiDb=function(){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return bM<=e})];case 1:return[2,e.sent()]}})})},vM.prototype.supportsTransactionConfig=function(){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return hM<=e})];case 1:return[2,e.sent()]}})})},vM.prototype.supportsUserImpersonation=function(){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return yM<=e})];case 1:return[2,e.sent()]}})})},vM.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},vM.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return $A(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return eM(this,function(e){switch(e.label){case 0:return t={database:l||null},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===dM?r.writers:r.readers,n=(0,nM.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),cM),e.label=2;case 2:e.trys.push([2,9,10,11]),o=tM(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}})})},vM.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},vM.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},vM.prototype._acquireConnectionToServer=function(e,t,r){return this._connectionPool.acquire(e)},vM.prototype._freshRoutingTable=function(e){var e=void 0===e?{}:e,t=e.accessMode,r=e.database,n=e.bookmarks,o=e.impersonatedUser,e=e.onDatabaseNameResolved,i=this._routingTableRegistry.get(r,function(){return new oM.RoutingTable({database:r})});return i.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(i)),this._refreshRoutingTable(i,n,o,e)):i},vM.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)},vM.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return $A(this,void 0,void 0,function(){var t,r,n,o,i;return eM(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c)];case 1:return(t=rM.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)];case 3:i=rM.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,l,n)];case 5:return[2,e.sent()]}})})},vM.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return $A(this,void 0,void 0,function(){var t,r,n;return eM(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a)];case 1:return r=rM.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a)];case 2:n=rM.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,s,r)];case 4:return[2,e.sent()]}})})},vM.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u){return $A(this,void 0,void 0,function(){var t,r;return eM(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u)];case 1:return(t=rM.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,vM._forgetRouter(o,n,r),[2,[null,t]])}})})},vM.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u){return $A(this,void 0,void 0,function(){var t;return eM(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)];case 2:return[2,e.sent()]}})})},vM.prototype._resolveSeedRouter=function(n){return $A(this,void 0,void 0,function(){var t,r=this;return eM(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)]}})})},vM.prototype._fetchRoutingTable=function(s,c,l,f){return $A(this,void 0,void 0,function(){var t=this;return eM(this,function(e){return[2,s.reduce(function(i,u,a){return $A(t,void 0,void 0,function(){var t,r,n,o;return eM(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=rM.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(vM._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f)]);case 2:if(t=rM.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]))]})})},vM.prototype._createSessionForRediscovery=function(o,i,u){return $A(this,void 0,void 0,function(){var t,r,n=this;return eM(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this._connectionPool.acquire(o)];case 1:return r=e.sent(),t=sM.ConnectionErrorHandler.create({errorCode:lM,handleAuthorizationExpired:function(e,t){return n._handleAuthorizationExpired(e,t)}}),t=new uM.default(new sM.DelegateConnection(r,t)),r.protocol().version<4?[2,[new nM.Session({mode:dM,bookmarks:fM.empty(),connectionProvider:t}),null]]:[2,[new nM.Session({mode:pM,database:"system",bookmarks:i,connectionProvider:t,impersonatedUser:u}),null]];case 2:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 3:return[2]}})})},vM.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"].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,nM.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),cM,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},vM.prototype._applyRoutingTableIfPossible=function(t,r,n,o){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r,n)];throw(0,nM.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),cM,o);case 1:return e.sent(),[2,r]}})})},vM.prototype._updateRoutingTable=function(t,r){return $A(this,void 0,void 0,function(){return eM(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),r(t.database),this._log.info("Updated routing table ".concat(t)),[2]}})})},vM._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},vM);function vM(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.authToken,e=e.routingTablePurgeDelay,c=ZA.call(this,{id:t,config:i,log:u,userAgent:a,authToken:s},function(e){return(0,sM.createChannelConnection)(e,c._config,c._createConnectionErrorHandler(),c._log,c._routingContext)})||this;return c._routingContext=QA(QA({},n),{address:r.toString()}),c._seedRouter=r,c._rediscovery=new oM.default(c._routingContext),c._loadBalancingStrategy=new aM.LeastConnectedLoadBalancingStrategy(c._connectionPool),c._hostNameResolver=o,c._dnsResolver=new iM.HostNameResolver,c._log=u,c._useSeedRouter=!0,c._routingTableRegistry=new UM(e?(0,nM.int)(e):_M),c}xy.default=l_;DM.prototype.register=function(e){return this._tables.set(e.database,e),this},DM.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},DM.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},DM.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},DM.prototype._forEach=function(e){var t,r;try{for(var n=tM(this._tables),o=n.next();!o.done;o=n.next())e(rM(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},DM.prototype._remove=function(e){return this._tables.delete(e),this},DM.prototype._removeIf=function(e){var t,r;try{for(var n=tM(this._tables),o=n.next();!o.done;o=n.next()){var i=rM(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 mM,gM,OM,wM,EM,PM,SM,TM,jM,CM,x,IM,RM,kM,AM,MM,NM,xM,UM=DM;function DM(e){this._tables=new Map,this._routingTablePurgeDelay=e}function LM(e,o,t){void 0===t&&(t={}),kM(e,"Bolt URL");var r,i=NM.parseDatabaseUrl(e),n=!1,u=!1;switch(i.scheme){case"bolt":break;case"bolt+s":u=!0,r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":u=!0,r="TRUST_ALL_CERTIFICATES";break;case"neo4j":n=!0;break;case"neo4j+s":r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",n=u=!0;break;case"neo4j+ssc":r="TRUST_ALL_CERTIFICATES",n=u=!0;break;default:throw new Error("Unknown scheme: ".concat(i.scheme))}if(u){if("encrypted"in t||"trust"in t)throw new Error("Encryption/trust can only be configured either through URL or config, not both");t.encrypted=RM,t.trust=r}(o=o||{}).scheme=o.scheme||"none",t.userAgent=t.userAgent||xM;var a=MM.fromUrl(i.hostAndPort),s={address:a,typename:n?"Routing":"Direct",routing:n};return new CM.Driver(s,t,function(){{if(n)return function(e,t,r,n){return new IM.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authToken:o,address:a,userAgent:t.userAgent,routingContext:i.query})};if(AM(i.query))return function(e,t,r){return new IM.DirectConnectionProvider({id:e,config:t,log:r,authToken:o,address:a,userAgent:t.userAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function FM(r,n){return TM(this,void 0,void 0,function(){var t;return jM(this,function(e){switch(e.label){case 0:t=LM(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=el,mM=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,gM=Id,Object.defineProperty(n,"SingleConnectionProvider",{enumerable:!0,get:function(){return mM(gM).default}}),OM=C,Object.defineProperty(n,"PooledConnectionProvider",{enumerable:!0,get:function(){return mM(OM).default}}),wM=uy,Object.defineProperty(n,"DirectConnectionProvider",{enumerable:!0,get:function(){return mM(wM).default}}),EM=xy,Object.defineProperty(n,"RoutingConnectionProvider",{enumerable:!0,get:function(){return mM(EM).default}}),P_=h,PM=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]}),SM=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),S=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)&&PM(t,e,r);return SM(t,e),t},R_=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||PM(t,e,r)},Object.defineProperty(P_,"__esModule",{value:!0}),P_.pool=P_.packstream=P_.channel=P_.buf=P_.bolt=P_.loadBalancing=void 0,P_.loadBalancing=S(Qa),P_.bolt=S(_),P_.buf=S(mf),P_.channel=S(Ul),P_.packstream=S(Lb),P_.pool=S(Sp),R_(el,P_),I=F,TM=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())})},jM=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}},Object.defineProperty(I,"__esModule",{value:!0}),I.PathSegment=I.Path=I.UnboundRelationship=I.Relationship=I.Node=I.Record=I.ServerInfo=I.Notification=I.QueryStatistics=I.ProfiledPlan=I.Plan=I.ResultSummary=I.RxResult=I.RxManagedTransaction=I.RxTransaction=I.RxSession=I.EagerResult=I.Result=I.ManagedTransaction=I.Transaction=I.Session=I.Driver=I.temporal=I.spatial=I.graph=I.error=I.routing=I.session=I.types=I.logging=I.auth=I.isRetryableError=I.Neo4jError=I.integer=I.isUnboundRelationship=I.isRelationship=I.isPathSegment=I.isPath=I.isNode=I.isDateTime=I.isLocalDateTime=I.isDate=I.isTime=I.isLocalTime=I.isDuration=I.isPoint=I.isInt=I.int=I.hasReachableServer=I.driver=void 0,I.notificationFilterMinimumSeverityLevel=I.notificationFilterDisabledCategory=I.notificationSeverityLevel=I.notificationCategory=I.resultTransformers=I.bookmarkManager=I.DateTime=I.LocalDateTime=I.Date=I.Time=I.LocalTime=I.Duration=I.Integer=I.Point=void 0,CM=B,Object.defineProperty(I,"Driver",{enumerable:!0,get:function(){return CM.Driver}}),m=W_(t),x=e,Object.defineProperty(I,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(I,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(I,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(I,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(I,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(I,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(I,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(I,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(I,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(I,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(I,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(I,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(I,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(I,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(I,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(I,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(I,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(I,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(I,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(I,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(I,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(I,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(I,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(I,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(I,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(I,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(I,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(I,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(I,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(I,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(I,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(I,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(I,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(I,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(I,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(I,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(I,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(I,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(I,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(I,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(I,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(I,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(I,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(I,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(I,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(I,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(I,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(I,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(I,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(I,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),IM=h,Y_=W_(Gr),I.RxSession=Y_.default,U_=W_(p),I.RxTransaction=U_.default,J_=W_(b),I.RxManagedTransaction=J_.default,W_=W_(E),I.RxResult=W_.default,hd=x.internal.util,RM=hd.ENCRYPTION_ON,kM=hd.assertString,AM=hd.isEmptyObjectOrNull,MM=x.internal.serverAddress.ServerAddress,NM=x.internal.urlUtil,I.driver=LM,I.hasReachableServer=FM,xM="neo4j-javascript/"+m.default,hd={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},I.logging=hd,m={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},I.types=m,__={READ:CM.READ,WRITE:CM.WRITE},I.session=__,hv={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},I.integer=hv,Sv={isPoint:x.isPoint},I.spatial=Sv,kv={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},I.temporal=kv,wv={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},I.graph=wv,hv={driver:LM,hasReachableServer:FM,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:hv,Neo4jError:x.Neo4jError,isRetryableError:x.isRetryableError,auth:x.auth,logging:hd,types:m,session:__,routing:x.routing,error:x.error,graph:wv,spatial:Sv,temporal:kv,Driver:CM.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:Y_.default,RxTransaction:U_.default,RxManagedTransaction:J_.default,RxResult:W_.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,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},I.default=hv,U(F)});
|
|
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 U(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D,L,F={},B={},e={},t={},n=r&&r.__extends||(D=function(e,t){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}D(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),W=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.Neo4jError=t.isRetriableError=t.newError=void 0,"ServiceUnavailable"),z=(t.SERVICE_UNAVAILABLE=W,"SessionExpired"),q=(t.SESSION_EXPIRED=z,t.PROTOCOL_ERROR="ProtocolError",L=Error,n(V,L),V.isRetriable=function(e){return null!=e&&e instanceof V&&e.retriable},V);function V(e,t,r){e=L.call(this,e,null!=r?{cause:r}:void 0)||this;return e.constructor=V,e.__proto__=V.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===W||r===z||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=q,t.newError=function(e,t,r){return new q(e,null!=t?t:"N/A",r)};n=q.isRetriable;t.isRetriableError=n;var n={},H=(Object.defineProperty(n,"__esModule",{value:!0}),n.toString=n.toNumber=n.inSafeRange=n.isInt=n.int=void 0,t),G=new Map,o=(d.prototype.inSafeRange=function(){return this.greaterThanOrEqual(d.MIN_SAFE_VALUE)&&this.lessThanOrEqual(d.MAX_SAFE_VALUE)},d.prototype.toInt=function(){return this.low},d.prototype.toNumber=function(){return this.high*Y+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(Y)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(Y)+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(Z)&&e.lessThan(Z))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,H.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);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=G.get(e)))return t;var t=new d(e,e<0?-1:0);return-128<=e&&e<128&&G.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<=-K?d.MIN_VALUE:K<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%Y|0,e/Y|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,H.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,H.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,H.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,H.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?d.fromNumber(e):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(o.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var Y=4294967296,K=Y*Y/2,Z=o.fromInt(1<<24),i=o.fromValue,i=(n.int=i,o.isInteger),i=(n.isInt=i,o.inSafeRange),i=(n.inSafeRange=i,o.toNumber),i=(n.toNumber=i,o.toString),i=(n.toString=i,n.default=o,{}),o={},u={},Q={},X={},J=(Object.defineProperty(X,"__esModule",{value:!0}),X.getBrokenObjectReason=X.isBrokenObject=X.createBrokenObject=void 0,"__isBrokenObject__"),$="__reason__";X.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===J||(t===$?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})},X.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[J]},X.getBrokenObjectReason=function(e){return e[$]},Object.defineProperty(Q,"__esModule",{value:!0}),Q.stringify=void 0;var ee=X;Q.stringify=function(e){return JSON.stringify(e,function(e,t){return(0,ee.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,ee.getBrokenObjectReason)(t)}:"bigint"==typeof t?"".concat(t,"n"):t})},Object.defineProperty(u,"__esModule",{value:!0}),u.ENCRYPTION_OFF=u.ENCRYPTION_ON=u.validateQueryAndParameters=u.assertValidDate=u.assertNumberOrInteger=u.assertNumber=u.assertString=u.assertObject=u.isString=u.isObject=u.isEmptyObjectOrNull=void 0;var a,te,re,ne,oe,ie,ue=n,ae=Q;u.ENCRYPTION_ON="ENCRYPTION_ON";function se(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function ce(e,t){if(le(e))return e;throw new TypeError((0,ae.stringify)(t)+" expected to be string but was: "+(0,ae.stringify)(e))}function le(e){return"[object String]"===Object.prototype.toString.call(e)}function fe(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,ne.int)(e),this._maxInteger=(0,ne.int)(t)}function pe(e,t,r){e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.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,ne.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 de(e,t,r){if((0,ie.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,oe.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function he(e,t){e=(0,ne.int)(e),t=(0,ne.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function be(e,t){return e=(0,ne.int)(e),t=(0,ne.int)(t),e.subtract(he(e,t).multiply(t))}function ye(e){return(e=(0,ne.int)(e)).equals(0)?"":"."+_e(e,9)}function _e(e,t,r){var n=(e=(0,ne.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}u.ENCRYPTION_OFF="ENCRYPTION_OFF",u.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!se(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},u.isObject=se,u.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(ce(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!se(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}},u.assertObject=function(e,t){if(se(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,ae.stringify)(e))},u.assertString=ce,u.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,ae.stringify)(e));return e},u.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,ue.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,ae.stringify)(e))},u.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,ae.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,ae.stringify)(e));return e},u.isString=le,a=o,te=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]}),re=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=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)&&te(t,e,r);return re(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,ne=s(n),oe=t,ie=u,fe.prototype.contains=function(e){var t;return(0,ne.isInt)(e)&&e instanceof ne.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,ne.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},fe.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},s=fe,a.YEAR_RANGE=new s(-999999999,999999999),a.MONTH_OF_YEAR_RANGE=new s(1,12),a.DAY_OF_MONTH_RANGE=new s(1,31),a.HOUR_OF_DAY_RANGE=new s(0,23),a.MINUTE_OF_HOUR_RANGE=new s(0,59),a.SECOND_OF_MINUTE_RANGE=new s(0,59),a.NANOSECOND_OF_SECOND_RANGE=new s(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,ne.int)(e).add(he(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return be(e,a.NANOS_PER_SECOND)},a.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.int)(r),n=(0,ne.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,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.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=_e(e),t=_e(t),r=function(e,t){e=(0,ne.int)(e),t=(0,ne.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=ye((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=_e(e,2),t=_e(t,2),r=_e(r,2),n=ye(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},a.timeZoneOffsetToIsoString=function(e){if((e=(0,ne.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=_e((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=_e(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:_e(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,ne.int)(e);if(e.isNegative()||e.greaterThan(9999))return _e(e,6,{usePositiveSign:!0});return _e(e,4)}(e),t=_e(t,2),r=_e(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 ne.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},a.timeZoneOffsetInSeconds=function(e){var t=e.getSeconds()>=e.getUTCSeconds()?e.getSeconds()-e.getUTCSeconds():e.getSeconds()-e.getUTCSeconds()+60;return 0===(e=e.getTimezoneOffset())?0+t:-1*e*a.SECONDS_PER_MINUTE+t},a.assertValidYear=function(e){return de(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return de(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return de(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return de(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return de(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return de(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return de(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},a.assertValidZoneId=function(t,r){try{Intl.DateTimeFormat(void 0,{timeZone:r})}catch(e){throw(0,oe.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(r,'"'))}},a.floorDiv=he,a.floorMod=be;var ve=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}),s=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)&&ve(t,e,r);return me(t,e),t},ge=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(i,"__esModule",{value:!0}),i.isDateTime=i.DateTime=i.isLocalDateTime=i.LocalDateTime=i.isDate=i.Date=i.isTime=i.Time=i.isLocalTime=i.LocalTime=i.isDuration=i.Duration=void 0,s(o)),Oe=u,we=t,Ee=s(n),s={value:!0,enumerable:!1,configurable:!1,writable:!1},Pe="__isDuration__",Se="__isLocalTime__",Te="__isTime__",je="__isDate__",Ce="__isLocalDateTime__",Ie="__isDateTime__",l=(Re.prototype.toString=function(){return c.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},Re);function Re(e,t,r,n){this.months=(0,Oe.assertNumberOrInteger)(e,"Months"),this.days=(0,Oe.assertNumberOrInteger)(t,"Days"),(0,Oe.assertNumberOrInteger)(r,"Seconds"),(0,Oe.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=c.normalizeSecondsForDuration(r,n),this.nanoseconds=c.normalizeNanosecondsForDuration(n),Object.freeze(this)}i.Duration=l,Object.defineProperty(l.prototype,Pe,s),i.isDuration=function(e){return Ue(e,Pe)};ke.fromStandardDate=function(e,t){Le(e,t);t=c.totalNanoseconds(e,t);return new ke(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof Ee.default?t.toInt():"bigint"==typeof t?(0,Ee.int)(t).toInt():t)},ke.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};l=ke;function ke(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)}i.LocalTime=l,Object.defineProperty(l.prototype,Se,s),i.isLocalTime=function(e){return Ue(e,Se)};Ae.fromStandardDate=function(e,t){return Le(e,t),new Ae(e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e))},Ae.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+c.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};l=Ae;function Ae(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,Oe.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}i.Time=l,Object.defineProperty(l.prototype,Te,s),i.isTime=function(e){return Ue(e,Te)};Me.fromStandardDate=function(e){return Le(e),new Me(e.getFullYear(),e.getMonth()+1,e.getDate())},Me.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Me.prototype.toString=function(){return c.dateToIsoString(this.year,this.month,this.day)};l=Me;function Me(e,t,r){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),Object.freeze(this)}i.Date=l,Object.defineProperty(l.prototype,je,s),i.isDate=function(e){return Ue(e,je)};Ne.fromStandardDate=function(e,t){return Le(e,t),new Ne(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(c.totalNanoseconds(e,t)))},Ne.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Ne.prototype.toString=function(){return De(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};l=Ne;function Ne(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)}i.LocalDateTime=l,Object.defineProperty(l.prototype,Ce,s),i.isLocalDateTime=function(e){return Ue(e,Ce)};xe.fromStandardDate=function(e,t){return Le(e,t),new xe(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Ee.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e),null)},xe.prototype.toStandardDate=function(){return c.toStandardDate(this._toUTC())},xe.prototype.toString=function(){var e;return De(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,"]"):"")},xe.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,Ee.int)(e).multiply(1e3).add((0,Ee.int)(this.nanosecond).div(1e6)).toNumber()};l=xe;function xe(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=ge(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,Oe.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,Oe.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 Ue(e,t){return null!=e&&!0===e[t]}function De(e,t,r,n,o,i,u){return c.dateToIsoString(e,t,r)+"T"+c.timeToIsoString(n,o,i,u)}function Le(e,t){(0,Oe.assertValidDate)(e,"Standard date"),null!=t&&(0,Oe.assertNumberOrInteger)(t,"Nanosecond")}i.DateTime=l,Object.defineProperty(l.prototype,Ie,s),i.isDateTime=function(e){return Ue(e,Ie)};var l={},Fe=(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,Q),s={value:!0,enumerable:!1,configurable:!1,writable:!1},Be="__isNode__",We="__isRelationship__",ze="__isUnboundRelationship__",qe="__isPath__",Ve="__isPathSegment__";function He(e,t){return null!=e&&!0===e[t]}Ge.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,Fe.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var f=Ge;function Ge(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=Je(n,function(){return e.toString()})}l.Node=f,Object.defineProperty(f.prototype,Be,s),l.isNode=function(e){return He(e,Be)};Ke.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,Fe.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var Ye=Ke;function Ke(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=Je(i,function(){return e.toString()}),this.startNodeElementId=Je(u,function(){return t.toString()}),this.endNodeElementId=Je(a,function(){return r.toString()})}l.Relationship=Ye,Object.defineProperty(Ye.prototype,We,s),l.isRelationship=function(e){return He(e,We)};Ze.prototype.bind=function(e,t){return new Ye(this.identity,e,t,this.type,this.properties,this.elementId)},Ze.prototype.bindTo=function(e,t){return new Ye(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},Ze.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,Fe.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};f=Ze;function Ze(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=Je(n,function(){return e.toString()})}l.UnboundRelationship=f,Object.defineProperty(f.prototype,ze,s),l.isUnboundRelationship=function(e){return He(e,ze)};function Qe(e,t,r){this.start=e,this.relationship=t,this.end=r}l.PathSegment=Qe,Object.defineProperty(Qe.prototype,Ve,s),l.isPathSegment=function(e){return He(e,Ve)};function Xe(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function Je(e,t){return null==e?t():e}l.Path=Xe,Object.defineProperty(Xe.prototype,qe,s),l.isPath=function(e){return He(e,qe)};var f={},$e=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}}}},et=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.")},tt=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},rt=(Object.defineProperty(f,"__esModule",{value:!0}),t);function nt(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)}nt.prototype.forEach=function(e){var t,r;try{for(var n=et(this.entries()),o=n.next();!o.done;o=n.next()){var i=tt(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}}},nt.prototype.map=function(e){var t,r,n=[];try{for(var o=et(this.entries()),i=o.next();!i.done;i=o.next()){var u=tt(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},nt.prototype.entries=function(){var t;return $e(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]}})},nt.prototype.values=function(){var t;return $e(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]}})},nt.prototype[Symbol.iterator]=function(){var t;return $e(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]}})},nt.prototype.toObject=function(){var t,e,r={};try{for(var n=et(this.entries()),o=n.next();!o.done;o=n.next()){var i=tt(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},nt.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,rt.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,rt.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]},nt.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},f.default=nt;var s={},ot=(Object.defineProperty(s,"__esModule",{value:!0}),s.isPoint=s.Point=void 0,u),it="__isPoint__",p=(ut.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(at(this.srid),", x=").concat(at(this.x),", y=").concat(at(this.y),"}"):"Point{srid=".concat(at(this.srid),", x=").concat(at(this.x),", y=").concat(at(this.y),", z=").concat(at(this.z),"}")},ut);function ut(e,t,r,n){this.srid=(0,ot.assertNumberOrInteger)(e,"SRID"),this.x=(0,ot.assertNumber)(t,"X coordinate"),this.y=(0,ot.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,ot.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function at(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}s.Point=p,Object.defineProperty(p.prototype,it,{value:!0,enumerable:!1,configurable:!1,writable:!1}),s.isPoint=function(e){return null!=e&&!0===e[it]};var p={},st=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}),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)&&st(t,e,r);return ct(t,e),t},lt=(Object.defineProperty(p,"__esModule",{value:!0}),p.notificationCategory=p.notificationSeverityLevel=p.Stats=p.QueryStatistics=p.ProfiledPlan=p.Plan=p.Notification=p.ServerInfo=p.queryType=void 0,h(n)),h=(ft.prototype._buildNotifications=function(e){return null==e?[]:e.map(function(e){return new Ot(e)})},ft.prototype.hasPlan=function(){return this.plan instanceof pt},ft.prototype.hasProfile=function(){return this.profile instanceof dt},ft);function ft(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new bt(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new pt(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new dt(r.profile),this.notifications=this._buildNotifications(r.notifications),this.server=new Et(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 pt=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)}):[]},dt=(p.Plan=pt,ht.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},ht);function ht(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=St("dbHits",e),this.rows=St("rows",e),this.pageCacheMisses=St("pageCacheMisses",e),this.pageCacheHits=St("pageCacheHits",e),this.pageCacheHitRatio=St("pageCacheHitRatio",e),this.time=St("time",e),this.children=null!=e.children?e.children.map(function(e){return new ht(e)}):[]}p.ProfiledPlan=dt;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},yt.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)},yt.prototype.updates=function(){return this._stats},yt.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},yt.prototype.systemUpdates=function(){return this._systemUpdates};var bt=yt;function yt(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]=Pt(r[e]):"systemUpdates"===t?n._systemUpdates=Pt(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}p.QueryStatistics=bt;var _t={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},vt=(p.notificationSeverityLevel=_t,Object.freeze(_t),Object.values(_t)),mt={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",UNKNOWN:"UNKNOWN"},gt=(p.notificationCategory=mt,Object.freeze(mt),Object.values(mt)),Ot=(wt._constructPosition=function(e){return null==e?{}:{offset:Pt(e.offset),line:Pt(e.line),column:Pt(e.column)}},wt);function wt(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=wt._constructPosition(e.position),this.severityLevel=vt.includes(e.severity)?e.severity:_t.UNKNOWN,this.rawSeverityLevel=e.severity,this.category=gt.includes(e.category)?e.category:mt.UNKNOWN,this.rawCategory=e.category}p.Notification=Ot;var Et=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Pt(e){return e instanceof lt.default?e.toInt():"bigint"==typeof e?(0,lt.int)(e).toInt():e}function St(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?Pt(t[e]):r}p.ServerInfo=Et;function Tt(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,new Error("Not implemented")}p.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},p.default=h;var h={},jt=(Object.defineProperty(h,"__esModule",{value:!0}),h.notificationFilterDisabledCategory=h.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),jt=(h.notificationFilterMinimumSeverityLevel=jt,Object.freeze(jt),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC"}),jt=(h.notificationFilterDisabledCategory=jt,Object.freeze(jt),h.default=Tt,{}),b={},y={},Ct=(Object.defineProperty(y,"__esModule",{value:!0}),y.FailedObserver=y.CompletedObserver=void 0,It.prototype.subscribe=function(e){kt(e,e.onKeys,[]),kt(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 Error("CompletedObserver not supposed to call onError")},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 kt(e,t,r){null!=t&&t.bind(e)(r)}y.CompletedObserver=Ct,Rt.prototype.subscribe=function(e){kt(e,e.onError,this._error),this._observers.push(e)},Rt.prototype.onError=function(t){kt(this,this._beforeError,t),this._observers.forEach(function(e){return kt(e,e.onError,t)})},Rt.prototype.cancel=function(){},Rt.prototype.pause=function(){},Rt.prototype.resume=function(){},Rt.prototype.markCompleted=function(){},Rt.prototype.prepareToHandleSingleResponse=function(){},y.FailedObserver=Rt;var Ct={},At=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}),_=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)&&At(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))},Ut=(Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.Bookmarks=void 0,_(u)),_=(Dt.empty=function(){return Lt},Dt.prototype.isEmpty=function(){return 0===this._values.length},Dt.prototype.values=function(){return this._values},Dt.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},Dt.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},Dt);function Dt(e){this._values=function(e){if(null==e||""===e)return[];if(Ut.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(!Ut.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 Lt=new(Ct.Bookmarks=_)(null);var Ft,_={},v=(Object.defineProperty(_,"__esModule",{value:!0}),_.BOLT_PROTOCOL_V5_2=_.BOLT_PROTOCOL_V5_1=_.BOLT_PROTOCOL_V5_0=_.BOLT_PROTOCOL_V4_4=_.BOLT_PROTOCOL_V4_3=_.BOLT_PROTOCOL_V4_2=_.BOLT_PROTOCOL_V4_1=_.BOLT_PROTOCOL_V4_0=_.BOLT_PROTOCOL_V3=_.BOLT_PROTOCOL_V2=_.BOLT_PROTOCOL_V1=_.DEFAULT_POOL_MAX_SIZE=_.DEFAULT_POOL_ACQUISITION_TIMEOUT=_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=_.ACCESS_MODE_WRITE=_.ACCESS_MODE_READ=_.FETCH_ALL=void 0,_.FETCH_ALL=-1,_.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,_.DEFAULT_POOL_MAX_SIZE=100,_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,_.ACCESS_MODE_READ="READ",_.ACCESS_MODE_WRITE="WRITE",_.BOLT_PROTOCOL_V1=1,_.BOLT_PROTOCOL_V2=2,_.BOLT_PROTOCOL_V3=3,_.BOLT_PROTOCOL_V4_0=4,_.BOLT_PROTOCOL_V4_1=4.1,_.BOLT_PROTOCOL_V4_2=4.2,_.BOLT_PROTOCOL_V4_3=4.3,_.BOLT_PROTOCOL_V4_4=4.4,_.BOLT_PROTOCOL_V5_0=5,_.BOLT_PROTOCOL_V5_1=5.1,_.BOLT_PROTOCOL_V5_2=5.2,{}),Bt=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=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(v,"__esModule",{value:!0}),v.EMPTY_CONNECTION_HOLDER=v.ReadOnlyConnectionHolder=v.ConnectionHolder=void 0,t),Vt=u,Ht=_,Gt=Ct,m=(Yt.prototype.mode=function(){return this._mode},Yt.prototype.database=function(){return this._database},Yt.prototype.setDatabase=function(e){this._database=e},Yt.prototype.bookmarks=function(){return this._bookmarks},Yt.prototype.connectionProvider=function(){return this._connectionProvider},Yt.prototype.referenceCount=function(){return this._referenceCount},Yt.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},Yt.prototype._createConnectionPromise=function(o){return Wt(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)])];case 2:return[2,e.sent()]}})})},Yt.prototype._getBookmarks=function(){return Wt(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()]}})})},Yt.prototype.getConnection=function(){return this._connectionPromise},Yt.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},Yt.prototype.close=function(e){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},Yt.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(Jt).then(function(){return e._release().then(function(){return null})}):e._release().then(function(){return null}):Promise.resolve(null)}).catch(Jt),this._connectionPromise},Yt);function Yt(e){var e=void 0===e?{}:e,t=e.mode,t=void 0===t?Ht.ACCESS_MODE_WRITE:t,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,e=e.getConnectionAcquistionBookmarks;this._mode=t,this._database=null!=r?(0,Vt.assertString)(r,"database"):"",this._bookmarks=null!=n?n:Gt.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._getConnectionAcquistionBookmarks=null!=e?e:function(){return Promise.resolve(Gt.Bookmarks.empty())}}v.ConnectionHolder=m;Bt(Qt,Kt=m),Qt.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},Qt.prototype.getConnection=function(){return this._connectionHolder.getConnection()},Qt.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},Qt.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var Kt,Zt,g=Qt;function Qt(e){var t=Kt.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider()})||this;return t._connectionHolder=e,t}function Xt(){return null!==Zt&&Zt.apply(this,arguments)||this}v.ReadOnlyConnectionHolder=g,v.default=g,Bt(Xt,Zt=m),Xt.prototype.mode=function(){},Xt.prototype.database=function(){},Xt.prototype.initializeConnection=function(){return!0},Xt.prototype.getConnection=function(){return Wt(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()]}})})},Xt.prototype.releaseConnection=function(){return Wt(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()]}})})},Xt.prototype.close=function(){return Wt(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 Xt;function Jt(e){return null}v.EMPTY_CONNECTION_HOLDER=g;var Bt={},$t=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),er=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),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)&&$t(t,e,r);return er(t,e),t},tr=(Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.TxConfig=void 0,m(u)),rr=t,nr=n,g=(or.empty=function(){return ir},or.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},or);function or(e){var t;null!=(t=e)&&tr.assertObject(t,"Transaction config"),this.timeout=function(e){if(tr.isObject(e)&&null!=e.timeout){tr.assertNumberOrInteger(e.timeout,"Transaction timeout");e=(0,nr.int)(e.timeout);if(e.isNegative())throw(0,rr.newError)("Transaction timeout should not be negative");return e}return null}(e),this.metadata=function(e){if(tr.isObject(e)&&null!=e.metadata){e=e.metadata;if(tr.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var ir=new(Bt.TxConfig=g)({});var m={},ur=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())})},ar=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}}}},sr=(Object.defineProperty(m,"__esModule",{value:!0}),m.TransactionExecutor=void 0,t);function cr(e,t,r,n){this._maxRetryTimeMs=lr(e,3e4),this._initialRetryDelayMs=lr(t,1e3),this._multiplier=lr(r,2),this._jitterFactor=lr(n,.2),this._inFlightTimeoutIds=[],this._verifyAfterConstruction()}function lr(e,t){return null!=e?e:t}cr.prototype.execute=function(n,o,i){var u=this;return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i)})},cr.prototype.close=function(){this._inFlightTimeoutIds.forEach(function(e){return clearTimeout(e)}),this._inFlightTimeoutIds=[]},cr.prototype._retryTransactionPromise=function(o,i,e,r,u,a){var s=this;return Date.now()-r>this._maxRetryTimeMs||!(0,sr.isRetriableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=s._computeDelayWithJitter(u),n=setTimeout(function(){s._inFlightTimeoutIds=s._inFlightTimeoutIds.filter(function(e){return e!==n}),s._executeTransactionInsidePromise(o,i,e,t,a).catch(t)},r);s._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*s._multiplier;return s._retryTransactionPromise(o,i,e,r,t,a)})},cr.prototype._executeTransactionInsidePromise=function(o,i,u,a,s){return ur(this,void 0,void 0,function(){var t,r,n=this;return ar(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,o()];case 1:return t=e.sent(),[3,3];case 2:return r=e.sent(),a(r),[2];case 3:return r=(null!=s?s:function(e){return e})(t),this._safeExecuteTransactionWork(r,i).then(function(e){return n._handleTransactionWorkSuccess(e,t,u,a)}).catch(function(e){return n._handleTransactionWorkFailure(e,t,a)}),[2]}})})},cr.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},cr.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},cr.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},cr.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},cr.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,sr.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,sr.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,sr.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,sr.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},m.TransactionExecutor=cr;var fr,pr,g={},O=r&&r.__extends||(fr=function(e,t){return(fr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}fr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),dr=(Object.defineProperty(g,"__esModule",{value:!0}),g.Logger=void 0,t),hr="error",br="warn",yr="info",_r="debug",vr=((w={})[hr]=0,w[br]=1,w[yr]=2,w[_r]=3,w),w=(mr.create=function(e){return null!=(null==e?void 0:e.logging)?new mr(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=vr[e];if(null!=t||0===t)return e;throw(0,dr.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(vr).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,dr.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},mr.noOp=function(){return Or},mr.prototype.isErrorEnabled=function(){return wr(this._level,hr)},mr.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(hr,e)},mr.prototype.isWarnEnabled=function(){return wr(this._level,br)},mr.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(br,e)},mr.prototype.isInfoEnabled=function(){return wr(this._level,yr)},mr.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(yr,e)},mr.prototype.isDebugEnabled=function(){return wr(this._level,_r)},mr.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(_r,e)},mr);function mr(e,t){this._level=e,this._loggerFunction=t}function gr(){return pr.call(this,yr,function(e,t){})||this}g.Logger=w,O(gr,pr=w),gr.prototype.isErrorEnabled=function(){return!1},gr.prototype.error=function(e){},gr.prototype.isWarnEnabled=function(){return!1},gr.prototype.warn=function(e){},gr.prototype.isInfoEnabled=function(){return!1},gr.prototype.info=function(e){},gr.prototype.isDebugEnabled=function(){return!1},gr.prototype.debug=function(e){};var Or=new gr;function wr(e,t){return vr[e]>=vr[t]}var O={},Er=r&&r.__assign||function(){return(Er=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)},Pr=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},Sr=(Object.defineProperty(O,"__esModule",{value:!0}),O.Url=O.formatIPv6Address=O.formatIPv4Address=O.defaultPortForScheme=O.parseDatabaseUrl=void 0,u),Tr=7687,jr=7474,Cr=7473,Ir=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Rr(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function kr(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 Ar(e){return"http"===e?jr:"https"===e?Cr:Tr}O.Url=Ir,O.parseDatabaseUrl=function(e){(0,Sr.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]),Pr((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=Er(Er({},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(":")?kr(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)?Ar(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=Rr(e[0],"key",r),e=Rr(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)?Pr(t.split("?"),2)[1]:null,e);return new Ir(n,o,u,i,r)},O.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},O.formatIPv6Address=function(e,t){return e=kr(e),"".concat(e,":").concat(t)},O.defaultPortForScheme=Ar;var w={},Mr=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]}),Nr=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)&&Mr(t,e,r);return Nr(t,e),t},xr=(Object.defineProperty(w,"__esModule",{value:!0}),w.ServerAddress=void 0,u),Ur=E(O);function Dr(e,t,r,n){this._host=(0,xr.assertString)(e,"host"),this._resolved=null!=t?(0,xr.assertString)(t,"resolved"):null,this._port=(0,xr.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Dr.prototype.host=function(){return this._host},Dr.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Dr.prototype.port=function(){return this._port},Dr.prototype.resolveWith=function(e){return new Dr(this._host,e,this._port,this._hostPort)},Dr.prototype.asHostPort=function(){return this._hostPort},Dr.prototype.asKey=function(){return this._hostPort},Dr.prototype.toString=function(){return this._stringValue},Dr.fromUrl=function(e){e=Ur.parseDatabaseUrl(e);return new Dr(e.host,null,e.port,e.hostAndPort)},w.ServerAddress=Dr;var E={},Lr={};function Fr(){}Object.defineProperty(Lr,"__esModule",{value:!0}),Fr.prototype.resolve=function(){throw new Error("Abstract function")},Fr.prototype._resolveToItself=function(e){return Promise.resolve([e])},Lr.default=Fr;var P={},Br=(Object.defineProperty(P,"__esModule",{value:!0}),w);function Wr(e){return Promise.resolve([e])}function zr(e){this._resolverFunction=null!=e?e:Wr}zr.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 Br.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))})},P.default=zr;function qr(e){console.log("Uncaught error when processing result: "+e)}function Vr(e){}function Hr(e){}var Gr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Lr=(Object.defineProperty(E,"__esModule",{value:!0}),E.ConfiguredCustomResolver=E.BaseHostNameResolver=void 0,Gr(Lr)),Lr=(E.BaseHostNameResolver=Lr.default,Gr(P)),Yr=(E.ConfiguredCustomResolver=Lr.default,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]})),Kr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Gr=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)&&Yr(t,e,r);return Kr(t,e),t},Lr=(Object.defineProperty(b,"__esModule",{value:!0}),b.objectUtil=b.resolver=b.serverAddress=b.urlUtil=b.logger=b.transactionExecutor=b.txConfig=b.connectionHolder=b.constants=b.bookmarks=b.observer=b.temporalUtil=b.util=void 0,Gr(u)),Lr=(b.util=Lr,Gr(o)),o=(b.temporalUtil=Lr,Gr(y)),Lr=(b.observer=o,Gr(Ct)),o=(b.bookmarks=Lr,Gr(_)),Lr=(b.constants=o,Gr(v)),o=(b.connectionHolder=Lr,Gr(Bt)),Lr=(b.txConfig=o,Gr(m)),o=(b.transactionExecutor=Lr,Gr(g)),Lr=(b.logger=o,Gr(O)),o=(b.urlUtil=Lr,Gr(w)),O=(b.serverAddress=o,Gr(E)),Lr=(b.resolver=O,Gr(X)),Zr=(b.objectUtil=Lr,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}}}},w=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xr=(Object.defineProperty(jt,"__esModule",{value:!0}),w(p)),Jr=b,$r=t,en=Jr.connectionHolder.EMPTY_CONNECTION_HOLDER;function tn(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),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:en,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}tn.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)})},tn.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)})},tn.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},tn.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,$r.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return Zr(n,void 0,void 0,function(){var t;return Qr(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,$r.newError)("InvalidState: Result stream finished without Summary",$r.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 Zr(n,void 0,void 0,function(){var t;return Qr(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 Zr(n,void 0,void 0,function(){var t;return Qr(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 Zr(n,void 0,void 0,function(){return Qr(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()]}})})}}},tn.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},tn.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},tn.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},tn.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},tn.prototype.isOpen=function(){return null===this._summary&&null===this._error},tn.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)})},tn.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:Vr,i=null!=(e=n.onError)?e:qr,r=null!=(e=n.onKeys)?e:Hr;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)}}},tn.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},tn.prototype._releaseConnectionAndGetSummary=function(t){var e=Jr.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(t){return o.releaseConnection().then(function(){var e;return null==(e=null==t?void 0:t.protocol())?void 0:e.version})},function(e){}).then(function(e){return new Xr.default(r,n,t,e)})},tn.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 Zr(this,void 0,void 0,function(){var t;return Qr(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,$r.newError)("Unexpected empty buffer",$r.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 Zr(e,void 0,void 0,function(){var t;return Qr(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 Zr(e,void 0,void 0,function(){var t,r;return Qr(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},jt.default=tn;o={};Object.defineProperty(o,"__esModule",{value:!0});o.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};E={};function rn(){}Object.defineProperty(E,"__esModule",{value:!0}),rn.prototype.acquireConnection=function(e){throw Error("Not implemented")},rn.prototype.supportsMultiDb=function(){throw Error("Not implemented")},rn.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},rn.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},rn.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},rn.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},rn.prototype.close=function(){throw Error("Not implemented")},E.default=rn;O={};function nn(){}Object.defineProperty(O,"__esModule",{value:!0}),Object.defineProperty(nn.prototype,"id",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"databaseId",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"server",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"address",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(nn.prototype,"version",{get:function(){},enumerable:!1,configurable:!0}),nn.prototype.isOpen=function(){return!1},nn.prototype.protocol=function(){throw Error("Not implemented")},nn.prototype.connect=function(e,t){throw Error("Not implemented")},nn.prototype.write=function(e,t,r){throw Error("Not implemented")},nn.prototype.resetAndFlush=function(){throw Error("Not implemented")},nn.prototype.hasOngoingObservableRequests=function(){throw Error("Not implemented")},nn.prototype.close=function(){throw Error("Not implemented")},nn.prototype._release=function(){return Promise.resolve()},O.default=nn;var Gr={},on=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},un=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={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}}}},X=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},an=(Object.defineProperty(Gr,"__esModule",{value:!0}),u),sn=v,cn=Ct,ln=Bt,fn=y,pn=t,dn=X(jt);function hn(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,e=e.notificationFilter,l=this;this._connectionHolder=t,this._reactive=i,this._state=bn.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=cn.Bookmarks.empty(),this._notificationFilter=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){l._acceptActive=e})}hn.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return on(t,void 0,void 0,function(){var t,r=this;return un(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.protocol().beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,beforeError:function(e){return null!=u&&u.onError(e),r._onError(e)},afterComplete:function(e){return null!=u&&u.onComplete(e),r._onComplete(e)}})];case 2:throw(0,pn.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},hn.prototype.run=function(e,t){e=(0,an.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},hn.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)}})})},hn.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)}})})},hn.prototype.isOpen=function(){return this._state===bn.ACTIVE},hn.prototype.close=function(){return on(this,void 0,void 0,function(){return un(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]}})})},hn.prototype._onErrorCallback=function(){return this._state=bn.FAILED,this._onClose(),this._connectionHolder.releaseConnection()},hn.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new cn.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:cn.Bookmarks.empty(),null==e?void 0:e.db)};var bn={ACTIVE:{commit:function(e){return{result:yn(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:bn.SUCCEEDED}},rollback:function(e){return{result:yn(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:bn.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 _n(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.protocol().run(t,r,{bookmarks:cn.Bookmarks.empty(),txConfig:ln.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,pn.newError)("No connection available")}).catch(function(e){return new fn.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:_n(new fn.FailedObserver({error:(0,pn.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:bn.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:_n(new fn.CompletedObserver,"ROLLBACK",{},t,0,0),state:bn.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,_n(new fn.FailedObserver({error:(0,pn.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:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},sn.EMPTY_CONNECTION_HOLDER,0,0),state:bn.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},sn.EMPTY_CONNECTION_HOLDER,0,0),state:bn.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,_n(new fn.FailedObserver({error:(0,pn.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:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:bn.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:bn.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,_n(new fn.FailedObserver({error:(0,pn.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function yn(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.protocol().commitTransaction({beforeError:n,afterComplete:o}):t.protocol().rollbackTransaction({beforeError:n,afterComplete:o});throw(0,pn.newError)("No connection available")})}).catch(function(e){return new fn.FailedObserver({error:e,onError:n})});return new dn.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function _n(e,t,r,n,o,i){return void 0===n&&(n=sn.EMPTY_CONNECTION_HOLDER),new dn.default(Promise.resolve(e),t,r,new sn.ReadOnlyConnectionHolder(null!=n?n:sn.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}Gr.default=hn;Lr={};function vn(e){e=e.run;this._run=e}Object.defineProperty(Lr,"__esModule",{value:!0}),vn.fromTransaction=function(e){return new vn({run:e.run.bind(e)})},vn.prototype.run=function(e,t){return this._run(e,t)},Lr.default=vn;var mn,gn,On,w={},X=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)}),wn=r&&r.__assign||function(){return(wn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},S=(Object.defineProperty(w,"__esModule",{value:!0}),S(Gr)),S=(On=S.default,X(En,On),En.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},En.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},En.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},En.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},En.prototype._toTransaction=function(){return wn(wn({},this),{run:On.prototype.run.bind(this),commit:On.prototype.commit.bind(this),rollback:On.prototype.rollback.bind(this),close:On.prototype.close.bind(this),isOpen:On.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},En.prototype._begin=function(e,t){return On.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},En.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},En.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},En);function En(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,e=e.notificationFilter,t=On.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:e})||this;return t[gn]="TransactionPromise",t}gn=Symbol.toStringTag,w.default=S;var X={},Pn=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Sn=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}}}},Tn=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},jn=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))},S=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cn=(Object.defineProperty(X,"__esModule",{value:!0}),y),In=u,Rn=_,kn=t,An=S(jt),Mn=v,Nn=m,xn=Ct,Un=Bt,Dn=S(w),Ln=S(Lr);function Fn(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,e=e.notificationFilter,t=(this._mode=t,this._database=o,this._reactive=u,this._fetchSize=a,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new Mn.ConnectionHolder({mode:Rn.ACCESS_MODE_READ,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks}),this._writeConnectionHolder=new Mn.ConnectionHolder({mode:Rn.ACCESS_MODE_WRITE,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:xn.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Nn.TransactionExecutor(e)}(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=e}Fn.prototype.run=function(e,t,r){var o=this,e=(0,In.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Un.TxConfig(r):Un.TxConfig.empty(),t=this._run(i,u,function(n){return Pn(o,void 0,void 0,function(){var t,r=this;return Sn(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.protocol().run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,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})]}})})});return this._results.push(t),t},Fn.prototype._run=function(e,t,r){var n=this._connectionHolderWithMode(this._mode),o=this._open?!this._hasTx&&n.initializeConnection()?n.getConnection().then(function(e){return r(e)}).catch(function(e){return Promise.resolve(new Cn.FailedObserver({error:e}))}):Promise.resolve(new Cn.FailedObserver({error:(0,kn.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.resolve(new Cn.FailedObserver({error:(0,kn.newError)("Cannot run query in a closed session.")})),i={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new An.default(o,e,t,n,i)},Fn.prototype._acquireConnection=function(t){var e=this,r=this._connectionHolderWithMode(this._mode),n=this._open?!this._hasTx&&r.initializeConnection()?r.getConnection().then(function(e){return t(e)}).then(function(t){return Pn(e,void 0,void 0,function(){return Sn(this,function(e){switch(e.label){case 0:return[4,r.releaseConnection()];case 1:return e.sent(),[2,t]}})})}):Promise.reject((0,kn.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,kn.newError)("Cannot run query in a closed session."));return n},Fn.prototype.beginTransaction=function(e){var t=Un.TxConfig.empty();return null!=e&&(t=new Un.TxConfig(e)),this._beginTransaction(this._mode,t)},Fn.prototype._beginTransaction=function(e,t){var n=this;if(!this._open)throw(0,kn.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,kn.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=Fn._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(),this._hasTx=!0,e=new Dn.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});return e._begin(function(){return n._bookmarks()},t),e},Fn.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,kn.newError)("You cannot run more transactions on a closed session.")},Fn.prototype._transactionClosed=function(){this._hasTx=!1},Fn.prototype.lastBookmark=function(){return this.lastBookmarks()},Fn.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},Fn.prototype._bookmarks=function(){var r;return Pn(this,void 0,void 0,function(){var t;return Sn(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 xn.Bookmarks(jn(jn([],Tn(t),!1),Tn(this._configuredBookmarks),!1))]}})})},Fn.prototype.readTransaction=function(e,t){t=new Un.TxConfig(t);return this._runTransaction(Rn.ACCESS_MODE_READ,t,e)},Fn.prototype.writeTransaction=function(e,t){t=new Un.TxConfig(t);return this._runTransaction(Rn.ACCESS_MODE_WRITE,t,e)},Fn.prototype._runTransaction=function(e,t,r){var n=this;return this._transactionExecutor.execute(function(){return n._beginTransaction(e,t)},r)},Fn.prototype.executeRead=function(e,t){t=new Un.TxConfig(t);return this._executeInTransaction(Rn.ACCESS_MODE_READ,t,e)},Fn.prototype.executeWrite=function(e,t){t=new Un.TxConfig(t);return this._executeInTransaction(Rn.ACCESS_MODE_WRITE,t,e)},Fn.prototype._executeInTransaction=function(e,t,r){var n=this;return this._transactionExecutor.execute(function(){return n._beginTransaction(e,t)},r,Ln.default.fromTransaction)},Fn.prototype._onDatabaseNameResolved=function(e){this._databaseNameResolved||(this._database=e=null!=e?e:"",this._readConnectionHolder.setDatabase(e),this._writeConnectionHolder.setDatabase(e),this._databaseNameResolved=!0)},Fn.prototype._getConnectionAcquistionBookmarks=function(){var r;return Pn(this,void 0,void 0,function(){var t;return Sn(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 xn.Bookmarks(jn(jn([],Tn(this._configuredBookmarks),!1),Tn(t),!1))]}})})},Fn.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:[]),this._lastBookmarks=e,this._configuredBookmarks=xn.Bookmarks.empty())},Fn.prototype.close=function(){return Pn(this,void 0,void 0,function(){return Sn(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]}})})},Fn.prototype._connectionHolderWithMode=function(e){if(e===Rn.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===Rn.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,kn.newError)("Unknown access mode: "+e)},Fn.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new xn.Bookmarks(e.bookmark),t,e.db)},Fn.prototype._calculateWatermaks=function(){return this._fetchSize===Rn.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},Fn._validateSessionMode=function(e){e=null!=e?e:Rn.ACCESS_MODE_WRITE;if(e!==Rn.ACCESS_MODE_READ&&e!==Rn.ACCESS_MODE_WRITE)throw(0,kn.newError)("Illegal session mode "+e);return e},X.default=Fn;var y={},v={},Bn=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())})},Wn=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=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.")},qn=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},Vn=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))},m=(Object.defineProperty(v,"__esModule",{value:!0}),v.bookmarkManager=void 0,Hn.prototype.updateBookmarks=function(e,t){return Bn(this,void 0,void 0,function(){return Wn(this,function(e){throw new Error("Not implemented")})})},Hn.prototype.getBookmarks=function(){return Bn(this,void 0,void 0,function(){return Wn(this,function(e){throw new Error("Not implemented")})})},Hn);function Hn(){throw new Error("Not implemented")}v.default=m,v.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new Gn(t,e.bookmarksSupplier,e.bookmarksConsumer)};Yn.prototype.updateBookmarks=function(f,p){return Bn(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return Wn(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=zn(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=zn(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(Vn([],qn(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Yn.prototype.getBookmarks=function(){var s;return Bn(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return Wn(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=zn(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,Vn([],qn(t),!1)]}})})};var Gn=Yn;function Yn(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var Bt={},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())})},Zn=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}},Qn=(Object.defineProperty(Bt,"__esModule",{value:!0}),S(o)),Xn=t;function Jn(o){return Kn(this,void 0,void 0,function(){var t,r,n;return Zn(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 Qn.default(n,r,t)]}})})}function $n(){}$n.prototype.eagerResultTransformer=function(){return Jn},$n.prototype.mappedResultTransformer=function(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,Xn.newError)("Requires a map or/and a collect functions.");return function(o){return Kn(e,void 0,void 0,function(){return Zn(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()]}})})}};var m=new $n,S=(Object.freeze(m),Bt.default=m,{}),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}}}};function ro(e){this._createSession=e}Object.defineProperty(S,"__esModule",{value:!0}),ro.prototype.execute=function(o,i,u){return eo(this,void 0,void 0,function(){var t,n=this;return to(this,function(e){switch(e.label){case 0:t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser}),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READERS"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return eo(n,void 0,void 0,function(){var t;return to(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})})];case 2:return[2,e.sent()];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},S.default=ro;function no(){this.routing=wo.WRITERS,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0}var 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}}}},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},uo=(Object.defineProperty(y,"__esModule",{value:!0}),y.QueryConfig=y.SessionConfig=y.routing=y.WRITE=y.READ=y.Driver=void 0,Ct),ao=m(P),so=_,co=g,lo=m(X),fo=u,po=v,ho=m(Bt),bo=m(S),yo=t,_o=36e5,vo=1e3,mo=so.ACCESS_MODE_READ,go=(y.READ=mo,so.ACCESS_MODE_WRITE),Oo=(y.WRITE=go,0),wo=(y.SessionConfig=function(){this.defaultAccessMode=go,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0},{WRITERS:"WRITERS",READERS:"READERS"}),Ct=(y.routing=wo,Object.freeze(wo),y.QueryConfig=no,Object.defineProperty(Eo.prototype,"defaultExecuteQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Eo.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),oo(this,void 0,void 0,function(){var t,r,n;return io(this,function(e){switch(e.label){case 0:if(t=null===u.bookmarkManager?void 0:null!=(a=u.bookmarkManager)?a:this.defaultExecuteQueryBookmarkManager,r=null!=(a=u.resultTransformer)?a:ho.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:wo.WRITERS)!==wo.READERS&&n!==wo.WRITERS)throw(0,yo.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser},o,i)];case 1:return[2,e.sent()]}})})},Eo.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:mo})},Eo.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:mo})},Eo.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Eo.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Eo.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Eo.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Eo.prototype.isEncrypted=function(){return this._isEncrypted()},Eo.prototype._supportsRouting=function(){return this._meta.routing},Eo.prototype._isEncrypted=function(){return this._config.encrypted===fo.ENCRYPTION_ON||!0===this._config.encrypted},Eo.prototype._getTrust=function(){return this._config.trust},Eo.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,e=e.notificationFilter;return this._newSession({defaultAccessMode:void 0===t?go:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:So(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:e})},Eo.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Eo.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Eo.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,e=e.notificationFilter,t=lo.default._validateSessionMode(t),s=this._getOrCreateConnectionProvider(),r=null!=r?new uo.Bookmarks(r):uo.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:s,bookmarks:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:e})},Eo.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new ao.default(e.resolver)))),this._connectionProvider},Eo);function Eo(e,t,r,n,o){void 0===n&&(n=function(e){return new lo.default(e)}),void 0===o&&(o=function(e){return new bo.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=Po(i.maxConnectionLifetime,_o),i.maxConnectionPoolSize=Po(i.maxConnectionPoolSize,so.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=Po(i.connectionAcquisitionTimeout,so.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=So(i.fetchSize,vo),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?so.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i);var i=co.Logger.create(t),u=t,a=i,s=u.resolver;if(null!=s&&"function"!=typeof s)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof s));u.connectionAcquisitionTimeout<u.connectionTimeout&&a.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'),this._id=Oo++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,po.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}function Po(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function So(e,t){e=parseInt(e,10);if(0<e||e===so.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(so.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}y.Driver=Ct,y.default=Ct;P={};function To(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Object.defineProperty(P,"__esModule",{value:!0}),P.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}},custom:function(e,t,r,n,o){n={scheme:n,principal:e};return To(t)&&(n.credentials=t),To(r)&&(n.realm=r),To(o)&&(n.parameters=o),n}};var jo,Co,Io,Ro,ko,Ao,Mo,No,xo,Uo,Do,_={},Gr=(Object.defineProperty(_,"__esModule",{value:!0}),g=e,jo=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]}),Co=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)&&jo(t,e,r);return Co(t,e),t},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(g,"__esModule",{value:!0}),g.ManagedTransaction=g.Transaction=g.Connection=g.ConnectionProvider=g.EagerResult=g.Result=g.Stats=g.QueryStatistics=g.ProfiledPlan=g.Plan=g.Notification=g.ServerInfo=g.queryType=g.ResultSummary=g.Record=g.isPathSegment=g.PathSegment=g.isPath=g.Path=g.isUnboundRelationship=g.UnboundRelationship=g.isRelationship=g.Relationship=g.isNode=g.Node=g.Time=g.LocalTime=g.LocalDateTime=g.isTime=g.isLocalTime=g.isLocalDateTime=g.isDuration=g.isDateTime=g.isDate=g.Duration=g.DateTime=g.Date=g.Point=g.isPoint=g.internal=g.toString=g.toNumber=g.inSafeRange=g.isInt=g.int=g.Integer=g.error=g.isRetriableError=g.Neo4jError=g.newError=void 0,g.notificationFilterMinimumSeverityLevel=g.notificationFilterDisabledCategory=g.notificationSeverityLevel=g.notificationCategory=g.resultTransformers=g.routing=g.bookmarkManager=g.auth=g.json=g.driver=g.types=g.Driver=g.Session=g.TransactionPromise=void 0,Io=t,Object.defineProperty(g,"newError",{enumerable:!0,get:function(){return Io.newError}}),Object.defineProperty(g,"Neo4jError",{enumerable:!0,get:function(){return Io.Neo4jError}}),Object.defineProperty(g,"isRetriableError",{enumerable:!0,get:function(){return Io.isRetriableError}}),Ro=u(n),g.Integer=Ro.default,Object.defineProperty(g,"int",{enumerable:!0,get:function(){return Ro.int}}),Object.defineProperty(g,"isInt",{enumerable:!0,get:function(){return Ro.isInt}}),Object.defineProperty(g,"inSafeRange",{enumerable:!0,get:function(){return Ro.inSafeRange}}),Object.defineProperty(g,"toNumber",{enumerable:!0,get:function(){return Ro.toNumber}}),Object.defineProperty(g,"toString",{enumerable:!0,get:function(){return Ro.toString}}),ko=i,Object.defineProperty(g,"Date",{enumerable:!0,get:function(){return ko.Date}}),Object.defineProperty(g,"DateTime",{enumerable:!0,get:function(){return ko.DateTime}}),Object.defineProperty(g,"Duration",{enumerable:!0,get:function(){return ko.Duration}}),Object.defineProperty(g,"isDate",{enumerable:!0,get:function(){return ko.isDate}}),Object.defineProperty(g,"isDateTime",{enumerable:!0,get:function(){return ko.isDateTime}}),Object.defineProperty(g,"isDuration",{enumerable:!0,get:function(){return ko.isDuration}}),Object.defineProperty(g,"isLocalDateTime",{enumerable:!0,get:function(){return ko.isLocalDateTime}}),Object.defineProperty(g,"isLocalTime",{enumerable:!0,get:function(){return ko.isLocalTime}}),Object.defineProperty(g,"isTime",{enumerable:!0,get:function(){return ko.isTime}}),Object.defineProperty(g,"LocalDateTime",{enumerable:!0,get:function(){return ko.LocalDateTime}}),Object.defineProperty(g,"LocalTime",{enumerable:!0,get:function(){return ko.LocalTime}}),Object.defineProperty(g,"Time",{enumerable:!0,get:function(){return ko.Time}}),Ao=l,Object.defineProperty(g,"Node",{enumerable:!0,get:function(){return Ao.Node}}),Object.defineProperty(g,"isNode",{enumerable:!0,get:function(){return Ao.isNode}}),Object.defineProperty(g,"Relationship",{enumerable:!0,get:function(){return Ao.Relationship}}),Object.defineProperty(g,"isRelationship",{enumerable:!0,get:function(){return Ao.isRelationship}}),Object.defineProperty(g,"UnboundRelationship",{enumerable:!0,get:function(){return Ao.UnboundRelationship}}),Object.defineProperty(g,"isUnboundRelationship",{enumerable:!0,get:function(){return Ao.isUnboundRelationship}}),Object.defineProperty(g,"Path",{enumerable:!0,get:function(){return Ao.Path}}),Object.defineProperty(g,"isPath",{enumerable:!0,get:function(){return Ao.isPath}}),Object.defineProperty(g,"PathSegment",{enumerable:!0,get:function(){return Ao.PathSegment}}),Object.defineProperty(g,"isPathSegment",{enumerable:!0,get:function(){return Ao.isPathSegment}}),S=m(f),g.Record=S.default,Mo=s,Object.defineProperty(g,"isPoint",{enumerable:!0,get:function(){return Mo.isPoint}}),Object.defineProperty(g,"Point",{enumerable:!0,get:function(){return Mo.Point}}),No=u(p),g.ResultSummary=No.default,Object.defineProperty(g,"queryType",{enumerable:!0,get:function(){return No.queryType}}),Object.defineProperty(g,"ServerInfo",{enumerable:!0,get:function(){return No.ServerInfo}}),Object.defineProperty(g,"Notification",{enumerable:!0,get:function(){return No.Notification}}),Object.defineProperty(g,"Plan",{enumerable:!0,get:function(){return No.Plan}}),Object.defineProperty(g,"ProfiledPlan",{enumerable:!0,get:function(){return No.ProfiledPlan}}),Object.defineProperty(g,"QueryStatistics",{enumerable:!0,get:function(){return No.QueryStatistics}}),Object.defineProperty(g,"Stats",{enumerable:!0,get:function(){return No.Stats}}),Object.defineProperty(g,"notificationCategory",{enumerable:!0,get:function(){return No.notificationCategory}}),Object.defineProperty(g,"notificationSeverityLevel",{enumerable:!0,get:function(){return No.notificationSeverityLevel}}),xo=h,Object.defineProperty(g,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return xo.notificationFilterDisabledCategory}}),Object.defineProperty(g,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return xo.notificationFilterMinimumSeverityLevel}}),Ct=m(jt),g.Result=Ct.default,t=m(o),g.EagerResult=t.default,n=m(E),g.ConnectionProvider=n.default,n=m(O),g.Connection=n.default,i=m(Gr),g.Transaction=i.default,l=m(Lr),g.ManagedTransaction=l.default,f=m(w),g.TransactionPromise=f.default,s=m(X),g.Session=s.default,p=u(y),h=p,g.Driver=p.default,g.driver=h,jt=m(P),g.auth=jt.default,Uo=v,Object.defineProperty(g,"bookmarkManager",{enumerable:!0,get:function(){return Uo.bookmarkManager}}),Do=y,Object.defineProperty(g,"routing",{enumerable:!0,get:function(){return Do.routing}}),o=u(_),g.types=o,E=u(Q),g.json=E,m=m(Bt),g.resultTransformers=m.default,u=u(b),g.internal=u,O={SERVICE_UNAVAILABLE:Io.SERVICE_UNAVAILABLE,SESSION_EXPIRED:Io.SESSION_EXPIRED,PROTOCOL_ERROR:Io.PROTOCOL_ERROR},g.error=O,O={newError:Io.newError,Neo4jError:Io.Neo4jError,isRetriableError:Io.isRetriableError,error:O,Integer:Ro.default,int:Ro.int,isInt:Ro.isInt,inSafeRange:Ro.inSafeRange,toNumber:Ro.toNumber,toString:Ro.toString,internal:u,isPoint:Mo.isPoint,Point:Mo.Point,Date:ko.Date,DateTime:ko.DateTime,Duration:ko.Duration,isDate:ko.isDate,isDateTime:ko.isDateTime,isDuration:ko.isDuration,isLocalDateTime:ko.isLocalDateTime,isLocalTime:ko.isLocalTime,isTime:ko.isTime,LocalDateTime:ko.LocalDateTime,LocalTime:ko.LocalTime,Time:ko.Time,Node:Ao.Node,isNode:Ao.isNode,Relationship:Ao.Relationship,isRelationship:Ao.isRelationship,UnboundRelationship:Ao.UnboundRelationship,isUnboundRelationship:Ao.isUnboundRelationship,Path:Ao.Path,isPath:Ao.isPath,PathSegment:Ao.PathSegment,isPathSegment:Ao.isPathSegment,Record:S.default,ResultSummary:No.default,queryType:No.queryType,ServerInfo:No.ServerInfo,Notification:No.Notification,Plan:No.Plan,ProfiledPlan:No.ProfiledPlan,QueryStatistics:No.QueryStatistics,Stats:No.Stats,Result:Ct.default,EagerResult:t.default,Transaction:i.default,ManagedTransaction:l.default,TransactionPromise:f.default,Session:s.default,Driver:p.default,Connection:n.default,types:o,driver:h,json:E,auth:jt.default,bookmarkManager:Uo.bookmarkManager,routing:Do.routing,resultTransformers:m.default,notificationCategory:No.notificationCategory,notificationSeverityLevel:No.notificationSeverityLevel,notificationFilterDisabledCategory:xo.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:xo.notificationFilterMinimumSeverityLevel},g.default=O,{}),Lr={},w={},X={},P={};Object.defineProperty(P,"__esModule",{value:!0}),P.isFunction=void 0,P.isFunction=function(e){return"function"==typeof e};v={},y={},_={};Object.defineProperty(_,"__esModule",{value:!0}),_.createErrorClass=void 0,_.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(y,"__esModule",{value:!0}),y.UnsubscriptionError=void 0;Q=_,y.UnsubscriptionError=Q.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}}),Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.arrRemove=void 0,Bt.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var 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=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},Bo=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},Wo=(Object.defineProperty(v,"__esModule",{value:!0}),v.isSubscription=v.EMPTY_SUBSCRIPTION=v.Subscription=void 0,P),zo=y,qo=Bt,Vo=(Ho.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=Lo(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(Wo.isFunction(u))try{u()}catch(e){r=e instanceof zo.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=Lo(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{Go(l)}catch(e){r=null!=r?r:[],e instanceof zo.UnsubscriptionError?r=Bo(Bo([],Fo(r)),Fo(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 zo.UnsubscriptionError(r)}},Ho.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Go(e);else{if(e instanceof Ho){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},Ho.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},Ho.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},Ho.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&qo.arrRemove(t,e)},Ho.prototype.remove=function(e){var t=this._finalizers;t&&qo.arrRemove(t,e),e instanceof Ho&&e._removeParent(this)},Ho.EMPTY=((b=new Ho).closed=!0,b),Ho);function Ho(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function Go(e){Wo.isFunction(e)?e():e.unsubscribe()}v.Subscription=Vo,v.EMPTY_SUBSCRIPTION=Vo.EMPTY,v.isSubscription=function(e){return e instanceof Vo||e&&"closed"in e&&Wo.isFunction(e.remove)&&Wo.isFunction(e.add)&&Wo.isFunction(e.unsubscribe)};var Yo,Ko,Zo,u={},S=(Object.defineProperty(u,"__esModule",{value:!0}),u.config=void 0,u.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),Ct={},Qo=(Yo=Ct,Ko=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},Zo=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(Yo,"__esModule",{value:!0}),Yo.timeoutProvider=void 0,Yo.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Yo.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,Zo([e,t],Ko(r))):setTimeout.apply(void 0,Zo([e,t],Ko(r)))},clearTimeout:function(e){var t=Yo.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(S,"__esModule",{value:!0}),S.reportUnhandledError=void 0,u),Xo=Ct;S.reportUnhandledError=function(t){Xo.timeoutProvider.setTimeout(function(){var e=Qo.config.onUnhandledError;if(!e)throw t;e(t)})};t={};Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){};i={};function Jo(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(i,"__esModule",{value:!0}),i.createNotification=i.nextNotification=i.errorNotification=i.COMPLETE_NOTIFICATION=void 0,i.COMPLETE_NOTIFICATION=Jo("C",void 0,void 0),i.errorNotification=function(e){return Jo("E",void 0,e)},i.nextNotification=function(e){return Jo("N",e,void 0)},i.createNotification=Jo;var $o,ei,ti,ri,ni,oi,ii,ui,ai,si,ci,li,fi,pi,l={},di=(Object.defineProperty(l,"__esModule",{value:!0}),l.captureError=l.errorContext=void 0,u),hi=null;function bi(e){var t=ti.call(this)||this;return t.isStopped=!1,e?(t.destination=e,ni.isSubscription(e)&&e.add(t)):t.destination=$o.EMPTY_OBSERVER,t}function yi(e,t){return ci.call(e,t)}function _i(e){this.partialObserver=e}function vi(e,t,r){var n=fi.call(this)||this;return r=ri.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&oi.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&yi(e.next,t),error:e.error&&yi(e.error,t),complete:e.complete&&yi(e.complete,t)}):e,n.destination=new li(r),n}function mi(e){oi.config.useDeprecatedSynchronousErrorHandling?si.captureError(e):ii.reportUnhandledError(e)}function gi(e,t){var r=oi.config.onStoppedNotification;r&&ai.timeoutProvider.setTimeout(function(){return r(e,t)})}l.errorContext=function(e){if(di.config.useDeprecatedSynchronousErrorHandling){var t=!hi;if(t&&(hi={errorThrown:!1,error:null}),e(),t){var t=hi,r=t.errorThrown,t=t.error;if(hi=null,r)throw t}}else e()},l.captureError=function(e){di.config.useDeprecatedSynchronousErrorHandling&&hi&&(hi.errorThrown=!0,hi.error=e)},$o=X,f=r&&r.__extends||(ei=function(e,t){return(ei=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}ei(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty($o,"__esModule",{value:!0}),$o.EMPTY_OBSERVER=$o.SafeSubscriber=$o.Subscriber=void 0,ri=P,oi=u,ii=S,s=t,ui=i,ai=Ct,si=l,ti=(ni=v).Subscription,f(bi,ti),bi.create=function(e,t,r){return new pi(e,t,r)},bi.prototype.next=function(e){this.isStopped?gi(ui.nextNotification(e),this):this._next(e)},bi.prototype.error=function(e){this.isStopped?gi(ui.errorNotification(e),this):(this.isStopped=!0,this._error(e))},bi.prototype.complete=function(){this.isStopped?gi(ui.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},bi.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,ti.prototype.unsubscribe.call(this),this.destination=null)},bi.prototype._next=function(e){this.destination.next(e)},bi.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},bi.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},p=bi,$o.Subscriber=p,ci=Function.prototype.bind,_i.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){mi(e)}},_i.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){mi(e)}else mi(e)},_i.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){mi(e)}},li=_i,f(vi,fi=p),pi=vi,$o.SafeSubscriber=pi,$o.EMPTY_OBSERVER={closed:!0,next:s.noop,error:function(e){throw e},complete:s.noop};n={},Object.defineProperty(n,"__esModule",{value:!0}),n.observable=void 0,n.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",o={},h={};Object.defineProperty(h,"__esModule",{value:!0}),h.identity=void 0,h.identity=function(e){return e},Object.defineProperty(o,"__esModule",{value:!0}),o.pipeFromArray=o.pipe=void 0;var Oi=h;function wi(t){return 0===t.length?Oi.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}o.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wi(e)},o.pipeFromArray=wi,Object.defineProperty(w,"__esModule",{value:!0}),w.Observable=void 0;var Ei=X,Pi=v,E=n,Si=o,Ti=u,ji=P,Ci=l;function Ii(e){e&&(this._subscribe=e)}function Ri(e){return null!=(e=null!=e?e:Ti.config.Promise)?e:Promise}Ii.prototype.lift=function(e){var t=new Ii;return t.source=this,t.operator=e,t},Ii.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof Ei.Subscriber||function(e){return e&&ji.isFunction(e.next)&&ji.isFunction(e.error)&&ji.isFunction(e.complete)}(n)&&Pi.isSubscription(n)?e:new Ei.SafeSubscriber(e,t,r);return Ci.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},Ii.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},Ii.prototype.forEach=function(n,e){var o=this;return new(e=Ri(e))(function(e,t){var r=new Ei.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},Ii.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},Ii.prototype[E.observable]=function(){return this},Ii.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Si.pipeFromArray(e)(this)},Ii.prototype.toPromise=function(e){var n=this;return new(e=Ri(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},Ii.create=function(e){return new Ii(e)},w.Observable=Ii;var jt={},m={},g={},ki=(Object.defineProperty(g,"__esModule",{value:!0}),g.operate=g.hasLift=void 0,P);function Ai(e){return ki.isFunction(null==e?void 0:e.lift)}g.hasLift=Ai,g.operate=function(t){return function(e){if(Ai(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 Mi,O={},Q=r&&r.__extends||(Mi=function(e,t){return(Mi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Mi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),b=(Object.defineProperty(O,"__esModule",{value:!0}),O.OperatorSubscriber=O.createOperatorSubscriber=void 0,X);O.createOperatorSubscriber=function(e,t,r,n,o){return new xi(e,t,r,n,o)};Q(Ui,Ni=b.Subscriber),Ui.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,Ni.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var Ni,xi=Ui;function Ui(t,r,e,n,o,i){var u=Ni.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:Ni.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:Ni.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:Ni.prototype._complete,u}O.OperatorSubscriber=xi,Object.defineProperty(m,"__esModule",{value:!0}),m.refCount=void 0;var Di=g,Li=O;m.refCount=function(){return Di.operate(function(r,n){var o=null,e=(r._refCount++,Li.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 Fi,i=r&&r.__extends||(Fi=function(e,t){return(Fi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Fi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(jt,"__esModule",{value:!0}),jt.ConnectableObservable=void 0;var Bi,Wi=v,zi=m,qi=O,Vi=g,Ct=(Bi=w.Observable,i(Hi,Bi),Hi.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},Hi.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},Hi.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},Hi.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new Wi.Subscription,t=this.getSubject(),e.add(this.source.subscribe(qi.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=Wi.Subscription.EMPTY)),e},Hi.prototype.refCount=function(){return zi.refCount()(this)},Hi);function Hi(e,t){var r=Bi.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,Vi.hasLift(e)&&(r.lift=e.lift),r}jt.ConnectableObservable=Ct;var Gi,Yi,Ki,Zi,Qi,f={},p={},s=(Gi=p,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.performanceTimestampProvider=void 0,Gi.performanceTimestampProvider={now:function(){return(Gi.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),Xi=(Yi=s,Ki=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},Zi=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(Yi,"__esModule",{value:!0}),Yi.animationFrameProvider=void 0,Qi=v,Yi.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=Yi.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new Qi.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=Yi.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Zi([],Ki(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Yi.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,Zi([],Ki(e)))},delegate:void 0},Object.defineProperty(f,"__esModule",{value:!0}),f.animationFrames=void 0,w),Ji=p,$i=s;function eu(a){return new Xi.Observable(function(r){var n=a||Ji.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=$i.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&$i.animationFrameProvider.cancelAnimationFrame(i)}})}f.animationFrames=function(e){return e?eu(e):nu};var tu,ru,nu=eu(),E={},Q={},b=(Object.defineProperty(Q,"__esModule",{value:!0}),Q.ObjectUnsubscribedError=void 0,_),i=(Q.ObjectUnsubscribedError=b.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(tu=function(e,t){return(tu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}tu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),ou=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.")},iu=(Object.defineProperty(E,"__esModule",{value:!0}),E.AnonymousSubject=E.Subject=void 0,w),uu=v,au=Q,su=Bt,cu=l,Ct=(ru=iu.Observable,i(lu,ru),lu.prototype.lift=function(e){var t=new pu(this,this);return t.operator=e,t},lu.prototype._throwIfClosed=function(){if(this.closed)throw new au.ObjectUnsubscribedError},lu.prototype.next=function(o){var i=this;cu.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=ou(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}}}})},lu.prototype.error=function(t){var r=this;cu.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)}})},lu.prototype.complete=function(){var t=this;cu.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},lu.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(lu.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),lu.prototype._trySubscribe=function(e){return this._throwIfClosed(),ru.prototype._trySubscribe.call(this,e)},lu.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},lu.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?uu.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new uu.Subscription(function(){t.currentObservers=null,su.arrRemove(o,e)}))},lu.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},lu.prototype.asObservable=function(){var e=new iu.Observable;return e.source=this,e},lu.create=function(e,t){return new pu(e,t)},lu);function lu(){var e=ru.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}E.Subject=Ct;i(du,fu=Ct),du.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},du.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},du.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},du.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:uu.EMPTY_SUBSCRIPTION};var fu,pu=du;function du(e,t){var r=fu.call(this)||this;return r.destination=e,r.source=t,r}E.AnonymousSubject=pu;var hu,p={},b=r&&r.__extends||(hu=function(e,t){return(hu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}hu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(p,"__esModule",{value:!0}),p.BehaviorSubject=void 0;bu=E.Subject,b(yu,bu),Object.defineProperty(yu.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),yu.prototype._subscribe=function(e){var t=bu.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},yu.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},yu.prototype.next=function(e){bu.prototype.next.call(this,this._value=e)};var bu,l=yu;function yu(e){var t=bu.call(this)||this;return t._value=e,t}p.BehaviorSubject=l;var _u,vu,i={},Ct={},b=(_u=Ct,Object.defineProperty(_u,"__esModule",{value:!0}),_u.dateTimestampProvider=void 0,_u.dateTimestampProvider={now:function(){return(_u.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(vu=function(e,t){return(vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}vu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(i,"__esModule",{value:!0}),i.ReplaySubject=void 0;var mu,gu=Ct,l=(mu=E.Subject,b(Ou,mu),Ou.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(),mu.prototype.next.call(this,e)},Ou.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},Ou.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)}},Ou);function Ou(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=gu.dateTimestampProvider);var n=mu.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}i.ReplaySubject=l;var wu,b={},l=r&&r.__extends||(wu=function(e,t){return(wu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}wu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(b,"__esModule",{value:!0}),b.AsyncSubject=void 0;Eu=E.Subject,l(Pu,Eu),Pu.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())},Pu.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},Pu.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&Eu.prototype.next.call(this,t),Eu.prototype.complete.call(this))};var Eu,l=Pu;function Pu(){var e=null!==Eu&&Eu.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}b.AsyncSubject=l;var Su,l={},T={},Tu={},ju={},Cu=r&&r.__extends||(Su=function(e,t){return(Su=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Su(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ju,"__esModule",{value:!0}),ju.Action=void 0;Iu=v.Subscription,Cu(Ru,Iu),Ru.prototype.schedule=function(e,t){return this};var Iu,Cu=Ru;function Ru(e,t){return Iu.call(this)||this}ju.Action=Cu;var ku,Au,Mu,Nu,Cu={},xu=(ku=Cu,Au=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},Mu=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(ku,"__esModule",{value:!0}),ku.intervalProvider=void 0,ku.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=ku.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,Mu([e,t],Au(r))):setInterval.apply(void 0,Mu([e,t],Au(r)))},clearInterval:function(e){var t=ku.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},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)}));Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.AsyncAction=void 0;var Uu,Du=Cu,Lu=Bt,Cu=(Uu=ju.Action,xu(Fu,Uu),Fu.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},Fu.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Du.intervalProvider.setInterval(e.flush.bind(e,this),r)},Fu.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&Du.intervalProvider.clearInterval(t)},Fu.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))},Fu.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},Fu.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,Lu.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,Uu.prototype.unsubscribe.call(this))},Fu);function Fu(e,t){var r=Uu.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}Tu.AsyncAction=Cu;var Bu,Wu,zu,qu,Vu,Hu,ju={},xu={},Gu=(Object.defineProperty(xu,"__esModule",{value:!0}),xu.TestTools=xu.Immediate=void 0,1),Yu={};function Ku(e){return e in Yu&&(delete Yu[e],!0)}xu.Immediate={setImmediate:function(e){var t=Gu++;return Yu[t]=!0,(Bu=Bu||Promise.resolve()).then(function(){return Ku(t)&&e()}),t},clearImmediate:function(e){Ku(e)}},xu.TestTools={pending:function(){return Object.keys(Yu).length}},Wu=ju,zu=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},qu=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(Wu,"__esModule",{value:!0}),Wu.immediateProvider=void 0,Vu=xu.Immediate.setImmediate,Hu=xu.Immediate.clearImmediate,Wu.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Wu.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||Vu).apply(void 0,qu([],zu(e)))},clearImmediate:function(e){var t=Wu.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||Hu)(e)},delegate:void 0};var Zu,Cu=r&&r.__extends||(Zu=function(e,t){return(Zu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Zu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(T,"__esModule",{value:!0}),T.AsapAction=void 0;var Qu,Xu=ju,xu=(Qu=Tu.AsyncAction,Cu(Ju,Qu),Ju.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Qu.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Xu.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},Ju.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Qu.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Xu.immediateProvider.clearImmediate(t),e._scheduled=void 0)},Ju);function Ju(e,t){var r=Qu.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.AsapAction=xu;var ju={},Cu={},xu={},$u=(Object.defineProperty(xu,"__esModule",{value:!0}),xu.Scheduler=void 0,Ct);function ea(e,t){void 0===t&&(t=ea.now),this.schedulerActionCtor=e,this.now=t}ea.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},ea.now=$u.dateTimestampProvider.now,xu.Scheduler=ea;var ta,ra,$u=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)}),na=(Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.AsyncScheduler=void 0,xu),$u=(ra=na.Scheduler,$u(oa,ra),oa.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}}},oa);function oa(e,t){void 0===t&&(t=na.Scheduler.now);e=ra.call(this,e,t)||this;return e.actions=[],e._active=!1,e}Cu.AsyncScheduler=$u;var ia,$u=r&&r.__extends||(ia=function(e,t){return(ia=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}ia(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ju,"__esModule",{value:!0}),ju.AsapScheduler=void 0;ua=Cu.AsyncScheduler,$u(aa,ua),aa.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 ua,$u=aa;function aa(){return null!==ua&&ua.apply(this,arguments)||this}ju.AsapScheduler=$u,$u=l,Object.defineProperty($u,"__esModule",{value:!0}),$u.asap=$u.asapScheduler=void 0,$u.asapScheduler=new ju.AsapScheduler(T.AsapAction),$u.asap=$u.asapScheduler;var sa,ju={},$u=(T=ju,Object.defineProperty(T,"__esModule",{value:!0}),T.async=T.asyncScheduler=void 0,T.asyncScheduler=new Cu.AsyncScheduler(Tu.AsyncAction),T.async=T.asyncScheduler,{}),T={},ca=r&&r.__extends||(sa=function(e,t){return(sa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}sa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(T,"__esModule",{value:!0}),T.QueueAction=void 0;la=Tu.AsyncAction,ca(fa,la),fa.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?la.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},fa.prototype.execute=function(e,t){return 0<t||this.closed?la.prototype.execute.call(this,e,t):this._execute(e,t)},fa.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?la.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var la,ca=fa;function fa(e,t){var r=la.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.QueueAction=ca;var pa,ca={},da=r&&r.__extends||(pa=function(e,t){return(pa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}pa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ca,"__esModule",{value:!0}),ca.QueueScheduler=void 0;ha=Cu.AsyncScheduler,da(ba,ha);var ha,da=ba;function ba(){return null!==ha&&ha.apply(this,arguments)||this}ca.QueueScheduler=da,da=$u,Object.defineProperty(da,"__esModule",{value:!0}),da.queue=da.queueScheduler=void 0,da.queueScheduler=new ca.QueueScheduler(T.QueueAction),da.queue=da.queueScheduler;var ya,ca={},T={},da=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)});Object.defineProperty(T,"__esModule",{value:!0}),T.AnimationFrameAction=void 0;var _a,va=s,s=(_a=Tu.AsyncAction,da(ma,_a),ma.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?_a.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=va.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},ma.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return _a.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(va.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},ma);function ma(e,t){var r=_a.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}T.AnimationFrameAction=s;var ga,da={},s=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(da,"__esModule",{value:!0}),da.AnimationFrameScheduler=void 0;Oa=Cu.AsyncScheduler,s(wa,Oa),wa.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 Oa,s=wa;function wa(){return null!==Oa&&Oa.apply(this,arguments)||this}da.AnimationFrameScheduler=s,s=ca,Object.defineProperty(s,"__esModule",{value:!0}),s.animationFrame=s.animationFrameScheduler=void 0,s.animationFrameScheduler=new da.AnimationFrameScheduler(T.AnimationFrameAction),s.animationFrame=s.animationFrameScheduler;var Ea,Pa,da={},T=r&&r.__extends||(Ea=function(e,t){return(Ea=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Ea(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(da,"__esModule",{value:!0}),da.VirtualAction=da.VirtualTimeScheduler=void 0,Tu),Sa=v,Tu=(Pa=Cu.AsyncScheduler,T(Ta,Pa),Ta.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}},Ta.frameTimeFactor=10,Ta);function Ta(e,t){void 0===t&&(t=1/0);var r=Pa.call(this,e=void 0===e?Ca:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}da.VirtualTimeScheduler=Tu;ja=s.AsyncAction,T(Ia,ja),Ia.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return ja.prototype.schedule.call(this,e,t);this.active=!1;var r=new Ia(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return Sa.Subscription.EMPTY},Ia.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(Ia.sortActions),1},Ia.prototype.recycleAsyncId=function(e,t,r){},Ia.prototype._execute=function(e,t){if(!0===this.active)return ja.prototype._execute.call(this,e,t)},Ia.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 ja,Ca=Ia;function Ia(e,t,r){void 0===r&&(r=e.index+=1);var n=ja.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}da.VirtualAction=Ca;var Ra,ka,Cu={},Tu={},s=(Ra=Tu,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.empty=Ra.EMPTY=void 0,ka=w,Ra.EMPTY=new ka.Observable(function(e){return e.complete()}),Ra.empty=function(e){return e?(t=e,new ka.Observable(function(e){return t.schedule(function(){return e.complete()})})):Ra.EMPTY;var t},{}),T={},Aa={},Ma=(Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.isScheduler=void 0,P);Aa.isScheduler=function(e){return e&&Ma.isFunction(e.schedule)},Object.defineProperty(T,"__esModule",{value:!0}),T.popNumber=T.popScheduler=T.popResultSelector=void 0;var Na=P,xa=Aa;function Ua(e){return e[e.length-1]}T.popResultSelector=function(e){return Na.isFunction(Ua(e))?e.pop():void 0},T.popScheduler=function(e){return xa.isScheduler(Ua(e))?e.pop():void 0},T.popNumber=function(e,t){return"number"==typeof Ua(e)?e.pop():t};var Da={},La={},Fa={},j={},Ba={},Wa=(Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.isArrayLike=void 0,Ba.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),za=(Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.isPromise=void 0,P);Wa.isPromise=function(e){return za.isFunction(null==e?void 0:e.then)};var qa={},Va=(Object.defineProperty(qa,"__esModule",{value:!0}),qa.isInteropObservable=void 0,n),Ha=P;qa.isInteropObservable=function(e){return Ha.isFunction(e[Va.observable])};var Ga={},Ya=(Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.isAsyncIterable=void 0,P);Ga.isAsyncIterable=function(e){return Symbol.asyncIterator&&Ya.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Ka={};Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.createInvalidObservableTypeError=void 0,Ka.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 Za={},Qa={};function Xa(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.iterator=Qa.getSymbolIterator=void 0,Qa.getSymbolIterator=Xa,Qa.iterator=Xa(),Object.defineProperty(Za,"__esModule",{value:!0}),Za.isIterable=void 0;var Ja=Qa,$a=P;Za.isIterable=function(e){return $a.isFunction(null==e?void 0:e[Ja.iterator])};var es={},ts=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}}}},rs=r&&r.__await||function(e){return this instanceof rs?(this.v=e,this):new rs(e)},ns=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 rs?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])}},os=(Object.defineProperty(es,"__esModule",{value:!0}),es.isReadableStreamLike=es.readableStreamLikeToAsyncGenerator=void 0,P);es.readableStreamLikeToAsyncGenerator=function(o){return ns(this,arguments,function(){var t,r,n;return ts(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,rs(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,rs(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,rs(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]}})})},es.isReadableStreamLike=function(e){return os.isFunction(null==e?void 0:e.getReader)};var is=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())})},us=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}}}},as=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 ss?ss(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)})}}},ss=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.")},cs=(Object.defineProperty(j,"__esModule",{value:!0}),j.fromReadableStreamLike=j.fromAsyncIterable=j.fromIterable=j.fromPromise=j.fromArrayLike=j.fromInteropObservable=j.innerFrom=void 0,Ba),ls=Wa,fs=w,ps=qa,ds=Ga,hs=Ka,bs=Za,ys=es,_s=P,vs=S,ms=n;function gs(r){return new fs.Observable(function(e){var t=r[ms.observable]();if(_s.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Os(r){return new fs.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function ws(e){return new fs.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,vs.reportUnhandledError)})}function Es(u){return new fs.Observable(function(e){var t,r;try{for(var n=ss(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 Ps(e){return new fs.Observable(function(t){!function(r,n){var o,i,u,a;return is(this,void 0,void 0,function(){var t;return us(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=as(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 Ss(e){return Ps(ys.readableStreamLikeToAsyncGenerator(e))}j.innerFrom=function(e){if(e instanceof fs.Observable)return e;if(null!=e){if(ps.isInteropObservable(e))return gs(e);if(cs.isArrayLike(e))return Os(e);if(ls.isPromise(e))return ws(e);if(ds.isAsyncIterable(e))return Ps(e);if(bs.isIterable(e))return Es(e);if(ys.isReadableStreamLike(e))return Ss(e)}throw hs.createInvalidObservableTypeError(e)},j.fromInteropObservable=gs,j.fromArrayLike=Os,j.fromPromise=ws,j.fromIterable=Es,j.fromAsyncIterable=Ps,j.fromReadableStreamLike=Ss;var S={},Ts={};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.executeSchedule=void 0,Ts.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(S,"__esModule",{value:!0}),S.observeOn=void 0;var js=Ts,Cs=g,Is=O;S.observeOn=function(r,n){return void 0===n&&(n=0),Cs.operate(function(e,t){e.subscribe(Is.createOperatorSubscriber(t,function(e){return js.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return js.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return js.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var Rs={},ks=(Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.subscribeOn=void 0,g);Rs.subscribeOn=function(r,n){return void 0===n&&(n=0),ks.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.scheduleObservable=void 0;var As=j,Ms=S,Ns=Rs;Fa.scheduleObservable=function(e,t){return As.innerFrom(e).pipe(Ns.subscribeOn(t),Ms.observeOn(t))};var xs={},Us=(Object.defineProperty(xs,"__esModule",{value:!0}),xs.schedulePromise=void 0,j),Ds=S,Ls=Rs;xs.schedulePromise=function(e,t){return Us.innerFrom(e).pipe(Ls.subscribeOn(t),Ds.observeOn(t))};var Fs={},Bs=(Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.scheduleArray=void 0,w);Fs.scheduleArray=function(r,n){return new Bs.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var Ws={},zs=(Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.scheduleIterable=void 0,w),qs=Qa,Vs=P,Hs=Ts;Ws.scheduleIterable=function(e,t){return new zs.Observable(function(n){var o;return Hs.executeSchedule(n,t,function(){o=e[qs.iterator](),Hs.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 Vs.isFunction(null==o?void 0:o.return)&&o.return()}})};var Qa={},Gs=(Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.scheduleAsyncIterable=void 0,w),Ys=Ts;Qa.scheduleAsyncIterable=function(r,n){if(r)return new Gs.Observable(function(t){Ys.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();Ys.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 Ks={},Zs=(Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.scheduleReadableStreamLike=void 0,Qa),Qs=es;Ks.scheduleReadableStreamLike=function(e,t){return Zs.scheduleAsyncIterable(Qs.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(La,"__esModule",{value:!0}),La.scheduled=void 0;var Xs=Fa,Js=xs,$s=Fs,ec=Ws,tc=Qa,rc=qa,nc=Wa,oc=Ba,ic=Za,uc=Ga,ac=Ka,sc=es,cc=Ks;La.scheduled=function(e,t){if(null!=e){if(rc.isInteropObservable(e))return Xs.scheduleObservable(e,t);if(oc.isArrayLike(e))return $s.scheduleArray(e,t);if(nc.isPromise(e))return Js.schedulePromise(e,t);if(uc.isAsyncIterable(e))return tc.scheduleAsyncIterable(e,t);if(ic.isIterable(e))return ec.scheduleIterable(e,t);if(sc.isReadableStreamLike(e))return cc.scheduleReadableStreamLike(e,t)}throw ac.createInvalidObservableTypeError(e)},Object.defineProperty(Da,"__esModule",{value:!0}),Da.from=void 0;var lc=La,fc=j;Da.from=function(e,t){return t?lc.scheduled(e,t):fc.innerFrom(e)},Object.defineProperty(s,"__esModule",{value:!0}),s.of=void 0;var pc=T,dc=Da;s.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pc.popScheduler(e);return dc.from(e,r)};var hc,bc,yc,_c,Fa={},vc=(Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.throwError=void 0,w),mc=P;function gc(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function Oc(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)}Fa.throwError=function(e,t){function r(e){return e.error(n())}var n=mc.isFunction(e)?e:function(){return e};return new vc.Observable(t?function(e){return t.schedule(r,0,e)}:r)},xs=Cu,Object.defineProperty(xs,"__esModule",{value:!0}),xs.observeNotification=xs.Notification=xs.NotificationKind=void 0,hc=Tu,bc=s,yc=Fa,_c=P,(Fs=xs.NotificationKind||(xs.NotificationKind={})).NEXT="N",Fs.ERROR="E",Fs.COMPLETE="C",gc.prototype.observe=function(e){return Oc(this,e)},gc.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()},gc.prototype.accept=function(e,t,r){var n;return _c.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},gc.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?bc.of(t):"E"===e?yc.throwError(function(){return r}):"C"===e?hc.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},gc.createNext=function(e){return new gc("N",e)},gc.createError=function(e){return new gc("E",void 0,e)},gc.createComplete=function(){return gc.completeNotification},gc.completeNotification=new gc("C"),Fs=gc,xs.Notification=Fs,xs.observeNotification=Oc;var Qa={},wc=(Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.isObservable=void 0,w),Ec=P;Qa.isObservable=function(e){return!!e&&(e instanceof wc.Observable||Ec.isFunction(e.lift)&&Ec.isFunction(e.subscribe))};var qa={},Wa={},Za=(Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.EmptyError=void 0,_),Pc=(Wa.EmptyError=Za.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(qa,"__esModule",{value:!0}),qa.lastValueFrom=void 0,Wa);qa.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 Pc.EmptyError)}})})};var Ga={},Sc=(Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.firstValueFrom=void 0,Wa),Tc=X;Ga.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new Tc.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new Sc.EmptyError)}});n.subscribe(r)})};var jc,Cc,Ic,Rc,kc,Ac,Mc,Ka={},es=(Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.ArgumentOutOfRangeError=void 0,_),Ks=(Ka.ArgumentOutOfRangeError=es.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),Fs=(Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.NotFoundError=void 0,_),xs=(Ks.NotFoundError=Fs.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),Za=(Object.defineProperty(xs,"__esModule",{value:!0}),xs.SequenceError=void 0,_),es=(xs.SequenceError=Za.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),Fs={};function Nc(e){throw new jc.TimeoutError(e)}Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.isValidDate=void 0,Fs.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},jc=es,Object.defineProperty(jc,"__esModule",{value:!0}),jc.timeout=jc.TimeoutError=void 0,Cc=ju,Ic=Fs,Rc=g,kc=j,Ac=O,Mc=Ts,jc.TimeoutError=_.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),jc.timeout=function(e,t){var a=(e=Ic.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?Nc:r,l=void 0===(r=e.scheduler)?null!=t?t:Cc.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return Rc.operate(function(e,t){function r(e){n=Mc.executeSchedule(t,l,function(){try{u.unsubscribe(),kc.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(Ac.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 Za={},_={},xc={},Uc={},Dc=(Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.map=void 0,g),Lc=O;Uc.map=function(n,o){return Dc.operate(function(e,t){var r=0;e.subscribe(Lc.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var Fc=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},Bc=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},Wc=(Object.defineProperty(xc,"__esModule",{value:!0}),xc.mapOneOrManyArgs=void 0,Uc),zc=Array.isArray;xc.mapOneOrManyArgs=function(r){return Wc.map(function(e){return t=r,zc(e=e)?t.apply(void 0,Bc([],Fc(e))):t(e);var t})};var qc=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},Vc=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},Hc=(Object.defineProperty(_,"__esModule",{value:!0}),_.bindCallbackInternals=void 0,Aa),Gc=w,Yc=Rs,Kc=xc,Zc=S,Qc=b;_.bindCallbackInternals=function r(a,s,n,o){if(n){if(!Hc.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(Kc.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(Yc.subscribeOn(o),Zc.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new Qc.AsyncSubject,u=!0;return new Gc.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,Vc(Vc([],qc(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(Za,"__esModule",{value:!0}),Za.bindCallback=void 0;var Xc=_;Za.bindCallback=function(e,t,r){return Xc.bindCallbackInternals(!1,e,t,r)};var Jc={},$c=(Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.bindNodeCallback=void 0,_);Jc.bindNodeCallback=function(e,t,r){return $c.bindCallbackInternals(!0,e,t,r)};var _={},el={},tl=(Object.defineProperty(el,"__esModule",{value:!0}),el.argsArgArrayOrObject=void 0,Array.isArray),rl=Object.getPrototypeOf,nl=Object.prototype,ol=Object.keys;el.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(tl(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&rl(r)===nl)return{args:(r=ol(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var il={};Object.defineProperty(il,"__esModule",{value:!0}),il.createObject=void 0,il.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(_,"__esModule",{value:!0}),_.combineLatestInit=_.combineLatest=void 0;var ul=w,al=el,sl=Da,cl=h,ll=xc,fl=T,pl=il,dl=O,hl=Ts;function bl(a,s,c){return void 0===c&&(c=cl.identity),function(u){yl(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){yl(s,function(){var e=sl.from(a[r],s),t=!1;e.subscribe(dl.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 yl(e,t,r){e?hl.executeSchedule(r,e,t):t()}_.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=fl.popScheduler(e),n=fl.popResultSelector(e),o=al.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?sl.from([],r):(o=new ul.Observable(bl(i,r,u?function(e){return pl.createObject(u,e)}:cl.identity)),n?o.pipe(ll.mapOneOrManyArgs(n)):o)},_.combineLatestInit=bl;var _l={},vl={},ml={},gl={},Ol={},wl=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.mergeInternals=void 0,j),El=Ts,Pl=O;Ol.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;wl.innerFrom(n(e,l++)).subscribe(Pl.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?El.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(Pl.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(gl,"__esModule",{value:!0}),gl.mergeMap=void 0;var Sl=Uc,Tl=j,jl=g,Cl=Ol,Il=P;gl.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),Il.isFunction(i)?e(function(r,n){return Sl.map(function(e,t){return i(r,e,n,t)})(Tl.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),jl.operate(function(e,t){return Cl.mergeInternals(e,t,o,r)}))},Object.defineProperty(ml,"__esModule",{value:!0}),ml.mergeAll=void 0;var Rl=gl,kl=h;ml.mergeAll=function(e){return Rl.mergeMap(kl.identity,e=void 0===e?1/0:e)},Object.defineProperty(vl,"__esModule",{value:!0}),vl.concatAll=void 0;var Al=ml;vl.concatAll=function(){return Al.mergeAll(1)},Object.defineProperty(_l,"__esModule",{value:!0}),_l.concat=void 0;var Ml=vl,Nl=T,xl=Da;_l.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ml.concatAll()(xl.from(e,Nl.popScheduler(e)))};var Ul={},Dl={},Ll=(Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.defer=void 0,w),Fl=j;Dl.defer=function(t){return new Ll.Observable(function(e){Fl.innerFrom(t()).subscribe(e)})},Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.connectable=void 0;var Bl=E,Wl=w,zl=Dl,ql={connector:function(){return new Bl.Subject},resetOnDisconnect:!0};Ul.connectable=function(e,t){var r=null,n=(t=void 0===t?ql:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new Wl.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=zl.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var Vl={},Hl=(Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.forkJoin=void 0,w),Gl=el,Yl=j,Kl=T,Zl=O,Ql=xc,Xl=il;Vl.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Kl.popResultSelector(e),u=(n=Gl.argsArgArrayOrObject(e)).args,a=n.keys,n=new Hl.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;Yl.innerFrom(u[t]).subscribe(Zl.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?Xl.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(Ql.mapOneOrManyArgs(r)):n};var el={},Jl=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(el,"__esModule",{value:!0}),el.fromEvent=void 0,j),ef=w,tf=gl,rf=Ba,nf=P,of=xc,uf=["addListener","removeListener"],af=["addEventListener","removeEventListener"],sf=["on","off"];function cf(r,n){return function(t){return function(e){return r[t](n,e)}}}el.fromEvent=function t(r,n,o,e){if(nf.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(of.mapOneOrManyArgs(e));var e=Jl((e=r,nf.isFunction(e.addEventListener)&&nf.isFunction(e.removeEventListener)?af.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,nf.isFunction(e.addListener)&&nf.isFunction(e.removeListener)?uf.map(cf(r,n)):(e=r,nf.isFunction(e.on)&&nf.isFunction(e.off)?sf.map(cf(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&rf.isArrayLike(r))return tf.mergeMap(function(e){return t(e,n,o)})($l.innerFrom(r));if(i)return new ef.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 il={},lf=(Object.defineProperty(il,"__esModule",{value:!0}),il.fromEventPattern=void 0,w),ff=P,pf=xc;il.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(pf.mapOneOrManyArgs(t)):new lf.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 ff.isFunction(o)?function(){return o(e,t)}:void 0})};var Ba={},df=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}}}},hf=(Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.generate=void 0,h),bf=Aa,yf=Dl,_f=Ws;Ba.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return df(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?hf.identity:i,o=e.scheduler):(a=e,!t||bf.isScheduler(t)?(u=hf.identity,o=t):u=t),yf.defer(o?function(){return _f.scheduleIterable(s(),o)}:s)};var Ws={},vf=(Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.iif=void 0,Dl);Ws.iif=function(e,t,r){return vf.defer(function(){return e()?t:r})};var mf={},gf={},Of=(Object.defineProperty(gf,"__esModule",{value:!0}),gf.timer=void 0,w),wf=ju,Ef=Aa,Pf=Fs;gf.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=wf.async);var i=-1;return null!=e&&(Ef.isScheduler(e)?o=e:i=e),new Of.Observable(function(e){var t=Pf.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(mf,"__esModule",{value:!0}),mf.interval=void 0;var Sf=ju,Tf=gf;mf.interval=function(e,t){return Tf.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?Sf.asyncScheduler:t)};var Aa={},jf=(Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.merge=void 0,ml),Cf=j,If=Tu,Rf=T,kf=Da;Aa.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Rf.popScheduler(e),n=Rf.popNumber(e,1/0),o=e;return o.length?1===o.length?Cf.innerFrom(o[0]):jf.mergeAll(n)(kf.from(o,r)):If.EMPTY};var Af,Mf={},Nf=(Af=Mf,Object.defineProperty(Af,"__esModule",{value:!0}),Af.never=Af.NEVER=void 0,Af.NEVER=new w.Observable(t.noop),Af.never=function(){return Af.NEVER},{}),xf={},Uf=(Object.defineProperty(xf,"__esModule",{value:!0}),xf.argsOrArgArray=void 0,Array.isArray);xf.argsOrArgArray=function(e){return 1===e.length&&Uf(e[0])?e[0]:e},Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.onErrorResumeNext=void 0;var Df=w,Lf=xf,Ff=O,Bf=t,Wf=j;Nf.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Lf.argsOrArgArray(e);return new Df.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=Wf.innerFrom(i[n++])}catch(e){return void o()}var t=new Ff.OperatorSubscriber(r,void 0,Bf.noop,Bf.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var zf={},qf=(Object.defineProperty(zf,"__esModule",{value:!0}),zf.pairs=void 0,Da);zf.pairs=function(e,t){return qf.from(Object.entries(e),t)};var Vf={},Hf={};Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.not=void 0,Hf.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var Gf={},Yf=(Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.filter=void 0,g),Kf=O;Gf.filter=function(n,o){return Yf.operate(function(e,t){var r=0;e.subscribe(Kf.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.partition=void 0;var Zf=Hf,Qf=Gf,Xf=j;Vf.partition=function(e,t,r){return[Qf.filter(t,r)(Xf.innerFrom(e)),Qf.filter(Zf.not(t,r))(Xf.innerFrom(e))]};var Jf={},$f=(Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.raceInit=Jf.race=void 0,w),ep=j,tp=xf,rp=O;function np(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(ep.innerFrom(t[r]).subscribe(rp.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)}}Jf.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=tp.argsOrArgArray(e)).length?ep.innerFrom(e[0]):new $f.Observable(np(e))},Jf.raceInit=np;var op={},ip=(Object.defineProperty(op,"__esModule",{value:!0}),op.range=void 0,w),up=Tu;op.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return up.EMPTY;var o=e+r;return new ip.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 ap={},sp=(Object.defineProperty(ap,"__esModule",{value:!0}),ap.using=void 0,w),cp=j,lp=Tu;ap.using=function(n,o){return new sp.Observable(function(e){var t=n(),r=o(t);return(r?cp.innerFrom(r):lp.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var fp={},pp=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},dp=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(fp,"__esModule",{value:!0}),fp.zip=void 0,w),bp=j,yp=xf,_p=Tu,vp=O,mp=T;fp.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=mp.popResultSelector(e),u=yp.argsOrArgArray(e);return u.length?new hp.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){bp.innerFrom(u[t]).subscribe(vp.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,dp([],pp(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}}):_p.EMPTY};var gp={},Op=(Object.defineProperty(gp,"__esModule",{value:!0}),{}),wp=(Object.defineProperty(Op,"__esModule",{value:!0}),Op.audit=void 0,g),Ep=j,Pp=O;Op.audit=function(s){return wp.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(Pp.createOperatorSubscriber(t,function(e){o=!0,i=e,u||Ep.innerFrom(s(e)).subscribe(u=Pp.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var Sp={},Tp=(Object.defineProperty(Sp,"__esModule",{value:!0}),Sp.auditTime=void 0,ju),jp=Op,Cp=gf;Sp.auditTime=function(e,t){return void 0===t&&(t=Tp.asyncScheduler),jp.audit(function(){return Cp.timer(e,t)})};var Ip={},Rp=(Object.defineProperty(Ip,"__esModule",{value:!0}),Ip.buffer=void 0,g),kp=t,Ap=O,Mp=j;Ip.buffer=function(n){return Rp.operate(function(e,t){var r=[];return e.subscribe(Ap.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),Mp.innerFrom(n).subscribe(Ap.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},kp.noop)),function(){r=null}})};var Np={},xp=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.")},Up=(Object.defineProperty(Np,"__esModule",{value:!0}),Np.bufferCount=void 0,g),Dp=O,Lp=Bt;Np.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,Up.operate(function(e,f){var p=[],d=0;e.subscribe(Dp.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=xp(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=xp(i),c=s.next();!c.done;c=s.next()){var l=c.value;Lp.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=xp(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 Fp={},Bp=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.")},Wp=(Object.defineProperty(Fp,"__esModule",{value:!0}),Fp.bufferTime=void 0,v),zp=g,qp=O,Vp=Bt,Hp=ju,Gp=T,Yp=Ts;Fp.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=Gp.popScheduler(t))?e:Hp.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return zp.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),Vp.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new Wp.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),Yp.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?Yp.executeSchedule(r,u,o,a,!0):n=!0,o(),qp.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=Bp(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 Kp={},Zp=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.")},Qp=(Object.defineProperty(Kp,"__esModule",{value:!0}),Kp.bufferToggle=void 0,v),Xp=g,Jp=j,$p=O,ed=t,td=Bt;Kp.bufferToggle=function(t,o){return Xp.operate(function(e,n){var i=[];Jp.innerFrom(t).subscribe($p.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new Qp.Subscription);r.add(Jp.innerFrom(o(e)).subscribe($p.createOperatorSubscriber(n,function(){td.arrRemove(i,t),n.next(t),r.unsubscribe()},ed.noop)))},ed.noop)),e.subscribe($p.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=Zp(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 rd={},nd=(Object.defineProperty(rd,"__esModule",{value:!0}),rd.bufferWhen=void 0,g),od=t,id=O,ud=j;rd.bufferWhen=function(i){return nd.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),ud.innerFrom(i()).subscribe(n=id.createOperatorSubscriber(t,o,od.noop))};o(),e.subscribe(id.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 ad={},sd=(Object.defineProperty(ad,"__esModule",{value:!0}),ad.catchError=void 0,j),cd=O,ld=g;ad.catchError=function u(a){return ld.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(cd.createOperatorSubscriber(r,void 0,void 0,function(e){n=sd.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 fd={},pd={},C={},dd={},I={},hd={},bd=(Object.defineProperty(hd,"__esModule",{value:!0}),hd.scanInternals=void 0,O);hd.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(bd.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(I,"__esModule",{value:!0}),I.reduce=void 0;var yd=hd,_d=g;I.reduce=function(e,t){return _d.operate(yd.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(dd,"__esModule",{value:!0}),dd.toArray=void 0;function vd(e,t){return e.push(t),e}var md=I,gd=g;dd.toArray=function(){return gd.operate(function(e,t){md.reduce(vd,[])(e).subscribe(t)})},Object.defineProperty(C,"__esModule",{value:!0}),C.joinAllInternals=void 0;var Od=h,wd=xc,Ed=o,Pd=gl,Sd=dd;C.joinAllInternals=function(t,e){return Ed.pipe(Sd.toArray(),Pd.mergeMap(function(e){return t(e)}),e?wd.mapOneOrManyArgs(e):Od.identity)},Object.defineProperty(pd,"__esModule",{value:!0}),pd.combineLatestAll=void 0;var Td=_,jd=C;pd.combineLatestAll=function(e){return jd.joinAllInternals(Td.combineLatest,e)},Object.defineProperty(fd,"__esModule",{value:!0}),fd.combineAll=void 0;fd.combineAll=pd.combineLatestAll;var Cd={},Id={},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},kd=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},Ad=(Object.defineProperty(Id,"__esModule",{value:!0}),Id.combineLatest=void 0,_),Md=g,Nd=xf,xd=xc,Ud=o,Dd=T;function Ld(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Dd.popResultSelector(r);return t?Ud.pipe(Ld.apply(void 0,kd([],Rd(r))),xd.mapOneOrManyArgs(t)):Md.operate(function(e,t){Ad.combineLatestInit(kd([e],Rd(Nd.argsOrArgArray(r))))(t)})}Id.combineLatest=Ld;var Fd=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},Bd=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},Wd=(Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.combineLatestWith=void 0,Id);Cd.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Wd.combineLatest.apply(void 0,Bd([],Fd(e)))};var xc={},zd=(Object.defineProperty(xc,"__esModule",{value:!0}),xc.concatMap=void 0,gl),qd=P;xc.concatMap=function(e,t){return qd.isFunction(t)?zd.mergeMap(e,t,1):zd.mergeMap(e,1)};var Vd={},Hd=(Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.concatMapTo=void 0,xc),Gd=P;Vd.concatMapTo=function(e,t){return Gd.isFunction(t)?Hd.concatMap(function(){return e},t):Hd.concatMap(function(){return e})};var Yd={},Kd={},Zd=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},Qd=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},Xd=(Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.concat=void 0,g),Jd=vl,$d=T,eh=Da;Kd.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=$d.popScheduler(r);return Xd.operate(function(e,t){Jd.concatAll()(eh.from(Qd([e],Zd(r)),n)).subscribe(t)})};var th=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},rh=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},nh=(Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.concatWith=void 0,Kd);Yd.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nh.concat.apply(void 0,rh([],th(e)))};var oh={},ih={},uh=(Object.defineProperty(ih,"__esModule",{value:!0}),ih.fromSubscribable=void 0,w);ih.fromSubscribable=function(t){return new uh.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(oh,"__esModule",{value:!0}),oh.connect=void 0;var ah=E,sh=j,ch=g,lh=ih,fh={connector:function(){return new ah.Subject}};oh.connect=function(n,e){var o=(e=void 0===e?fh:e).connector;return ch.operate(function(e,t){var r=o();sh.innerFrom(n(lh.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var ih={},ph=(Object.defineProperty(ih,"__esModule",{value:!0}),ih.count=void 0,I);ih.count=function(n){return ph.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var dh={},hh=(Object.defineProperty(dh,"__esModule",{value:!0}),dh.debounce=void 0,g),bh=t,yh=O,_h=j;dh.debounce=function(u){return hh.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(yh.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=yh.createOperatorSubscriber(t,r,bh.noop),_h.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var R={},vh=(Object.defineProperty(R,"__esModule",{value:!0}),R.debounceTime=void 0,ju),mh=g,gh=O;R.debounceTime=function(a,s){return void 0===s&&(s=vh.asyncScheduler),mh.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(gh.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 Oh={},wh=(Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.defaultIfEmpty=void 0,g),Eh=O;Oh.defaultIfEmpty=function(n){return wh.operate(function(e,t){var r=!1;e.subscribe(Eh.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var Ph={},Sh={},Th={},jh=(Object.defineProperty(Th,"__esModule",{value:!0}),Th.take=void 0,Tu),Ch=g,Ih=O;Th.take=function(n){return n<=0?function(){return jh.EMPTY}:Ch.operate(function(e,t){var r=0;e.subscribe(Ih.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var Rh={},kh=(Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.ignoreElements=void 0,g),Ah=O,Mh=t;Rh.ignoreElements=function(){return kh.operate(function(e,t){e.subscribe(Ah.createOperatorSubscriber(t,Mh.noop))})};var Nh={},xh=(Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.mapTo=void 0,Uc);Nh.mapTo=function(e){return xh.map(function(){return e})},Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.delayWhen=void 0;var Uh=_l,Dh=Th,Lh=Rh,Fh=Nh,Bh=gl,Wh=j;Sh.delayWhen=function t(r,n){return n?function(e){return Uh.concat(n.pipe(Dh.take(1),Lh.ignoreElements()),e.pipe(t(r)))}:Bh.mergeMap(function(e,t){return Wh.innerFrom(r(e,t)).pipe(Dh.take(1),Fh.mapTo(e))})},Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.delay=void 0;var zh=ju,qh=Sh,Vh=gf;Ph.delay=function(e,t){var r=Vh.timer(e,t=void 0===t?zh.asyncScheduler:t);return qh.delayWhen(function(){return r})};var Hh={},Gh=(Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.dematerialize=void 0,Cu),Yh=g,Kh=O;Hh.dematerialize=function(){return Yh.operate(function(e,t){e.subscribe(Kh.createOperatorSubscriber(t,function(e){return Gh.observeNotification(e,t)}))})};var Zh={},Qh=(Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.distinct=void 0,g),Xh=O,Jh=t,$h=j;Zh.distinct=function(o,t){return Qh.operate(function(e,r){var n=new Set;e.subscribe(Xh.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&$h.innerFrom(t).subscribe(Xh.createOperatorSubscriber(r,function(){return n.clear()},Jh.noop))})};var eb={},tb=(Object.defineProperty(eb,"__esModule",{value:!0}),eb.distinctUntilChanged=void 0,h),rb=g,nb=O;function ob(e,t){return e===t}eb.distinctUntilChanged=function(i,u){return void 0===u&&(u=tb.identity),i=null!=i?i:ob,rb.operate(function(e,r){var n,o=!0;e.subscribe(nb.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var ib={},ub=(Object.defineProperty(ib,"__esModule",{value:!0}),ib.distinctUntilKeyChanged=void 0,eb);ib.distinctUntilKeyChanged=function(r,n){return ub.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var ab={},sb={},cb=(Object.defineProperty(sb,"__esModule",{value:!0}),sb.throwIfEmpty=void 0,Wa),lb=g,fb=O;function pb(){return new cb.EmptyError}sb.throwIfEmpty=function(n){return void 0===n&&(n=pb),lb.operate(function(e,t){var r=!1;e.subscribe(fb.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(ab,"__esModule",{value:!0}),ab.elementAt=void 0;var db=Ka,hb=Gf,bb=sb,yb=Oh,_b=Th;ab.elementAt=function(r,t){if(r<0)throw new db.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(hb.filter(function(e,t){return t===r}),_b.take(1),n?yb.defaultIfEmpty(t):bb.throwIfEmpty(function(){return new db.ArgumentOutOfRangeError}))}};var vb={},mb=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},Ob=(Object.defineProperty(vb,"__esModule",{value:!0}),vb.endWith=void 0,_l),wb=s;vb.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Ob.concat(e,wb.of.apply(void 0,gb([],mb(t))))}};var Eb={},Pb=(Object.defineProperty(Eb,"__esModule",{value:!0}),Eb.every=void 0,g),Sb=O;Eb.every=function(o,i){return Pb.operate(function(t,r){var n=0;t.subscribe(Sb.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var Tb={},jb={},Cb={},Ib=(Object.defineProperty(Cb,"__esModule",{value:!0}),Cb.exhaustMap=void 0,Uc),Rb=j,kb=g,Ab=O;Cb.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return Rb.innerFrom(i(r,n)).pipe(Ib.map(function(e,t){return o(r,e,n,t)}))}))}:kb.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(Ab.createOperatorSubscriber(t,function(e){n||(n=Ab.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),Rb.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(jb,"__esModule",{value:!0}),jb.exhaustAll=void 0;var Mb=Cb,Nb=h;jb.exhaustAll=function(){return Mb.exhaustMap(Nb.identity)},Object.defineProperty(Tb,"__esModule",{value:!0}),Tb.exhaust=void 0;Tb.exhaust=jb.exhaustAll;var xb={},Ub=(Object.defineProperty(xb,"__esModule",{value:!0}),xb.expand=void 0,g),Db=Ol;xb.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,Ub.operate(function(e,t){return Db.mergeInternals(e,t,r,n,void 0,!0,o)})};var Lb={},Fb=(Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.finalize=void 0,g);Lb.finalize=function(r){return Fb.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var Bb={},Wb=(Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.createFind=Bb.find=void 0,g),zb=O;function qb(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(zb.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()}))}}Bb.find=function(e,t){return Wb.operate(qb(e,t,"value"))},Bb.createFind=qb;var Vb={},Hb=(Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.findIndex=void 0,g),Gb=Bb;Vb.findIndex=function(e,t){return Hb.operate(Gb.createFind(e,t,"index"))};var Yb={},Kb=(Object.defineProperty(Yb,"__esModule",{value:!0}),Yb.first=void 0,Wa),Zb=Gf,Qb=Th,Xb=Oh,Jb=sb,$b=h;Yb.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?Zb.filter(function(e,t){return n(e,t,r)}):$b.identity,Qb.take(1),t?Xb.defaultIfEmpty(e):Jb.throwIfEmpty(function(){return new Kb.EmptyError}))}};var ey={},ty=(Object.defineProperty(ey,"__esModule",{value:!0}),ey.groupBy=void 0,w),ry=j,ny=E,oy=g,iy=O;ey.groupBy=function(b,t,y,_){return oy.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 iy.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new ny.Subject),i=n,u=o,(a=new ty.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=iy.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(ry.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 uy={},ay=(Object.defineProperty(uy,"__esModule",{value:!0}),uy.isEmpty=void 0,g),sy=O;uy.isEmpty=function(){return ay.operate(function(e,t){e.subscribe(sy.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var cy={},ly={},fy=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.")},py=(Object.defineProperty(ly,"__esModule",{value:!0}),ly.takeLast=void 0,Tu),dy=g,hy=O;ly.takeLast=function(t){return t<=0?function(){return py.EMPTY}:dy.operate(function(e,i){var u=[];e.subscribe(hy.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=fy(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(cy,"__esModule",{value:!0}),cy.last=void 0;var by=Wa,yy=Gf,_y=ly,vy=sb,my=Oh,gy=h;cy.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?yy.filter(function(e,t){return n(e,t,r)}):gy.identity,_y.takeLast(1),t?my.defaultIfEmpty(e):vy.throwIfEmpty(function(){return new by.EmptyError}))}};var Oy={},wy=(Object.defineProperty(Oy,"__esModule",{value:!0}),Oy.materialize=void 0,Cu),Ey=g,Py=O;Oy.materialize=function(){return Ey.operate(function(e,t){e.subscribe(Py.createOperatorSubscriber(t,function(e){t.next(wy.Notification.createNext(e))},function(){t.next(wy.Notification.createComplete()),t.complete()},function(e){t.next(wy.Notification.createError(e)),t.complete()}))})};var Sy={},Ty=(Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.max=void 0,I),jy=P;Sy.max=function(r){return Ty.reduce(jy.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var Cy={},Iy=(Object.defineProperty(Cy,"__esModule",{value:!0}),Cy.flatMap=void 0,gl),Iy=(Cy.flatMap=Iy.mergeMap,{}),Ry=(Object.defineProperty(Iy,"__esModule",{value:!0}),Iy.mergeMapTo=void 0,gl),ky=P;Iy.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),ky.isFunction(t)?Ry.mergeMap(function(){return e},t,r):Ry.mergeMap(function(){return e},r="number"==typeof t?t:r)};var Ay={},My=(Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.mergeScan=void 0,g),Ny=Ol;Ay.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),My.operate(function(e,t){var r=o;return Ny.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var Ol={},xy={},Uy=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},Dy=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},Ly=(Object.defineProperty(xy,"__esModule",{value:!0}),xy.merge=void 0,g),Fy=xf,By=ml,Wy=T,zy=Da;xy.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Wy.popScheduler(r),o=Wy.popNumber(r,1/0),r=Fy.argsOrArgArray(r);return Ly.operate(function(e,t){By.mergeAll(o)(zy.from(Dy([e],Uy(r)),n)).subscribe(t)})};var qy=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},Vy=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},Hy=(Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.mergeWith=void 0,xy);Ol.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Hy.merge.apply(void 0,Vy([],qy(e)))};var Gy={},Yy=(Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.min=void 0,I),Ky=P;Gy.min=function(r){return Yy.reduce(Ky.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var Zy={},Qy=(Object.defineProperty(Zy,"__esModule",{value:!0}),Zy.multicast=void 0,jt),Xy=P,Jy=oh;Zy.multicast=function(e,t){var r=Xy.isFunction(e)?e:function(){return e};return Xy.isFunction(t)?Jy.connect(t,{connector:r}):function(e){return new Qy.ConnectableObservable(e,r)}};var $y={},e_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},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},r_=(Object.defineProperty($y,"__esModule",{value:!0}),$y.onErrorResumeNext=$y.onErrorResumeNextWith=void 0,xf),n_=Nf;function o_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=r_.argsOrArgArray(e);return function(e){return n_.onErrorResumeNext.apply(void 0,t_([e],e_(r)))}}$y.onErrorResumeNextWith=o_,$y.onErrorResumeNext=o_;var i_={},u_=(Object.defineProperty(i_,"__esModule",{value:!0}),i_.pairwise=void 0,g),a_=O;i_.pairwise=function(){return u_.operate(function(e,r){var n,o=!1;e.subscribe(a_.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var s_={},c_=(Object.defineProperty(s_,"__esModule",{value:!0}),s_.pluck=void 0,Uc);s_.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 c_.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 l_={},f_=(Object.defineProperty(l_,"__esModule",{value:!0}),l_.publish=void 0,E),p_=Zy,d_=oh;l_.publish=function(t){return t?function(e){return d_.connect(t)(e)}:function(e){return p_.multicast(new f_.Subject)(e)}};var h_={},b_=(Object.defineProperty(h_,"__esModule",{value:!0}),h_.publishBehavior=void 0,p),y_=jt;h_.publishBehavior=function(r){return function(e){var t=new b_.BehaviorSubject(r);return new y_.ConnectableObservable(e,function(){return t})}};var __={},v_=(Object.defineProperty(__,"__esModule",{value:!0}),__.publishLast=void 0,b),m_=jt;__.publishLast=function(){return function(e){var t=new v_.AsyncSubject;return new m_.ConnectableObservable(e,function(){return t})}};var g_={},O_=(Object.defineProperty(g_,"__esModule",{value:!0}),g_.publishReplay=void 0,i),w_=Zy,E_=P;g_.publishReplay=function(t,r,e,n){e&&!E_.isFunction(e)&&(n=e);var o=E_.isFunction(e)?e:void 0;return function(e){return w_.multicast(new O_.ReplaySubject(t,r,n),o)(e)}};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_.raceWith=void 0,Jf),C_=g,I_=h;P_.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?C_.operate(function(e,t){j_.raceInit(T_([e],S_(r)))(t)}):I_.identity};var R_={},k_=(Object.defineProperty(R_,"__esModule",{value:!0}),R_.repeat=void 0,Tu),A_=g,M_=O,N_=j,x_=gf;R_.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 k_.EMPTY}:A_.operate(function(t,r){function n(){var e=!1;o=t.subscribe(M_.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?x_.timer(a):N_.innerFrom(a(i)),t=M_.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var U_={},D_=(Object.defineProperty(U_,"__esModule",{value:!0}),U_.repeatWhen=void 0,j),L_=E,F_=g,B_=O;U_.repeatWhen=function(l){return F_.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 L_.Subject,D_.innerFrom(l(n)).subscribe(B_.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(B_.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var W_={},z_=(Object.defineProperty(W_,"__esModule",{value:!0}),W_.retry=void 0,g),q_=O,V_=h,H_=gf,G_=j;W_.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?V_.identity:z_.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(q_.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?H_.timer(l):G_.innerFrom(l(e,a)),n=q_.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var Y_={},K_=(Object.defineProperty(Y_,"__esModule",{value:!0}),Y_.retryWhen=void 0,j),Z_=E,Q_=g,X_=O;Y_.retryWhen=function(u){return Q_.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(X_.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new Z_.Subject,K_.innerFrom(u(n)).subscribe(X_.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var J_={},$_=(Object.defineProperty(J_,"__esModule",{value:!0}),J_.sample=void 0,j),ev=g,tv=t,rv=O;J_.sample=function(o){return ev.operate(function(e,t){var r=!1,n=null;e.subscribe(rv.createOperatorSubscriber(t,function(e){r=!0,n=e})),$_.innerFrom(o).subscribe(rv.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},tv.noop))})};var nv={},ov=(Object.defineProperty(nv,"__esModule",{value:!0}),nv.sampleTime=void 0,ju),iv=J_,uv=mf;nv.sampleTime=function(e,t){return iv.sample(uv.interval(e,t=void 0===t?ov.asyncScheduler:t))};var av={},sv=(Object.defineProperty(av,"__esModule",{value:!0}),av.scan=void 0,g),cv=hd;av.scan=function(e,t){return sv.operate(cv.scanInternals(e,t,2<=arguments.length,!0))};var hd={},lv=(Object.defineProperty(hd,"__esModule",{value:!0}),hd.sequenceEqual=void 0,g),fv=O,pv=j;function dv(){return{buffer:[],complete:!1}}hd.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),lv.operate(function(e,t){function r(n,o){var r=fv.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=dv(),o=dv(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),pv.innerFrom(u).subscribe(r(o,n))})};var hv={},bv=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},yv=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},_v=(Object.defineProperty(hv,"__esModule",{value:!0}),hv.share=void 0,j),vv=E,mv=X,gv=g;function Ov(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 mv.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),_v.innerFrom(t.apply(void 0,yv([],bv(n)))).subscribe(r)}hv.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new vv.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 gv.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=Ov(n,b))}),r.subscribe(t),!o&&0<a&&(o=new mv.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=Ov(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=Ov(f,h),r.complete()}}),_v.innerFrom(e).subscribe(o))})(e)}};var wv={},Ev=(Object.defineProperty(wv,"__esModule",{value:!0}),wv.shareReplay=void 0,i),Pv=hv;wv.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,Pv.share({connector:function(){return new Ev.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var Sv={},Tv=(Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.single=void 0,Wa),jv=xs,Cv=Ks,Iv=g,Rv=O;Sv.single=function(a){return Iv.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(Rv.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new jv.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new Cv.NotFoundError("No matching values"):new Tv.EmptyError)}))})};var kv={},Av=(Object.defineProperty(kv,"__esModule",{value:!0}),kv.skip=void 0,Gf);kv.skip=function(r){return Av.filter(function(e,t){return r<=t})};var Mv={},Nv=(Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.skipLast=void 0,h),xv=g,Uv=O;Mv.skipLast=function(u){return u<=0?Nv.identity:xv.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(Uv.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 Dv={},Lv=(Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.skipUntil=void 0,g),Fv=O,Bv=j,Wv=t;Dv.skipUntil=function(o){return Lv.operate(function(e,t){var r=!1,n=Fv.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},Wv.noop);Bv.innerFrom(o).subscribe(n),e.subscribe(Fv.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var zv={},qv=(Object.defineProperty(zv,"__esModule",{value:!0}),zv.skipWhile=void 0,g),Vv=O;zv.skipWhile=function(o){return qv.operate(function(e,t){var r=!1,n=0;e.subscribe(Vv.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var Hv={},Gv=(Object.defineProperty(Hv,"__esModule",{value:!0}),Hv.startWith=void 0,_l),Yv=T,Kv=g;Hv.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Yv.popScheduler(r);return Kv.operate(function(e,t){(n?Gv.concat(r,e,n):Gv.concat(r,e)).subscribe(t)})};var Zv={},Qv={},Xv=(Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.switchMap=void 0,j),Jv=g,$v=O;Qv.switchMap=function(s,c){return Jv.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe($v.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;Xv.innerFrom(s(t,n)).subscribe(u=$v.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(Zv,"__esModule",{value:!0}),Zv.switchAll=void 0;var em=Qv,tm=h;Zv.switchAll=function(){return em.switchMap(tm.identity)};var rm={},nm=(Object.defineProperty(rm,"__esModule",{value:!0}),rm.switchMapTo=void 0,Qv),om=P;rm.switchMapTo=function(e,t){return om.isFunction(t)?nm.switchMap(function(){return e},t):nm.switchMap(function(){return e})};var im={},um=(Object.defineProperty(im,"__esModule",{value:!0}),im.switchScan=void 0,Qv),am=g;im.switchScan=function(n,o){return am.operate(function(e,t){var r=o;return um.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var sm={},cm=(Object.defineProperty(sm,"__esModule",{value:!0}),sm.takeUntil=void 0,g),lm=O,fm=j,pm=t;sm.takeUntil=function(r){return cm.operate(function(e,t){fm.innerFrom(r).subscribe(lm.createOperatorSubscriber(t,function(){return t.complete()},pm.noop)),t.closed||e.subscribe(t)})};var dm={},hm=(Object.defineProperty(dm,"__esModule",{value:!0}),dm.takeWhile=void 0,g),bm=O;dm.takeWhile=function(o,i){return void 0===i&&(i=!1),hm.operate(function(e,r){var n=0;e.subscribe(bm.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var ym={},_m=(Object.defineProperty(ym,"__esModule",{value:!0}),ym.tap=void 0,P),vm=g,mm=O,gm=h;ym.tap=function(e,t,r){var o=_m.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?vm.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(mm.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)}))}):gm.identity};var Om,wm,Em,Pm,P={},Sm=(Om=P,Object.defineProperty(Om,"__esModule",{value:!0}),Om.throttle=Om.defaultThrottleConfig=void 0,wm=g,Em=O,Pm=j,Om.defaultThrottleConfig={leading:!0,trailing:!1},Om.throttle=function(p,d){return void 0===d&&(d=Om.defaultThrottleConfig),wm.operate(function(e,t){function r(){var e;i&&(i=!1,e=u,u=null,t.next(e),s||f(e))}var n=d.leading,o=d.trailing,i=!1,u=null,a=null,s=!1,c=function(){null!=a&&a.unsubscribe(),a=null,o&&(r(),s&&t.complete())},l=function(){a=null,s&&t.complete()},f=function(e){return a=Pm.innerFrom(p(e)).subscribe(Em.createOperatorSubscriber(t,c,l))};e.subscribe(Em.createOperatorSubscriber(t,function(e){i=!0,u=e,a&&!a.closed||(n?r():f(e))},function(){s=!0,o&&i&&a&&!a.closed||t.complete()}))})},{}),Tm=(Object.defineProperty(Sm,"__esModule",{value:!0}),Sm.throttleTime=void 0,ju),jm=P,Cm=gf;Sm.throttleTime=function(e,t,r){void 0===r&&(r=jm.defaultThrottleConfig);var n=Cm.timer(e,t=void 0===t?Tm.asyncScheduler:t);return jm.throttle(function(){return n},r)};var Im={},Rm=(Object.defineProperty(Im,"__esModule",{value:!0}),Im.TimeInterval=Im.timeInterval=void 0,ju),km=g,Am=O;Im.timeInterval=function(i){return void 0===i&&(i=Rm.asyncScheduler),km.operate(function(e,n){var o=i.now();e.subscribe(Am.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new Mm(e,r))}))})};var Mm=function(e,t){this.value=e,this.interval=t},Nm=(Im.TimeInterval=Mm,{}),xm=(Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.timeoutWith=void 0,ju),Um=Fs,Dm=es;Nm.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:xm.async,Um.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 Dm.timeout({first:n,each:o,scheduler:r,with:e})};var Fs={},Lm=(Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.timestamp=void 0,Ct),Fm=Uc;Fs.timestamp=function(t){return void 0===t&&(t=Lm.dateTimestampProvider),Fm.map(function(e){return{value:e,timestamp:t.now()}})};var Ct={},Bm=(Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.window=void 0,E),Wm=g,zm=O,qm=t,Vm=j;Ct.window=function(o){return Wm.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new Bm.Subject;t.next(n.asObservable());return e.subscribe(zm.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),Vm.innerFrom(o).subscribe(zm.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new Bm.Subject)},qm.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var Hm={},Gm=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ym=(Object.defineProperty(Hm,"__esModule",{value:!0}),Hm.windowCount=void 0,E),Km=g,Zm=O;Hm.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return Km.operate(function(e,i){var u=[new Ym.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(Zm.createOperatorSubscriber(i,function(e){try{for(var t=Gm(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 Ym.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 Qm={},Xm=(Object.defineProperty(Qm,"__esModule",{value:!0}),Qm.windowTime=void 0,E),Jm=ju,$m=v,e0=g,t0=O,r0=Bt,n0=T,o0=Ts;Qm.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=n0.popScheduler(t))?e:Jm.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return e0.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(),r0.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new $m.Subscription,n.add(e),t=new Xm.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),o0.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?o0.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(t0.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 Ts={},i0=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.")},u0=(Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.windowToggle=void 0,E),a0=v,s0=g,c0=j,l0=O,f0=t,p0=Bt;Ts.windowToggle=function(t,a){return s0.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];c0.innerFrom(t).subscribe(l0.createOperatorSubscriber(o,function(e){var t,r=new u0.Subject,n=(u.push(r),new a0.Subscription);try{t=c0.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(l0.createOperatorSubscriber(o,function(){p0.arrRemove(u,r),r.complete(),n.unsubscribe()},f0.noop,i)))},f0.noop)),e.subscribe(l0.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=i0(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 Bt={},d0=(Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.windowWhen=void 0,E),h0=g,b0=O,y0=j;Bt.windowWhen=function(u){return h0.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 d0.Subject,t.next(r.asObservable());try{e=y0.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=b0.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(b0.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var _0={},v0=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},m0=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},g0=(Object.defineProperty(_0,"__esModule",{value:!0}),_0.withLatestFrom=void 0,g),O0=O,w0=j,E0=h,P0=t,S0=T;_0.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=S0.popResultSelector(a);return g0.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){w0.innerFrom(a[t]).subscribe(O0.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(E0.identity))&&(o=null))},P0.noop))}(u);e.subscribe(O0.createOperatorSubscriber(r,function(e){i&&(e=m0([e],v0(n)),r.next(s?s.apply(void 0,m0([],v0(e))):e))}))})};var O={},T0=(Object.defineProperty(O,"__esModule",{value:!0}),O.zipAll=void 0,fp),j0=C;O.zipAll=function(e){return j0.joinAllInternals(T0.zip,e)};var j={},T={},C0=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},I0=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},R0=(Object.defineProperty(T,"__esModule",{value:!0}),T.zip=void 0,fp),k0=g;T.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return k0.operate(function(e,t){R0.zip.apply(void 0,I0([e],C0(r))).subscribe(t)})};var A0,M0,N0,x0,U0,D0,L0,F0,B0,W0,z0,q0,V0,H0,G0,Y0,K0,Z0,Q0,X0,J0,$0,eg,tg,rg,ng,og,ig,ug,ag,sg,cg,lg,fg,pg,dg,hg,bg,yg,_g,vg,mg,gg,Og,wg,Eg,Pg,Sg,Tg,jg,Cg,Ig,Rg,kg,Ag,Mg,Ng,xg,Ug,Dg,Lg,Fg,Bg,Wg,zg,qg,Vg,Hg,Gg,Yg,Kg,Zg,Qg,Xg,Jg,$g,eO,tO,rO,nO,oO,iO,uO,aO,sO,cO,lO,fO,pO,dO,hO,bO,yO,_O,vO,mO,gO,OO,wO,EO,PO,SO,TO,jO,CO,IO,RO,kO,AO,MO,NO,xO,UO,DO,LO,FO,BO,WO,zO,qO,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,Iw,Rw,kw,Aw,Mw,Nw,xw,Uw,Dw,Lw=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},Fw=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},Bw=(Object.defineProperty(j,"__esModule",{value:!0}),j.zipWith=void 0,T);j.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Bw.zip.apply(void 0,Fw([],Lw(e)))},C=Lr,A0=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)||A0(t,e,r)},Object.defineProperty(C,"__esModule",{value:!0}),C.interval=C.iif=C.generate=C.fromEventPattern=C.fromEvent=C.from=C.forkJoin=C.empty=C.defer=C.connectable=C.concat=C.combineLatest=C.bindNodeCallback=C.bindCallback=C.UnsubscriptionError=C.TimeoutError=C.SequenceError=C.ObjectUnsubscribedError=C.NotFoundError=C.EmptyError=C.ArgumentOutOfRangeError=C.firstValueFrom=C.lastValueFrom=C.isObservable=C.identity=C.noop=C.pipe=C.NotificationKind=C.Notification=C.Subscriber=C.Subscription=C.Scheduler=C.VirtualAction=C.VirtualTimeScheduler=C.animationFrameScheduler=C.animationFrame=C.queueScheduler=C.queue=C.asyncScheduler=C.async=C.asapScheduler=C.asap=C.AsyncSubject=C.ReplaySubject=C.BehaviorSubject=C.Subject=C.animationFrames=C.observable=C.ConnectableObservable=C.Observable=void 0,C.filter=C.expand=C.exhaustMap=C.exhaustAll=C.exhaust=C.every=C.endWith=C.elementAt=C.distinctUntilKeyChanged=C.distinctUntilChanged=C.distinct=C.dematerialize=C.delayWhen=C.delay=C.defaultIfEmpty=C.debounceTime=C.debounce=C.count=C.connect=C.concatWith=C.concatMapTo=C.concatMap=C.concatAll=C.combineLatestWith=C.combineLatestAll=C.combineAll=C.catchError=C.bufferWhen=C.bufferToggle=C.bufferTime=C.bufferCount=C.buffer=C.auditTime=C.audit=C.config=C.NEVER=C.EMPTY=C.scheduled=C.zip=C.using=C.timer=C.throwError=C.range=C.race=C.partition=C.pairs=C.onErrorResumeNext=C.of=C.never=C.merge=void 0,C.switchMap=C.switchAll=C.subscribeOn=C.startWith=C.skipWhile=C.skipUntil=C.skipLast=C.skip=C.single=C.shareReplay=C.share=C.sequenceEqual=C.scan=C.sampleTime=C.sample=C.refCount=C.retryWhen=C.retry=C.repeatWhen=C.repeat=C.reduce=C.raceWith=C.publishReplay=C.publishLast=C.publishBehavior=C.publish=C.pluck=C.pairwise=C.onErrorResumeNextWith=C.observeOn=C.multicast=C.min=C.mergeWith=C.mergeScan=C.mergeMapTo=C.mergeMap=C.flatMap=C.mergeAll=C.max=C.materialize=C.mapTo=C.map=C.last=C.isEmpty=C.ignoreElements=C.groupBy=C.first=C.findIndex=C.find=C.finalize=void 0,C.zipWith=C.zipAll=C.withLatestFrom=C.windowWhen=C.windowToggle=C.windowTime=C.windowCount=C.window=C.toArray=C.timestamp=C.timeoutWith=C.timeout=C.timeInterval=C.throwIfEmpty=C.throttleTime=C.throttle=C.tap=C.takeWhile=C.takeUntil=C.takeLast=C.take=C.switchScan=C.switchMapTo=void 0,M0=w,Object.defineProperty(C,"Observable",{enumerable:!0,get:function(){return M0.Observable}}),N0=jt,Object.defineProperty(C,"ConnectableObservable",{enumerable:!0,get:function(){return N0.ConnectableObservable}}),x0=n,Object.defineProperty(C,"observable",{enumerable:!0,get:function(){return x0.observable}}),U0=f,Object.defineProperty(C,"animationFrames",{enumerable:!0,get:function(){return U0.animationFrames}}),D0=E,Object.defineProperty(C,"Subject",{enumerable:!0,get:function(){return D0.Subject}}),L0=p,Object.defineProperty(C,"BehaviorSubject",{enumerable:!0,get:function(){return L0.BehaviorSubject}}),F0=i,Object.defineProperty(C,"ReplaySubject",{enumerable:!0,get:function(){return F0.ReplaySubject}}),B0=b,Object.defineProperty(C,"AsyncSubject",{enumerable:!0,get:function(){return B0.AsyncSubject}}),W0=l,Object.defineProperty(C,"asap",{enumerable:!0,get:function(){return W0.asap}}),Object.defineProperty(C,"asapScheduler",{enumerable:!0,get:function(){return W0.asapScheduler}}),z0=ju,Object.defineProperty(C,"async",{enumerable:!0,get:function(){return z0.async}}),Object.defineProperty(C,"asyncScheduler",{enumerable:!0,get:function(){return z0.asyncScheduler}}),q0=$u,Object.defineProperty(C,"queue",{enumerable:!0,get:function(){return q0.queue}}),Object.defineProperty(C,"queueScheduler",{enumerable:!0,get:function(){return q0.queueScheduler}}),V0=ca,Object.defineProperty(C,"animationFrame",{enumerable:!0,get:function(){return V0.animationFrame}}),Object.defineProperty(C,"animationFrameScheduler",{enumerable:!0,get:function(){return V0.animationFrameScheduler}}),H0=da,Object.defineProperty(C,"VirtualTimeScheduler",{enumerable:!0,get:function(){return H0.VirtualTimeScheduler}}),Object.defineProperty(C,"VirtualAction",{enumerable:!0,get:function(){return H0.VirtualAction}}),G0=xu,Object.defineProperty(C,"Scheduler",{enumerable:!0,get:function(){return G0.Scheduler}}),Y0=v,Object.defineProperty(C,"Subscription",{enumerable:!0,get:function(){return Y0.Subscription}}),K0=X,Object.defineProperty(C,"Subscriber",{enumerable:!0,get:function(){return K0.Subscriber}}),Z0=Cu,Object.defineProperty(C,"Notification",{enumerable:!0,get:function(){return Z0.Notification}}),Object.defineProperty(C,"NotificationKind",{enumerable:!0,get:function(){return Z0.NotificationKind}}),Q0=o,Object.defineProperty(C,"pipe",{enumerable:!0,get:function(){return Q0.pipe}}),X0=t,Object.defineProperty(C,"noop",{enumerable:!0,get:function(){return X0.noop}}),J0=h,Object.defineProperty(C,"identity",{enumerable:!0,get:function(){return J0.identity}}),$0=Qa,Object.defineProperty(C,"isObservable",{enumerable:!0,get:function(){return $0.isObservable}}),eg=qa,Object.defineProperty(C,"lastValueFrom",{enumerable:!0,get:function(){return eg.lastValueFrom}}),tg=Ga,Object.defineProperty(C,"firstValueFrom",{enumerable:!0,get:function(){return tg.firstValueFrom}}),rg=Ka,Object.defineProperty(C,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return rg.ArgumentOutOfRangeError}}),ng=Wa,Object.defineProperty(C,"EmptyError",{enumerable:!0,get:function(){return ng.EmptyError}}),og=Ks,Object.defineProperty(C,"NotFoundError",{enumerable:!0,get:function(){return og.NotFoundError}}),ig=Q,Object.defineProperty(C,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return ig.ObjectUnsubscribedError}}),ug=xs,Object.defineProperty(C,"SequenceError",{enumerable:!0,get:function(){return ug.SequenceError}}),ag=es,Object.defineProperty(C,"TimeoutError",{enumerable:!0,get:function(){return ag.TimeoutError}}),sg=y,Object.defineProperty(C,"UnsubscriptionError",{enumerable:!0,get:function(){return sg.UnsubscriptionError}}),cg=Za,Object.defineProperty(C,"bindCallback",{enumerable:!0,get:function(){return cg.bindCallback}}),lg=Jc,Object.defineProperty(C,"bindNodeCallback",{enumerable:!0,get:function(){return lg.bindNodeCallback}}),fg=_,Object.defineProperty(C,"combineLatest",{enumerable:!0,get:function(){return fg.combineLatest}}),pg=_l,Object.defineProperty(C,"concat",{enumerable:!0,get:function(){return pg.concat}}),dg=Ul,Object.defineProperty(C,"connectable",{enumerable:!0,get:function(){return dg.connectable}}),hg=Dl,Object.defineProperty(C,"defer",{enumerable:!0,get:function(){return hg.defer}}),bg=Tu,Object.defineProperty(C,"empty",{enumerable:!0,get:function(){return bg.empty}}),yg=Vl,Object.defineProperty(C,"forkJoin",{enumerable:!0,get:function(){return yg.forkJoin}}),_g=Da,Object.defineProperty(C,"from",{enumerable:!0,get:function(){return _g.from}}),vg=el,Object.defineProperty(C,"fromEvent",{enumerable:!0,get:function(){return vg.fromEvent}}),mg=il,Object.defineProperty(C,"fromEventPattern",{enumerable:!0,get:function(){return mg.fromEventPattern}}),gg=Ba,Object.defineProperty(C,"generate",{enumerable:!0,get:function(){return gg.generate}}),Og=Ws,Object.defineProperty(C,"iif",{enumerable:!0,get:function(){return Og.iif}}),wg=mf,Object.defineProperty(C,"interval",{enumerable:!0,get:function(){return wg.interval}}),Eg=Aa,Object.defineProperty(C,"merge",{enumerable:!0,get:function(){return Eg.merge}}),Pg=Mf,Object.defineProperty(C,"never",{enumerable:!0,get:function(){return Pg.never}}),Sg=s,Object.defineProperty(C,"of",{enumerable:!0,get:function(){return Sg.of}}),Tg=Nf,Object.defineProperty(C,"onErrorResumeNext",{enumerable:!0,get:function(){return Tg.onErrorResumeNext}}),jg=zf,Object.defineProperty(C,"pairs",{enumerable:!0,get:function(){return jg.pairs}}),Cg=Vf,Object.defineProperty(C,"partition",{enumerable:!0,get:function(){return Cg.partition}}),Ig=Jf,Object.defineProperty(C,"race",{enumerable:!0,get:function(){return Ig.race}}),Rg=op,Object.defineProperty(C,"range",{enumerable:!0,get:function(){return Rg.range}}),kg=Fa,Object.defineProperty(C,"throwError",{enumerable:!0,get:function(){return kg.throwError}}),Ag=gf,Object.defineProperty(C,"timer",{enumerable:!0,get:function(){return Ag.timer}}),Mg=ap,Object.defineProperty(C,"using",{enumerable:!0,get:function(){return Mg.using}}),Ng=fp,Object.defineProperty(C,"zip",{enumerable:!0,get:function(){return Ng.zip}}),xg=La,Object.defineProperty(C,"scheduled",{enumerable:!0,get:function(){return xg.scheduled}}),Ug=Tu,Object.defineProperty(C,"EMPTY",{enumerable:!0,get:function(){return Ug.EMPTY}}),Dg=Mf,Object.defineProperty(C,"NEVER",{enumerable:!0,get:function(){return Dg.NEVER}}),g(gp,C),Lg=u,Object.defineProperty(C,"config",{enumerable:!0,get:function(){return Lg.config}}),Fg=Op,Object.defineProperty(C,"audit",{enumerable:!0,get:function(){return Fg.audit}}),Bg=Sp,Object.defineProperty(C,"auditTime",{enumerable:!0,get:function(){return Bg.auditTime}}),Wg=Ip,Object.defineProperty(C,"buffer",{enumerable:!0,get:function(){return Wg.buffer}}),zg=Np,Object.defineProperty(C,"bufferCount",{enumerable:!0,get:function(){return zg.bufferCount}}),qg=Fp,Object.defineProperty(C,"bufferTime",{enumerable:!0,get:function(){return qg.bufferTime}}),Vg=Kp,Object.defineProperty(C,"bufferToggle",{enumerable:!0,get:function(){return Vg.bufferToggle}}),Hg=rd,Object.defineProperty(C,"bufferWhen",{enumerable:!0,get:function(){return Hg.bufferWhen}}),Gg=ad,Object.defineProperty(C,"catchError",{enumerable:!0,get:function(){return Gg.catchError}}),Yg=fd,Object.defineProperty(C,"combineAll",{enumerable:!0,get:function(){return Yg.combineAll}}),Kg=pd,Object.defineProperty(C,"combineLatestAll",{enumerable:!0,get:function(){return Kg.combineLatestAll}}),Zg=Cd,Object.defineProperty(C,"combineLatestWith",{enumerable:!0,get:function(){return Zg.combineLatestWith}}),Qg=vl,Object.defineProperty(C,"concatAll",{enumerable:!0,get:function(){return Qg.concatAll}}),Xg=xc,Object.defineProperty(C,"concatMap",{enumerable:!0,get:function(){return Xg.concatMap}}),Jg=Vd,Object.defineProperty(C,"concatMapTo",{enumerable:!0,get:function(){return Jg.concatMapTo}}),$g=Yd,Object.defineProperty(C,"concatWith",{enumerable:!0,get:function(){return $g.concatWith}}),eO=oh,Object.defineProperty(C,"connect",{enumerable:!0,get:function(){return eO.connect}}),tO=ih,Object.defineProperty(C,"count",{enumerable:!0,get:function(){return tO.count}}),rO=dh,Object.defineProperty(C,"debounce",{enumerable:!0,get:function(){return rO.debounce}}),nO=R,Object.defineProperty(C,"debounceTime",{enumerable:!0,get:function(){return nO.debounceTime}}),oO=Oh,Object.defineProperty(C,"defaultIfEmpty",{enumerable:!0,get:function(){return oO.defaultIfEmpty}}),iO=Ph,Object.defineProperty(C,"delay",{enumerable:!0,get:function(){return iO.delay}}),uO=Sh,Object.defineProperty(C,"delayWhen",{enumerable:!0,get:function(){return uO.delayWhen}}),aO=Hh,Object.defineProperty(C,"dematerialize",{enumerable:!0,get:function(){return aO.dematerialize}}),sO=Zh,Object.defineProperty(C,"distinct",{enumerable:!0,get:function(){return sO.distinct}}),cO=eb,Object.defineProperty(C,"distinctUntilChanged",{enumerable:!0,get:function(){return cO.distinctUntilChanged}}),lO=ib,Object.defineProperty(C,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return lO.distinctUntilKeyChanged}}),fO=ab,Object.defineProperty(C,"elementAt",{enumerable:!0,get:function(){return fO.elementAt}}),pO=vb,Object.defineProperty(C,"endWith",{enumerable:!0,get:function(){return pO.endWith}}),dO=Eb,Object.defineProperty(C,"every",{enumerable:!0,get:function(){return dO.every}}),hO=Tb,Object.defineProperty(C,"exhaust",{enumerable:!0,get:function(){return hO.exhaust}}),bO=jb,Object.defineProperty(C,"exhaustAll",{enumerable:!0,get:function(){return bO.exhaustAll}}),yO=Cb,Object.defineProperty(C,"exhaustMap",{enumerable:!0,get:function(){return yO.exhaustMap}}),_O=xb,Object.defineProperty(C,"expand",{enumerable:!0,get:function(){return _O.expand}}),vO=Gf,Object.defineProperty(C,"filter",{enumerable:!0,get:function(){return vO.filter}}),mO=Lb,Object.defineProperty(C,"finalize",{enumerable:!0,get:function(){return mO.finalize}}),gO=Bb,Object.defineProperty(C,"find",{enumerable:!0,get:function(){return gO.find}}),OO=Vb,Object.defineProperty(C,"findIndex",{enumerable:!0,get:function(){return OO.findIndex}}),wO=Yb,Object.defineProperty(C,"first",{enumerable:!0,get:function(){return wO.first}}),EO=ey,Object.defineProperty(C,"groupBy",{enumerable:!0,get:function(){return EO.groupBy}}),PO=Rh,Object.defineProperty(C,"ignoreElements",{enumerable:!0,get:function(){return PO.ignoreElements}}),SO=uy,Object.defineProperty(C,"isEmpty",{enumerable:!0,get:function(){return SO.isEmpty}}),TO=cy,Object.defineProperty(C,"last",{enumerable:!0,get:function(){return TO.last}}),jO=Uc,Object.defineProperty(C,"map",{enumerable:!0,get:function(){return jO.map}}),CO=Nh,Object.defineProperty(C,"mapTo",{enumerable:!0,get:function(){return CO.mapTo}}),IO=Oy,Object.defineProperty(C,"materialize",{enumerable:!0,get:function(){return IO.materialize}}),RO=Sy,Object.defineProperty(C,"max",{enumerable:!0,get:function(){return RO.max}}),kO=ml,Object.defineProperty(C,"mergeAll",{enumerable:!0,get:function(){return kO.mergeAll}}),AO=Cy,Object.defineProperty(C,"flatMap",{enumerable:!0,get:function(){return AO.flatMap}}),MO=gl,Object.defineProperty(C,"mergeMap",{enumerable:!0,get:function(){return MO.mergeMap}}),NO=Iy,Object.defineProperty(C,"mergeMapTo",{enumerable:!0,get:function(){return NO.mergeMapTo}}),xO=Ay,Object.defineProperty(C,"mergeScan",{enumerable:!0,get:function(){return xO.mergeScan}}),UO=Ol,Object.defineProperty(C,"mergeWith",{enumerable:!0,get:function(){return UO.mergeWith}}),DO=Gy,Object.defineProperty(C,"min",{enumerable:!0,get:function(){return DO.min}}),LO=Zy,Object.defineProperty(C,"multicast",{enumerable:!0,get:function(){return LO.multicast}}),FO=S,Object.defineProperty(C,"observeOn",{enumerable:!0,get:function(){return FO.observeOn}}),BO=$y,Object.defineProperty(C,"onErrorResumeNextWith",{enumerable:!0,get:function(){return BO.onErrorResumeNextWith}}),WO=i_,Object.defineProperty(C,"pairwise",{enumerable:!0,get:function(){return WO.pairwise}}),zO=s_,Object.defineProperty(C,"pluck",{enumerable:!0,get:function(){return zO.pluck}}),qO=l_,Object.defineProperty(C,"publish",{enumerable:!0,get:function(){return qO.publish}}),VO=h_,Object.defineProperty(C,"publishBehavior",{enumerable:!0,get:function(){return VO.publishBehavior}}),HO=__,Object.defineProperty(C,"publishLast",{enumerable:!0,get:function(){return HO.publishLast}}),GO=g_,Object.defineProperty(C,"publishReplay",{enumerable:!0,get:function(){return GO.publishReplay}}),YO=P_,Object.defineProperty(C,"raceWith",{enumerable:!0,get:function(){return YO.raceWith}}),KO=I,Object.defineProperty(C,"reduce",{enumerable:!0,get:function(){return KO.reduce}}),ZO=R_,Object.defineProperty(C,"repeat",{enumerable:!0,get:function(){return ZO.repeat}}),QO=U_,Object.defineProperty(C,"repeatWhen",{enumerable:!0,get:function(){return QO.repeatWhen}}),XO=W_,Object.defineProperty(C,"retry",{enumerable:!0,get:function(){return XO.retry}}),JO=Y_,Object.defineProperty(C,"retryWhen",{enumerable:!0,get:function(){return JO.retryWhen}}),$O=m,Object.defineProperty(C,"refCount",{enumerable:!0,get:function(){return $O.refCount}}),ew=J_,Object.defineProperty(C,"sample",{enumerable:!0,get:function(){return ew.sample}}),tw=nv,Object.defineProperty(C,"sampleTime",{enumerable:!0,get:function(){return tw.sampleTime}}),rw=av,Object.defineProperty(C,"scan",{enumerable:!0,get:function(){return rw.scan}}),nw=hd,Object.defineProperty(C,"sequenceEqual",{enumerable:!0,get:function(){return nw.sequenceEqual}}),ow=hv,Object.defineProperty(C,"share",{enumerable:!0,get:function(){return ow.share}}),iw=wv,Object.defineProperty(C,"shareReplay",{enumerable:!0,get:function(){return iw.shareReplay}}),uw=Sv,Object.defineProperty(C,"single",{enumerable:!0,get:function(){return uw.single}}),aw=kv,Object.defineProperty(C,"skip",{enumerable:!0,get:function(){return aw.skip}}),sw=Mv,Object.defineProperty(C,"skipLast",{enumerable:!0,get:function(){return sw.skipLast}}),cw=Dv,Object.defineProperty(C,"skipUntil",{enumerable:!0,get:function(){return cw.skipUntil}}),lw=zv,Object.defineProperty(C,"skipWhile",{enumerable:!0,get:function(){return lw.skipWhile}}),fw=Hv,Object.defineProperty(C,"startWith",{enumerable:!0,get:function(){return fw.startWith}}),pw=Rs,Object.defineProperty(C,"subscribeOn",{enumerable:!0,get:function(){return pw.subscribeOn}}),dw=Zv,Object.defineProperty(C,"switchAll",{enumerable:!0,get:function(){return dw.switchAll}}),hw=Qv,Object.defineProperty(C,"switchMap",{enumerable:!0,get:function(){return hw.switchMap}}),bw=rm,Object.defineProperty(C,"switchMapTo",{enumerable:!0,get:function(){return bw.switchMapTo}}),yw=im,Object.defineProperty(C,"switchScan",{enumerable:!0,get:function(){return yw.switchScan}}),_w=Th,Object.defineProperty(C,"take",{enumerable:!0,get:function(){return _w.take}}),vw=ly,Object.defineProperty(C,"takeLast",{enumerable:!0,get:function(){return vw.takeLast}}),mw=sm,Object.defineProperty(C,"takeUntil",{enumerable:!0,get:function(){return mw.takeUntil}}),gw=dm,Object.defineProperty(C,"takeWhile",{enumerable:!0,get:function(){return gw.takeWhile}}),Ow=ym,Object.defineProperty(C,"tap",{enumerable:!0,get:function(){return Ow.tap}}),ww=P,Object.defineProperty(C,"throttle",{enumerable:!0,get:function(){return ww.throttle}}),Ew=Sm,Object.defineProperty(C,"throttleTime",{enumerable:!0,get:function(){return Ew.throttleTime}}),Pw=sb,Object.defineProperty(C,"throwIfEmpty",{enumerable:!0,get:function(){return Pw.throwIfEmpty}}),Sw=Im,Object.defineProperty(C,"timeInterval",{enumerable:!0,get:function(){return Sw.timeInterval}}),Tw=es,Object.defineProperty(C,"timeout",{enumerable:!0,get:function(){return Tw.timeout}}),jw=Nm,Object.defineProperty(C,"timeoutWith",{enumerable:!0,get:function(){return jw.timeoutWith}}),Cw=Fs,Object.defineProperty(C,"timestamp",{enumerable:!0,get:function(){return Cw.timestamp}}),Iw=dd,Object.defineProperty(C,"toArray",{enumerable:!0,get:function(){return Iw.toArray}}),Rw=Ct,Object.defineProperty(C,"window",{enumerable:!0,get:function(){return Rw.window}}),kw=Hm,Object.defineProperty(C,"windowCount",{enumerable:!0,get:function(){return kw.windowCount}}),Aw=Qm,Object.defineProperty(C,"windowTime",{enumerable:!0,get:function(){return Aw.windowTime}}),Mw=Ts,Object.defineProperty(C,"windowToggle",{enumerable:!0,get:function(){return Mw.windowToggle}}),Nw=Bt,Object.defineProperty(C,"windowWhen",{enumerable:!0,get:function(){return Nw.windowWhen}}),xw=_0,Object.defineProperty(C,"withLatestFrom",{enumerable:!0,get:function(){return xw.withLatestFrom}}),Uw=O,Object.defineProperty(C,"zipAll",{enumerable:!0,get:function(){return Uw.zipAll}}),Dw=j,Object.defineProperty(C,"zipWith",{enumerable:!0,get:function(){return Dw.zipWith}});var w={},jt={},Ww=(Object.defineProperty(jt,"__esModule",{value:!0}),jt.partition=void 0,Hf),zw=Gf;jt.partition=function(t,r){return function(e){return[zw.filter(t,r)(e),zw.filter(Ww.not(t,r))(e)]}};var qw,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,IE,RE,kE,AE,ME,NE,xE,UE,DE,LE,FE,BE,WE,zE,qE,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,IP,RP,kP,AP,MP,NP,xP,UP,DP,LP,FP,BP,WP,zP,qP,VP,HP,GP,YP,n={},KP=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ZP=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},QP=(Object.defineProperty(n,"__esModule",{value:!0}),n.race=void 0,xf),XP=P_;n.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return XP.raceWith.apply(void 0,ZP([],KP(QP.argsOrArgArray(e))))},f=w,Object.defineProperty(f,"__esModule",{value:!0}),f.mergeAll=f.merge=f.max=f.materialize=f.mapTo=f.map=f.last=f.isEmpty=f.ignoreElements=f.groupBy=f.first=f.findIndex=f.find=f.finalize=f.filter=f.expand=f.exhaustMap=f.exhaustAll=f.exhaust=f.every=f.endWith=f.elementAt=f.distinctUntilKeyChanged=f.distinctUntilChanged=f.distinct=f.dematerialize=f.delayWhen=f.delay=f.defaultIfEmpty=f.debounceTime=f.debounce=f.count=f.connect=f.concatWith=f.concatMapTo=f.concatMap=f.concatAll=f.concat=f.combineLatestWith=f.combineLatest=f.combineLatestAll=f.combineAll=f.catchError=f.bufferWhen=f.bufferToggle=f.bufferTime=f.bufferCount=f.buffer=f.auditTime=f.audit=void 0,f.timeInterval=f.throwIfEmpty=f.throttleTime=f.throttle=f.tap=f.takeWhile=f.takeUntil=f.takeLast=f.take=f.switchScan=f.switchMapTo=f.switchMap=f.switchAll=f.subscribeOn=f.startWith=f.skipWhile=f.skipUntil=f.skipLast=f.skip=f.single=f.shareReplay=f.share=f.sequenceEqual=f.scan=f.sampleTime=f.sample=f.refCount=f.retryWhen=f.retry=f.repeatWhen=f.repeat=f.reduce=f.raceWith=f.race=f.publishReplay=f.publishLast=f.publishBehavior=f.publish=f.pluck=f.partition=f.pairwise=f.onErrorResumeNext=f.observeOn=f.multicast=f.min=f.mergeWith=f.mergeScan=f.mergeMapTo=f.mergeMap=f.flatMap=void 0,f.zipWith=f.zipAll=f.zip=f.withLatestFrom=f.windowWhen=f.windowToggle=f.windowTime=f.windowCount=f.window=f.toArray=f.timestamp=f.timeoutWith=f.timeout=void 0,qw=Op,Object.defineProperty(f,"audit",{enumerable:!0,get:function(){return qw.audit}}),Vw=Sp,Object.defineProperty(f,"auditTime",{enumerable:!0,get:function(){return Vw.auditTime}}),Hw=Ip,Object.defineProperty(f,"buffer",{enumerable:!0,get:function(){return Hw.buffer}}),Gw=Np,Object.defineProperty(f,"bufferCount",{enumerable:!0,get:function(){return Gw.bufferCount}}),Yw=Fp,Object.defineProperty(f,"bufferTime",{enumerable:!0,get:function(){return Yw.bufferTime}}),Kw=Kp,Object.defineProperty(f,"bufferToggle",{enumerable:!0,get:function(){return Kw.bufferToggle}}),Zw=rd,Object.defineProperty(f,"bufferWhen",{enumerable:!0,get:function(){return Zw.bufferWhen}}),Qw=ad,Object.defineProperty(f,"catchError",{enumerable:!0,get:function(){return Qw.catchError}}),Xw=fd,Object.defineProperty(f,"combineAll",{enumerable:!0,get:function(){return Xw.combineAll}}),Jw=pd,Object.defineProperty(f,"combineLatestAll",{enumerable:!0,get:function(){return Jw.combineLatestAll}}),$w=Id,Object.defineProperty(f,"combineLatest",{enumerable:!0,get:function(){return $w.combineLatest}}),eE=Cd,Object.defineProperty(f,"combineLatestWith",{enumerable:!0,get:function(){return eE.combineLatestWith}}),tE=Kd,Object.defineProperty(f,"concat",{enumerable:!0,get:function(){return tE.concat}}),rE=vl,Object.defineProperty(f,"concatAll",{enumerable:!0,get:function(){return rE.concatAll}}),nE=xc,Object.defineProperty(f,"concatMap",{enumerable:!0,get:function(){return nE.concatMap}}),oE=Vd,Object.defineProperty(f,"concatMapTo",{enumerable:!0,get:function(){return oE.concatMapTo}}),iE=Yd,Object.defineProperty(f,"concatWith",{enumerable:!0,get:function(){return iE.concatWith}}),uE=oh,Object.defineProperty(f,"connect",{enumerable:!0,get:function(){return uE.connect}}),aE=ih,Object.defineProperty(f,"count",{enumerable:!0,get:function(){return aE.count}}),sE=dh,Object.defineProperty(f,"debounce",{enumerable:!0,get:function(){return sE.debounce}}),cE=R,Object.defineProperty(f,"debounceTime",{enumerable:!0,get:function(){return cE.debounceTime}}),lE=Oh,Object.defineProperty(f,"defaultIfEmpty",{enumerable:!0,get:function(){return lE.defaultIfEmpty}}),fE=Ph,Object.defineProperty(f,"delay",{enumerable:!0,get:function(){return fE.delay}}),pE=Sh,Object.defineProperty(f,"delayWhen",{enumerable:!0,get:function(){return pE.delayWhen}}),dE=Hh,Object.defineProperty(f,"dematerialize",{enumerable:!0,get:function(){return dE.dematerialize}}),hE=Zh,Object.defineProperty(f,"distinct",{enumerable:!0,get:function(){return hE.distinct}}),bE=eb,Object.defineProperty(f,"distinctUntilChanged",{enumerable:!0,get:function(){return bE.distinctUntilChanged}}),yE=ib,Object.defineProperty(f,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return yE.distinctUntilKeyChanged}}),_E=ab,Object.defineProperty(f,"elementAt",{enumerable:!0,get:function(){return _E.elementAt}}),vE=vb,Object.defineProperty(f,"endWith",{enumerable:!0,get:function(){return vE.endWith}}),mE=Eb,Object.defineProperty(f,"every",{enumerable:!0,get:function(){return mE.every}}),gE=Tb,Object.defineProperty(f,"exhaust",{enumerable:!0,get:function(){return gE.exhaust}}),OE=jb,Object.defineProperty(f,"exhaustAll",{enumerable:!0,get:function(){return OE.exhaustAll}}),wE=Cb,Object.defineProperty(f,"exhaustMap",{enumerable:!0,get:function(){return wE.exhaustMap}}),EE=xb,Object.defineProperty(f,"expand",{enumerable:!0,get:function(){return EE.expand}}),PE=Gf,Object.defineProperty(f,"filter",{enumerable:!0,get:function(){return PE.filter}}),SE=Lb,Object.defineProperty(f,"finalize",{enumerable:!0,get:function(){return SE.finalize}}),TE=Bb,Object.defineProperty(f,"find",{enumerable:!0,get:function(){return TE.find}}),jE=Vb,Object.defineProperty(f,"findIndex",{enumerable:!0,get:function(){return jE.findIndex}}),CE=Yb,Object.defineProperty(f,"first",{enumerable:!0,get:function(){return CE.first}}),IE=ey,Object.defineProperty(f,"groupBy",{enumerable:!0,get:function(){return IE.groupBy}}),RE=Rh,Object.defineProperty(f,"ignoreElements",{enumerable:!0,get:function(){return RE.ignoreElements}}),kE=uy,Object.defineProperty(f,"isEmpty",{enumerable:!0,get:function(){return kE.isEmpty}}),AE=cy,Object.defineProperty(f,"last",{enumerable:!0,get:function(){return AE.last}}),ME=Uc,Object.defineProperty(f,"map",{enumerable:!0,get:function(){return ME.map}}),NE=Nh,Object.defineProperty(f,"mapTo",{enumerable:!0,get:function(){return NE.mapTo}}),xE=Oy,Object.defineProperty(f,"materialize",{enumerable:!0,get:function(){return xE.materialize}}),UE=Sy,Object.defineProperty(f,"max",{enumerable:!0,get:function(){return UE.max}}),DE=xy,Object.defineProperty(f,"merge",{enumerable:!0,get:function(){return DE.merge}}),LE=ml,Object.defineProperty(f,"mergeAll",{enumerable:!0,get:function(){return LE.mergeAll}}),FE=Cy,Object.defineProperty(f,"flatMap",{enumerable:!0,get:function(){return FE.flatMap}}),BE=gl,Object.defineProperty(f,"mergeMap",{enumerable:!0,get:function(){return BE.mergeMap}}),WE=Iy,Object.defineProperty(f,"mergeMapTo",{enumerable:!0,get:function(){return WE.mergeMapTo}}),zE=Ay,Object.defineProperty(f,"mergeScan",{enumerable:!0,get:function(){return zE.mergeScan}}),qE=Ol,Object.defineProperty(f,"mergeWith",{enumerable:!0,get:function(){return qE.mergeWith}}),VE=Gy,Object.defineProperty(f,"min",{enumerable:!0,get:function(){return VE.min}}),HE=Zy,Object.defineProperty(f,"multicast",{enumerable:!0,get:function(){return HE.multicast}}),GE=S,Object.defineProperty(f,"observeOn",{enumerable:!0,get:function(){return GE.observeOn}}),YE=$y,Object.defineProperty(f,"onErrorResumeNext",{enumerable:!0,get:function(){return YE.onErrorResumeNext}}),KE=i_,Object.defineProperty(f,"pairwise",{enumerable:!0,get:function(){return KE.pairwise}}),ZE=jt,Object.defineProperty(f,"partition",{enumerable:!0,get:function(){return ZE.partition}}),QE=s_,Object.defineProperty(f,"pluck",{enumerable:!0,get:function(){return QE.pluck}}),XE=l_,Object.defineProperty(f,"publish",{enumerable:!0,get:function(){return XE.publish}}),JE=h_,Object.defineProperty(f,"publishBehavior",{enumerable:!0,get:function(){return JE.publishBehavior}}),$E=__,Object.defineProperty(f,"publishLast",{enumerable:!0,get:function(){return $E.publishLast}}),eP=g_,Object.defineProperty(f,"publishReplay",{enumerable:!0,get:function(){return eP.publishReplay}}),tP=n,Object.defineProperty(f,"race",{enumerable:!0,get:function(){return tP.race}}),rP=P_,Object.defineProperty(f,"raceWith",{enumerable:!0,get:function(){return rP.raceWith}}),nP=I,Object.defineProperty(f,"reduce",{enumerable:!0,get:function(){return nP.reduce}}),oP=R_,Object.defineProperty(f,"repeat",{enumerable:!0,get:function(){return oP.repeat}}),iP=U_,Object.defineProperty(f,"repeatWhen",{enumerable:!0,get:function(){return iP.repeatWhen}}),uP=W_,Object.defineProperty(f,"retry",{enumerable:!0,get:function(){return uP.retry}}),aP=Y_,Object.defineProperty(f,"retryWhen",{enumerable:!0,get:function(){return aP.retryWhen}}),sP=m,Object.defineProperty(f,"refCount",{enumerable:!0,get:function(){return sP.refCount}}),cP=J_,Object.defineProperty(f,"sample",{enumerable:!0,get:function(){return cP.sample}}),lP=nv,Object.defineProperty(f,"sampleTime",{enumerable:!0,get:function(){return lP.sampleTime}}),fP=av,Object.defineProperty(f,"scan",{enumerable:!0,get:function(){return fP.scan}}),pP=hd,Object.defineProperty(f,"sequenceEqual",{enumerable:!0,get:function(){return pP.sequenceEqual}}),dP=hv,Object.defineProperty(f,"share",{enumerable:!0,get:function(){return dP.share}}),hP=wv,Object.defineProperty(f,"shareReplay",{enumerable:!0,get:function(){return hP.shareReplay}}),bP=Sv,Object.defineProperty(f,"single",{enumerable:!0,get:function(){return bP.single}}),yP=kv,Object.defineProperty(f,"skip",{enumerable:!0,get:function(){return yP.skip}}),_P=Mv,Object.defineProperty(f,"skipLast",{enumerable:!0,get:function(){return _P.skipLast}}),vP=Dv,Object.defineProperty(f,"skipUntil",{enumerable:!0,get:function(){return vP.skipUntil}}),mP=zv,Object.defineProperty(f,"skipWhile",{enumerable:!0,get:function(){return mP.skipWhile}}),gP=Hv,Object.defineProperty(f,"startWith",{enumerable:!0,get:function(){return gP.startWith}}),OP=Rs,Object.defineProperty(f,"subscribeOn",{enumerable:!0,get:function(){return OP.subscribeOn}}),wP=Zv,Object.defineProperty(f,"switchAll",{enumerable:!0,get:function(){return wP.switchAll}}),EP=Qv,Object.defineProperty(f,"switchMap",{enumerable:!0,get:function(){return EP.switchMap}}),PP=rm,Object.defineProperty(f,"switchMapTo",{enumerable:!0,get:function(){return PP.switchMapTo}}),SP=im,Object.defineProperty(f,"switchScan",{enumerable:!0,get:function(){return SP.switchScan}}),TP=Th,Object.defineProperty(f,"take",{enumerable:!0,get:function(){return TP.take}}),jP=ly,Object.defineProperty(f,"takeLast",{enumerable:!0,get:function(){return jP.takeLast}}),CP=sm,Object.defineProperty(f,"takeUntil",{enumerable:!0,get:function(){return CP.takeUntil}}),IP=dm,Object.defineProperty(f,"takeWhile",{enumerable:!0,get:function(){return IP.takeWhile}}),RP=ym,Object.defineProperty(f,"tap",{enumerable:!0,get:function(){return RP.tap}}),kP=P,Object.defineProperty(f,"throttle",{enumerable:!0,get:function(){return kP.throttle}}),AP=Sm,Object.defineProperty(f,"throttleTime",{enumerable:!0,get:function(){return AP.throttleTime}}),MP=sb,Object.defineProperty(f,"throwIfEmpty",{enumerable:!0,get:function(){return MP.throwIfEmpty}}),NP=Im,Object.defineProperty(f,"timeInterval",{enumerable:!0,get:function(){return NP.timeInterval}}),xP=es,Object.defineProperty(f,"timeout",{enumerable:!0,get:function(){return xP.timeout}}),UP=Nm,Object.defineProperty(f,"timeoutWith",{enumerable:!0,get:function(){return UP.timeoutWith}}),DP=Fs,Object.defineProperty(f,"timestamp",{enumerable:!0,get:function(){return DP.timestamp}}),LP=dd,Object.defineProperty(f,"toArray",{enumerable:!0,get:function(){return LP.toArray}}),FP=Ct,Object.defineProperty(f,"window",{enumerable:!0,get:function(){return FP.window}}),BP=Hm,Object.defineProperty(f,"windowCount",{enumerable:!0,get:function(){return BP.windowCount}}),WP=Qm,Object.defineProperty(f,"windowTime",{enumerable:!0,get:function(){return WP.windowTime}}),zP=Ts,Object.defineProperty(f,"windowToggle",{enumerable:!0,get:function(){return zP.windowToggle}}),qP=Bt,Object.defineProperty(f,"windowWhen",{enumerable:!0,get:function(){return qP.windowWhen}}),VP=_0,Object.defineProperty(f,"withLatestFrom",{enumerable:!0,get:function(){return VP.withLatestFrom}}),HP=T,Object.defineProperty(f,"zip",{enumerable:!0,get:function(){return HP.zip}}),GP=O,Object.defineProperty(f,"zipAll",{enumerable:!0,get:function(){return GP.zipAll}}),YP=j,Object.defineProperty(f,"zipWith",{enumerable:!0,get:function(){return YP.zipWith}});var E={},JP=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())})},$P=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}}}},eS=(Object.defineProperty(E,"__esModule",{value:!0}),e),tS=Lr,rS=w,nS=0,oS=1,iS=2;function uS(e,t){e=e.pipe((0,rS.publishReplay)(1),(0,rS.refCount)());this._result=e,this._keys=e.pipe((0,rS.mergeMap)(function(e){return(0,tS.from)(e.keys())}),(0,rS.publishReplay)(1),(0,rS.refCount)()),this._records=void 0,this._controls=new aS,this._summary=new tS.ReplaySubject,this._state=t||nS}uS.prototype.keys=function(){return this._keys},uS.prototype.records=function(){var r=this,e=this._result.pipe((0,rS.mergeMap)(function(t){return new tS.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},uS.prototype.consume=function(){var r=this;return this._result.pipe((0,rS.mergeMap)(function(t){return new tS.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},uS.prototype.pause=function(){this._controls.pause()},uS.prototype.resume=function(){return this._controls.resume()},uS.prototype.push=function(){return this._controls.push()},uS.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<oS?(this._state=oS,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,eS.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},uS.prototype._toObservable=function(){var n=this;return new tS.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new uS((t=e,new tS.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},uS.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new aS);var a=new tS.Subject,s=function(n){return JP(e,void 0,void 0,function(){var t,r;return $P(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 JP(this,void 0,void 0,function(){return $P(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 JP(t,void 0,void 0,function(){var t,r;return $P(this,function(e){switch(e.label){case 0:return this._state=iS,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=iS,t._summary.error(e)}},this._controls),this._records)},E.default=uS;sS.prototype.pause=function(){this._paused=!0},Object.defineProperty(sS.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(sS.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),sS.prototype.resume=function(){return JP(this,void 0,void 0,function(){var t;return $P(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]}})})},sS.prototype.push=function(){return JP(this,void 0,void 0,function(){return $P(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(sS.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var aS=sS;function sS(e){void 0===e&&(e=function(){return JP(t,void 0,void 0,function(){return $P(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var p={},i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cS=(Object.defineProperty(p,"__esModule",{value:!0}),Lr),lS=i(E);function fS(e){this._txc=e}i(e),fS.prototype.run=function(e,r){var n=this;return new lS.default(new cS.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},fS.prototype.commit=function(){var e=this;return new cS.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},fS.prototype.rollback=function(){var e=this;return new cS.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},fS.prototype.isOpen=function(){return this._txc.isOpen()},fS.prototype.close=function(){var e=this;return new cS.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},p.default=fS;b={},l=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function pS(e){e=e.run;this._run=e}Object.defineProperty(b,"__esModule",{value:!0}),l(E),l(p),pS.fromTransaction=function(e){return new pS({run:e.run.bind(e)})},pS.prototype.run=function(e,t){return this._run(e,t)},b.default=pS;var ju={},dS=(Object.defineProperty(ju,"__esModule",{value:!0}),e),hS=Lr,bS=w,yS=(dS.internal.logger.Logger,dS.error.SERVICE_UNAVAILABLE);function _S(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=vS(void 0===t?3e4:t,3e4),this._initialDelay=vS(r,1e3),this._delayMultiplier=vS(n,2),this._delayJitter=vS(o,.2),this._logger=e}function vS(e,t){return e||0===e?e:t}_S.prototype.retry=function(e){var a=this;return e.pipe((0,bS.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,bS.mergeMap)(function(e){if(!(0,dS.isRetriableError)(e))return(0,hS.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,dS.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),yS)).seenErrors=n,(0,hS.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,hS.of)(1).pipe((0,bS.delay)(r))}))}))},_S.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},ju.default=_S;var $u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mS=(Object.defineProperty(Gr,"__esModule",{value:!0}),Lr),gS=w,OS=$u(E),ca=e,wS=$u(p),ES=$u(b),PS=$u(ju),da=ca.internal.constants,SS=da.ACCESS_MODE_READ,TS=da.ACCESS_MODE_WRITE,jS=ca.internal.txConfig.TxConfig;function CS(e){var e=void 0===e?{}:e,t=e.session,e=e.config;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new PS.default({maxRetryTimeout:e})}(e)}CS.prototype.run=function(e,r,n){var o=this;return new OS.default(new mS.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},CS.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e)},CS.prototype.readTransaction=function(e,t){return this._runTransaction(SS,e,t)},CS.prototype.writeTransaction=function(e,t){return this._runTransaction(TS,e,t)},CS.prototype.executeRead=function(e,t){return this._executeInTransaction(SS,e,t)},CS.prototype.executeWrite=function(e,t){return this._executeInTransaction(TS,e,t)},CS.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new ES.default({run:e.run.bind(e)})})},CS.prototype.close=function(){var e=this;return new mS.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},CS.prototype.lastBookmark=function(){return this.lastBookmarks()},CS.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},CS.prototype._beginTransaction=function(e,t){var r=this,n=jS.empty();return t&&(n=new jS(t)),new mS.Observable(function(t){try{r._session._beginTransaction(e,n).then(function(e){t.next(new wS.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},CS.prototype._runTransaction=function(e,r,t,n){void 0===n&&(n=function(e){return e});var o=jS.empty();return t&&(o=new jS(t)),this._retryLogic.retry(this._beginTransaction(e,o).pipe((0,gS.mergeMap)(function(t){return(0,mS.defer)(function(){try{return r(n(t))}catch(e){return(0,mS.throwError)(function(){return e})}}).pipe((0,gS.catchError)(function(e){return t.rollback().pipe((0,gS.concatWith)((0,mS.throwError)(function(){return e})))}),(0,gS.concatWith)(t.commit()))})))},Gr.default=CS;var IS,RS,xu=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)}),v=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},X=(Object.defineProperty(B,"__esModule",{value:!0}),B.WRITE=B.READ=B.Driver=void 0,e),kS=v(Gr),AS=X.internal.constants.FETCH_ALL,Cu=X.driver.READ,MS=X.driver.WRITE,o=(B.READ=Cu,B.WRITE=MS,xu(NS,RS=X.Driver),NS.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,e=e.notificationFilter;return new kS.default({session:this._newSession({defaultAccessMode:void 0===t?MS:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,impersonatedUser:i,reactive:!1,fetchSize:function(e,t){e=parseInt(e,10);{if(0<e||e===AS)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(AS," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:e}),config:this._config})},NS);function NS(){return null!==RS&&RS.apply(this,arguments)||this}B.Driver=o,B.default=o;t={},Object.defineProperty(t,"__esModule",{value:!0}),t.default="5.7.1",h={},Qa={},qa={};function xS(){}Object.defineProperty(qa,"__esModule",{value:!0}),xS.prototype.selectReader=function(e){throw new Error("Abstract function")},xS.prototype.selectWriter=function(e){throw new Error("Abstract function")},qa.default=xS;Ga={},Ka={};function US(e){this._offset=e||0}Object.defineProperty(Ka,"__esModule",{value:!0}),US.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},Ka.default=US;var DS,LS,Wa=r&&r.__extends||(DS=function(e,t){return(DS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}DS(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ks=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},FS=(Object.defineProperty(Ga,"__esModule",{value:!0}),Ks(Ka)),Q=Ks(qa),xs=(LS=Q.default,Wa(BS,LS),BS.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},BS.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},BS.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},BS);function BS(e){var t=LS.call(this)||this;return t._readersIndex=new FS.default,t._writersIndex=new FS.default,t._connectionPool=e,t}Ga.default=xs;y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.LeastConnectedLoadBalancingStrategy=Qa.LoadBalancingStrategy=void 0,Za=y(qa),Qa.LoadBalancingStrategy=Za.default,Jc=y(Ga),Qa.LeastConnectedLoadBalancingStrategy=Jc.default,Qa.default=Jc.default,_={},_l={},Ul={},Dl={},Vl={},Da={},el={},il={byteLength:function(e){var e=YS(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};il.toByteArray=function(e){var t,r,n=YS(e),o=n[0],n=n[1],i=new qS(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=zS[e.charCodeAt(r)]<<18|zS[e.charCodeAt(r+1)]<<12|zS[e.charCodeAt(r+2)]<<6|zS[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=zS[e.charCodeAt(r)]<<2|zS[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=zS[e.charCodeAt(r)]<<10|zS[e.charCodeAt(r+1)]<<4|zS[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},il.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 WS[e>>18&63]+WS[e>>12&63]+WS[e>>6&63]+WS[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(WS[t>>2]+WS[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(WS[t>>10]+WS[t>>4&63]+WS[t<<2&63]+"="));return o.join("")};for(var WS=[],zS=[],qS="undefined"!=typeof Uint8Array?Uint8Array:Array,VS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",HS=0,GS=VS.length;HS<GS;++HS)WS[HS]=VS[HS],zS[VS.charCodeAt(HS)]=HS;function YS(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]}zS["-".charCodeAt(0)]=62,zS["_".charCodeAt(0)]=63;Ba={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 KS=el;const BM=il,WM=Ba,zM=(Ws="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,KS.Buffer=k,KS.SlowBuffer=function(e){+e!=e&&(e=0);return k.alloc(+e)},KS.INSPECT_MAX_BYTES=50,2147483647);function ZS(e){if(e>zM)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 QS(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return JS(e)}function QS(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|r1(n,o);let e=ZS(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return S1(o=t,Uint8Array)?e1((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):$S(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(S1(t,ArrayBuffer)||t&&S1(t.buffer,ArrayBuffer))return e1(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(S1(t,SharedArrayBuffer)||t&&S1(t.buffer,SharedArrayBuffer)))return e1(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|t1(e.length),0===(r=ZS(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||T1(e.length)?ZS(0):$S(e);if("Buffer"===e.type&&Array.isArray(e.data))return $S(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 XS(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 JS(e){return XS(e),ZS(e<0?0:0|t1(e))}function $S(t){var r=t.length<0?0:0|t1(t.length);const n=ZS(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function e1(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 t1(e){if(e>=zM)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+zM.toString(16)+" bytes");return 0|e}function r1(e,t){if(k.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||S1(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 w1(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return E1(e).length;default:if(o)return n?-1:w1(e).length;t=(""+t).toLowerCase(),o=!0}}function n1(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+=GM[o[e]];return t;return}case"utf8":case"utf-8":return c1(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?BM.fromByteArray(d):BM.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 o1(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i1(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=T1(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:u1(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):u1(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function u1(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 a1(e,t,r,n){return P1(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 s1(e,t,r,n){return P1(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 c1(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<=qM)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=qM));return e}}KS.kMaxLength=zM,(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=QS,Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(e,t,r){return t=t,r=r,XS(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?ZS(e).fill(t,r):ZS(e).fill(t):ZS(e)},k.allocUnsafe=JS,k.allocUnsafeSlow=JS,k.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==k.prototype},k.compare=function(r,n){if(S1(r,Uint8Array)&&(r=k.from(r,r.offset,r.byteLength)),S1(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(S1(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=r1,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)o1(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)o1(this,e,e+3),o1(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)o1(this,e,e+7),o1(this,e+1,e+6),o1(this,e+2,e+5),o1(this,e+3,e+4);return this},k.prototype.toLocaleString=k.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?c1(this,0,e):n1.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=KS.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},Ws&&(k.prototype[Ws]=k.prototype.inspect),k.prototype.compare=function(e,t,r,n,o){if(S1(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 i1(this,e,t,r,!0)},k.prototype.lastIndexOf=function(e,t,r){return i1(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(T1(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,P1(w1(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return a1(this,t,r,n);case"base64":return i=this,u=r,o=n,P1(E1(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s1(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 qM=4096;function l1(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 f1(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 p1(e,t,r,n,o){m1(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 d1(e,t,r,n,o){m1(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 h1(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 b1(e,t,r,n,o){return t=+t,r>>>=0,o||h1(e,0,r,4),WM.write(e,t,r,n,23,4),r+4}function y1(e,t,r,n,o){return t=+t,r>>>=0,o||h1(e,0,r,8),WM.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||l1(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||l1(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||l1(e,1,this.length),this[e]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(e,t){return e>>>=0,t||l1(e,2,this.length),this[e]|this[e+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(e,t){return e>>>=0,t||l1(e,2,this.length),this[e]<<8|this[e+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(e,t){return e>>>=0,t||l1(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||l1(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},k.prototype.readBigUInt64LE=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||O1(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=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||O1(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||l1(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||l1(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||l1(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},k.prototype.readInt16LE=function(e,t){e>>>=0,t||l1(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||l1(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||l1(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||l1(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},k.prototype.readBigInt64LE=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||O1(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=j1(function(e){g1(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||O1(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||l1(e,4,this.length),WM.read(this,e,!0,23,4)},k.prototype.readFloatBE=function(e,t){return e>>>=0,t||l1(e,4,this.length),WM.read(this,e,!1,23,4)},k.prototype.readDoubleLE=function(e,t){return e>>>=0,t||l1(e,8,this.length),WM.read(this,e,!0,52,8)},k.prototype.readDoubleBE=function(e,t){return e>>>=0,t||l1(e,8,this.length),WM.read(this,e,!1,52,8)},k.prototype.writeUintLE=k.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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=j1(function(e,t=0){return p1(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=j1(function(e,t=0){return d1(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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||f1(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=j1(function(e,t=0){return p1(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=j1(function(e,t=0){return d1(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeFloatLE=function(e,t,r){return b1(this,e,t,!0,r)},k.prototype.writeFloatBE=function(e,t,r){return b1(this,e,t,!1,r)},k.prototype.writeDoubleLE=function(e,t,r){return y1(this,e,t,!0,r)},k.prototype.writeDoubleBE=function(e,t,r){return y1(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 VM={};function _1(e,t,r){VM[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 v1(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 m1(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 VM.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,g1(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||O1(u,r.length-(n+1))}function g1(e,t){if("number"!=typeof e)throw new VM.ERR_INVALID_ARG_TYPE(t,"number",e)}function O1(e,t,r){if(Math.floor(e)!==e)throw g1(e,r),new VM.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new VM.ERR_BUFFER_OUT_OF_BOUNDS;throw new VM.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}_1("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),_1("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),_1("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=v1(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=v1(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const HM=/[^+/0-9A-Za-z-_]/g;function w1(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 E1(e){return BM.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(HM,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function P1(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 S1(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function T1(e){return e!=e}const GM=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 j1(e){return"undefined"==typeof BigInt?C1:e}function C1(){throw new Error("BigInt not supported")}}var I1,mf={},Aa={},s=r&&r.__extends||(I1=function(e,t){return(I1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}I1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Nf=(Object.defineProperty(Aa,"__esModule",{value:!0}),A.prototype.getUInt8=function(e){throw new Error("Not implemented")},A.prototype.getInt8=function(e){throw new Error("Not implemented")},A.prototype.getFloat64=function(e){throw new Error("Not implemented")},A.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},A.prototype.putInt8=function(e,t){throw new Error("Not implemented")},A.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},A.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},A.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},A.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},A.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},A.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)},A.prototype.getSlice=function(e,t){return new k1(e,t,this)},A.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},A.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},A.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)},A.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)},A.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)},A.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},A.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},A.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},A.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},A.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},A.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},A.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},A.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},A.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},A.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},A.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},A.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},A.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},A.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},A.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},A.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},A.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},A.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},A.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},A.prototype.remaining=function(){return this.length-this.position},A.prototype.hasRemaining=function(){return 0<this.remaining()},A.prototype.reset=function(){this.position=0},A.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},A.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},A);function A(e){this.position=0,this.length=e}Aa.default=Nf;s(A1,R1=Nf),A1.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},A1.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},A1.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},A1.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},A1.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},A1.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var R1,k1=A1;function A1(e,t,r){t=R1.call(this,t)||this;return t._start=e,t._inner=r,t}var M1,N1,zf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Vf=(Object.defineProperty(mf,"__esModule",{value:!0}),mf.BaseBuffer=void 0,zf(Aa)),Jf=(mf.BaseBuffer=Vf.default,mf.default=Vf.default,r&&r.__extends||(M1=function(e,t){return(M1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}M1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),op=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},x1=(Object.defineProperty(Da,"__esModule",{value:!0}),Da.alloc=void 0,op(el)),Fa=op(mf),U1=(N1=Fa.default,Jf(D1,N1),D1.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},D1.prototype.getInt8=function(e){return this._buffer.readInt8(e)},D1.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},D1.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},D1.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},D1.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},D1.prototype.putBytes=function(e,t){var r;t instanceof D1?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):N1.prototype.putBytes.call(this,e,t)},D1.prototype.getSlice=function(e,t){return new D1(this._buffer.slice(e,e+t))},D1);function D1(e){var t=this,e=(e=e)instanceof x1.default.Buffer?e:"number"==typeof e&&"function"==typeof x1.default.Buffer.alloc?x1.default.Buffer.alloc(e):new x1.default.Buffer(e);return(t=N1.call(this,e.length)||this)._buffer=e,t}Da.default=U1,Da.alloc=function(e){return new U1(e)};var gf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},L1=(Object.defineProperty(Vl,"__esModule",{value:!0}),gf(Da)),F1=e,ap=F1.internal.util,B1=ap.ENCRYPTION_OFF,W1=ap.ENCRYPTION_ON;function z1(e,t,r){void 0===t&&(t=q1),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,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===W1}(e),n=function(e){return!1===e.encrypted||e.encrypted===B1}(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,F1.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:"'+B1+'"` 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 L1.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function q1(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}z1.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,F1.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,F1.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))},z1.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof L1.default))throw(0,F1.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()}}},z1.prototype.close=function(){var r=this;return new Promise(function(e,t){r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._clearConnectionTimeout(),r._ws.onclose=function(){return e()},r._ws.close()):e()})},z1.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},z1.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},z1.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},z1.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,F1.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))},z1.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},z1.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},Vl.default=z1;var V1,fp={},La=r&&r.__extends||(V1=function(e,t){return(V1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}V1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(fp,"__esModule",{value:!0});var H1,Tu=e.internal.resolver.BaseHostNameResolver,Mf=(La(G1,H1=Tu),G1.prototype.resolve=function(e){return this._resolveToItself(e)},G1);function G1(){return null!==H1&&H1.apply(this,arguments)||this}fp.default=Mf;var Y1,g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gp=(Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.HostNameResolver=Dl.Channel=void 0,g(Vl)),u=g(fp),C=(Dl.Channel=gp.default,Dl.HostNameResolver=u.default,{}),Hf={},xf=r&&r.__extends||(Y1=function(e,t){return(Y1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Y1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Hf,"__esModule",{value:!0});var K1,Z1=Da,Op=(K1=mf.BaseBuffer,xf(Q1,K1),Q1.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}},Q1.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}},Q1.prototype.getFloat64=function(e){for(var t=(0,Z1.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},Q1);function Q1(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=K1.call(this,r)||this)._buffers=e,t}Hf.default=Op;var X1,J1,Sp=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)}),Ip=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Np=(Object.defineProperty(C,"__esModule",{value:!0}),C.Dechunker=C.Chunker=void 0,Ip(Aa)),$1=Da,eT=Ip(Hf),Fp=(J1=Np.default,Sp(tT,J1),tT.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},tT.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},tT.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},tT.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},tT.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,$1.alloc)(this._bufferSize),this._chunkOpen=!1),this},tT.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},tT.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)},tT.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},tT);function tT(e,t){var r=J1.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,$1.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function rT(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}C.Chunker=Fp,rT.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},rT.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},rT.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)},rT.prototype.CLOSED=function(e){},rT.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 eT.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},rT.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},C.Dechunker=rT;var Kp={},nT=(Object.defineProperty(Kp,"__esModule",{value:!0}),e),rd=nT.internal.util,ad=rd.ENCRYPTION_OFF,fd=rd.ENCRYPTION_ON,oT=nT.error.SERVICE_UNAVAILABLE,iT=[null,void 0,!0,!1,fd,ad],uT=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];Kp.default=function(e,t,r){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==iT.indexOf(e))return e;throw(0,nT.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(iT))}(t),this.trust=function(e){e=e.trust;if(-1!==uT.indexOf(e))return e;throw(0,nT.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(uT))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||oT,this.connectionTimeout=t.connectionTimeout};var aT,sT,pd={},Id={},Cd={exports:{}};function cT(e,t){for(var r in e)t[r]=e[r]}function lT(e,t,r){return sT(e,t,r)}vl=(Kd=Cd).exports,(sT=(aT=el).Buffer).from&&sT.alloc&&sT.allocUnsafe&&sT.allocUnsafeSlow?Kd.exports=aT:(cT(aT,vl),vl.Buffer=lT),lT.prototype=Object.create(sT.prototype),cT(sT,lT),lT.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return sT(e,t,r)},lT.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=sT(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},lT.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return sT(e)},lT.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return aT.SlowBuffer(e)};var fT=Cd.exports.Buffer,pT=fT.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 dT(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||fT.isEncoding!==pT&&pT(e))return t||e;throw new Error("Unknown encoding: "+e)}function hT(e){var t;switch(this.encoding=dT(e),this.encoding){case"utf16le":this.text=_T,this.end=vT,t=4;break;case"utf8":this.fillLast=yT,t=4;break;case"base64":this.text=mT,this.end=gT,t=3;break;default:return this.write=OT,void(this.end=wT)}this.lastNeed=0,this.lastTotal=0,this.lastChar=fT.allocUnsafe(t)}function bT(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function yT(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 _T(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 vT(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 mT(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 gT(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function OT(e){return e.toString(this.encoding)}function wT(e){return e&&e.length?this.write(e):""}(Id.StringDecoder=hT).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||""},hT.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},hT.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=bT(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=bT(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=bT(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)},hT.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 ET,PT,ST,TT,jT,xc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},CT=(Object.defineProperty(pd,"__esModule",{value:!0}),xc(Da)),IT=e,RT=xc(el),kT=new Id.StringDecoder("utf8");pd.default={encode:function(e){return new CT.default((e=e,"function"==typeof RT.default.Buffer.from?RT.default.Buffer.from(e,"utf8"):new RT.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 kT.write(e._buffer)},r=function(){return kT.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,IT.newError)("Don't know how to decode strings from '".concat(e,"'"))}},Vd=Ul,ET=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]}),Yd=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||ET(t,e,r)},PT=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.utf8=Vd.alloc=Vd.ChannelConfig=void 0,Yd(Dl,Vd),Yd(C,Vd),ST=Kp,Object.defineProperty(Vd,"ChannelConfig",{enumerable:!0,get:function(){return PT(ST).default}}),TT=Da,Object.defineProperty(Vd,"alloc",{enumerable:!0,get:function(){return TT.alloc}}),jT=pd,Object.defineProperty(Vd,"utf8",{enumerable:!0,get:function(){return PT(jT).default}}),Object.defineProperty(_l,"__esModule",{value:!0});var AT=Ul,MT=e,NT=1616949271;function xT(e,t){return{major:e,minor:t}}function UT(){var e=[[xT(5,2),xT(5,0)],[xT(4,4),xT(4,2)],xT(4,1),xT(3,0)];if(4<e.length)throw(0,MT.newError)("It should not have more than 4 versions of the protocol");var o=(0,AT.alloc)(20);return o.writeInt32(NT),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}_l.default=function(t){var o=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(o),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw(0,MT.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);r({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(UT())})};var DT,oh={},ih={},dh={},R={},Oh={},Ph=r&&r.__extends||(DT=function(e,t){return(DT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}DT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Sh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Hh=(Object.defineProperty(Oh,"__esModule",{value:!0}),Sh(e),LT.ofRecord=function(e){return null===e?LT.ofNull():new GT(e)},LT.ofMessageResponse=function(e){return null===e?LT.ofNull():new BT(e)},LT.ofNull=function(){return new qT},Object.defineProperty(LT.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(LT.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(LT.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(LT.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),LT);function LT(){}Oh.default=Hh;Ph(WT,FT=Hh),Object.defineProperty(WT.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(WT.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(WT.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(WT.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var FT,BT=WT;function WT(e){var t=FT.call(this)||this;return t._response=e,t}Ph(VT,zT=Hh),Object.defineProperty(VT.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var zT,qT=VT;function VT(){return null!==zT&&zT.apply(this,arguments)||this}Ph(YT,HT=Hh),Object.defineProperty(YT.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(YT.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(YT.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(YT.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var HT,GT=YT;function YT(e){var t=HT.call(this)||this;return t._record=e,t}var KT,Zh=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)}),eb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ZT=(Object.defineProperty(R,"__esModule",{value:!0}),R.ProcedureRouteObserver=R.RouteObserver=R.CompletedObserver=R.FailedObserver=R.ResetObserver=R.LogoffObserver=R.LoginObserver=R.ResultStreamObserver=R.StreamObserver=void 0,e),QT=eb(Oh),XT=ZT.internal.constants.FETCH_ALL,JT=ZT.error.PROTOCOL_ERROR,ib=($T.prototype.onNext=function(e){},$T.prototype.onError=function(e){},$T.prototype.onCompleted=function(e){},$T);function $T(){}R.StreamObserver=ib;Zh(tj,ej=ib),tj.prototype.pause=function(){this._paused=!0},tj.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},tj.prototype.onNext=function(e){var t=new ZT.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))},tj.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},tj.prototype.onError=function(e){this._state.onError(this,e)},tj.prototype.cancel=function(){this._discard=!0},tj.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(yj.STREAMING)},tj.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(yj.SUCCEEDED)},tj.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===yj.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===yj.READY&&this._handleStreaming()},tj.prototype._handleHasMore=function(e){this._setState(yj.READY),this._handleStreaming(),delete e.has_more},tj.prototype._handlePullSuccess=function(e){var t,r=this,n=Object.assign(this._server?{server:this._server}:{},this._meta,e);[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(yj.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,ZT.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),JT))},tj.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;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()}},tj.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(yj.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},tj.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},tj.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):this._moreFunction(this._queryId,this._fetchSize,this),this._setState(yj.STREAMING)},tj.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},tj.prototype._setState=function(e){this._state=e},tj.prototype._setupAutoPull=function(){this._autoPull=!0};var ej,ab=tj;function tj(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?XT: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,e=e.lowRecordWatermark,e=void 0===e?Number.MAX_VALUE:e,d=ej.call(this)||this;return d._fieldKeys=null,d._fieldLookup=null,d._head=null,d._queuedRecords=[],d._tail=null,d._error=null,d._observers=[],d._meta={},d._server=f,d._beforeError=i,d._afterError=u,d._beforeKeys=a,d._afterKeys=s,d._beforeComplete=c,d._afterComplete=l,d._queryId=null,d._moreFunction=r,d._discardFunction=n,d._discard=!1,d._fetchSize=o,d._lowRecordWatermark=e,d._highRecordWatermark=p,d._setState(t?yj.READY:yj.READY_STREAMING),d._setupAutoPull(),d._paused=!1,d}R.ResultStreamObserver=ab;Zh(nj,rj=ib),nj.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when initializing "+ZT.json.stringify(e)))},nj.prototype.onError=function(e){this._onError&&this._onError(e)},nj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var rj,vb=nj;function nj(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=rj.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.LoginObserver=vb;Zh(ij,oj=ib),ij.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when logging off "+ZT.json.stringify(e)))},ij.prototype.onError=function(e){this._onError&&this._onError(e)},ij.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var oj,Eb=ij;function ij(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=oj.call(this)||this;return r._onError=t,r._onCompleted=e,r}R.LogoffObserver=Eb;Zh(aj,uj=ib),aj.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when resetting: received record is: "+ZT.json.stringify(e),JT))},aj.prototype.onError=function(e){e.code===JT&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},aj.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var uj,Tb=aj;function aj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=uj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}R.ResetObserver=Tb;Zh(cj,sj=ab);var sj,jb=cj;function cj(e){var t=e.error,e=e.onError,e=sj.call(this,{beforeError:e})||this;return e.onError(t),e}R.FailedObserver=jb;Zh(fj,lj=ab);var lj,Cb=fj;function fj(){var e=lj.call(this)||this;return lj.prototype.markCompleted.call(e),e}R.CompletedObserver=Cb;Zh(dj,pj=ib),dj.prototype.onNext=function(e){this._records.push(e)},dj.prototype.onError=function(e){e.code===JT&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},dj.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,ZT.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+ZT.json.stringify(this._records),JT)):this._onCompleted&&this._onCompleted(QT.default.ofRecord(this._records[0]))};var pj,xb=dj;function dj(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=pj.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}R.ProcedureRouteObserver=xb;Zh(bj,hj=ib),bj.prototype.onNext=function(e){this.onError((0,ZT.newError)("Received RECORD when resetting: received record is: "+ZT.json.stringify(e),JT))},bj.prototype.onError=function(e){e.code===JT&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},bj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(QT.default.ofMessageResponse(e))};var hj,Gf=bj;function bj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=hj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}R.RouteObserver=Gf;var yj={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(yj.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(){}}},_j=(Object.defineProperty(dh,"__esModule",{value:!0}),dh.assertNotificationFilterIsEmpty=dh.assertImpersonatedUserIsEmpty=dh.assertTxConfigIsEmpty=dh.assertDatabaseIsEmpty=void 0,e);dh.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,_j.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},dh.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,_j.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},dh.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,_j.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},dh.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,_j.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(_j.json.stringify(e),"."))).message),r.onError(t),t};Lb={},Bb={},Vb={},Yb={};Object.defineProperty(Yb,"__esModule",{value:!0}),Yb.identity=void 0,Yb.identity=function(e){return e};var vj=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]}),mj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ey=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)&&vj(t,e,r);return mj(t,e),t},Rh=(Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.functional=void 0,Vb.functional=ey(Yb),{}),gj=(Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.verifyStructSize=Rh.Structure=void 0,e),Oj=gj.error.PROTOCOL_ERROR,uy=(Object.defineProperty(wj.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),wj.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+"])"},wj);function wj(e,t){this.signature=e,this.fields=t}Rh.Structure=uy,Rh.verifyStructSize=function(e,t,r){if(t!==r)throw(0,gj.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),Oj)},Rh.default=uy,Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.Unpacker=Bb.Packer=void 0;var Ej=Ul,Pj=Vb,Sj=Rh,Tj=e,jj=Tj.error.PROTOCOL_ERROR;function Cj(e){this._ch=e,this._byteArraysSupported=!0}function Ij(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}Cj.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=Pj.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,Tj.int)(o))};if((0,Tj.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 Sj.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))},Cj.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,Tj.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},Cj.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},Cj.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))},Cj.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},Cj.prototype.packString=function(e){var e=Ej.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,Tj.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)}},Cj.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,Tj.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)}},Cj.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,Tj.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])},Cj.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,Tj.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)}},Cj.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,Tj.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)}},Cj.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,Tj.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},Cj.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},Cj.prototype._nonPackableValue=function(e){return function(){throw(0,Tj.newError)(e,jj)}},Bb.Packer=Cj,Ij.prototype.unpack=function(e,t){void 0===t&&(t=Pj.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,Tj.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,Tj.newError)("Unknown packed value with marker "+r.toString(16))},Ij.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,Tj.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},Ij.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},Ij.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},Ij.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,Tj.int)(e):240<=e&&e<256?(0,Tj.int)(e-256):200===e?(0,Tj.int)(t.readInt8()):201===e?(0,Tj.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,Tj.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new Tj.Integer(e,r)):null},Ij.prototype._unpackString=function(e,t,r,n){return 128===t?Ej.utf8.decode(n,r):208===e?Ej.utf8.decode(n,n.readUInt8()):209===e?Ej.utf8.decode(n,n.readUInt16()):210===e?Ej.utf8.decode(n,n.readUInt32()):null},Ij.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},Ij.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},Ij.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},Ij.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},Ij.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},Ij.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},Ij.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},Ij.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new Sj.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},Bb.Unpacker=Ij;var Rj,kj,cy={},Uc=r&&r.__extends||(Rj=function(e,t){return(Rj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Rj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Aj=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]}),Mj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nh=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)&&Aj(t,e,r);return Mj(t,e),t},Oy=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.Unpacker=cy.Packer=void 0,Nh(Bb)),Sy=(kj=Oy.Packer,Uc(Nj,kj),Nj.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},Nj);function Nj(){return null!==kj&&kj.apply(this,arguments)||this}cy.Packer=Sy;xj=Oy.Unpacker,Uc(Uj,xj);var xj,xy=Uj;function Uj(e,t){return xj.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}cy.Unpacker=xy;var Dj=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]}),Lj=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ml=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)&&Dj(t,e,r);return Lj(t,e),t},Cy=(Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.structure=Lb.v2=Lb.v1=void 0,ml(Bb)),gl=(Lb.v1=Cy,ml(cy)),Iy=(Lb.v2=gl,ml(Rh)),Ay=(Lb.structure=Iy,Lb.default=gl,{}),Fj=(Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.SIGNATURES=void 0,e),Ol=Fj.internal.constants,Bj=Ol.ACCESS_MODE_READ,Wj=Ol.FETCH_ALL,zj=Fj.internal.util.assertString,Gy=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),Zy=(Ay.SIGNATURES=Gy,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(Fj.json.stringify(t))})},M.pullAll=function(){return Hj},M.reset=function(){return Gj},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(t=void 0===t?null:t)&&(t.minimumSeverityLevel&&(n.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(n.notifications_disabled_categories=t.disabledCategories)),r&&(n.routing=r),new M(1,[n],function(){return"HELLO ".concat(Fj.json.stringify(n))})},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=qj(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new M(17,[t],function(){return"BEGIN ".concat(Fj.json.stringify(t))})},M.commit=function(){return Yj},M.rollback=function(){return Kj},M.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=qj(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(Fj.json.stringify(t)," ").concat(Fj.json.stringify(n))})},M.goodbye=function(){return Zj},M.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=Vj(null==t?-1:t,(void 0===e?Wj:e)||Wj);return new M(63,[r],function(){return"PULL ".concat(Fj.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=Vj(null==t?-1:t,(void 0===e?Wj:e)||Wj);return new M(47,[r],function(){return"DISCARD ".concat(Fj.json.stringify(r))})},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(Fj.json.stringify(e)," ").concat(Fj.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(Fj.json.stringify(e)," ").concat(Fj.json.stringify(t)," ").concat(Fj.json.stringify(n))})},M);function M(e,t,r){this.signature=e,this.fields=t,this.toString=r}function qj(e,t,r,n,o,i){var u={};return e.isEmpty()||(u.bookmarks=e.values()),null!==t.timeout&&(u.tx_timeout=t.timeout),t.metadata&&(u.tx_metadata=t.metadata),r&&(u.db=zj(r,"database")),o&&(u.imp_user=zj(o,"impersonatedUser")),n===Bj&&(u.mode="r"),i&&(i.minimumSeverityLevel&&(u.notifications_minimum_severity=i.minimumSeverityLevel),i.disabledCategories&&(u.notifications_disabled_categories=i.disabledCategories)),u}function Vj(e,t){t={n:(0,Fj.int)(t)};return-1!==e&&(t.qid=(0,Fj.int)(e)),t}var Hj=new(Ay.default=Zy)(63,[],function(){return"PULL_ALL"}),Gj=new Zy(15,[],function(){return"RESET"}),Yj=new Zy(18,[],function(){return"COMMIT"}),Kj=new Zy(19,[],function(){return"ROLLBACK"}),Zj=new Zy(2,[],function(){return"GOODBYE"}),S={},$y={},Qj=(Object.defineProperty($y,"__esModule",{value:!0}),$y.TypeTransformer=void 0,Lb),Xj=e.internal.objectUtil;function Jj(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 $j(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)}Jj.prototype.fromStructure=function(e){try{return e instanceof Qj.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return Xj.createBrokenObject(e)}},Jj.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},$y.default=Jj,$j.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new $j({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},$y.TypeTransformer=$j;var eC=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},tC=(Object.defineProperty(S,"__esModule",{value:!0}),e),rC=Lb,nC=$y,oC=tC.error.PROTOCOL_ERROR;S.default={createNodeTransformer:function(){return new nC.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof tC.Node},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("Node",3,e.size);var e=eC(e.fields,3),t=e[0],r=e[1],e=e[2];return new tC.Node(t,r,e)}})},createRelationshipTransformer:function(){return new nC.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof tC.Relationship},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("Relationship",5,e.size);var e=eC(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new tC.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new nC.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof tC.UnboundRelationship},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=eC(e.fields,3),t=e[0],r=e[1],e=e[2];return new tC.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new nC.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof tC.Path},toStructure:function(e){throw(0,tC.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),oC)},fromStructure:function(e){rC.structure.verifyStructSize("Path",3,e.size);for(var e=eC(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,tC.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof tC.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof tC.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new tC.PathSegment(i,c,a)),i=a}return new tC.Path(t[0],t[t.length-1],o)}})}};var iC=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]}),uC=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)&&iC(t,e,r);return uC(t,e),t},jt=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},aC=(Object.defineProperty(ih,"__esModule",{value:!0}),dh),sC=Lb,cC=i_(Ay),lC=R,fC=e,pC=jt(S),dC=jt($y),hC=fC.internal.bookmarks.Bookmarks,s_=fC.internal.constants,bC=s_.ACCESS_MODE_WRITE,yC=s_.BOLT_PROTOCOL_V1,_C=(fC.internal.logger.Logger,fC.internal.txConfig.TxConfig),l_=(Object.defineProperty(N.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new dC.default(Object.values(pC.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"version",{get:function(){return yC},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.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new lC.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,aC.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(cC.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 lC.LogoffObserver({onCompleted:t,onError:r})),t=(0,fC.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 lC.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,fC.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:hC.empty(),txConfig:_C.empty(),mode:bC,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:hC.empty(),txConfig:_C.empty(),mode:bC,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 lC.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,aC.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,aC.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,aC.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,aC.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(cC.default.run(e,t),a,!1),this.write(cC.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 lC.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(cC.default.reset(),t,!0),t},N.prototype._createPacker=function(e){return new sC.v1.Packer(e)},N.prototype._createUnpacker=function(e,t){return new sC.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 sC.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},N.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===cC.SIGNATURES.HELLO||this._lastMessageSignature===cC.SIGNATURES.LOGON},N.prototype.isLastMessageReset=function(){return this._lastMessageSignature===cC.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}}ih.default=l_;var h_={},__={},g_={},vC=(Object.defineProperty(g_,"__esModule",{value:!0}),g_.epochSecondAndNanoToLocalDateTime=g_.nanoOfDayToLocalTime=g_.epochDayToDate=void 0,e),n=vC.internal.temporalUtil,mC=n.DAYS_0000_TO_1970,gC=n.DAYS_PER_400_YEAR_CYCLE,OC=n.NANOS_PER_HOUR,wC=n.NANOS_PER_MINUTE,EC=n.NANOS_PER_SECOND,PC=n.SECONDS_PER_DAY,SC=n.floorDiv,TC=n.floorMod;function jC(e){var e=(e=(0,vC.int)(e)).add(mC).subtract(60),t=(0,vC.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(gC).subtract(1)).multiply(400),e=e.add(r.multiply(-gC))),e.multiply(400).add(591).div(gC)),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 vC.Date(r,n,e)}function CC(e){var t=(e=(0,vC.int)(e)).div(OC),r=(e=e.subtract(t.multiply(OC))).div(wC),n=(e=e.subtract(r.multiply(wC))).div(EC),e=e.subtract(n.multiply(EC));return new vC.LocalTime(t,r,n,e)}g_.epochDayToDate=jC,g_.nanoOfDayToLocalTime=CC,g_.epochSecondAndNanoToLocalDateTime=function(e,t){var r=SC(e,PC),e=TC(e,PC).multiply(EC).add(t),t=jC(r),r=CC(e);return new vC.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var IC=r&&r.__assign||function(){return(IC=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)},RC=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}},kC=(Object.defineProperty(__,"__esModule",{value:!0}),e),AC=Lb,MC=$y,NC=g_,I=P_(S),R_=kC.internal.temporalUtil,xC=R_.dateToEpochDay,UC=R_.localDateTimeToEpochSecond,DC=R_.localTimeToNanoOfDay;function LC(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,kC.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}__.default=IC(IC({},I.default),{createPoint2DTransformer:function(){return new MC.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,kC.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new AC.structure.Structure(88,[(0,kC.int)(e.srid),e.x,e.y])},fromStructure:function(e){AC.structure.verifyStructSize("Point2D",3,e.size);var e=RC(e.fields,3),t=e[0],r=e[1],e=e[2];return new kC.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new MC.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,kC.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new AC.structure.Structure(89,[(0,kC.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){AC.structure.verifyStructSize("Point3D",4,e.size);var e=RC(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new kC.Point(t,r,n,e)}})},createDurationTransformer:function(){return new MC.TypeTransformer({signature:69,isTypeInstance:kC.isDuration,toStructure:function(e){var t=(0,kC.int)(e.months),r=(0,kC.int)(e.days),n=(0,kC.int)(e.seconds),e=(0,kC.int)(e.nanoseconds);return new AC.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){AC.structure.verifyStructSize("Duration",4,e.size);var e=RC(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new kC.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new MC.TypeTransformer({signature:116,isTypeInstance:kC.isLocalTime,toStructure:function(e){e=DC(e.hour,e.minute,e.second,e.nanosecond);return new AC.structure.Structure(116,[e])},fromStructure:function(e){AC.structure.verifyStructSize("LocalTime",1,e.size);e=RC(e.fields,1)[0];return LC((0,NC.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new MC.TypeTransformer({signature:84,isTypeInstance:kC.isTime,toStructure:function(e){var t=DC(e.hour,e.minute,e.second,e.nanosecond),e=(0,kC.int)(e.timeZoneOffsetSeconds);return new AC.structure.Structure(84,[t,e])},fromStructure:function(e){AC.structure.verifyStructSize("Time",2,e.size);var e=RC(e.fields,2),t=e[0],e=e[1],t=(0,NC.nanoOfDayToLocalTime)(t);return LC(new kC.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new MC.TypeTransformer({signature:68,isTypeInstance:kC.isDate,toStructure:function(e){e=xC(e.year,e.month,e.day);return new AC.structure.Structure(68,[e])},fromStructure:function(e){AC.structure.verifyStructSize("Date",1,e.size);e=RC(e.fields,1)[0];return LC((0,NC.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new MC.TypeTransformer({signature:100,isTypeInstance:kC.isLocalDateTime,toStructure:function(e){var t=UC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,kC.int)(e.nanosecond);return new AC.structure.Structure(100,[t,e])},fromStructure:function(e){AC.structure.verifyStructSize("LocalDateTime",2,e.size);var e=RC(e.fields,2),t=e[0],e=e[1];return LC((0,NC.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new MC.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,kC.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=UC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,kC.int)(e.nanosecond),e=e.timeZoneId;return new AC.structure.Structure(102,[t,r,e])},fromStructure:function(e){AC.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=RC(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,NC.epochSecondAndNanoToLocalDateTime)(t,r);return LC(new kC.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 MC.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,kC.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=UC(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,kC.int)(e.nanosecond),e=(0,kC.int)(e.timeZoneOffsetSeconds);return new AC.structure.Structure(70,[t,r,e])},fromStructure:function(e){AC.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=RC(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,NC.epochSecondAndNanoToLocalDateTime)(t,r);return LC(new kC.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var FC,BC,U_=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)}),W_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Y_=(Object.defineProperty(h_,"__esModule",{value:!0}),W_(ih)),WC=W_(Lb),m=e,zC=W_(__),qC=W_($y),VC=m.internal.constants.BOLT_PROTOCOL_V2,J_=(BC=Y_.default,U_(HC,BC),HC.prototype._createPacker=function(e){return new WC.default.Packer(e)},HC.prototype._createUnpacker=function(e,t){return new WC.default.Unpacker(e,t)},Object.defineProperty(HC.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new qC.default(Object.values(zC.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(HC.prototype,"version",{get:function(){return VC},enumerable:!1,configurable:!0}),HC);function HC(){return null!==BC&&BC.apply(this,arguments)||this}h_.default=J_;var GC,YC,nv={},av={},KC=r&&r.__assign||function(){return(KC=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)},hd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hv=(Object.defineProperty(av,"__esModule",{value:!0}),hd(__)),wv=(av.default=KC({},hv.default),r&&r.__extends||(GC=function(e,t){return(GC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}GC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),ZC=r&&r.__assign||function(){return(ZC=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Sv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kv=(Object.defineProperty(nv,"__esModule",{value:!0}),Sv(h_)),QC=Sv(Ay),XC=dh,JC=R,$C=Sv(av),eI=Sv($y),tI=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),rI=e.internal.txConfig.TxConfig,nI="context",oI="CALL dbms.cluster.routing.getRoutingTable($".concat(nI,")"),iI=new JC.StreamObserver,Mv=(YC=kv.default,wv(uI,YC),Object.defineProperty(uI.prototype,"version",{get:function(){return tI},enumerable:!1,configurable:!0}),Object.defineProperty(uI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new eI.default(Object.values($C.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),uI.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},uI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new JC.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,XC.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(QC.default.hello(r,n),e,!0),e},uI.prototype.prepareToClose=function(){this.write(QC.default.goodbye(),iI,!0)},uI.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 JC.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,XC.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,XC.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,XC.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(QC.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},uI.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new JC.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(QC.default.commit(),t,!0),t},uI.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new JC.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(QC.default.rollback(),t,!0),t},uI.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 JC.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,XC.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,XC.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,XC.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(QC.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(QC.default.pullAll(),c,b),c},uI.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(oI,((t={})[nI]=void 0===r?{}:r,t),ZC(ZC({},n),{txConfig:rI.empty()}));return new JC.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},uI);function uI(){return null!==YC&&YC.apply(this,arguments)||this}nv.default=Mv;var aI,sI,Dv={},zv={},cI=r&&r.__assign||function(){return(cI=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)},Hv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Rs=(Object.defineProperty(zv,"__esModule",{value:!0}),Hv(av)),Zv=(zv.default=cI({},Rs.default),r&&r.__extends||(aI=function(e,t){return(aI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}aI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),lI=r&&r.__assign||function(){return(lI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Qv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rm=(Object.defineProperty(Dv,"__esModule",{value:!0}),Qv(nv)),fI=Qv(Ay),pI=dh,dI=R,hI=Qv(zv),bI=Qv($y),im=(e.internal.bookmarks.Bookmarks,e.internal.constants),yI=im.BOLT_PROTOCOL_V4_0,_I=im.FETCH_ALL,vI=e.internal.txConfig.TxConfig,mI="context",gI="database",OI="CALL dbms.routing.getRoutingTable($".concat(mI,", $").concat(gI,")"),Th=(sI=rm.default,Zv(wI,sI),Object.defineProperty(wI.prototype,"version",{get:function(){return yI},enumerable:!1,configurable:!0}),Object.defineProperty(wI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new bI.default(Object.values(hI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),wI.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 dI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,pI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,pI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(fI.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},wI.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===_?_I:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new dI.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,pI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,pI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(fI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(fI.default.pull({n:_}),c,b),c},wI.prototype._requestMore=function(e,t,r){this.write(fI.default.pull({stmtId:e,n:t}),r,!0)},wI.prototype._requestDiscard=function(e,t){this.write(fI.default.discard({stmtId:e}),t,!0)},wI.prototype._noOp=function(){},wI.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(OI,((t={})[mI]=void 0===r?{}:r,t[gI]=n,t),lI(lI({},o),{txConfig:vI.empty()}));return new dI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},wI);function wI(){return null!==sI&&sI.apply(this,arguments)||this}Dv.default=Th;var EI,PI,ly={},sm={},SI=r&&r.__assign||function(){return(SI=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)},dm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ym=(Object.defineProperty(sm,"__esModule",{value:!0}),dm(zv)),P=(sm.default=SI({},ym.default),r&&r.__extends||(EI=function(e,t){return(EI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}EI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Sm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sb=(Object.defineProperty(ly,"__esModule",{value:!0}),Sm(Dv)),TI=Sm(Ay),jI=R,Im=e,CI=dh,II=Sm(sm),RI=Sm($y),kI=Im.internal.constants.BOLT_PROTOCOL_V4_1,es=(PI=sb.default,P(AI,PI),Object.defineProperty(AI.prototype,"version",{get:function(){return kI},enumerable:!1,configurable:!0}),Object.defineProperty(AI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new RI.default(Object.values(II.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),AI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new jI.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,CI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(TI.default.hello(r,n,this._serversideRouting),e,!0),e},AI);function AI(e,t,r,n,o,i,u){e=PI.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}ly.default=es;var MI,NI,Nm={},Fs={},xI=r&&r.__assign||function(){return(xI=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)},dd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ct=(Object.defineProperty(Fs,"__esModule",{value:!0}),dd(sm)),Hm=(Fs.default=xI({},Ct.default),r&&r.__extends||(MI=function(e,t){return(MI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}MI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Qm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ts=(Object.defineProperty(Nm,"__esModule",{value:!0}),Qm(ly)),Bt=e,UI=Qm(Fs),DI=Qm($y),LI=Bt.internal.constants.BOLT_PROTOCOL_V4_2,_0=(NI=Ts.default,Hm(FI,NI),Object.defineProperty(FI.prototype,"version",{get:function(){return LI},enumerable:!1,configurable:!0}),Object.defineProperty(FI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new DI.default(Object.values(UI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),FI);function FI(){return null!==NI&&NI.apply(this,arguments)||this}Nm.default=_0;var T={},O={},BI=r&&r.__assign||function(){return(BI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},j=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},f=(Object.defineProperty(O,"__esModule",{value:!0}),j(Fs)),i=(O.default=BI({},f.default),{}),l={},WI=r&&r.__assign||function(){return(WI=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)},Lr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},w=(Object.defineProperty(l,"__esModule",{value:!0}),Lr(O)),zI=(l.default=WI({},w.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}),$u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qI=(Object.defineProperty(i,"__esModule",{value:!0}),Lb),VI=e,HI=$u(l),GI=g_,YI=Yb,KI=VI.internal.temporalUtil.localDateTimeToEpochSecond;function ZI(e,t,r){e=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),r=(0,VI.int)(t).multiply(1e3).add((0,VI.int)(r).div(1e6)).toNumber(),e=e.formatToParts(r).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:YI.identity:"literal"!==t.type&&(e[t.type]=(0,VI.int)(t.value)),e},{}),e.year=e.adjustEra(e.year),r=KI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond);return e.timeZoneOffsetSeconds=r.subtract(t),e.hour=e.hour.modulo(24),e}function QI(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,VI.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}i.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return HI.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){qI.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=zI(e.fields,3),t=e[0],r=e[1],e=e[2],t=ZI(e,t,r);return QI(new VI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,VI.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=KI(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=ZI(r,i,o),n=KI(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=ZI(r,i,o),KI(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,VI.int)(e.nanosecond),i=e.timeZoneId;return new qI.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return HI.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=KI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,VI.int)(e.nanosecond),e=(0,VI.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new qI.structure.Structure(73,[t,r,e])},fromStructure:function(e){qI.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=zI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,VI.int)(t).add(e),t=(0,GI.epochSecondAndNanoToLocalDateTime)(t,r);return QI(new VI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var XI,JI,ju=r&&r.__extends||(XI=function(e,t){return(XI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}XI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),$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)},da=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ca=(Object.defineProperty(T,"__esModule",{value:!0}),da(Nm)),eR=da(Ay),tR=R,rR=dh,nR=da(O),oR=da(i),iR=da($y),uR=e.internal.bookmarks.Bookmarks,aR=e.internal.constants.BOLT_PROTOCOL_V4_3,v=(JI=ca.default,ju(sR,JI),Object.defineProperty(sR.prototype,"version",{get:function(){return aR},enumerable:!1,configurable:!0}),Object.defineProperty(sR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new iR.default(Object.values(nR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),sR.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 tR.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||uR.empty();return this.write(eR.default.route(t,e.values(),r),o,!0),o},sR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new tR.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,rR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(eR.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},sR.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},sR.prototype._applyUtcPatch=function(){var t=this;this._transformer=new iR.default(Object.values($I($I({},nR.default),oR.default)).map(function(e){return e(t._config,t._log)}))},sR);function sR(){return null!==JI&&JI.apply(this,arguments)||this}T.default=v;var cR,lR,Cu={},xu=r&&r.__extends||(cR=function(e,t){return(cR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}cR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),fR=r&&r.__assign||function(){return(fR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},X=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(Cu,"__esModule",{value:!0}),X(T)),Ka=e,pR=X(Ay),dR=R,hR=dh,bR=X(l),yR=X(i),_R=X($y),Ks=Ka.internal.constants,vR=Ks.BOLT_PROTOCOL_V4_4,mR=Ks.FETCH_ALL,gR=Ka.internal.bookmarks.Bookmarks,Q=(lR=o.default,xu(OR,lR),Object.defineProperty(OR.prototype,"version",{get:function(){return vR},enumerable:!1,configurable:!0}),Object.defineProperty(OR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new _R.default(Object.values(bR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),OR.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 dR.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||gR.empty();return this.write(pR.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},OR.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===_?mR:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new dR.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,hR.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(pR.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(pR.default.pull({n:_}),c,b),c},OR.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 dR.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,hR.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(pR.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},OR.prototype._applyUtcPatch=function(){var t=this;this._transformer=new _R.default(Object.values(fR(fR({},bR.default),yR.default)).map(function(e){return e(t._config,t._log)}))},OR);function OR(){return null!==lR&&lR.apply(this,arguments)||this}Cu.default=Q;var Wa={},xs={},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.__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},qa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},PR=(Object.defineProperty(xs,"__esModule",{value:!0}),Lb),SR=e,TR=qa(l),Za=qa(i);xs.default=wR(wR(wR({},TR.default),Za.default),{createNodeTransformer:function(e){return TR.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){PR.structure.verifyStructSize("Node",4,e.size);var e=ER(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new SR.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return TR.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){PR.structure.verifyStructSize("Relationship",8,e.size);var e=ER(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 SR.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return TR.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){PR.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=ER(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new SR.UnboundRelationship(t,r,n,e)}})}});var jR,CR,y=r&&r.__extends||(jR=function(e,t){return(jR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}jR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ga=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Jc=(Object.defineProperty(Wa,"__esModule",{value:!0}),Ga(Cu)),IR=dh,RR=Ga(xs),kR=Ga($y),AR=Ga(Ay),MR=R,NR=e.internal.constants.BOLT_PROTOCOL_V5_0,il=(CR=Jc.default,y(xR,CR),Object.defineProperty(xR.prototype,"version",{get:function(){return NR},enumerable:!1,configurable:!0}),Object.defineProperty(xR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new kR.default(Object.values(RR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),xR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new MR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,IR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(AR.default.hello(r,n,this._serversideRouting),e,!0),e},xR);function xR(){return null!==CR&&CR.apply(this,arguments)||this}Wa.default=il;var UR,DR,Ba={},Ws={},LR=r&&r.__assign||function(){return(LR=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}},Nf=(Object.defineProperty(Ws,"__esModule",{value:!0}),s(xs)),zf=(Ws.default=LR({},Nf.default),r&&r.__extends||(UR=function(e,t){return(UR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}UR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),FR=r&&r.__assign||function(){return(FR=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)},Vf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},op=(Object.defineProperty(Ba,"__esModule",{value:!0}),Vf(Wa)),BR=dh,WR=Vf(Ws),zR=Vf($y),qR=Vf(Ay),VR=R,HR=e.internal.constants.BOLT_PROTOCOL_V5_1,Fa=(DR=op.default,zf(GR,DR),Object.defineProperty(GR.prototype,"version",{get:function(){return HR},enumerable:!1,configurable:!0}),Object.defineProperty(GR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new zR.default(Object.values(WR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(GR.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),GR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new VR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,BR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(qR.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(FR(FR({},e),a.metadata))},onError:i,flush:!0})},GR.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 VR.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(qR.default.logon(r),i,e),i},GR.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new VR.LogoffObserver({onCompleted:t,onError:r});return this.write(qR.default.logoff(),t,e),t},GR);function GR(){return null!==DR&&DR.apply(this,arguments)||this}Ba.default=Fa;var YR,KR,Jf={},gf={},ZR=r&&r.__assign||function(){return(ZR=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)},ap=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},La=(Object.defineProperty(gf,"__esModule",{value:!0}),ap(Ws)),Tu=(gf.default=ZR({},La.default),r&&r.__extends||(YR=function(e,t){return(YR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}YR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),QR=r&&r.__assign||function(){return(QR=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)},Mf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Vl=(Object.defineProperty(Jf,"__esModule",{value:!0}),Mf(Ba)),XR=Mf(gf),JR=Mf($y),$R=Mf(Ay),ek=R,g=e.internal.constants,tk=g.BOLT_PROTOCOL_V5_2,rk=g.FETCH_ALL,fp=(KR=Vl.default,Tu(nk,KR),Object.defineProperty(nk.prototype,"version",{get:function(){return tk},enumerable:!1,configurable:!0}),Object.defineProperty(nk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new JR.default(Object.values(XR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(nk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),nk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.authToken,o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new ek.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write($R.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(QR(QR({},e),a.metadata))},onError:i,flush:!0})},nk.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(),this.write($R.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},nk.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=y;return this.write($R.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write($R.default.pull({n:_}),c,b),c},nk);function nk(){return null!==KR&&KR.apply(this,arguments)||this}Jf.default=fp;var gp={},ok=(Object.defineProperty(gp,"__esModule",{value:!0}),e);function ik(){}function uk(e){return e}var ak={onNext:ik,onCompleted:ik,onError:ik};function sk(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.log,e=e.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=t||uk,this._observer=Object.assign({onPendingObserversChange:ik,onError:ik,onFailure:ik,onErrorApplyTransformation:uk},e)}Object.defineProperty(sk.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),sk.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(ok.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(ok.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(ok.json.stringify(e)));try{var n=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}(t.code),o=(0,ok.newError)(t.message,n);this._currentFailure=this._observer.onErrorApplyTransformation(o),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(ok.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,ok.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,ok.newError)("Unknown Bolt protocol message: "+e))}},sk.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onPendingObserversChange(this._pendingObservers.length)},sk.prototype._queueObserver=function(e){return(e=e||ak).onCompleted=e.onCompleted||ik,e.onError=e.onError||ik,e.onNext=e.onNext||ik,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onPendingObserversChange(this._pendingObservers.length),!0},sk.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)}},sk.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},sk.prototype._resetFailure=function(){this._currentFailure=null},gp.default=sk;var ck,u=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lk=(Object.defineProperty(oh,"__esModule",{value:!0}),e),fk=u(ih),pk=u(h_),dk=u(nv),hk=u(Dv),bk=u(ly),yk=u(Nm),_k=u(T),vk=u(Cu),mk=u(Wa),gk=u(Ba),Ok=u(Jf),wk=u(gp);oh.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 wk.default({transformMetadata:t.transformMetadata.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 fk.default(p,d,h,y,v,_);case 2:return new pk.default(p,d,h,y,v,_);case 3:return new dk.default(p,d,h,y,v,_);case 4:return new hk.default(p,d,h,y,v,_);case 4.1:return new bk.default(p,d,h,y,v,_,b);case 4.2:return new yk.default(p,d,h,y,v,_,b);case 4.3:return new _k.default(p,d,h,y,v,_,b);case 4.4:return new vk.default(p,d,h,y,v,_,b);case 5:return new mk.default(p,d,h,y,v,_,b);case 5.1:return new gk.default(p,d,h,y,v,_,b);case 5.2:return new Ok.default(p,d,h,y,v,_,b);default:throw(0,lk.newError)("Unknown Bolt protocol version: "+f)}},xf=_,ck=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]}),Op=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||ck(t,e,r)},Aa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(xf,"__esModule",{value:!0}),xf.RawRoutingTable=xf.BoltProtocol=void 0,Ip=Aa(_l),Hf=Aa(oh),Np=Aa(T),Aa=Aa(Oh),Op(R,xf),xf.BoltProtocol=Np.default,xf.RawRoutingTable=Aa.default,xf.default={handshake:Ip.default,create:Hf.default};Sp={},Fp={},Object.defineProperty(Fp,"__esModule",{value:!0}),Fp.DEFAULT_ACQUISITION_TIMEOUT=Fp.DEFAULT_MAX_SIZE=void 0,Fp.DEFAULT_MAX_SIZE=100,Fp.DEFAULT_ACQUISITION_TIMEOUT=6e4,Ek.defaultConfig=function(){return new Ek(100,6e4)},Ek.fromDriverConfig=function(e){return new Ek(Sk(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,Sk(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},rd=Ek;function Ek(e,t){this.maxSize=Pk(e,100),this.acquisitionTimeout=Pk(t,6e4)}function Pk(e,t){return 0===e||e?e:t}function Sk(e){return 0===e||e}Fp.default=rd;var fd={},Tk=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())})},jk=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}}}},ad=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ck=(Object.defineProperty(fd,"__esModule",{value:!0}),ad(Fp)),Ik=e,Rk=Ik.internal.logger.Logger,Kd=(kk.prototype.acquire=function(o){var i=this,u=o.asKey(),a=this._acquireRequests;return a[u]||(a[u]=[]),new Promise(function(e,t){var r=null,n=setTimeout(function(){var e,t=a[u];t&&(a[u]=t.filter(function(e){return e!==r})),r.isCompleted()||(t=i.activeResourceCount(o),e=i.has(o)?i._pools[u].length:0,r.reject((0,Ik.newError)("Connection acquisition timed out in ".concat(i._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},i._acquisitionTimeout),r=new Mk(u,e,t,n,i._log);a[u].push(r),i._processPendingAcquireRequests(o)})},kk.prototype.purge=function(e){return this._purgeKey(e.asKey())},kk.prototype.close=function(){return Tk(this,void 0,void 0,function(){var t=this;return jk(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(e){return t._purgeKey(e)}))];case 1:return[2,e.sent()]}})})},kk.prototype.keepAll=function(e){var t=this,r=e.map(function(e){return e.asKey()}),e=Object.keys(this._pools).filter(function(e){return-1===r.indexOf(e)});return Promise.all(e.map(function(e){return t._purgeKey(e)}))},kk.prototype.has=function(e){return e.asKey()in this._pools},kk.prototype.activeResourceCount=function(e){return this._activeResourceCounts[e.asKey()]||0},kk.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return t||(t=new Lk,this._pools[e]=t,this._pendingCreates[e]=0),t},kk.prototype._acquire=function(u){return Tk(this,void 0,void 0,function(){var t,r,n,o,i=this;return jk(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,Ik.newError)("Pool is closed, it is no more able to serve requests.");t=u.asKey(),r=this._getOrInitializePoolFor(t),e.label=1;case 1:return r.length?(n=r.pop(),this._validate(n)?(this._removeIdleObserver&&this._removeIdleObserver(n),Ak(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(n," acquired from the pool ").concat(t)),[2,{resource:n,pool:r}]):[3,2]):[3,5];case 2:return[4,this._destroy(n)];case 3:e.sent(),e.label=4;case 4:return[3,1];case 5:if(0<this._maxSize&&this.activeResourceCount(u)+this._pendingCreates[t]>=this._maxSize)return[2,{resource:null,pool:r}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=6;case 6:return e.trys.push([6,,8,9]),[4,this._create(u,function(e,t){return i._release(e,t,r)})];case 7:return o=e.sent(),Ak(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(o," created for the pool ").concat(t)),[3,9];case 8:return this._pendingCreates[t]=this._pendingCreates[t]-1,[7];case 9:return[2,{resource:o,pool:r}]}})})},kk.prototype._release=function(u,a,s){return Tk(this,void 0,void 0,function(){var o,i=this;return jk(this,function(e){switch(e.label){case 0:return(o=u.asKey(),s.isActive())?this._validate(a)?[3,2]:(this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because it is not functional")),[4,this._destroy(a)]):[3,4];case 1:return e.sent(),[3,3];case 2:this._installIdleObserver&&this._installIdleObserver(a,{onError:function(e){i._log.debug("Idle connection ".concat(a," destroyed because of error: ").concat(e));e=i._pools[o];e&&(i._pools[o]=e.filter(function(e){return e!==a})),i._destroy(a).catch(function(){})}}),s.push(a),this._log.isDebugEnabled()&&this._log.debug("".concat(a," released to the pool ").concat(o)),e.label=3;case 3:return[3,6];case 4:return this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because pool has been purged")),[4,this._destroy(a)];case 5:e.sent(),e.label=6;case 6:return t=o,r=this._activeResourceCounts,0<(n=(r[t]||0)-1)?r[t]=n:delete r[t],this._processPendingAcquireRequests(u),[2]}var t,r,n})})},kk.prototype._purgeKey=function(o){return Tk(this,void 0,void 0,function(){var t,r,n;return jk(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],!t)return[3,2];for(;t.length;)n=t.pop(),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]}})})},kk.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];e&&((n=e.shift())?this._acquire(r).catch(function(e){return n.reject(e),{resource:null}}).then(function(e){var t=e.resource,e=e.pool;t?n.isCompleted()?o._release(r,t,e):n.resolve(t):n.isCompleted()||(o._acquireRequests[i]||(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}):delete this._acquireRequests[i])},kk);function kk(e){var e=void 0===e?{}:e,t=e.create,t=void 0===t?function(e,t){return Promise.resolve()}:t,r=e.destroy,r=void 0===r?function(e){return Promise.resolve()}:r,n=e.validate,n=void 0===n?function(e){return!0}:n,o=e.installIdleObserver,o=void 0===o?function(e,t){}:o,i=e.removeIdleObserver,i=void 0===i?function(e){}:i,u=e.config,u=void 0===u?Ck.default.defaultConfig():u,e=e.log,e=void 0===e?Rk.noOp():e;this._create=t,this._destroy=r,this._validate=n,this._installIdleObserver=o,this._removeIdleObserver=i,this._maxSize=u.maxSize,this._acquisitionTimeout=u.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function Ak(e,t){var r=t[e]||0;t[e]=r+1}Nk.prototype.isCompleted=function(){return this._completed},Nk.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))},Nk.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var Mk=Nk;function Nk(e,t,r,n,o){this._key=e,this._resolve=t,this._reject=r,this._timeoutId=n,this._log=o,this._completed=!1}Fk.prototype.isActive=function(){return this._active},Fk.prototype.close=function(){this._active=!1},Fk.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},Object.defineProperty(Fk.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),Fk.prototype.pop=function(){return this._elements.pop()},Fk.prototype.push=function(e){return this._elements.push(e)};var xk,Uk,Dk,Lk=Fk;function Fk(){this._active=!0,this._elements=[]}fd.default=Kd,vl=Sp,xk=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]}),Uk=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cd=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)&&xk(t,e,r);return Uk(t,e),t},xc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(vl,"__esModule",{value:!0}),vl.DEFAULT_MAX_SIZE=vl.DEFAULT_ACQUISITION_TIMEOUT=vl.PoolConfig=vl.Pool=void 0,Dk=Cd(Fp),vl.PoolConfig=Dk.default,Object.defineProperty(vl,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return Dk.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(vl,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return Dk.DEFAULT_MAX_SIZE}}),Cd=xc(fd),vl.Pool=Cd.default,vl.default=Cd.default;var Bk,el={},Id={},Dl=r&&r.__extends||(Bk=function(e,t){return(Bk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Bk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Id,"__esModule",{value:!0});Dl(zk,Wk=e.ConnectionProvider),zk.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 Wk,Yd=zk;function zk(e){var t=Wk.call(this)||this;return t._connection=e,t}Id.default=Yd;C={},Kp={},Da={};function qk(e){this._errorHandler=e}Object.defineProperty(Da,"__esModule",{value:!0}),Object.defineProperty(qk.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),qk.prototype.isOpen=function(){throw new Error("not implemented")},qk.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(qk.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),qk.prototype.connect=function(e,t){throw new Error("not implemented")},qk.prototype.write=function(e,t,r){throw new Error("not implemented")},qk.prototype.resetAndFlush=function(){throw new Error("not implemented")},qk.prototype.hasOngoingObservableRequests=function(){throw new Error("not implemented")},qk.prototype.close=function(){throw new Error("not implemented")},qk.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t):e},Da.default=qk;var Vk,pd={},Vd=r&&r.__extends||(Vk=function(e,t){return(Vk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}Vk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Hk=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())})},Gk=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=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Yk=(Object.defineProperty(pd,"__esModule",{value:!0}),pd.createChannelConnection=void 0,Ul),Kk=e,Ph=Sh(Da),Zk=Sh(_),Qk=Kk.error.PROTOCOL_ERROR,Xk=Kk.internal.logger.Logger,Jk=0;pd.createChannelConnection=function(i,u,a,s,c,e){void 0===c&&(c=null);var l=(e=void 0===e?function(e){return new Yk.Channel(e)}:e)(new Yk.ChannelConfig(i,u,a.errorCode()));return Zk.default.handshake(l).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new Yk.Chunker(l),o=new Yk.Dechunker,t=new eA(l,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return Zk.default.create({version:r,channel:l,chunker:n,dechunker:o,disableLosslessIntegers:u.disableLosslessIntegers,useBigInt:u.useBigInt,serversideRouting:c,server:t.server,log:t.logger,observer:{onPendingObserversChange: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)}}})});return e(function(e){return o.write(e)}),t}).catch(function(e){return l.close().then(function(){throw e})})};$k=Ph.default,Vd(tA,$k),Object.defineProperty(tA.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),tA.prototype.connect=function(e,t){return this._initialize(e,t)},tA.prototype._initialize=function(e,n){var o=this,i=this;return new Promise(function(r,t){o._protocol.initialize({userAgent:e,authToken:n,notificationFilter:o._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,o.version&&!t||(o.version=t),t=e.connection_id,o.databaseId||(o.databaseId=t),e.hints&&null!=(t=e.hints["connection.recv_timeout_seconds"])&&(e=(0,Kk.toNumber)(t),Number.isInteger(e)&&0<e?o._ch.setupReceiveTimeout(1e3*e):o._log.info("Server located at ".concat(o._address," supplied an invalid connection receive timeout value (").concat(e,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue."))),r(i)}})})},tA.prototype.protocol=function(){return this._protocol},Object.defineProperty(tA.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(tA.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),tA.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(Kk.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},tA.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},tA.prototype.hasOngoingObservableRequests=function(){return this._protocol.hasOngoingObservableRequests()},tA.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: "+e),t(e))},onComplete:function(){e()}})})},tA.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},tA.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()})}}))},tA.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},tA.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},tA.prototype._handleOngoingRequestsNumberChange=function(e){0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout()},tA.prototype.close=function(){return Hk(this,void 0,void 0,function(){return Gk(this,function(e){switch(e.label){case 0:return 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]}})})},tA.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},tA.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,Kk.newError)(e,Qk);return this._handleFatalError(e),e};var $k,eA=tA;function tA(e,t,r,n,o,i,u,a,s){void 0===o&&(o=!1),void 0===i&&(i=null);var c,l,t=$k.call(this,t)||this;return t._reseting=!1,t._resetObservers=[],t._id=Jk++,t._address=r,t._server={address:r.asHostPort()},t.creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(c=t,new Xk((l=n)._level,function(e,t){return l._loggerFunction(e,"".concat(c," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}pd.default=eA;var rA,nA,Hh={},eb=r&&r.__extends||(rA=function(e,t){return(rA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}rA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),vb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Eb=(Object.defineProperty(Hh,"__esModule",{value:!0}),vb(Da)),Tb=(nA=Eb.default,eb(oA,nA),Object.defineProperty(oA.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(oA.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),oA.prototype.isOpen=function(){return this._delegate.isOpen()},oA.prototype.protocol=function(){return this._delegate.protocol()},oA.prototype.connect=function(e,t){return this._delegate.connect(e,t)},oA.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},oA.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},oA.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},oA.prototype.close=function(){return this._delegate.close()},oA.prototype._release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate._release()},oA);function oA(e,t){var r=nA.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}Hh.default=Tb;jb={};Object.defineProperty(jb,"__esModule",{value:!0});var iA,uA,aA,sA=e.error.SERVICE_UNAVAILABLE,cA=e.error.SESSION_EXPIRED;function lA(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||fA,this._handleWriteFailure=r||fA,this._handleAuthorizationExpired=n||fA}function fA(e){return e}lA.create=function(e){return new lA(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleAuthorizationExpired)},lA.prototype.errorCode=function(){return this._errorCode},lA.prototype.handleAndTransformError=function(e,t){return!(r=e)||"Neo.ClientError.Security.AuthorizationExpired"!==r.code&&"Neo.ClientError.Security.TokenExpired"!==r.code?function(e){if(e)return e.code===cA||e.code===sA||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return}(e)?this._handleUnavailability(e,t):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return}(e)?this._handleWriteFailure(e,t):e:this._handleAuthorizationExpired(e,t);var r},jb.default=lA,ab=Kp,iA=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]}),uA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cb=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)&&iA(t,e,r);return uA(t,e),t},xb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(ab,"__esModule",{value:!0}),ab.createChannelConnection=ab.ConnectionErrorHandler=ab.DelegateConnection=ab.ChannelConnection=ab.Connection=void 0,Zh=xb(Da),ab.Connection=Zh.default,aA=Cb(pd),ab.ChannelConnection=aA.default,Object.defineProperty(ab,"createChannelConnection",{enumerable:!0,get:function(){return aA.createChannelConnection}}),Cb=xb(Hh),ab.DelegateConnection=Cb.default,Cb=xb(jb),ab.ConnectionErrorHandler=Cb.default,ab.default=Zh.default;var pA,dA,ib=r&&r.__extends||(pA=function(e,t){return(pA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}pA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),hA=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]}),bA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Gf=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)&&hA(t,e,r);return bA(t,e),t},yA=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())})},_A=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}}}},vA=(Object.defineProperty(C,"__esModule",{value:!0}),Kp),mA=Gf(Sp),gA=e,OA=gA.error.SERVICE_UNAVAILABLE,ey=(dA=gA.ConnectionProvider,ib(wA,dA),wA.prototype._createConnectionErrorHandler=function(){return new vA.ConnectionErrorHandler(OA)},wA.prototype._createConnection=function(e,r){var n=this;return this._createChannelConnection(e).then(function(t){return t._release=function(){return r(e,t)},(n._openConnections[t.id]=t).connect(n._userAgent,n._authToken).catch(function(e){throw n._destroyConnection(t),e})})},wA.prototype._validateConnection=function(e){if(!e.isOpen())return!1;var t=this._config.maxConnectionLifetime;return Date.now()-e.creationTimestamp<=t},wA.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},wA.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return yA(this,void 0,void 0,function(){var t,r;return _A(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire(n)];case 1:t=e.sent(),r=new gA.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]}})})},wA.prototype.close=function(){return yA(this,void 0,void 0,function(){return _A(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]}})})},wA._installIdleObserverOnConnection=function(e,t){e._queueObserver(t)},wA._removeIdleObserverOnConnection=function(e){e._updateCurrentObserver()},wA);function wA(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,e=e.authToken,u=(void 0===t&&(t=null),dA.call(this)||this);return u._id=r,u._config=n,u._log=o,u._userAgent=i,u._authToken=e,u._createChannelConnection=t||function(e){return(0,vA.createChannelConnection)(e,u._config,u._createConnectionErrorHandler(),u._log)},u._connectionPool=new mA.default({create:u._createConnection.bind(u),destroy:u._destroyConnection.bind(u),validate:u._validateConnection.bind(u),installIdleObserver:wA._installIdleObserverOnConnection.bind(u),removeIdleObserver:wA._removeIdleObserverOnConnection.bind(u),config:mA.PoolConfig.fromDriverConfig(n),log:u._log}),u._openConnections={},u}C.default=ey;var EA,PA,uy={},Vb=r&&r.__extends||(EA=function(e,t){return(EA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&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}EA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),SA=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())})},TA=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}}}},Nh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sy=(Object.defineProperty(uy,"__esModule",{value:!0}),Nh(C)),jA=Kp,Oy=e.internal.constants,CA=Oy.BOLT_PROTOCOL_V3,IA=Oy.BOLT_PROTOCOL_V4_0,RA=Oy.BOLT_PROTOCOL_V4_4,kA=e.error.SERVICE_UNAVAILABLE,Uc=(PA=Sy.default,Vb(AA,PA),AA.prototype.acquireConnection=function(e){var r=this,e=void 0===e?{}:e,n=(e.accessMode,e.database),t=(e.bookmarks,jA.ConnectionErrorHandler.create({errorCode:kA,handleAuthorizationExpired:function(e,t){return r._handleAuthorizationExpired(e,t,n)}}));return this._connectionPool.acquire(this._address).then(function(e){return new jA.DelegateConnection(e,t)})},AA.prototype._handleAuthorizationExpired=function(e,t,r){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this._connectionPool.purge(t).catch(function(){}),e},AA.prototype._hasProtocolVersion=function(n){return SA(this,void 0,void 0,function(){var t,r;return TA(this,function(e){switch(e.label){case 0:return[4,(0,jA.createChannelConnection)(this._address,this._config,this._createConnectionErrorHandler(),this._log)];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]}})})},AA.prototype.supportsMultiDb=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return IA<=e})];case 1:return[2,e.sent()]}})})},AA.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},AA.prototype.supportsTransactionConfig=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return CA<=e})];case 1:return[2,e.sent()]}})})},AA.prototype.supportsUserImpersonation=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return RA<=e})];case 1:return[2,e.sent()]}})})},AA.prototype.verifyConnectivityAndGetServerInfo=function(){return SA(this,void 0,void 0,function(){return TA(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},AA);function AA(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,e=e.authToken,t=PA.call(this,{id:t,config:r,log:n,userAgent:i,authToken:e})||this;return t._address=o,t}uy.default=Uc;var xy={},Bb={},Cy={},cy={},MA=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},NA=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))},xA=(Object.defineProperty(cy,"__esModule",{value:!0}),cy.createValidRoutingTable=void 0,e),ml=xA.internal.constants,UA=ml.ACCESS_MODE_WRITE,DA=ml.ACCESS_MODE_READ,LA=xA.internal.serverAddress.ServerAddress,FA=xA.error.PROTOCOL_ERROR,BA=(WA.fromRawRoutingTable=qA,WA.prototype.forget=function(e){this.readers=zA(this.readers,e),this.writers=zA(this.writers,e)},WA.prototype.forgetRouter=function(e){this.routers=zA(this.routers,e)},WA.prototype.forgetWriter=function(e){this.writers=zA(this.writers,e)},WA.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===DA&&0===this.readers.length||e===UA&&0===this.writers.length},WA.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},WA.prototype.allServers=function(){return NA(NA(NA([],MA(this.routers),!1),MA(this.readers),!1),MA(this.writers),!1)},WA.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,"]]")},WA);function WA(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,xA.int)(0),this.ttl=e}function zA(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function qA(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,xA.int)(Date.now()),n=(0,xA.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?xA.Integer.MAX_VALUE:n}catch(e){throw(0,xA.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(xA.json.stringify(t),"\nError message: ").concat(e.message),FA)}}(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=HA(e).map(function(e){return LA.fromUrl(e)}):"WRITE"===t?i=HA(e).map(function(e){return LA.fromUrl(e)}):"READ"===t&&(o=HA(e).map(function(e){return LA.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,xA.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(xA.json.stringify(t.servers),"\nError message: ").concat(e.message),FA)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return VA(u,"routers",t),VA(a,"readers",t),new BA({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function VA(e,t,r){if(0===e.length)throw(0,xA.newError)("Received no "+t+" from router "+r,FA)}function HA(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}cy.default=BA,cy.createValidRoutingTable=qA;var Rh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},GA=(Object.defineProperty(Cy,"__esModule",{value:!0}),Rh(cy));function YA(e){this._routingContext=e}YA.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:GA.default.fromRawRoutingTable(r,n,e)})})},YA.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})})},Cy.default=YA;var KA,ZA,Iy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gl=(Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.RoutingTable=Bb.Rediscovery=void 0,Iy(Cy)),Ol=(Bb.Rediscovery=gl.default,Iy(cy)),Gy=(Bb.RoutingTable=Ol.default,Bb.default=gl.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)})),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)},XA=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]}),JA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zy=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)&&XA(t,e,r);return JA(t,e),t},$A=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())})},eM=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}}}},tM=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.")},rM=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},i_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},nM=(Object.defineProperty(xy,"__esModule",{value:!0}),e),oM=Zy(Bb),iM=Ul,uM=i_(Id),jt=i_(C),aM=Qa,sM=Kp,cM=nM.error.SERVICE_UNAVAILABLE,lM=nM.error.SESSION_EXPIRED,fM=nM.internal.bookmarks.Bookmarks,s_=nM.internal.constants,pM=s_.ACCESS_MODE_READ,dM=s_.ACCESS_MODE_WRITE,hM=s_.BOLT_PROTOCOL_V3,bM=s_.BOLT_PROTOCOL_V4_0,yM=s_.BOLT_PROTOCOL_V4_4,_M=(0,nM.int)(3e4),l_=(ZA=jt.default,Gy(vM,ZA),vM.prototype._createConnectionErrorHandler=function(){return new sM.ConnectionErrorHandler(lM)},vM.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||null),e},vM.prototype._handleAuthorizationExpired=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this._connectionPool.purge(t).catch(function(){}),e},vM.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||null),(0,nM.newError)("No longer possible to write to server at "+t,lM,e)},vM.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,s=e.accessMode,c=e.database,l=e.bookmarks,f=e.impersonatedUser,p=e.onDatabaseNameResolved;return $A(this,void 0,void 0,function(){var t,r,n,o,i,u,a=this;return eM(this,function(e){switch(e.label){case 0:return n={database:c||null},o=new sM.ConnectionErrorHandler(lM,function(e,t){return a._handleUnavailability(e,t,n.database)},function(e,t){return a._handleWriteFailure(e,t,n.database)},function(e,t){return a._handleAuthorizationExpired(e,t,n.database)}),[4,this._freshRoutingTable({accessMode:s,database:n.database,bookmarks:l,impersonatedUser:f,onDatabaseNameResolved:function(e){n.database=n.database||e,p&&p(e)}})];case 1:if(i=e.sent(),s===pM)r=this._loadBalancingStrategy.selectReader(i.readers),t="read";else{if(s!==dM)throw(0,nM.newError)("Illegal mode "+s);r=this._loadBalancingStrategy.selectWriter(i.writers),t="write"}if(!r)throw(0,nM.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(i),lM);e.label=2;case 2:return e.trys.push([2,4,,5]),[4,this._acquireConnectionToServer(r,t,i)];case 3:return u=e.sent(),[2,new sM.DelegateConnection(u,o)];case 4:throw u=e.sent(),o.handleAndTransformError(u,r);case 5:return[2]}})})},vM.prototype._hasProtocolVersion=function(u){return $A(this,void 0,void 0,function(){var t,r,n,o,i;return eM(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,(0,sM.createChannelConnection)(t[n],this._config,this._createConnectionErrorHandler(),this._log)];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]}})})},vM.prototype.supportsMultiDb=function(){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return bM<=e})];case 1:return[2,e.sent()]}})})},vM.prototype.supportsTransactionConfig=function(){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return hM<=e})];case 1:return[2,e.sent()]}})})},vM.prototype.supportsUserImpersonation=function(){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return yM<=e})];case 1:return[2,e.sent()]}})})},vM.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},vM.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return $A(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return eM(this,function(e){switch(e.label){case 0:return t={database:l||null},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===dM?r.writers:r.readers,n=(0,nM.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),cM),e.label=2;case 2:e.trys.push([2,9,10,11]),o=tM(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}})})},vM.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},vM.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},vM.prototype._acquireConnectionToServer=function(e,t,r){return this._connectionPool.acquire(e)},vM.prototype._freshRoutingTable=function(e){var e=void 0===e?{}:e,t=e.accessMode,r=e.database,n=e.bookmarks,o=e.impersonatedUser,e=e.onDatabaseNameResolved,i=this._routingTableRegistry.get(r,function(){return new oM.RoutingTable({database:r})});return i.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(i)),this._refreshRoutingTable(i,n,o,e)):i},vM.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)},vM.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return $A(this,void 0,void 0,function(){var t,r,n,o,i;return eM(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c)];case 1:return(t=rM.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)];case 3:i=rM.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,l,n)];case 5:return[2,e.sent()]}})})},vM.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return $A(this,void 0,void 0,function(){var t,r,n;return eM(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a)];case 1:return r=rM.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a)];case 2:n=rM.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,s,r)];case 4:return[2,e.sent()]}})})},vM.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u){return $A(this,void 0,void 0,function(){var t,r;return eM(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u)];case 1:return(t=rM.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,vM._forgetRouter(o,n,r),[2,[null,t]])}})})},vM.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u){return $A(this,void 0,void 0,function(){var t;return eM(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)];case 2:return[2,e.sent()]}})})},vM.prototype._resolveSeedRouter=function(n){return $A(this,void 0,void 0,function(){var t,r=this;return eM(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)]}})})},vM.prototype._fetchRoutingTable=function(s,c,l,f){return $A(this,void 0,void 0,function(){var t=this;return eM(this,function(e){return[2,s.reduce(function(i,u,a){return $A(t,void 0,void 0,function(){var t,r,n,o;return eM(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=rM.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(vM._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f)]);case 2:if(t=rM.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]))]})})},vM.prototype._createSessionForRediscovery=function(o,i,u){return $A(this,void 0,void 0,function(){var t,r,n=this;return eM(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this._connectionPool.acquire(o)];case 1:return r=e.sent(),t=sM.ConnectionErrorHandler.create({errorCode:lM,handleAuthorizationExpired:function(e,t){return n._handleAuthorizationExpired(e,t)}}),t=new uM.default(new sM.DelegateConnection(r,t)),r.protocol().version<4?[2,[new nM.Session({mode:dM,bookmarks:fM.empty(),connectionProvider:t}),null]]:[2,[new nM.Session({mode:pM,database:"system",bookmarks:i,connectionProvider:t,impersonatedUser:u}),null]];case 2:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 3:return[2]}})})},vM.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"].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,nM.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),cM,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},vM.prototype._applyRoutingTableIfPossible=function(t,r,n,o){return $A(this,void 0,void 0,function(){return eM(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r,n)];throw(0,nM.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),cM,o);case 1:return e.sent(),[2,r]}})})},vM.prototype._updateRoutingTable=function(t,r){return $A(this,void 0,void 0,function(){return eM(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),r(t.database),this._log.info("Updated routing table ".concat(t)),[2]}})})},vM._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},vM);function vM(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.authToken,e=e.routingTablePurgeDelay,c=ZA.call(this,{id:t,config:i,log:u,userAgent:a,authToken:s},function(e){return(0,sM.createChannelConnection)(e,c._config,c._createConnectionErrorHandler(),c._log,c._routingContext)})||this;return c._routingContext=QA(QA({},n),{address:r.toString()}),c._seedRouter=r,c._rediscovery=new oM.default(c._routingContext),c._loadBalancingStrategy=new aM.LeastConnectedLoadBalancingStrategy(c._connectionPool),c._hostNameResolver=o,c._dnsResolver=new iM.HostNameResolver,c._log=u,c._useSeedRouter=!0,c._routingTableRegistry=new UM(e?(0,nM.int)(e):_M),c}xy.default=l_;DM.prototype.register=function(e){return this._tables.set(e.database,e),this},DM.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},DM.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},DM.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},DM.prototype._forEach=function(e){var t,r;try{for(var n=tM(this._tables),o=n.next();!o.done;o=n.next())e(rM(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},DM.prototype._remove=function(e){return this._tables.delete(e),this},DM.prototype._removeIf=function(e){var t,r;try{for(var n=tM(this._tables),o=n.next();!o.done;o=n.next()){var i=rM(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 mM,gM,OM,wM,EM,PM,SM,TM,jM,CM,x,IM,RM,kM,AM,MM,NM,xM,UM=DM;function DM(e){this._tables=new Map,this._routingTablePurgeDelay=e}function LM(e,o,t){void 0===t&&(t={}),kM(e,"Bolt URL");var r,i=NM.parseDatabaseUrl(e),n=!1,u=!1;switch(i.scheme){case"bolt":break;case"bolt+s":u=!0,r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":u=!0,r="TRUST_ALL_CERTIFICATES";break;case"neo4j":n=!0;break;case"neo4j+s":r="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",n=u=!0;break;case"neo4j+ssc":r="TRUST_ALL_CERTIFICATES",n=u=!0;break;default:throw new Error("Unknown scheme: ".concat(i.scheme))}if(u){if("encrypted"in t||"trust"in t)throw new Error("Encryption/trust can only be configured either through URL or config, not both");t.encrypted=RM,t.trust=r}(o=o||{}).scheme=o.scheme||"none",t.userAgent=t.userAgent||xM;var a=MM.fromUrl(i.hostAndPort),s={address:a,typename:n?"Routing":"Direct",routing:n};return new CM.Driver(s,t,function(){{if(n)return function(e,t,r,n){return new IM.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authToken:o,address:a,userAgent:t.userAgent,routingContext:i.query})};if(AM(i.query))return function(e,t,r){return new IM.DirectConnectionProvider({id:e,config:t,log:r,authToken:o,address:a,userAgent:t.userAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function FM(r,n){return TM(this,void 0,void 0,function(){var t;return jM(this,function(e){switch(e.label){case 0:t=LM(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=el,mM=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,gM=Id,Object.defineProperty(n,"SingleConnectionProvider",{enumerable:!0,get:function(){return mM(gM).default}}),OM=C,Object.defineProperty(n,"PooledConnectionProvider",{enumerable:!0,get:function(){return mM(OM).default}}),wM=uy,Object.defineProperty(n,"DirectConnectionProvider",{enumerable:!0,get:function(){return mM(wM).default}}),EM=xy,Object.defineProperty(n,"RoutingConnectionProvider",{enumerable:!0,get:function(){return mM(EM).default}}),P_=h,PM=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]}),SM=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),S=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)&&PM(t,e,r);return SM(t,e),t},R_=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||PM(t,e,r)},Object.defineProperty(P_,"__esModule",{value:!0}),P_.pool=P_.packstream=P_.channel=P_.buf=P_.bolt=P_.loadBalancing=void 0,P_.loadBalancing=S(Qa),P_.bolt=S(_),P_.buf=S(mf),P_.channel=S(Ul),P_.packstream=S(Lb),P_.pool=S(Sp),R_(el,P_),I=F,TM=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())})},jM=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}},Object.defineProperty(I,"__esModule",{value:!0}),I.PathSegment=I.Path=I.UnboundRelationship=I.Relationship=I.Node=I.Record=I.ServerInfo=I.Notification=I.QueryStatistics=I.ProfiledPlan=I.Plan=I.ResultSummary=I.RxResult=I.RxManagedTransaction=I.RxTransaction=I.RxSession=I.EagerResult=I.Result=I.ManagedTransaction=I.Transaction=I.Session=I.Driver=I.temporal=I.spatial=I.graph=I.error=I.routing=I.session=I.types=I.logging=I.auth=I.isRetryableError=I.Neo4jError=I.integer=I.isUnboundRelationship=I.isRelationship=I.isPathSegment=I.isPath=I.isNode=I.isDateTime=I.isLocalDateTime=I.isDate=I.isTime=I.isLocalTime=I.isDuration=I.isPoint=I.isInt=I.int=I.hasReachableServer=I.driver=void 0,I.notificationFilterMinimumSeverityLevel=I.notificationFilterDisabledCategory=I.notificationSeverityLevel=I.notificationCategory=I.resultTransformers=I.bookmarkManager=I.DateTime=I.LocalDateTime=I.Date=I.Time=I.LocalTime=I.Duration=I.Integer=I.Point=void 0,CM=B,Object.defineProperty(I,"Driver",{enumerable:!0,get:function(){return CM.Driver}}),m=W_(t),x=e,Object.defineProperty(I,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(I,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(I,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(I,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(I,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(I,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(I,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(I,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(I,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(I,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(I,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(I,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(I,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(I,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(I,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(I,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(I,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(I,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(I,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(I,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(I,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(I,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(I,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(I,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(I,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(I,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(I,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(I,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(I,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(I,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(I,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(I,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(I,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(I,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(I,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(I,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(I,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(I,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(I,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(I,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(I,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(I,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(I,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(I,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(I,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(I,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(I,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(I,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(I,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(I,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),IM=h,Y_=W_(Gr),I.RxSession=Y_.default,U_=W_(p),I.RxTransaction=U_.default,J_=W_(b),I.RxManagedTransaction=J_.default,W_=W_(E),I.RxResult=W_.default,hd=x.internal.util,RM=hd.ENCRYPTION_ON,kM=hd.assertString,AM=hd.isEmptyObjectOrNull,MM=x.internal.serverAddress.ServerAddress,NM=x.internal.urlUtil,I.driver=LM,I.hasReachableServer=FM,xM="neo4j-javascript/"+m.default,hd={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},I.logging=hd,m={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},I.types=m,__={READ:CM.READ,WRITE:CM.WRITE},I.session=__,hv={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},I.integer=hv,Sv={isPoint:x.isPoint},I.spatial=Sv,kv={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},I.temporal=kv,wv={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},I.graph=wv,hv={driver:LM,hasReachableServer:FM,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:hv,Neo4jError:x.Neo4jError,isRetryableError:x.isRetryableError,auth:x.auth,logging:hd,types:m,session:__,routing:x.routing,error:x.error,graph:wv,spatial:Sv,temporal:kv,Driver:CM.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:Y_.default,RxTransaction:U_.default,RxManagedTransaction:J_.default,RxResult:W_.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,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},I.default=hv,U(F)});
|