dbgate-plugin-oracle 5.3.1 → 5.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -21
- package/dist/backend.js +1 -1
- package/package.json +3 -3
package/dist/backend.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see backend.js.LICENSE.txt */
|
|
2
|
-
(()=>{var t={4792:(t,e,n)=>{"use strict";var r=n(5894),i=n(4020),s=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&s(t,".prototype.")>-1?i(n):n}},4020:(t,e,n)=>{"use strict";var r=n(2460),i=n(5894),s=n(1778),o=n(4002),a=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),_=i("%Reflect.apply%",!0)||r.call(u,a),c=n(7526),l=i("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new o("a function is required");var e=_(r,u,arguments);return s(e,1+l(0,t.length-(arguments.length-1)),!0)};var h=function(){return _(r,a,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},3716:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.splitQuery=void 0;var s=n(6814);Object.defineProperty(e,"splitQuery",{enumerable:!0,get:function(){return s.splitQuery}}),i(n(5994),e)},5994:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.oracleSplitterOptions=e.redisSplitterOptions=e.noSplitSplitterOptions=e.mongoSplitterOptions=e.sqliteSplitterOptions=e.postgreSplitterOptions=e.mssqlSplitterOptions=e.mysqlSplitterOptions=e.defaultSplitterOptions=void 0,e.defaultSplitterOptions={stringsBegins:["'"],stringsEnds:{"'":"'"},stringEscapes:{"'":"'"},allowSemicolon:!0,allowCustomDelimiter:!1,allowCustomSqlTerminator:!1,allowGoDelimiter:!1,allowSlashDelimiter:!1,allowDollarDollarString:!1,noSplit:!1,doubleDashComments:!0,multilineComments:!0,javaScriptComments:!1,returnRichInfo:!1,splitByLines:!1,preventSingleLineSplit:!1,adaptiveGoSplit:!1,ignoreComments:!1},e.mysqlSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{allowCustomDelimiter:!0,stringsBegins:["'","`"],stringsEnds:{"'":"'","`":"`"},stringEscapes:{"'":"\\","`":"`"}}),e.mssqlSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{allowSemicolon:!1,allowGoDelimiter:!0,stringsBegins:["'","["],stringsEnds:{"'":"'","[":"]"},stringEscapes:{"'":"'"}}),e.postgreSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{allowDollarDollarString:!0,stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"'",'"':'"'}}),e.sqliteSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"'",'"':'"'}}),e.mongoSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"\\",'"':"\\"}}),e.noSplitSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{noSplit:!0}),e.redisSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{splitByLines:!0}),e.oracleSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{allowCustomSqlTerminator:!0,allowSlashDelimiter:!0,stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"'",'"':'"'}})},6814:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitQuery=e.finishSplitStream=e.getInitialDelimiter=e.splitQueryLine=void 0;const r=n(5994),i=";";function s(t,e,n){let{source:r,position:i,line:s,column:o,streamPosition:a}=t;for(;e>0;)"\n"==r[i]?(s+=1,o=0):o+=1,i+=1,a+=1,e-=1;t.position=i,t.streamPosition=a,t.line=s,t.column=o,t.wasDataInCommand||(n?(t.trimCommandStartPosition=a,t.trimCommandStartLine=s,t.trimCommandStartColumn=o):t.wasDataInCommand=!0),n||(t.noWhitePosition=a,t.noWhiteLine=s,t.noWhiteColumn=o)}function o(t,e,n,r){return r?n==r?t[e]==n&&t[e+1]!=n:t[e]==n&&t[e-1]!=r:t[e]==n}const a={type:"whitespace",length:1},u={type:"eoln",length:1},_={type:"data",length:1};function c(t){let e=t.position;const n=t.source,r=n[e];if(t.options.stringsBegins.includes(r)){e++;const i=t.options.stringsEnds[r],s=t.options.stringEscapes[r];for(;e<t.end&&!o(n,e,i,s);)i==s&&n[e]==i&&n[e+1]==i?e+=2:e++;return{type:"string",length:e-t.position+1}}if(t.currentDelimiter&&n.slice(e).startsWith(t.currentDelimiter))return{type:"delimiter",length:t.currentDelimiter.length};if(" "==r||"\t"==r||"\r"==r)return a;if("\n"==r)return u;if(t.options.doubleDashComments&&"-"==r&&"-"==n[e+1]){for(;e<t.end&&"\n"!=n[e];)e++;return{type:"comment",length:e-t.position}}if(t.options.multilineComments&&"/"==r&&"*"==n[e+1]){for(e+=2;e<t.end&&("*"!=n[e]||"/"!=n[e+1]);)e++;return{type:"comment",length:e-t.position+2}}if(t.options.allowCustomDelimiter&&!t.wasDataOnLine){const t=n.slice(e).match(/^DELIMITER[ \t]+([^\n]+)/i);if(t)return{type:"set_delimiter",value:t[1].trim(),length:t[0].length}}if(t.options.allowCustomSqlTerminator){const t=n.slice(e).match(/^SET[ \t]+SQLT(ERMINATOR)?[ \t]+(ON|OFF|".")/i);if(t){if("OFF"==t[2].toUpperCase())return{type:"set_sqlterminator",value:null,length:t[0].length};if("ON"==t[2].toUpperCase())return{type:"set_sqlterminator",value:i,length:t[0].length};if(t[2].startsWith('"'))return{type:"set_sqlterminator",value:t[2].slice(1,-1),length:t[0].length}}}if((t.options.allowGoDelimiter||t.options.adaptiveGoSplit)&&!t.wasDataOnLine){const t=n.slice(e).match(/^GO[\t\r ]*(\n|$)/i);if(t)return{type:"go_delimiter",length:t[0].endsWith("\n")?t[0].length-1:t[0].length}}if(t.options.allowSlashDelimiter&&!t.wasDataOnLine){const t=n.slice(e).match(/^\/[\t\r ]*(\n|$)/i);if(t)return{type:"slash_delimiter",length:t[0].endsWith("\n")?t[0].length-1:t[0].length}}if(t.options.adaptiveGoSplit){const t=n.slice(e).match(/^(CREATE|ALTER)\s*(PROCEDURE|FUNCTION|TRIGGER)/i);if(t)return{type:"create_routine",length:t[0].length}}const s=function(t){if(!t.options.allowDollarDollarString)return null;let e=t.position;const n=t.source,r=/^(\$[a-zA-Z0-9_]*\$)/.exec(n.slice(e));if(!r)return null;const i=r[1];for(e+=i.length;e<t.end;){if(n.slice(e).startsWith(i))return{type:"string",length:e+i.length-t.position};e++}return null}(t);return s||_}function l(t,e){var n;const r={options:t.options,source:t.source,position:t.position,currentDelimiter:t.currentDelimiter,end:t.end,wasDataOnLine:t.wasDataOnLine};for(r.position+=e.length;r.position<r.end;){const t=c(r);if(t)switch(t.type){case"whitespace":r.position+=t.length;continue;case"eoln":return!1;case"comment":if(null===(n=t.value)||void 0===n?void 0:n.includes("\n"))return!0;r.position+=t.length;continue;default:return!0}else r.position+=1}}function h(t){t.commandPart+=t.source.slice(t.currentCommandStart,t.position),T(t)}function T(t){const e=t.commandPart.substring(t.trimCommandStartPosition-t.commandStartPosition,t.noWhitePosition-t.commandStartPosition);e.trim()&&(t.options.returnRichInfo?t.pushOutput({text:e,start:{position:t.commandStartPosition,line:t.commandStartLine,column:t.commandStartColumn},end:{position:t.streamPosition,line:t.line,column:t.column},trimStart:{position:t.trimCommandStartPosition,line:t.trimCommandStartLine,column:t.trimCommandStartColumn},trimEnd:{position:t.noWhitePosition,line:t.noWhiteLine,column:t.noWhiteColumn}}):t.pushOutput(e))}function p(t){t.commandStartPosition=t.streamPosition,t.commandStartLine=t.line,t.commandStartColumn=t.column,t.trimCommandStartPosition=t.streamPosition,t.trimCommandStartLine=t.line,t.trimCommandStartColumn=t.column,t.wasDataInCommand=!1}function f(t){if(t.options.splitByLines)!function(t){for(;t.position<t.end;)"\n"==t.source[t.position]?(h(t),t.commandPart="",s(t,1,!0),t.currentCommandStart=t.position,p(t)):s(t,1,/\s/.test(t.source[t.position]));t.end>t.currentCommandStart&&(t.commandPart+=t.source.slice(t.currentCommandStart,t.position))}(t);else{for(;t.position<t.end;){const e=c(t);if(e)switch(e.type){case"string":case"data":s(t,e.length,!1),t.wasDataOnLine=!0;break;case"comment":s(t,e.length,!!t.options.ignoreComments),t.wasDataOnLine=!0;break;case"eoln":s(t,e.length,!0),t.wasDataOnLine=!1;break;case"whitespace":s(t,e.length,!0);break;case"set_delimiter":case"set_sqlterminator":h(t),t.commandPart="",t.currentDelimiter=e.value,s(t,e.length,!1),t.currentCommandStart=t.position,p(t);break;case"go_delimiter":h(t),t.commandPart="",s(t,e.length,!1),t.currentCommandStart=t.position,p(t),t.options.adaptiveGoSplit&&(t.currentDelimiter=i);break;case"slash_delimiter":h(t),t.commandPart="",s(t,e.length,!1),t.currentCommandStart=t.position,p(t);break;case"create_routine":s(t,e.length,!1),t.options.adaptiveGoSplit&&(t.currentDelimiter=null);break;case"delimiter":if(t.options.preventSingleLineSplit&&l(t,e)){s(t,e.length,!1),t.wasDataOnLine=!0;break}h(t),t.commandPart="",s(t,e.length,!1),t.currentCommandStart=t.position,p(t)}else s(t,1,!1)}t.end>t.currentCommandStart&&(t.commandPart+=t.source.slice(t.currentCommandStart,t.position))}}function E(t){return(null==t?void 0:t.adaptiveGoSplit)?i:!1===(null==t?void 0:t.allowSemicolon)?null:i}function d(t){T(t)}e.splitQueryLine=f,e.getInitialDelimiter=E,e.finishSplitStream=d,e.splitQuery=function(t,e=null){var n;const i=Object.assign(Object.assign({},r.defaultSplitterOptions),e);if(i.noSplit){if(i.returnRichInfo){const e=t.split("\n");return[{text:t,start:{position:0,line:0,column:0},end:{position:t.length,line:e.length,column:(null===(n=e[e.length-1])||void 0===n?void 0:n.length)||0}}]}return[t]}const s=[],o={source:t,end:t.length,currentDelimiter:E(e),position:0,column:0,line:0,currentCommandStart:0,commandStartLine:0,commandStartColumn:0,commandStartPosition:0,streamPosition:0,noWhiteLine:0,noWhiteColumn:0,noWhitePosition:0,trimCommandStartPosition:0,trimCommandStartLine:0,trimCommandStartColumn:0,wasDataInCommand:!1,pushOutput:t=>s.push(t),wasDataOnLine:!1,options:i,commandPart:""};return f(o),d(o),s}},4356:(t,e,n)=>{"use strict";var r=n(7526),i=n(2873),s=n(4002),o=n(3906);t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,_=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],l=!!o&&o(t,e);if(r)r(t,e,{configurable:null===_&&l?l.configurable:!_,enumerable:null===a&&l?l.enumerable:!a,value:n,writable:null===u&&l?l.writable:!u});else{if(!c&&(a||u||_))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},7526:(t,e,n)=>{"use strict";var r=n(5894)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(t){r=!1}t.exports=r},8096:t=>{"use strict";t.exports=EvalError},5671:t=>{"use strict";t.exports=Error},7049:t=>{"use strict";t.exports=RangeError},1977:t=>{"use strict";t.exports=ReferenceError},2873:t=>{"use strict";t.exports=SyntaxError},4002:t=>{"use strict";t.exports=TypeError},1621:t=>{"use strict";t.exports=URIError},1552:t=>{"use strict";var e=Object.prototype.toString,n=Math.max,r=function(t,e){for(var n=[],r=0;r<t.length;r+=1)n[r]=t[r];for(var i=0;i<e.length;i+=1)n[i+t.length]=e[i];return n};t.exports=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var s,o=function(t,e){for(var n=[],r=1,i=0;r<t.length;r+=1,i+=1)n[i]=t[r];return n}(arguments),a=n(0,i.length-o.length),u=[],_=0;_<a;_++)u[_]="$"+_;if(s=Function("binder","return function ("+function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=",");return n}(u)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var e=i.apply(this,r(o,arguments));return Object(e)===e?e:this}return i.apply(t,r(o,arguments))})),i.prototype){var c=function(){};c.prototype=i.prototype,s.prototype=new c,c.prototype=null}return s}},2460:(t,e,n)=>{"use strict";var r=n(1552);t.exports=Function.prototype.bind||r},5894:(t,e,n)=>{"use strict";var r,i=n(5671),s=n(8096),o=n(7049),a=n(1977),u=n(2873),_=n(4002),c=n(1621),l=Function,h=function(t){try{return l('"use strict"; return ('+t+").constructor;")()}catch(t){}},T=Object.getOwnPropertyDescriptor;if(T)try{T({},"")}catch(t){T=null}var p=function(){throw new _},f=T?function(){try{return p}catch(t){try{return T(arguments,"callee").get}catch(t){return p}}}():p,E=n(2040)(),d=n(8675)(),N=Object.getPrototypeOf||(d?function(t){return t.__proto__}:null),S={},m="undefined"!=typeof Uint8Array&&N?N(Uint8Array):r,A={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":E&&N?N([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":S,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&N?N(N([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E&&N?N((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":o,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E&&N?N((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&N?N(""[Symbol.iterator]()):r,"%Symbol%":E?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":f,"%TypedArray%":m,"%TypeError%":_,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(N)try{null.error}catch(t){var P=N(N(t));A["%Error.prototype%"]=P}var g=function t(e){var n;if("%AsyncFunction%"===e)n=h("async function () {}");else if("%GeneratorFunction%"===e)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=h("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&N&&(n=N(i.prototype))}return A[e]=n,n},y={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=n(2460),I=n(2204),D=R.call(Function.call,Array.prototype.concat),O=R.call(Function.apply,Array.prototype.splice),C=R.call(Function.call,String.prototype.replace),b=R.call(Function.call,String.prototype.slice),v=R.call(Function.call,RegExp.prototype.exec),w=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L=/\\(\\)?/g,B=function(t,e){var n,r=t;if(I(y,r)&&(r="%"+(n=y[r])[0]+"%"),I(A,r)){var i=A[r];if(i===S&&(i=g(r)),void 0===i&&!e)throw new _("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new u("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new _("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new _('"allowMissing" argument must be a boolean');if(null===v(/^%?[^%]*%?$/,t))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=b(t,0,1),n=b(t,-1);if("%"===e&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new u("invalid intrinsic syntax, expected opening `%`");var r=[];return C(t,w,(function(t,e,n,i){r[r.length]=n?C(i,L,"$1"):e||t})),r}(t),r=n.length>0?n[0]:"",i=B("%"+r+"%",e),s=i.name,o=i.value,a=!1,c=i.alias;c&&(r=c[0],O(n,D([0,1],c)));for(var l=1,h=!0;l<n.length;l+=1){var p=n[l],f=b(p,0,1),E=b(p,-1);if(('"'===f||"'"===f||"`"===f||'"'===E||"'"===E||"`"===E)&&f!==E)throw new u("property names with quotes must have matching quotes");if("constructor"!==p&&h||(a=!0),I(A,s="%"+(r+="."+p)+"%"))o=A[s];else if(null!=o){if(!(p in o)){if(!e)throw new _("base intrinsic for "+t+" exists, but the property is not available.");return}if(T&&l+1>=n.length){var d=T(o,p);o=(h=!!d)&&"get"in d&&!("originalValue"in d.get)?d.get:o[p]}else h=I(o,p),o=o[p];h&&!a&&(A[s]=o)}}return o}},3906:(t,e,n)=>{"use strict";var r=n(5894)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(t){r=null}t.exports=r},7553:(t,e,n)=>{"use strict";var r=n(7526),i=function(){return!!r};i.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},8675:t=>{"use strict";var e={__proto__:null,foo:{}},n=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof n)}},2040:(t,e,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(3674);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},3674:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},2204:(t,e,n)=>{"use strict";var r=Function.prototype.call,i=Object.prototype.hasOwnProperty,s=n(2460);t.exports=s.call(r,i)},4558:(t,e,n)=>{"use strict";var r=("undefined"!=typeof JSON?JSON:n(2496)).stringify,i=n(7155),s=n(698),o=n(4020),a=n(4792),u=a("Array.prototype.join"),_=a("Array.prototype.push"),c=function(t,e){for(var n="",r=0;r<t;r+=1)n+=e;return n},l=function(t,e,n){return n};t.exports=function(t){var e=arguments.length>1?arguments[1]:void 0,n=e&&e.space||"";"number"==typeof n&&(n=c(n," "));var a=!!e&&"boolean"==typeof e.cycles&&e.cycles,h=e&&e.replacer?o(e.replacer):l,T="function"==typeof e?e:e&&e.cmp,p=T&&function(t){var e=T.length>2&&function(e){return t[e]};return function(n,r){return T({key:n,value:t[n]},{key:r,value:t[r]},e?{__proto__:null,get:e}:void 0)}},f=[];return function t(e,o,l,T){var E=n?"\n"+c(T,n):"",d=n?": ":":";if(l&&l.toJSON&&"function"==typeof l.toJSON&&(l=l.toJSON()),void 0!==(l=h(e,o,l))){if("object"!=typeof l||null===l)return r(l);if(i(l)){for(var N=[],S=0;S<l.length;S++){var m=t(l,S,l[S],T+1)||r(null);_(N,E+n+m)}return"["+u(N,",")+E+"]"}if(-1!==f.indexOf(l)){if(a)return r("__cycle__");throw new TypeError("Converting circular structure to JSON")}_(f,l);var A=s(l).sort(p&&p(l));for(N=[],S=0;S<A.length;S++){var P=t(l,o=A[S],l[o],T+1);if(P){var g=r(o)+d+P;_(N,E+n+g)}}return f.splice(f.indexOf(l),1),"{"+u(N,",")+E+"}"}}({"":t},"",t,0)}},7155:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},2496:(t,e,n)=>{"use strict";e.parse=n(7663),e.stringify=n(3937)},7663:t=>{"use strict";var e,n,r,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function s(t){throw{name:"SyntaxError",message:t,at:e,text:r}}function o(t){return t&&t!==n&&s("Expected '"+t+"' instead of '"+n+"'"),n=r.charAt(e),e+=1,n}function a(){var t,e="";for("-"===n&&(e="-",o("-"));n>="0"&&n<="9";)e+=n,o();if("."===n)for(e+=".";o()&&n>="0"&&n<="9";)e+=n;if("e"===n||"E"===n)for(e+=n,o(),"-"!==n&&"+"!==n||(e+=n,o());n>="0"&&n<="9";)e+=n,o();return t=Number(e),isFinite(t)||s("Bad number"),t}function u(){var t,e,r,a="";if('"'===n)for(;o();){if('"'===n)return o(),a;if("\\"===n)if(o(),"u"===n){for(r=0,e=0;e<4&&(t=parseInt(o(),16),isFinite(t));e+=1)r=16*r+t;a+=String.fromCharCode(r)}else{if("string"!=typeof i[n])break;a+=i[n]}else a+=n}s("Bad string")}function _(){for(;n&&n<=" ";)o()}function c(){switch(_(),n){case"{":return function(){var t,e={};if("{"===n){if(o("{"),_(),"}"===n)return o("}"),e;for(;n;){if(t=u(),_(),o(":"),Object.prototype.hasOwnProperty.call(e,t)&&s('Duplicate key "'+t+'"'),e[t]=c(),_(),"}"===n)return o("}"),e;o(","),_()}}s("Bad object")}();case"[":return function(){var t=[];if("["===n){if(o("["),_(),"]"===n)return o("]"),t;for(;n;){if(t.push(c()),_(),"]"===n)return o("]"),t;o(","),_()}}s("Bad array")}();case'"':return u();case"-":return a();default:return n>="0"&&n<="9"?a():function(){switch(n){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null;default:s("Unexpected '"+n+"'")}}()}}t.exports=function(t,i){var o;return r=t,e=0,n=" ",o=c(),_(),n&&s("Syntax error"),"function"==typeof i?function t(e,n){var r,s,o=e[n];if(o&&"object"==typeof o)for(r in c)Object.prototype.hasOwnProperty.call(o,r)&&(void 0===(s=t(o,r))?delete o[r]:o[r]=s);return i.call(e,n,o)}({"":o},""):o}},3937:t=>{"use strict";var e,n,r,i=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(t){return i.lastIndex=0,i.test(t)?'"'+t.replace(i,(function(t){var e=s[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function a(t,i){var s,u,_,c,l,h=e,T=i[t];switch(T&&"object"==typeof T&&"function"==typeof T.toJSON&&(T=T.toJSON(t)),"function"==typeof r&&(T=r.call(i,t,T)),typeof T){case"string":return o(T);case"number":return isFinite(T)?String(T):"null";case"boolean":case"null":return String(T);case"object":if(!T)return"null";if(e+=n,l=[],"[object Array]"===Object.prototype.toString.apply(T)){for(c=T.length,s=0;s<c;s+=1)l[s]=a(s,T)||"null";return _=0===l.length?"[]":e?"[\n"+e+l.join(",\n"+e)+"\n"+h+"]":"["+l.join(",")+"]",e=h,_}if(r&&"object"==typeof r)for(c=r.length,s=0;s<c;s+=1)"string"==typeof(u=r[s])&&(_=a(u,T))&&l.push(o(u)+(e?": ":":")+_);else for(u in T)Object.prototype.hasOwnProperty.call(T,u)&&(_=a(u,T))&&l.push(o(u)+(e?": ":":")+_);return _=0===l.length?"{}":e?"{\n"+e+l.join(",\n"+e)+"\n"+h+"}":"{"+l.join(",")+"}",e=h,_}}t.exports=function(t,i,s){var o;if(e="",n="","number"==typeof s)for(o=0;o<s;o+=1)n+=" ";else"string"==typeof s&&(n=s);if(r=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return a("",{"":t})}},7737:(t,e,n)=>{var r=n(3789)(n(5036),"DataView");t.exports=r},5072:(t,e,n)=>{var r=n(9763),i=n(3879),s=n(8150),o=n(7106),a=n(938);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,t.exports=u},5332:(t,e,n)=>{var r=n(3023),i=n(4747),s=n(9978),o=n(6734),a=n(4710);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,t.exports=u},16:(t,e,n)=>{var r=n(3789)(n(5036),"Map");t.exports=r},1708:(t,e,n)=>{var r=n(615),i=n(9859),s=n(5170),o=n(8470),a=n(7646);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,t.exports=u},1767:(t,e,n)=>{var r=n(3789)(n(5036),"Promise");t.exports=r},7802:(t,e,n)=>{var r=n(3789)(n(5036),"Set");t.exports=r},6874:(t,e,n)=>{var r=n(1708),i=n(9871),s=n(1772);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=s,t.exports=o},9310:(t,e,n)=>{var r=n(5332),i=n(9333),s=n(1893),o=n(9676),a=n(6536),u=n(3336);function _(t){var e=this.__data__=new r(t);this.size=e.size}_.prototype.clear=i,_.prototype.delete=s,_.prototype.get=o,_.prototype.has=a,_.prototype.set=u,t.exports=_},7432:(t,e,n)=>{var r=n(5036).Symbol;t.exports=r},181:(t,e,n)=>{var r=n(5036).Uint8Array;t.exports=r},20:(t,e,n)=>{var r=n(3789)(n(5036),"WeakMap");t.exports=r},9822:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},4170:t=>{t.exports=function(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}},2130:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},5773:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}},3574:(t,e,n)=>{var r=n(2712);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},9106:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},6272:(t,e,n)=>{var r=n(8355),i=n(7933),s=n(9464),o=n(5752),a=n(1574),u=n(264),_=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=s(t),c=!n&&i(t),l=!n&&!c&&o(t),h=!n&&!c&&!l&&u(t),T=n||c||l||h,p=T?r(t.length,String):[],f=p.length;for(var E in t)!e&&!_.call(t,E)||T&&("length"==E||l&&("offset"==E||"parent"==E)||h&&("buffer"==E||"byteLength"==E||"byteOffset"==E)||a(E,f))||p.push(E);return p}},6233:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},1595:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},2609:t=>{t.exports=function(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}},119:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},1819:t=>{t.exports=function(t){return t.split("")}},6564:t=>{var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=function(t){return t.match(e)||[]}},6312:(t,e,n)=>{var r=n(6571),i=n(9679),s=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];s.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},5096:(t,e,n)=>{var r=n(9679);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},3644:(t,e,n)=>{var r=n(9040);t.exports=function(t,e,n,i){return r(t,(function(t,r,s){e(i,t,n(t),s)})),i}},2516:(t,e,n)=>{var r=n(5634),i=n(9125);t.exports=function(t,e){return t&&r(e,i(e),t)}},5771:(t,e,n)=>{var r=n(5634),i=n(7798);t.exports=function(t,e){return t&&r(e,i(e),t)}},6571:(t,e,n)=>{var r=n(6514);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},9192:(t,e,n)=>{var r=n(9310),i=n(2130),s=n(6312),o=n(2516),a=n(5771),u=n(1733),_=n(5240),c=n(6752),l=n(4239),h=n(1679),T=n(6628),p=n(1344),f=n(7928),E=n(4290),d=n(6082),N=n(9464),S=n(5752),m=n(6043),A=n(6130),P=n(6885),g=n(9125),y=n(7798),R="[object Arguments]",I="[object Function]",D="[object Object]",O={};O[R]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[D]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[I]=O["[object WeakMap]"]=!1,t.exports=function t(e,n,C,b,v,w){var L,B=1&n,Y=2&n,U=4&n;if(C&&(L=v?C(e,b,v,w):C(e)),void 0!==L)return L;if(!A(e))return e;var M=N(e);if(M){if(L=f(e),!B)return _(e,L)}else{var x=p(e),V=x==I||"[object GeneratorFunction]"==x;if(S(e))return u(e,B);if(x==D||x==R||V&&!v){if(L=Y||V?{}:d(e),!B)return Y?l(e,a(L,e)):c(e,o(L,e))}else{if(!O[x])return v?e:{};L=E(e,x,B)}}w||(w=new r);var F=w.get(e);if(F)return F;w.set(e,L),P(e)?e.forEach((function(r){L.add(t(r,n,C,r,e,w))})):m(e)&&e.forEach((function(r,i){L.set(i,t(r,n,C,i,e,w))}));var k=M?void 0:(U?Y?T:h:Y?y:g)(e);return i(k||e,(function(r,i){k&&(r=e[i=r]),s(L,i,t(r,n,C,i,e,w))})),L}},6309:(t,e,n)=>{var r=n(6130),i=Object.create,s=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=s},9040:(t,e,n)=>{var r=n(5828),i=n(251)(r);t.exports=i},8052:t=>{t.exports=function(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}},5951:(t,e,n)=>{var r=n(1595),i=n(8352);t.exports=function t(e,n,s,o,a){var u=-1,_=e.length;for(s||(s=i),a||(a=[]);++u<_;){var c=e[u];n>0&&s(c)?n>1?t(c,n-1,s,o,a):r(a,c):o||(a[a.length]=c)}return a}},4350:(t,e,n)=>{var r=n(2294)();t.exports=r},5828:(t,e,n)=>{var r=n(4350),i=n(9125);t.exports=function(t,e){return t&&r(t,e,i)}},3117:(t,e,n)=>{var r=n(8328),i=n(1966);t.exports=function(t,e){for(var n=0,s=(e=r(e,t)).length;null!=t&&n<s;)t=t[i(e[n++])];return n&&n==s?t:void 0}},4090:(t,e,n)=>{var r=n(1595),i=n(9464);t.exports=function(t,e,n){var s=e(t);return i(t)?s:r(s,n(t))}},6077:(t,e,n)=>{var r=n(7432),i=n(4444),s=n(3371),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):s(t)}},2282:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},2712:(t,e,n)=>{var r=n(8052),i=n(1264),s=n(7635);t.exports=function(t,e,n){return e==e?s(t,e,n):r(t,i,n)}},2800:(t,e,n)=>{var r=n(6874),i=n(3574),s=n(9106),o=n(6233),a=n(7746),u=n(4854),_=Math.min;t.exports=function(t,e,n){for(var c=n?s:i,l=t[0].length,h=t.length,T=h,p=Array(h),f=1/0,E=[];T--;){var d=t[T];T&&e&&(d=o(d,a(e))),f=_(d.length,f),p[T]=!n&&(e||l>=120&&d.length>=120)?new r(T&&d):void 0}d=t[0];var N=-1,S=p[0];t:for(;++N<l&&E.length<f;){var m=d[N],A=e?e(m):m;if(m=n||0!==m?m:0,!(S?u(S,A):c(E,A,n))){for(T=h;--T;){var P=p[T];if(!(P?u(P,A):c(t[T],A,n)))continue t}S&&S.push(A),E.push(m)}}return E}},5301:(t,e,n)=>{var r=n(6077),i=n(4189);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},2201:(t,e,n)=>{var r=n(6077),i=n(4189);t.exports=function(t){return i(t)&&"[object Date]"==r(t)}},6161:(t,e,n)=>{var r=n(4715),i=n(4189);t.exports=function t(e,n,s,o,a){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,s,o,t,a))}},4715:(t,e,n)=>{var r=n(9310),i=n(8832),s=n(391),o=n(2132),a=n(1344),u=n(9464),_=n(5752),c=n(264),l="[object Arguments]",h="[object Array]",T="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,f,E,d){var N=u(t),S=u(e),m=N?h:a(t),A=S?h:a(e),P=(m=m==l?T:m)==T,g=(A=A==l?T:A)==T,y=m==A;if(y&&_(t)){if(!_(e))return!1;N=!0,P=!1}if(y&&!P)return d||(d=new r),N||c(t)?i(t,e,n,f,E,d):s(t,e,m,n,f,E,d);if(!(1&n)){var R=P&&p.call(t,"__wrapped__"),I=g&&p.call(e,"__wrapped__");if(R||I){var D=R?t.value():t,O=I?e.value():e;return d||(d=new r),E(D,O,n,f,d)}}return!!y&&(d||(d=new r),o(t,e,n,f,E,d))}},1939:(t,e,n)=>{var r=n(1344),i=n(4189);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},2272:(t,e,n)=>{var r=n(9310),i=n(6161);t.exports=function(t,e,n,s){var o=n.length,a=o,u=!s;if(null==t)return!a;for(t=Object(t);o--;){var _=n[o];if(u&&_[2]?_[1]!==t[_[0]]:!(_[0]in t))return!1}for(;++o<a;){var c=(_=n[o])[0],l=t[c],h=_[1];if(u&&_[2]){if(void 0===l&&!(c in t))return!1}else{var T=new r;if(s)var p=s(l,h,c,t,e,T);if(!(void 0===p?i(h,l,3,s,T):p))return!1}}return!0}},1264:t=>{t.exports=function(t){return t!=t}},9950:(t,e,n)=>{var r=n(6553),i=n(3909),s=n(6130),o=n(2760),a=/^\[object .+?Constructor\]$/,u=Function.prototype,_=Object.prototype,c=u.toString,l=_.hasOwnProperty,h=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||i(t))&&(r(t)?h:a).test(o(t))}},8685:(t,e,n)=>{var r=n(1344),i=n(4189);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},8912:(t,e,n)=>{var r=n(6077),i=n(5841),s=n(4189),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return s(t)&&i(t.length)&&!!o[r(t)]}},535:(t,e,n)=>{var r=n(3052),i=n(2273),s=n(515),o=n(9464),a=n(416);t.exports=function(t){return"function"==typeof t?t:null==t?s:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):a(t)}},4829:(t,e,n)=>{var r=n(2632),i=n(9963),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))s.call(t,n)&&"constructor"!=n&&e.push(n);return e}},9262:(t,e,n)=>{var r=n(6130),i=n(2632),s=n(312),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return s(t);var e=i(t),n=[];for(var a in t)("constructor"!=a||!e&&o.call(t,a))&&n.push(a);return n}},5703:(t,e,n)=>{var r=n(9040),i=n(623);t.exports=function(t,e){var n=-1,s=i(t)?Array(t.length):[];return r(t,(function(t,r,i){s[++n]=e(t,r,i)})),s}},3052:(t,e,n)=>{var r=n(2272),i=n(3145),s=n(9738);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?s(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},2273:(t,e,n)=>{var r=n(6161),i=n(613),s=n(8146),o=n(3297),a=n(1685),u=n(9738),_=n(1966);t.exports=function(t,e){return o(t)&&a(e)?u(_(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?s(n,t):r(e,o,3)}}},5004:(t,e,n)=>{var r=n(6233),i=n(3117),s=n(535),o=n(5703),a=n(4244),u=n(7746),_=n(8609),c=n(515),l=n(9464);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return l(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[c];var h=-1;e=r(e,u(s));var T=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++h,value:t}}));return a(T,(function(t,e){return _(t,e,n)}))}},3612:(t,e,n)=>{var r=n(6333),i=n(8146);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},6333:(t,e,n)=>{var r=n(3117),i=n(6601),s=n(8328);t.exports=function(t,e,n){for(var o=-1,a=e.length,u={};++o<a;){var _=e[o],c=r(t,_);n(c,_)&&i(u,s(_,t),c)}return u}},4024:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},4822:(t,e,n)=>{var r=n(3117);t.exports=function(t){return function(e){return r(e,t)}}},721:t=>{t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},8339:(t,e,n)=>{var r=n(515),i=n(4088),s=n(6218);t.exports=function(t,e){return s(i(t,e,r),t+"")}},6601:(t,e,n)=>{var r=n(6312),i=n(8328),s=n(1574),o=n(6130),a=n(1966);t.exports=function(t,e,n,u){if(!o(t))return t;for(var _=-1,c=(e=i(e,t)).length,l=c-1,h=t;null!=h&&++_<c;){var T=a(e[_]),p=n;if("__proto__"===T||"constructor"===T||"prototype"===T)return t;if(_!=l){var f=h[T];void 0===(p=u?u(f,T,h):void 0)&&(p=o(f)?f:s(e[_+1])?[]:{})}r(h,T,p),h=h[T]}return t}},5193:(t,e,n)=>{var r=n(4961),i=n(6514),s=n(515),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:s;t.exports=o},6699:t=>{t.exports=function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}},4244:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},8355:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},8761:(t,e,n)=>{var r=n(7432),i=n(6233),s=n(9464),o=n(5733),a=r?r.prototype:void 0,u=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(s(e))return i(e,t)+"";if(o(e))return u?u.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},7746:t=>{t.exports=function(t){return function(e){return t(e)}}},4900:(t,e,n)=>{var r=n(6874),i=n(3574),s=n(9106),o=n(4854),a=n(754),u=n(4886);t.exports=function(t,e,n){var _=-1,c=i,l=t.length,h=!0,T=[],p=T;if(n)h=!1,c=s;else if(l>=200){var f=e?null:a(t);if(f)return u(f);h=!1,c=o,p=new r}else p=e?[]:T;t:for(;++_<l;){var E=t[_],d=e?e(E):E;if(E=n||0!==E?E:0,h&&d==d){for(var N=p.length;N--;)if(p[N]===d)continue t;e&&p.push(d),T.push(E)}else c(p,d,n)||(p!==T&&p.push(d),T.push(E))}return T}},3704:(t,e,n)=>{var r=n(8328),i=n(1853),s=n(320),o=n(1966);t.exports=function(t,e){return e=r(e,t),null==(t=s(t,e))||delete t[o(i(e))]}},4854:t=>{t.exports=function(t,e){return t.has(e)}},3282:(t,e,n)=>{var r=n(8796);t.exports=function(t){return r(t)?t:[]}},8328:(t,e,n)=>{var r=n(9464),i=n(3297),s=n(5643),o=n(8753);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:s(o(t))}},1769:(t,e,n)=>{var r=n(6699);t.exports=function(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:r(t,e,n)}},990:(t,e,n)=>{var r=n(181);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},1733:(t,e,n)=>{t=n.nmd(t);var r=n(5036),i=e&&!e.nodeType&&e,s=i&&t&&!t.nodeType&&t,o=s&&s.exports===i?r.Buffer:void 0,a=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=a?a(n):new t.constructor(n);return t.copy(r),r}},9842:(t,e,n)=>{var r=n(990);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},7054:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},6923:(t,e,n)=>{var r=n(7432),i=r?r.prototype:void 0,s=i?i.valueOf:void 0;t.exports=function(t){return s?Object(s.call(t)):{}}},1058:(t,e,n)=>{var r=n(990);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},5619:(t,e,n)=>{var r=n(5733);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,s=t==t,o=r(t),a=void 0!==e,u=null===e,_=e==e,c=r(e);if(!u&&!c&&!o&&t>e||o&&a&&_&&!u&&!c||i&&a&&_||!n&&_||!s)return 1;if(!i&&!o&&!c&&t<e||c&&n&&s&&!i&&!o||u&&n&&s||!a&&s||!_)return-1}return 0}},8609:(t,e,n)=>{var r=n(5619);t.exports=function(t,e,n){for(var i=-1,s=t.criteria,o=e.criteria,a=s.length,u=n.length;++i<a;){var _=r(s[i],o[i]);if(_)return i>=u?_:_*("desc"==n[i]?-1:1)}return t.index-e.index}},5240:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},5634:(t,e,n)=>{var r=n(6312),i=n(6571);t.exports=function(t,e,n,s){var o=!n;n||(n={});for(var a=-1,u=e.length;++a<u;){var _=e[a],c=s?s(n[_],t[_],_,n,t):void 0;void 0===c&&(c=t[_]),o?i(n,_,c):r(n,_,c)}return n}},6752:(t,e,n)=>{var r=n(5634),i=n(1809);t.exports=function(t,e){return r(t,i(t),e)}},4239:(t,e,n)=>{var r=n(5634),i=n(9242);t.exports=function(t,e){return r(t,i(t),e)}},4780:(t,e,n)=>{var r=n(5036)["__core-js_shared__"];t.exports=r},9693:(t,e,n)=>{var r=n(4170),i=n(3644),s=n(535),o=n(9464);t.exports=function(t,e){return function(n,a){var u=o(n)?r:i,_=e?e():{};return u(n,t,s(a,2),_)}}},251:(t,e,n)=>{var r=n(623);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var s=n.length,o=e?s:-1,a=Object(n);(e?o--:++o<s)&&!1!==i(a[o],o,a););return n}}},2294:t=>{t.exports=function(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var u=o[t?a:++i];if(!1===n(s[u],u,s))break}return e}}},2032:(t,e,n)=>{var r=n(1769),i=n(5675),s=n(935),o=n(8753);t.exports=function(t){return function(e){e=o(e);var n=i(e)?s(e):void 0,a=n?n[0]:e.charAt(0),u=n?r(n,1).join(""):e.slice(1);return a[t]()+u}}},2222:(t,e,n)=>{var r=n(2609),i=n(767),s=n(6376),o=RegExp("['’]","g");t.exports=function(t){return function(e){return r(s(i(e).replace(o,"")),t,"")}}},754:(t,e,n)=>{var r=n(7802),i=n(3125),s=n(4886),o=r&&1/s(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},5589:(t,e,n)=>{var r=n(6446);t.exports=function(t){return r(t)?void 0:t}},9210:(t,e,n)=>{var r=n(721)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});t.exports=r},6514:(t,e,n)=>{var r=n(3789),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},8832:(t,e,n)=>{var r=n(6874),i=n(119),s=n(4854);t.exports=function(t,e,n,o,a,u){var _=1&n,c=t.length,l=e.length;if(c!=l&&!(_&&l>c))return!1;var h=u.get(t),T=u.get(e);if(h&&T)return h==e&&T==t;var p=-1,f=!0,E=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++p<c;){var d=t[p],N=e[p];if(o)var S=_?o(N,d,p,e,t,u):o(d,N,p,t,e,u);if(void 0!==S){if(S)continue;f=!1;break}if(E){if(!i(e,(function(t,e){if(!s(E,e)&&(d===t||a(d,t,n,o,u)))return E.push(e)}))){f=!1;break}}else if(d!==N&&!a(d,N,n,o,u)){f=!1;break}}return u.delete(t),u.delete(e),f}},391:(t,e,n)=>{var r=n(7432),i=n(181),s=n(9679),o=n(8832),a=n(5860),u=n(4886),_=r?r.prototype:void 0,c=_?_.valueOf:void 0;t.exports=function(t,e,n,r,_,l,h){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var T=a;case"[object Set]":var p=1&r;if(T||(T=u),t.size!=e.size&&!p)return!1;var f=h.get(t);if(f)return f==e;r|=2,h.set(t,e);var E=o(T(t),T(e),r,_,l,h);return h.delete(t),E;case"[object Symbol]":if(c)return c.call(t)==c.call(e)}return!1}},2132:(t,e,n)=>{var r=n(1679),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,s,o,a){var u=1&n,_=r(t),c=_.length;if(c!=r(e).length&&!u)return!1;for(var l=c;l--;){var h=_[l];if(!(u?h in e:i.call(e,h)))return!1}var T=a.get(t),p=a.get(e);if(T&&p)return T==e&&p==t;var f=!0;a.set(t,e),a.set(e,t);for(var E=u;++l<c;){var d=t[h=_[l]],N=e[h];if(s)var S=u?s(N,d,h,e,t,a):s(d,N,h,t,e,a);if(!(void 0===S?d===N||o(d,N,n,s,a):S)){f=!1;break}E||(E="constructor"==h)}if(f&&!E){var m=t.constructor,A=e.constructor;m==A||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof A&&A instanceof A||(f=!1)}return a.delete(t),a.delete(e),f}},565:(t,e,n)=>{var r=n(9607),i=n(4088),s=n(6218);t.exports=function(t){return s(i(t,void 0,r),t+"")}},8565:t=>{var e="object"==typeof global&&global&&global.Object===Object&&global;t.exports=e},1679:(t,e,n)=>{var r=n(4090),i=n(1809),s=n(9125);t.exports=function(t){return r(t,s,i)}},6628:(t,e,n)=>{var r=n(4090),i=n(9242),s=n(7798);t.exports=function(t){return r(t,s,i)}},5930:(t,e,n)=>{var r=n(29);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},3145:(t,e,n)=>{var r=n(1685),i=n(9125);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var s=e[n],o=t[s];e[n]=[s,o,r(o)]}return e}},3789:(t,e,n)=>{var r=n(9950),i=n(8869);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},4754:(t,e,n)=>{var r=n(2344)(Object.getPrototypeOf,Object);t.exports=r},4444:(t,e,n)=>{var r=n(7432),i=Object.prototype,s=i.hasOwnProperty,o=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=s.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[a]=n:delete t[a]),i}},1809:(t,e,n)=>{var r=n(5773),i=n(3864),s=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return s.call(t,e)})))}:i;t.exports=a},9242:(t,e,n)=>{var r=n(1595),i=n(4754),s=n(1809),o=n(3864),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,s(t)),t=i(t);return e}:o;t.exports=a},1344:(t,e,n)=>{var r=n(7737),i=n(16),s=n(1767),o=n(7802),a=n(20),u=n(6077),_=n(2760),c="[object Map]",l="[object Promise]",h="[object Set]",T="[object WeakMap]",p="[object DataView]",f=_(r),E=_(i),d=_(s),N=_(o),S=_(a),m=u;(r&&m(new r(new ArrayBuffer(1)))!=p||i&&m(new i)!=c||s&&m(s.resolve())!=l||o&&m(new o)!=h||a&&m(new a)!=T)&&(m=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?_(n):"";if(r)switch(r){case f:return p;case E:return c;case d:return l;case N:return h;case S:return T}return e}),t.exports=m},8869:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},3773:(t,e,n)=>{var r=n(8328),i=n(7933),s=n(9464),o=n(1574),a=n(5841),u=n(1966);t.exports=function(t,e,n){for(var _=-1,c=(e=r(e,t)).length,l=!1;++_<c;){var h=u(e[_]);if(!(l=null!=t&&n(t,h)))break;t=t[h]}return l||++_!=c?l:!!(c=null==t?0:t.length)&&a(c)&&o(h,c)&&(s(t)||i(t))}},5675:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},8683:t=>{var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function(t){return e.test(t)}},9763:(t,e,n)=>{var r=n(267);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},3879:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},8150:(t,e,n)=>{var r=n(267),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},7106:(t,e,n)=>{var r=n(267),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},938:(t,e,n)=>{var r=n(267);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},7928:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},4290:(t,e,n)=>{var r=n(990),i=n(9842),s=n(7054),o=n(6923),a=n(1058);t.exports=function(t,e,n){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(t,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return s(t);case"[object Symbol]":return o(t)}}},6082:(t,e,n)=>{var r=n(6309),i=n(4754),s=n(2632);t.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:r(i(t))}},8352:(t,e,n)=>{var r=n(7432),i=n(7933),s=n(9464),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return s(t)||i(t)||!!(o&&t&&t[o])}},1574:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},4661:(t,e,n)=>{var r=n(9679),i=n(623),s=n(1574),o=n(6130);t.exports=function(t,e,n){if(!o(n))return!1;var a=typeof e;return!!("number"==a?i(n)&&s(e,n.length):"string"==a&&e in n)&&r(n[e],t)}},3297:(t,e,n)=>{var r=n(9464),i=n(5733),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||o.test(t)||!s.test(t)||null!=e&&t in Object(e)}},29:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},3909:(t,e,n)=>{var r,i=n(4780),s=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!s&&s in t}},2632:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},1685:(t,e,n)=>{var r=n(6130);t.exports=function(t){return t==t&&!r(t)}},3023:t=>{t.exports=function(){this.__data__=[],this.size=0}},4747:(t,e,n)=>{var r=n(5096),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},9978:(t,e,n)=>{var r=n(5096);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},6734:(t,e,n)=>{var r=n(5096);t.exports=function(t){return r(this.__data__,t)>-1}},4710:(t,e,n)=>{var r=n(5096);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},615:(t,e,n)=>{var r=n(5072),i=n(5332),s=n(16);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||i),string:new r}}},9859:(t,e,n)=>{var r=n(5930);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},5170:(t,e,n)=>{var r=n(5930);t.exports=function(t){return r(this,t).get(t)}},8470:(t,e,n)=>{var r=n(5930);t.exports=function(t){return r(this,t).has(t)}},7646:(t,e,n)=>{var r=n(5930);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},5860:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},9738:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},5647:(t,e,n)=>{var r=n(7105);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},267:(t,e,n)=>{var r=n(3789)(Object,"create");t.exports=r},9963:(t,e,n)=>{var r=n(2344)(Object.keys,Object);t.exports=r},312:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},1172:(t,e,n)=>{t=n.nmd(t);var r=n(8565),i=e&&!e.nodeType&&e,s=i&&t&&!t.nodeType&&t,o=s&&s.exports===i&&r.process,a=function(){try{return s&&s.require&&s.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a},3371:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},2344:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},4088:(t,e,n)=>{var r=n(9822),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var s=arguments,o=-1,a=i(s.length-e,0),u=Array(a);++o<a;)u[o]=s[e+o];o=-1;for(var _=Array(e+1);++o<e;)_[o]=s[o];return _[e]=n(u),r(t,this,_)}}},320:(t,e,n)=>{var r=n(3117),i=n(6699);t.exports=function(t,e){return e.length<2?t:r(t,i(e,0,-1))}},5036:(t,e,n)=>{var r=n(8565),i="object"==typeof self&&self&&self.Object===Object&&self,s=r||i||Function("return this")();t.exports=s},9871:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},1772:t=>{t.exports=function(t){return this.__data__.has(t)}},4886:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},6218:(t,e,n)=>{var r=n(5193),i=n(5366)(r);t.exports=i},5366:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),s=16-(i-r);if(r=i,s>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},9333:(t,e,n)=>{var r=n(5332);t.exports=function(){this.__data__=new r,this.size=0}},1893:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},9676:t=>{t.exports=function(t){return this.__data__.get(t)}},6536:t=>{t.exports=function(t){return this.__data__.has(t)}},3336:(t,e,n)=>{var r=n(5332),i=n(16),s=n(1708);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new s(o)}return n.set(t,e),this.size=n.size,this}},7635:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},935:(t,e,n)=>{var r=n(1819),i=n(5675),s=n(5823);t.exports=function(t){return i(t)?s(t):r(t)}},5643:(t,e,n)=>{var r=n(5647),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(s,"$1"):n||t)})),e}));t.exports=o},1966:(t,e,n)=>{var r=n(5733);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},2760:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},5823:t=>{var e="\\ud800-\\udfff",n="["+e+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",s="[^"+e+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")?",_="[\\ufe0e\\ufe0f]?",c=_+u+"(?:\\u200d(?:"+[s,o,a].join("|")+")"+_+u+")*",l="(?:"+[s+r+"?",r,o,a,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){return t.match(h)||[]}},4160:t=>{var e="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",s="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+s+"]",a="\\d+",u="["+n+"]",_="["+r+"]",c="[^"+e+s+a+n+r+i+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",T="["+i+"]",p="(?:"+_+"|"+c+")",f="(?:"+T+"|"+c+")",E="(?:['’](?:d|ll|m|re|s|t|ve))?",d="(?:['’](?:D|LL|M|RE|S|T|VE))?",N="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",S="[\\ufe0e\\ufe0f]?",m=S+N+"(?:\\u200d(?:"+["[^"+e+"]",l,h].join("|")+")"+S+N+")*",A="(?:"+[u,l,h].join("|")+")"+m,P=RegExp([T+"?"+_+"+"+E+"(?="+[o,T,"$"].join("|")+")",f+"+"+d+"(?="+[o,T+p,"$"].join("|")+")",T+"?"+p+"+"+E,T+"+"+d,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",a,A].join("|"),"g");t.exports=function(t){return t.match(P)||[]}},3039:(t,e,n)=>{var r=n(3215),i=n(2222)((function(t,e,n){return e=e.toLowerCase(),t+(n?r(e):e)}));t.exports=i},3215:(t,e,n)=>{var r=n(8753),i=n(4367);t.exports=function(t){return i(r(t).toLowerCase())}},1454:(t,e,n)=>{var r=n(9192);t.exports=function(t){return r(t,5)}},3402:(t,e,n)=>{var r=n(9192);t.exports=function(t,e){return r(t,5,e="function"==typeof e?e:void 0)}},7120:t=>{t.exports=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}},4961:t=>{t.exports=function(t){return function(){return t}}},767:(t,e,n)=>{var r=n(9210),i=n(8753),s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.exports=function(t){return(t=i(t))&&t.replace(s,r).replace(o,"")}},9679:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},4099:(t,e,n)=>{var r=n(8753),i=/[\\^$.*+?()[\]{}|]/g,s=RegExp(i.source);t.exports=function(t){return(t=r(t))&&s.test(t)?t.replace(i,"\\$&"):t}},9607:(t,e,n)=>{var r=n(5951);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},3671:(t,e,n)=>{var r=n(134).runInContext();t.exports=n(2385)(r,r)},2385:(t,e,n)=>{var r=n(4287),i=n(197),s=Array.prototype.push;function o(t,e){return 2==e?function(e,n){return t(e,n)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,n=Array(e);e--;)n[e]=t[e];return n}function u(t,e){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=e.apply(void 0,r);return t.apply(void 0,r),i}}}t.exports=function t(e,n,_,c){var l="function"==typeof n,h=n===Object(n);if(h&&(c=_,_=n,n=void 0),null==_)throw new TypeError;c||(c={});var T={cap:!("cap"in c)||c.cap,curry:!("curry"in c)||c.curry,fixed:!("fixed"in c)||c.fixed,immutable:!("immutable"in c)||c.immutable,rearg:!("rearg"in c)||c.rearg},p=l?_:i,f="curry"in c&&c.curry,E="fixed"in c&&c.fixed,d="rearg"in c&&c.rearg,N=l?_.runInContext():void 0,S=l?_:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},m=S.ary,A=S.assign,P=S.clone,g=S.curry,y=S.forEach,R=S.isArray,I=S.isError,D=S.isFunction,O=S.isWeakMap,C=S.keys,b=S.rearg,v=S.toInteger,w=S.toPath,L=C(r.aryMethod),B={castArray:function(t){return function(){var e=arguments[0];return R(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[1],n=t(arguments[0],e),r=n.length;return T.cap&&"number"==typeof e?(e=e>2?e-2:1,r&&r<=e?n:o(n,e)):n}},mixin:function(t){return function(e){var n=this;if(!D(n))return t(n,Object(e));var r=[];return y(C(e),(function(t){D(e[t])&&r.push([t,n.prototype[t]])})),t(n,Object(e)),y(r,(function(t){var e=t[1];D(e)?n.prototype[t[0]]=e:delete n.prototype[t[0]]})),n}},nthArg:function(t){return function(e){var n=e<0?1:v(e)+1;return g(t(e),n)}},rearg:function(t){return function(e,n){var r=n?n.length:0;return g(t(e,n),r)}},runInContext:function(n){return function(r){return t(e,n(r),c)}}};function Y(t,e,n){if(T.fixed&&(E||!r.skipFixed[t])){var i=r.methodSpread[t],o=i&&i.start;return void 0===o?m(e,n):function(t,e){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var o=i[e],a=i.slice(0,e);return o&&s.apply(a,o),e!=r&&s.apply(a,i.slice(e+1)),t.apply(this,a)}}(e,o)}return e}function U(t,e,n){return T.rearg&&n>1&&(d||!r.skipRearg[t])?b(e,r.methodRearg[t]||r.aryRearg[n]):e}function M(t,e){for(var n=-1,r=(e=w(e)).length,i=r-1,s=P(Object(t)),o=s;null!=o&&++n<r;){var a=e[n],u=o[a];null==u||D(u)||I(u)||O(u)||(o[a]=P(n==i?u:Object(u))),o=o[a]}return s}function x(e,n){var i=r.aliasToReal[e]||e,s=r.remap[i]||i,o=c;return function(e){var r=l?N:S,a=l?N[s]:n,u=A(A({},o),e);return t(r,i,a,u)}}function V(t,e){return function(){var n=arguments.length;if(!n)return t();for(var r=Array(n);n--;)r[n]=arguments[n];var i=T.rearg?0:n-1;return r[i]=e(r[i]),t.apply(void 0,r)}}function F(t,e,n){var i,s=r.aliasToReal[t]||t,_=e,c=B[s];return c?_=c(e):T.immutable&&(r.mutate.array[s]?_=u(e,a):r.mutate.object[s]?_=u(e,function(t){return function(e){return t({},e)}}(e)):r.mutate.set[s]&&(_=u(e,M))),y(L,(function(t){return y(r.aryMethod[t],(function(e){if(s==e){var n=r.methodSpread[s],a=n&&n.afterRearg;return i=a?Y(s,U(s,_,t),t):U(s,Y(s,_,t),t),i=function(t,e,n){return f||T.curry&&n>1?g(e,n):e}(0,i=function(t,e){if(T.cap){var n=r.iterateeRearg[t];if(n)return function(t,e){return V(t,(function(t){var n=e.length;return function(t,e){return 2==e?function(e,n){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}(b(o(t,n),e),n)}))}(e,n);var i=!l&&r.iterateeAry[t];if(i)return function(t,e){return V(t,(function(t){return"function"==typeof t?o(t,e):t}))}(e,i)}return e}(s,i),t),!1}})),!i})),i||(i=_),i==e&&(i=f?g(i,1):function(){return e.apply(this,arguments)}),i.convert=x(s,e),i.placeholder=e.placeholder=n,i}if(!h)return F(n,_,p);var k=_,j=[];return y(L,(function(t){y(r.aryMethod[t],(function(t){var e=k[r.remap[t]||t];e&&j.push([t,F(t,e,k)])}))})),y(C(k),(function(t){var e=k[t];if("function"==typeof e){for(var n=j.length;n--;)if(j[n][0]==t)return;e.convert=x(t,e),j.push([t,e])}})),y(j,(function(t){k[t[0]]=t[1]})),k.convert=function(t){return k.runInContext.convert(t)(void 0)},k.placeholder=k,y(C(k),(function(t){y(r.realToAlias[t]||[],(function(e){k[e]=k[t]}))})),k}},4287:(t,e)=>{e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,n=e.aliasToReal,r={};for(var i in n){var s=n[i];t.call(r,s)?r[s].push(i):r[s]=[i]}return r}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},197:t=>{t.exports={}},4584:t=>{t.exports=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}},613:(t,e,n)=>{var r=n(3117);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},2535:(t,e,n)=>{var r=n(6571),i=n(9693),s=Object.prototype.hasOwnProperty,o=i((function(t,e,n){s.call(t,n)?t[n].push(e):r(t,n,[e])}));t.exports=o},8146:(t,e,n)=>{var r=n(2282),i=n(3773);t.exports=function(t,e){return null!=t&&i(t,e,r)}},515:t=>{t.exports=function(t){return t}},4200:(t,e,n)=>{var r=n(6233),i=n(2800),s=n(8339),o=n(3282),a=s((function(t){var e=r(t,o);return e.length&&e[0]===t[0]?i(e):[]}));t.exports=a},7933:(t,e,n)=>{var r=n(5301),i=n(4189),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},9464:t=>{var e=Array.isArray;t.exports=e},623:(t,e,n)=>{var r=n(6553),i=n(5841);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},8796:(t,e,n)=>{var r=n(623),i=n(4189);t.exports=function(t){return i(t)&&r(t)}},5752:(t,e,n)=>{t=n.nmd(t);var r=n(5036),i=n(8042),s=e&&!e.nodeType&&e,o=s&&t&&!t.nodeType&&t,a=o&&o.exports===s?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u},6241:(t,e,n)=>{var r=n(2201),i=n(7746),s=n(1172),o=s&&s.isDate,a=o?i(o):r;t.exports=a},4169:(t,e,n)=>{var r=n(6161);t.exports=function(t,e){return r(t,e)}},6553:(t,e,n)=>{var r=n(6077),i=n(6130);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5841:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},6043:(t,e,n)=>{var r=n(1939),i=n(7746),s=n(1172),o=s&&s.isMap,a=o?i(o):r;t.exports=a},2168:(t,e,n)=>{var r=n(2164);t.exports=function(t){return r(t)&&t!=+t}},2164:(t,e,n)=>{var r=n(6077),i=n(4189);t.exports=function(t){return"number"==typeof t||i(t)&&"[object Number]"==r(t)}},6130:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},4189:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},6446:(t,e,n)=>{var r=n(6077),i=n(4754),s=n(4189),o=Function.prototype,a=Object.prototype,u=o.toString,_=a.hasOwnProperty,c=u.call(Object);t.exports=function(t){if(!s(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=_.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}},6885:(t,e,n)=>{var r=n(8685),i=n(7746),s=n(1172),o=s&&s.isSet,a=o?i(o):r;t.exports=a},7072:(t,e,n)=>{var r=n(6077),i=n(9464),s=n(4189);t.exports=function(t){return"string"==typeof t||!i(t)&&s(t)&&"[object String]"==r(t)}},5733:(t,e,n)=>{var r=n(6077),i=n(4189);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},264:(t,e,n)=>{var r=n(8912),i=n(7746),s=n(1172),o=s&&s.isTypedArray,a=o?i(o):r;t.exports=a},9125:(t,e,n)=>{var r=n(6272),i=n(4829),s=n(623);t.exports=function(t){return s(t)?r(t):i(t)}},7798:(t,e,n)=>{var r=n(6272),i=n(9262),s=n(623);t.exports=function(t){return s(t)?r(t,!0):i(t)}},1853:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},5076:function(t,e,n){var r;t=n.nmd(t),function(){var i,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,_=128,c=1/0,l=9007199254740991,h=NaN,T=4294967295,p=[["ary",_],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],f="[object Arguments]",E="[object Array]",d="[object Boolean]",N="[object Date]",S="[object Error]",m="[object Function]",A="[object GeneratorFunction]",P="[object Map]",g="[object Number]",y="[object Object]",R="[object Promise]",I="[object RegExp]",D="[object Set]",O="[object String]",C="[object Symbol]",b="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",L="[object Float32Array]",B="[object Float64Array]",Y="[object Int8Array]",U="[object Int16Array]",M="[object Int32Array]",x="[object Uint8Array]",V="[object Uint8ClampedArray]",F="[object Uint16Array]",k="[object Uint32Array]",j=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,W=RegExp(K.source),z=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,it=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ot=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_t=/[()=,{}\[\]\/\s]/,ct=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,Tt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,ft=/^\[object .+?Constructor\]$/,Et=/^0o[0-7]+$/i,dt=/^(?:0|[1-9]\d*)$/,Nt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,St=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,At="\\ud800-\\udfff",Pt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",gt="\\u2700-\\u27bf",yt="a-z\\xdf-\\xf6\\xf8-\\xff",Rt="A-Z\\xc0-\\xd6\\xd8-\\xde",It="\\ufe0e\\ufe0f",Dt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ot="["+At+"]",Ct="["+Dt+"]",bt="["+Pt+"]",vt="\\d+",wt="["+gt+"]",Lt="["+yt+"]",Bt="[^"+At+Dt+vt+gt+yt+Rt+"]",Yt="\\ud83c[\\udffb-\\udfff]",Ut="[^"+At+"]",Mt="(?:\\ud83c[\\udde6-\\uddff]){2}",xt="[\\ud800-\\udbff][\\udc00-\\udfff]",Vt="["+Rt+"]",Ft="\\u200d",kt="(?:"+Lt+"|"+Bt+")",jt="(?:"+Vt+"|"+Bt+")",Gt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Kt="(?:"+bt+"|"+Yt+")?",Ht="["+It+"]?",Wt=Ht+Kt+"(?:"+Ft+"(?:"+[Ut,Mt,xt].join("|")+")"+Ht+Kt+")*",zt="(?:"+[wt,Mt,xt].join("|")+")"+Wt,Qt="(?:"+[Ut+bt+"?",bt,Mt,xt,Ot].join("|")+")",Xt=RegExp("['’]","g"),$t=RegExp(bt,"g"),Jt=RegExp(Yt+"(?="+Yt+")|"+Qt+Wt,"g"),Zt=RegExp([Vt+"?"+Lt+"+"+Gt+"(?="+[Ct,Vt,"$"].join("|")+")",jt+"+"+qt+"(?="+[Ct,Vt+kt,"$"].join("|")+")",Vt+"?"+kt+"+"+Gt,Vt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,zt].join("|"),"g"),te=RegExp("["+Ft+At+Pt+It+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,ie={};ie[L]=ie[B]=ie[Y]=ie[U]=ie[M]=ie[x]=ie[V]=ie[F]=ie[k]=!0,ie[f]=ie[E]=ie[v]=ie[d]=ie[w]=ie[N]=ie[S]=ie[m]=ie[P]=ie[g]=ie[y]=ie[I]=ie[D]=ie[O]=ie[b]=!1;var se={};se[f]=se[E]=se[v]=se[w]=se[d]=se[N]=se[L]=se[B]=se[Y]=se[U]=se[M]=se[P]=se[g]=se[y]=se[I]=se[D]=se[O]=se[C]=se[x]=se[V]=se[F]=se[k]=!0,se[S]=se[m]=se[b]=!1;var oe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,_e="object"==typeof global&&global&&global.Object===Object&&global,ce="object"==typeof self&&self&&self.Object===Object&&self,le=_e||ce||Function("return this")(),he=e&&!e.nodeType&&e,Te=he&&t&&!t.nodeType&&t,pe=Te&&Te.exports===he,fe=pe&&_e.process,Ee=function(){try{return Te&&Te.require&&Te.require("util").types||fe&&fe.binding&&fe.binding("util")}catch(t){}}(),de=Ee&&Ee.isArrayBuffer,Ne=Ee&&Ee.isDate,Se=Ee&&Ee.isMap,me=Ee&&Ee.isRegExp,Ae=Ee&&Ee.isSet,Pe=Ee&&Ee.isTypedArray;function ge(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ye(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}function Re(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function De(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Oe(t,e){for(var n=-1,r=null==t?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Ce(t,e){return!(null==t||!t.length)&&Ve(t,e,0)>-1}function be(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function ve(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function we(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Le(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function Be(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Ye(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Ue=Ge("length");function Me(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function xe(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}function Ve(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):xe(t,ke,n)}function Fe(t,e,n,r){for(var i=n-1,s=t.length;++i<s;)if(r(t[i],e))return i;return-1}function ke(t){return t!=t}function je(t,e){var n=null==t?0:t.length;return n?He(t,e)/n:h}function Ge(t){return function(e){return null==e?i:e[t]}}function qe(t){return function(e){return null==t?i:t[e]}}function Ke(t,e,n,r,i){return i(t,(function(t,i,s){n=r?(r=!1,t):e(n,t,i,s)})),n}function He(t,e){for(var n,r=-1,s=t.length;++r<s;){var o=e(t[r]);o!==i&&(n=n===i?o:n+o)}return n}function We(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function ze(t){return t?t.slice(0,hn(t)+1).replace(rt,""):t}function Qe(t){return function(e){return t(e)}}function Xe(t,e){return ve(e,(function(e){return t[e]}))}function $e(t,e){return t.has(e)}function Je(t,e){for(var n=-1,r=t.length;++n<r&&Ve(e,t[n],0)>-1;);return n}function Ze(t,e){for(var n=t.length;n--&&Ve(e,t[n],0)>-1;);return n}var tn=qe({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),en=qe({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(t){return"\\"+oe[t]}function rn(t){return te.test(t)}function sn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function on(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n];o!==e&&o!==a||(t[n]=a,s[i++]=n)}return s}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function _n(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function cn(t){return rn(t)?function(t){for(var e=Jt.lastIndex=0;Jt.test(t);)++e;return e}(t):Ue(t)}function ln(t){return rn(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function hn(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var Tn=qe({"&":"&","<":"<",">":">",""":'"',"'":"'"}),pn=function t(e){var n,r=(e=null==e?le:pn.defaults(le.Object(),e,pn.pick(le,ne))).Array,it=e.Date,At=e.Error,Pt=e.Function,gt=e.Math,yt=e.Object,Rt=e.RegExp,It=e.String,Dt=e.TypeError,Ot=r.prototype,Ct=Pt.prototype,bt=yt.prototype,vt=e["__core-js_shared__"],wt=Ct.toString,Lt=bt.hasOwnProperty,Bt=0,Yt=(n=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ut=bt.toString,Mt=wt.call(yt),xt=le._,Vt=Rt("^"+wt.call(Lt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ft=pe?e.Buffer:i,kt=e.Symbol,jt=e.Uint8Array,Gt=Ft?Ft.allocUnsafe:i,qt=on(yt.getPrototypeOf,yt),Kt=yt.create,Ht=bt.propertyIsEnumerable,Wt=Ot.splice,zt=kt?kt.isConcatSpreadable:i,Qt=kt?kt.iterator:i,Jt=kt?kt.toStringTag:i,te=function(){try{var t=us(yt,"defineProperty");return t({},"",{}),t}catch(t){}}(),oe=e.clearTimeout!==le.clearTimeout&&e.clearTimeout,_e=it&&it.now!==le.Date.now&&it.now,ce=e.setTimeout!==le.setTimeout&&e.setTimeout,he=gt.ceil,Te=gt.floor,fe=yt.getOwnPropertySymbols,Ee=Ft?Ft.isBuffer:i,Ue=e.isFinite,qe=Ot.join,fn=on(yt.keys,yt),En=gt.max,dn=gt.min,Nn=it.now,Sn=e.parseInt,mn=gt.random,An=Ot.reverse,Pn=us(e,"DataView"),gn=us(e,"Map"),yn=us(e,"Promise"),Rn=us(e,"Set"),In=us(e,"WeakMap"),Dn=us(yt,"create"),On=In&&new In,Cn={},bn=Us(Pn),vn=Us(gn),wn=Us(yn),Ln=Us(Rn),Bn=Us(In),Yn=kt?kt.prototype:i,Un=Yn?Yn.valueOf:i,Mn=Yn?Yn.toString:i;function xn(t){if(ta(t)&&!Go(t)&&!(t instanceof jn)){if(t instanceof kn)return t;if(Lt.call(t,"__wrapped__"))return Ms(t)}return new kn(t)}var Vn=function(){function t(){}return function(e){if(!Zo(e))return{};if(Kt)return Kt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Fn(){}function kn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function jn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=T,this.__views__=[]}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Kn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Kn;++e<n;)this.add(t[e])}function Wn(t){var e=this.__data__=new qn(t);this.size=e.size}function zn(t,e){var n=Go(t),r=!n&&jo(t),i=!n&&!r&&Wo(t),s=!n&&!r&&!i&&ua(t),o=n||r||i||s,a=o?We(t.length,It):[],u=a.length;for(var _ in t)!e&&!Lt.call(t,_)||o&&("length"==_||i&&("offset"==_||"parent"==_)||s&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||fs(_,u))||a.push(_);return a}function Qn(t){var e=t.length;return e?t[Kr(0,e-1)]:i}function Xn(t,e){return vs(Ii(t),sr(e,0,t.length))}function $n(t){return vs(Ii(t))}function Jn(t,e,n){(n!==i&&!Vo(t[e],n)||n===i&&!(e in t))&&rr(t,e,n)}function Zn(t,e,n){var r=t[e];Lt.call(t,e)&&Vo(r,n)&&(n!==i||e in t)||rr(t,e,n)}function tr(t,e){for(var n=t.length;n--;)if(Vo(t[n][0],e))return n;return-1}function er(t,e,n,r){return cr(t,(function(t,i,s){e(r,t,n(t),s)})),r}function nr(t,e){return t&&Di(e,ba(e),t)}function rr(t,e,n){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ir(t,e){for(var n=-1,s=e.length,o=r(s),a=null==t;++n<s;)o[n]=a?i:Ra(t,e[n]);return o}function sr(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function or(t,e,n,r,s,o){var a,u=1&e,_=2&e,c=4&e;if(n&&(a=s?n(t,r,s,o):n(t)),a!==i)return a;if(!Zo(t))return t;var l=Go(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Lt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Ii(t,a)}else{var h=ls(t),T=h==m||h==A;if(Wo(t))return mi(t,u);if(h==y||h==f||T&&!s){if(a=_||T?{}:Ts(t),!u)return _?function(t,e){return Di(t,cs(t),e)}(t,function(t,e){return t&&Di(e,va(e),t)}(a,t)):function(t,e){return Di(t,_s(t),e)}(t,nr(a,t))}else{if(!se[h])return s?t:{};a=function(t,e,n){var r,i=t.constructor;switch(e){case v:return Ai(t);case d:case N:return new i(+t);case w:return function(t,e){var n=e?Ai(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case L:case B:case Y:case U:case M:case x:case V:case F:case k:return Pi(t,n);case P:return new i;case g:case O:return new i(t);case I:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case D:return new i;case C:return r=t,Un?yt(Un.call(r)):{}}}(t,h,u)}}o||(o=new Wn);var p=o.get(t);if(p)return p;o.set(t,a),sa(t)?t.forEach((function(r){a.add(or(r,e,n,r,t,o))})):ea(t)&&t.forEach((function(r,i){a.set(i,or(r,e,n,i,t,o))}));var E=l?i:(c?_?es:ts:_?va:ba)(t);return Re(E||t,(function(r,i){E&&(r=t[i=r]),Zn(a,i,or(r,e,n,i,t,o))})),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=yt(t);r--;){var s=n[r],o=e[s],a=t[s];if(a===i&&!(s in t)||!o(a))return!1}return!0}function ur(t,e,n){if("function"!=typeof t)throw new Dt(s);return Ds((function(){t.apply(i,n)}),e)}function _r(t,e,n,r){var i=-1,s=Ce,o=!0,a=t.length,u=[],_=e.length;if(!a)return u;n&&(e=ve(e,Qe(n))),r?(s=be,o=!1):e.length>=200&&(s=$e,o=!1,e=new Hn(e));t:for(;++i<a;){var c=t[i],l=null==n?c:n(c);if(c=r||0!==c?c:0,o&&l==l){for(var h=_;h--;)if(e[h]===l)continue t;u.push(c)}else s(e,l,r)||u.push(c)}return u}xn.templateSettings={escape:Q,evaluate:X,interpolate:$,variable:"",imports:{_:xn}},xn.prototype=Fn.prototype,xn.prototype.constructor=xn,kn.prototype=Vn(Fn.prototype),kn.prototype.constructor=kn,jn.prototype=Vn(Fn.prototype),jn.prototype.constructor=jn,Gn.prototype.clear=function(){this.__data__=Dn?Dn(null):{},this.size=0},Gn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gn.prototype.get=function(t){var e=this.__data__;if(Dn){var n=e[t];return n===o?i:n}return Lt.call(e,t)?e[t]:i},Gn.prototype.has=function(t){var e=this.__data__;return Dn?e[t]!==i:Lt.call(e,t)},Gn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Dn&&e===i?o:e,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(t){var e=this.__data__,n=tr(e,t);return!(n<0||(n==e.length-1?e.pop():Wt.call(e,n,1),--this.size,0))},qn.prototype.get=function(t){var e=this.__data__,n=tr(e,t);return n<0?i:e[n][1]},qn.prototype.has=function(t){return tr(this.__data__,t)>-1},qn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(gn||qn),string:new Gn}},Kn.prototype.delete=function(t){var e=os(this,t).delete(t);return this.size-=e?1:0,e},Kn.prototype.get=function(t){return os(this,t).get(t)},Kn.prototype.has=function(t){return os(this,t).has(t)},Kn.prototype.set=function(t,e){var n=os(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(t){return this.__data__.set(t,o),this},Hn.prototype.has=function(t){return this.__data__.has(t)},Wn.prototype.clear=function(){this.__data__=new qn,this.size=0},Wn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Wn.prototype.get=function(t){return this.__data__.get(t)},Wn.prototype.has=function(t){return this.__data__.has(t)},Wn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!gn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(t,e),this.size=n.size,this};var cr=bi(Nr),lr=bi(Sr,!0);function hr(t,e){var n=!0;return cr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function Tr(t,e,n){for(var r=-1,s=t.length;++r<s;){var o=t[r],a=e(o);if(null!=a&&(u===i?a==a&&!aa(a):n(a,u)))var u=a,_=o}return _}function pr(t,e){var n=[];return cr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function fr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=ps),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?fr(a,e-1,n,r,i):we(i,a):r||(i[i.length]=a)}return i}var Er=vi(),dr=vi(!0);function Nr(t,e){return t&&Er(t,e,ba)}function Sr(t,e){return t&&dr(t,e,ba)}function mr(t,e){return Oe(e,(function(e){return Xo(t[e])}))}function Ar(t,e){for(var n=0,r=(e=Ei(e,t)).length;null!=t&&n<r;)t=t[Ys(e[n++])];return n&&n==r?t:i}function Pr(t,e,n){var r=e(t);return Go(t)?r:we(r,n(t))}function gr(t){return null==t?t===i?"[object Undefined]":"[object Null]":Jt&&Jt in yt(t)?function(t){var e=Lt.call(t,Jt),n=t[Jt];try{t[Jt]=i;var r=!0}catch(t){}var s=Ut.call(t);return r&&(e?t[Jt]=n:delete t[Jt]),s}(t):function(t){return Ut.call(t)}(t)}function yr(t,e){return t>e}function Rr(t,e){return null!=t&&Lt.call(t,e)}function Ir(t,e){return null!=t&&e in yt(t)}function Dr(t,e,n){for(var s=n?be:Ce,o=t[0].length,a=t.length,u=a,_=r(a),c=1/0,l=[];u--;){var h=t[u];u&&e&&(h=ve(h,Qe(e))),c=dn(h.length,c),_[u]=!n&&(e||o>=120&&h.length>=120)?new Hn(u&&h):i}h=t[0];var T=-1,p=_[0];t:for(;++T<o&&l.length<c;){var f=h[T],E=e?e(f):f;if(f=n||0!==f?f:0,!(p?$e(p,E):s(l,E,n))){for(u=a;--u;){var d=_[u];if(!(d?$e(d,E):s(t[u],E,n)))continue t}p&&p.push(E),l.push(f)}}return l}function Or(t,e,n){var r=null==(t=ys(t,e=Ei(e,t)))?t:t[Ys(zs(e))];return null==r?i:ge(r,t,n)}function Cr(t){return ta(t)&&gr(t)==f}function br(t,e,n,r,s){return t===e||(null==t||null==e||!ta(t)&&!ta(e)?t!=t&&e!=e:function(t,e,n,r,s,o){var a=Go(t),u=Go(e),_=a?E:ls(t),c=u?E:ls(e),l=(_=_==f?y:_)==y,h=(c=c==f?y:c)==y,T=_==c;if(T&&Wo(t)){if(!Wo(e))return!1;a=!0,l=!1}if(T&&!l)return o||(o=new Wn),a||ua(t)?Ji(t,e,n,r,s,o):function(t,e,n,r,i,s,o){switch(n){case w:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case v:return!(t.byteLength!=e.byteLength||!s(new jt(t),new jt(e)));case d:case N:case g:return Vo(+t,+e);case S:return t.name==e.name&&t.message==e.message;case I:case O:return t==e+"";case P:var a=sn;case D:var u=1&r;if(a||(a=un),t.size!=e.size&&!u)return!1;var _=o.get(t);if(_)return _==e;r|=2,o.set(t,e);var c=Ji(a(t),a(e),r,i,s,o);return o.delete(t),c;case C:if(Un)return Un.call(t)==Un.call(e)}return!1}(t,e,_,n,r,s,o);if(!(1&n)){var p=l&&Lt.call(t,"__wrapped__"),m=h&&Lt.call(e,"__wrapped__");if(p||m){var A=p?t.value():t,R=m?e.value():e;return o||(o=new Wn),s(A,R,n,r,o)}}return!!T&&(o||(o=new Wn),function(t,e,n,r,s,o){var a=1&n,u=ts(t),_=u.length;if(_!=ts(e).length&&!a)return!1;for(var c=_;c--;){var l=u[c];if(!(a?l in e:Lt.call(e,l)))return!1}var h=o.get(t),T=o.get(e);if(h&&T)return h==e&&T==t;var p=!0;o.set(t,e),o.set(e,t);for(var f=a;++c<_;){var E=t[l=u[c]],d=e[l];if(r)var N=a?r(d,E,l,e,t,o):r(E,d,l,t,e,o);if(!(N===i?E===d||s(E,d,n,r,o):N)){p=!1;break}f||(f="constructor"==l)}if(p&&!f){var S=t.constructor,m=e.constructor;S==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof S&&S instanceof S&&"function"==typeof m&&m instanceof m||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,s,o))}(t,e,n,r,br,s))}function vr(t,e,n,r){var s=n.length,o=s,a=!r;if(null==t)return!o;for(t=yt(t);s--;){var u=n[s];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++s<o;){var _=(u=n[s])[0],c=t[_],l=u[1];if(a&&u[2]){if(c===i&&!(_ in t))return!1}else{var h=new Wn;if(r)var T=r(c,l,_,t,e,h);if(!(T===i?br(l,c,3,r,h):T))return!1}}return!0}function wr(t){return!(!Zo(t)||(e=t,Yt&&Yt in e))&&(Xo(t)?Vt:ft).test(Us(t));var e}function Lr(t){return"function"==typeof t?t:null==t?nu:"object"==typeof t?Go(t)?xr(t[0],t[1]):Mr(t):lu(t)}function Br(t){if(!ms(t))return fn(t);var e=[];for(var n in yt(t))Lt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Yr(t,e){return t<e}function Ur(t,e){var n=-1,i=Ko(t)?r(t.length):[];return cr(t,(function(t,r,s){i[++n]=e(t,r,s)})),i}function Mr(t){var e=as(t);return 1==e.length&&e[0][2]?Ps(e[0][0],e[0][1]):function(n){return n===t||vr(n,t,e)}}function xr(t,e){return ds(t)&&As(e)?Ps(Ys(t),e):function(n){var r=Ra(n,t);return r===i&&r===e?Ia(n,t):br(e,r,3)}}function Vr(t,e,n,r,s){t!==e&&Er(e,(function(o,a){if(s||(s=new Wn),Zo(o))!function(t,e,n,r,s,o,a){var u=Rs(t,n),_=Rs(e,n),c=a.get(_);if(c)Jn(t,n,c);else{var l=o?o(u,_,n+"",t,e,a):i,h=l===i;if(h){var T=Go(_),p=!T&&Wo(_),f=!T&&!p&&ua(_);l=_,T||p||f?Go(u)?l=u:Ho(u)?l=Ii(u):p?(h=!1,l=mi(_,!0)):f?(h=!1,l=Pi(_,!0)):l=[]:ra(_)||jo(_)?(l=u,jo(u)?l=Ea(u):Zo(u)&&!Xo(u)||(l=Ts(_))):h=!1}h&&(a.set(_,l),s(l,_,r,o,a),a.delete(_)),Jn(t,n,l)}}(t,e,a,n,Vr,r,s);else{var u=r?r(Rs(t,a),o,a+"",t,e,s):i;u===i&&(u=o),Jn(t,a,u)}}),va)}function Fr(t,e){var n=t.length;if(n)return fs(e+=e<0?n:0,n)?t[e]:i}function kr(t,e,n){e=e.length?ve(e,(function(t){return Go(t)?function(e){return Ar(e,1===t.length?t[0]:t)}:t})):[nu];var r=-1;e=ve(e,Qe(ss()));var i=Ur(t,(function(t,n,i){var s=ve(e,(function(e){return e(t)}));return{criteria:s,index:++r,value:t}}));return function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,s=e.criteria,o=i.length,a=n.length;++r<o;){var u=gi(i[r],s[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function jr(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=Ar(t,o);n(a,o)&&Xr(s,Ei(o,t),a)}return s}function Gr(t,e,n,r){var i=r?Fe:Ve,s=-1,o=e.length,a=t;for(t===e&&(e=Ii(e)),n&&(a=ve(t,Qe(n)));++s<o;)for(var u=0,_=e[s],c=n?n(_):_;(u=i(a,c,u,r))>-1;)a!==t&&Wt.call(a,u,1),Wt.call(t,u,1);return t}function qr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==s){var s=i;fs(i)?Wt.call(t,i,1):ui(t,i)}}return t}function Kr(t,e){return t+Te(mn()*(e-t+1))}function Hr(t,e){var n="";if(!t||e<1||e>l)return n;do{e%2&&(n+=t),(e=Te(e/2))&&(t+=t)}while(e);return n}function Wr(t,e){return Os(gs(t,e,nu),t+"")}function zr(t){return Qn(Va(t))}function Qr(t,e){var n=Va(t);return vs(n,sr(e,0,n.length))}function Xr(t,e,n,r){if(!Zo(t))return t;for(var s=-1,o=(e=Ei(e,t)).length,a=o-1,u=t;null!=u&&++s<o;){var _=Ys(e[s]),c=n;if("__proto__"===_||"constructor"===_||"prototype"===_)return t;if(s!=a){var l=u[_];(c=r?r(l,_,u):i)===i&&(c=Zo(l)?l:fs(e[s+1])?[]:{})}Zn(u,_,c),u=u[_]}return t}var $r=On?function(t,e){return On.set(t,e),t}:nu,Jr=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Za(e),writable:!0})}:nu;function Zr(t){return vs(Va(t))}function ti(t,e,n){var i=-1,s=t.length;e<0&&(e=-e>s?0:s+e),(n=n>s?s:n)<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;for(var o=r(s);++i<s;)o[i]=t[i+e];return o}function ei(t,e){var n;return cr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ni(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=t[s];null!==o&&!aa(o)&&(n?o<=e:o<e)?r=s+1:i=s}return i}return ri(t,e,nu,n)}function ri(t,e,n,r){var s=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=n(e))!=e,u=null===e,_=aa(e),c=e===i;s<o;){var l=Te((s+o)/2),h=n(t[l]),T=h!==i,p=null===h,f=h==h,E=aa(h);if(a)var d=r||f;else d=c?f&&(r||T):u?f&&T&&(r||!p):_?f&&T&&!p&&(r||!E):!p&&!E&&(r?h<=e:h<e);d?s=l+1:o=l}return dn(o,4294967294)}function ii(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n],a=e?e(o):o;if(!n||!Vo(a,u)){var u=a;s[i++]=0===o?0:o}}return s}function si(t){return"number"==typeof t?t:aa(t)?h:+t}function oi(t){if("string"==typeof t)return t;if(Go(t))return ve(t,oi)+"";if(aa(t))return Mn?Mn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ai(t,e,n){var r=-1,i=Ce,s=t.length,o=!0,a=[],u=a;if(n)o=!1,i=be;else if(s>=200){var _=e?null:Hi(t);if(_)return un(_);o=!1,i=$e,u=new Hn}else u=e?[]:a;t:for(;++r<s;){var c=t[r],l=e?e(c):c;if(c=n||0!==c?c:0,o&&l==l){for(var h=u.length;h--;)if(u[h]===l)continue t;e&&u.push(l),a.push(c)}else i(u,l,n)||(u!==a&&u.push(l),a.push(c))}return a}function ui(t,e){return null==(t=ys(t,e=Ei(e,t)))||delete t[Ys(zs(e))]}function _i(t,e,n,r){return Xr(t,e,n(Ar(t,e)),r)}function ci(t,e,n,r){for(var i=t.length,s=r?i:-1;(r?s--:++s<i)&&e(t[s],s,t););return n?ti(t,r?0:s,r?s+1:i):ti(t,r?s+1:0,r?i:s)}function li(t,e){var n=t;return n instanceof jn&&(n=n.value()),Le(e,(function(t,e){return e.func.apply(e.thisArg,we([t],e.args))}),n)}function hi(t,e,n){var i=t.length;if(i<2)return i?ai(t[0]):[];for(var s=-1,o=r(i);++s<i;)for(var a=t[s],u=-1;++u<i;)u!=s&&(o[s]=_r(o[s]||a,t[u],e,n));return ai(fr(o,1),e,n)}function Ti(t,e,n){for(var r=-1,s=t.length,o=e.length,a={};++r<s;){var u=r<o?e[r]:i;n(a,t[r],u)}return a}function pi(t){return Ho(t)?t:[]}function fi(t){return"function"==typeof t?t:nu}function Ei(t,e){return Go(t)?t:ds(t,e)?[t]:Bs(da(t))}var di=Wr;function Ni(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:ti(t,e,n)}var Si=oe||function(t){return le.clearTimeout(t)};function mi(t,e){if(e)return t.slice();var n=t.length,r=Gt?Gt(n):new t.constructor(n);return t.copy(r),r}function Ai(t){var e=new t.constructor(t.byteLength);return new jt(e).set(new jt(t)),e}function Pi(t,e){var n=e?Ai(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function gi(t,e){if(t!==e){var n=t!==i,r=null===t,s=t==t,o=aa(t),a=e!==i,u=null===e,_=e==e,c=aa(e);if(!u&&!c&&!o&&t>e||o&&a&&_&&!u&&!c||r&&a&&_||!n&&_||!s)return 1;if(!r&&!o&&!c&&t<e||c&&n&&s&&!r&&!o||u&&n&&s||!a&&s||!_)return-1}return 0}function yi(t,e,n,i){for(var s=-1,o=t.length,a=n.length,u=-1,_=e.length,c=En(o-a,0),l=r(_+c),h=!i;++u<_;)l[u]=e[u];for(;++s<a;)(h||s<o)&&(l[n[s]]=t[s]);for(;c--;)l[u++]=t[s++];return l}function Ri(t,e,n,i){for(var s=-1,o=t.length,a=-1,u=n.length,_=-1,c=e.length,l=En(o-u,0),h=r(l+c),T=!i;++s<l;)h[s]=t[s];for(var p=s;++_<c;)h[p+_]=e[_];for(;++a<u;)(T||s<o)&&(h[p+n[a]]=t[s++]);return h}function Ii(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Di(t,e,n,r){var s=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var u=e[o],_=r?r(n[u],t[u],u,n,t):i;_===i&&(_=t[u]),s?rr(n,u,_):Zn(n,u,_)}return n}function Oi(t,e){return function(n,r){var i=Go(n)?ye:er,s=e?e():{};return i(n,t,ss(r,2),s)}}function Ci(t){return Wr((function(e,n){var r=-1,s=n.length,o=s>1?n[s-1]:i,a=s>2?n[2]:i;for(o=t.length>3&&"function"==typeof o?(s--,o):i,a&&Es(n[0],n[1],a)&&(o=s<3?i:o,s=1),e=yt(e);++r<s;){var u=n[r];u&&t(e,u,r,o)}return e}))}function bi(t,e){return function(n,r){if(null==n)return n;if(!Ko(n))return t(n,r);for(var i=n.length,s=e?i:-1,o=yt(n);(e?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function vi(t){return function(e,n,r){for(var i=-1,s=yt(e),o=r(e),a=o.length;a--;){var u=o[t?a:++i];if(!1===n(s[u],u,s))break}return e}}function wi(t){return function(e){var n=rn(e=da(e))?ln(e):i,r=n?n[0]:e.charAt(0),s=n?Ni(n,1).join(""):e.slice(1);return r[t]()+s}}function Li(t){return function(e){return Le(Xa(ja(e).replace(Xt,"")),t,"")}}function Bi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return Zo(r)?r:n}}function Yi(t){return function(e,n,r){var s=yt(e);if(!Ko(e)){var o=ss(n,3);e=ba(e),n=function(t){return o(s[t],t,s)}}var a=t(e,n,r);return a>-1?s[o?e[a]:a]:i}}function Ui(t){return Zi((function(e){var n=e.length,r=n,o=kn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new Dt(s);if(o&&!u&&"wrapper"==rs(a))var u=new kn([],!0)}for(r=u?r:n;++r<n;){var _=rs(a=e[r]),c="wrapper"==_?ns(a):i;u=c&&Ns(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[rs(c[0])].apply(u,c[3]):1==a.length&&Ns(a)?u[_]():u.thru(a)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Go(r))return u.plant(r).value();for(var i=0,s=n?e[i].apply(this,t):r;++i<n;)s=e[i].call(this,s);return s}}))}function Mi(t,e,n,s,o,a,u,c,l,h){var T=e&_,p=1&e,f=2&e,E=24&e,d=512&e,N=f?i:Bi(t);return function _(){for(var S=arguments.length,m=r(S),A=S;A--;)m[A]=arguments[A];if(E)var P=is(_),g=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(m,P);if(s&&(m=yi(m,s,o,E)),a&&(m=Ri(m,a,u,E)),S-=g,E&&S<h){var y=an(m,P);return qi(t,e,Mi,_.placeholder,n,m,y,c,l,h-S)}var R=p?n:this,I=f?R[t]:t;return S=m.length,c?m=function(t,e){for(var n=t.length,r=dn(e.length,n),s=Ii(t);r--;){var o=e[r];t[r]=fs(o,n)?s[o]:i}return t}(m,c):d&&S>1&&m.reverse(),T&&l<S&&(m.length=l),this&&this!==le&&this instanceof _&&(I=N||Bi(I)),I.apply(R,m)}}function xi(t,e){return function(n,r){return function(t,e,n,r){return Nr(t,(function(t,i,s){e(r,n(t),i,s)})),r}(n,t,e(r),{})}}function Vi(t,e){return function(n,r){var s;if(n===i&&r===i)return e;if(n!==i&&(s=n),r!==i){if(s===i)return r;"string"==typeof n||"string"==typeof r?(n=oi(n),r=oi(r)):(n=si(n),r=si(r)),s=t(n,r)}return s}}function Fi(t){return Zi((function(e){return e=ve(e,Qe(ss())),Wr((function(n){var r=this;return t(e,(function(t){return ge(t,r,n)}))}))}))}function ki(t,e){var n=(e=e===i?" ":oi(e)).length;if(n<2)return n?Hr(e,t):e;var r=Hr(e,he(t/cn(e)));return rn(e)?Ni(ln(r),0,t).join(""):r.slice(0,t)}function ji(t){return function(e,n,s){return s&&"number"!=typeof s&&Es(e,n,s)&&(n=s=i),e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n,i){for(var s=-1,o=En(he((e-t)/(n||1)),0),a=r(o);o--;)a[i?o:++s]=t,t+=n;return a}(e,n,s=s===i?e<n?1:-1:ha(s),t)}}function Gi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=fa(e),n=fa(n)),t(e,n)}}function qi(t,e,n,r,s,o,a,_,c,l){var h=8&e;e|=h?u:64,4&(e&=~(h?64:u))||(e&=-4);var T=[t,e,s,h?o:i,h?a:i,h?i:o,h?i:a,_,c,l],p=n.apply(i,T);return Ns(t)&&Is(p,T),p.placeholder=r,Cs(p,t,e)}function Ki(t){var e=gt[t];return function(t,n){if(t=fa(t),(n=null==n?0:dn(Ta(n),292))&&Ue(t)){var r=(da(t)+"e").split("e");return+((r=(da(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Hi=Rn&&1/un(new Rn([,-0]))[1]==c?function(t){return new Rn(t)}:au;function Wi(t){return function(e){var n=ls(e);return n==P?sn(e):n==D?_n(e):function(t,e){return ve(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function zi(t,e,n,o,c,l,h,T){var p=2&e;if(!p&&"function"!=typeof t)throw new Dt(s);var f=o?o.length:0;if(f||(e&=-97,o=c=i),h=h===i?h:En(Ta(h),0),T=T===i?T:Ta(T),f-=c?c.length:0,64&e){var E=o,d=c;o=c=i}var N=p?i:ns(t),S=[t,e,n,o,c,E,d,l,h,T];if(N&&function(t,e){var n=t[1],r=e[1],i=n|r,s=i<131,o=r==_&&8==n||r==_&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!s&&!o)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?yi(c,u,e[4]):u,t[4]=c?an(t[3],a):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Ri(c,u,e[6]):u,t[6]=c?an(t[5],a):e[6]),(u=e[7])&&(t[7]=u),r&_&&(t[8]=null==t[8]?e[8]:dn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,N),t=S[0],e=S[1],n=S[2],o=S[3],c=S[4],!(T=S[9]=S[9]===i?p?0:t.length:En(S[9]-f,0))&&24&e&&(e&=-25),e&&1!=e)m=8==e||16==e?function(t,e,n){var s=Bi(t);return function o(){for(var a=arguments.length,u=r(a),_=a,c=is(o);_--;)u[_]=arguments[_];var l=a<3&&u[0]!==c&&u[a-1]!==c?[]:an(u,c);return(a-=l.length)<n?qi(t,e,Mi,o.placeholder,i,u,l,i,i,n-a):ge(this&&this!==le&&this instanceof o?s:t,this,u)}}(t,e,T):e!=u&&33!=e||c.length?Mi.apply(i,S):function(t,e,n,i){var s=1&e,o=Bi(t);return function e(){for(var a=-1,u=arguments.length,_=-1,c=i.length,l=r(c+u),h=this&&this!==le&&this instanceof e?o:t;++_<c;)l[_]=i[_];for(;u--;)l[_++]=arguments[++a];return ge(h,s?n:this,l)}}(t,e,n,o);else var m=function(t,e,n){var r=1&e,i=Bi(t);return function e(){return(this&&this!==le&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Cs((N?$r:Is)(m,S),t,e)}function Qi(t,e,n,r){return t===i||Vo(t,bt[n])&&!Lt.call(r,n)?e:t}function Xi(t,e,n,r,s,o){return Zo(t)&&Zo(e)&&(o.set(e,t),Vr(t,e,i,Xi,o),o.delete(e)),t}function $i(t){return ra(t)?i:t}function Ji(t,e,n,r,s,o){var a=1&n,u=t.length,_=e.length;if(u!=_&&!(a&&_>u))return!1;var c=o.get(t),l=o.get(e);if(c&&l)return c==e&&l==t;var h=-1,T=!0,p=2&n?new Hn:i;for(o.set(t,e),o.set(e,t);++h<u;){var f=t[h],E=e[h];if(r)var d=a?r(E,f,h,e,t,o):r(f,E,h,t,e,o);if(d!==i){if(d)continue;T=!1;break}if(p){if(!Ye(e,(function(t,e){if(!$e(p,e)&&(f===t||s(f,t,n,r,o)))return p.push(e)}))){T=!1;break}}else if(f!==E&&!s(f,E,n,r,o)){T=!1;break}}return o.delete(t),o.delete(e),T}function Zi(t){return Os(gs(t,i,Gs),t+"")}function ts(t){return Pr(t,ba,_s)}function es(t){return Pr(t,va,cs)}var ns=On?function(t){return On.get(t)}:au;function rs(t){for(var e=t.name+"",n=Cn[e],r=Lt.call(Cn,e)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==t)return i.name}return e}function is(t){return(Lt.call(xn,"placeholder")?xn:t).placeholder}function ss(){var t=xn.iteratee||ru;return t=t===ru?Lr:t,arguments.length?t(arguments[0],arguments[1]):t}function os(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function as(t){for(var e=ba(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,As(i)]}return e}function us(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return wr(n)?n:i}var _s=fe?function(t){return null==t?[]:(t=yt(t),Oe(fe(t),(function(e){return Ht.call(t,e)})))}:pu,cs=fe?function(t){for(var e=[];t;)we(e,_s(t)),t=qt(t);return e}:pu,ls=gr;function hs(t,e,n){for(var r=-1,i=(e=Ei(e,t)).length,s=!1;++r<i;){var o=Ys(e[r]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++r!=i?s:!!(i=null==t?0:t.length)&&Jo(i)&&fs(o,i)&&(Go(t)||jo(t))}function Ts(t){return"function"!=typeof t.constructor||ms(t)?{}:Vn(qt(t))}function ps(t){return Go(t)||jo(t)||!!(zt&&t&&t[zt])}function fs(t,e){var n=typeof t;return!!(e=null==e?l:e)&&("number"==n||"symbol"!=n&&dt.test(t))&&t>-1&&t%1==0&&t<e}function Es(t,e,n){if(!Zo(n))return!1;var r=typeof e;return!!("number"==r?Ko(n)&&fs(e,n.length):"string"==r&&e in n)&&Vo(n[e],t)}function ds(t,e){if(Go(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!aa(t))||Z.test(t)||!J.test(t)||null!=e&&t in yt(e)}function Ns(t){var e=rs(t),n=xn[e];if("function"!=typeof n||!(e in jn.prototype))return!1;if(t===n)return!0;var r=ns(n);return!!r&&t===r[0]}(Pn&&ls(new Pn(new ArrayBuffer(1)))!=w||gn&&ls(new gn)!=P||yn&&ls(yn.resolve())!=R||Rn&&ls(new Rn)!=D||In&&ls(new In)!=b)&&(ls=function(t){var e=gr(t),n=e==y?t.constructor:i,r=n?Us(n):"";if(r)switch(r){case bn:return w;case vn:return P;case wn:return R;case Ln:return D;case Bn:return b}return e});var Ss=vt?Xo:fu;function ms(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||bt)}function As(t){return t==t&&!Zo(t)}function Ps(t,e){return function(n){return null!=n&&n[t]===e&&(e!==i||t in yt(n))}}function gs(t,e,n){return e=En(e===i?t.length-1:e,0),function(){for(var i=arguments,s=-1,o=En(i.length-e,0),a=r(o);++s<o;)a[s]=i[e+s];s=-1;for(var u=r(e+1);++s<e;)u[s]=i[s];return u[e]=n(a),ge(t,this,u)}}function ys(t,e){return e.length<2?t:Ar(t,ti(e,0,-1))}function Rs(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Is=bs($r),Ds=ce||function(t,e){return le.setTimeout(t,e)},Os=bs(Jr);function Cs(t,e,n){var r=e+"";return Os(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Re(p,(function(n){var r="_."+n[0];e&n[1]&&!Ce(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ot);return e?e[1].split(at):[]}(r),n)))}function bs(t){var e=0,n=0;return function(){var r=Nn(),s=16-(r-n);if(n=r,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function vs(t,e){var n=-1,r=t.length,s=r-1;for(e=e===i?r:e;++n<e;){var o=Kr(n,s),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var ws,Ls,Bs=(ws=Lo((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,i){e.push(r?i.replace(ct,"$1"):n||t)})),e}),(function(t){return 500===Ls.size&&Ls.clear(),t})),Ls=ws.cache,ws);function Ys(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Us(t){if(null!=t){try{return wt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ms(t){if(t instanceof jn)return t.clone();var e=new kn(t.__wrapped__,t.__chain__);return e.__actions__=Ii(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var xs=Wr((function(t,e){return Ho(t)?_r(t,fr(e,1,Ho,!0)):[]})),Vs=Wr((function(t,e){var n=zs(e);return Ho(n)&&(n=i),Ho(t)?_r(t,fr(e,1,Ho,!0),ss(n,2)):[]})),Fs=Wr((function(t,e){var n=zs(e);return Ho(n)&&(n=i),Ho(t)?_r(t,fr(e,1,Ho,!0),i,n):[]}));function ks(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Ta(n);return i<0&&(i=En(r+i,0)),xe(t,ss(e,3),i)}function js(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r-1;return n!==i&&(s=Ta(n),s=n<0?En(r+s,0):dn(s,r-1)),xe(t,ss(e,3),s,!0)}function Gs(t){return null!=t&&t.length?fr(t,1):[]}function qs(t){return t&&t.length?t[0]:i}var Ks=Wr((function(t){var e=ve(t,pi);return e.length&&e[0]===t[0]?Dr(e):[]})),Hs=Wr((function(t){var e=zs(t),n=ve(t,pi);return e===zs(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Dr(n,ss(e,2)):[]})),Ws=Wr((function(t){var e=zs(t),n=ve(t,pi);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Dr(n,i,e):[]}));function zs(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Qs=Wr(Xs);function Xs(t,e){return t&&t.length&&e&&e.length?Gr(t,e):t}var $s=Zi((function(t,e){var n=null==t?0:t.length,r=ir(t,e);return qr(t,ve(e,(function(t){return fs(t,n)?+t:t})).sort(gi)),r}));function Js(t){return null==t?t:An.call(t)}var Zs=Wr((function(t){return ai(fr(t,1,Ho,!0))})),to=Wr((function(t){var e=zs(t);return Ho(e)&&(e=i),ai(fr(t,1,Ho,!0),ss(e,2))})),eo=Wr((function(t){var e=zs(t);return e="function"==typeof e?e:i,ai(fr(t,1,Ho,!0),i,e)}));function no(t){if(!t||!t.length)return[];var e=0;return t=Oe(t,(function(t){if(Ho(t))return e=En(t.length,e),!0})),We(e,(function(e){return ve(t,Ge(e))}))}function ro(t,e){if(!t||!t.length)return[];var n=no(t);return null==e?n:ve(n,(function(t){return ge(e,i,t)}))}var io=Wr((function(t,e){return Ho(t)?_r(t,e):[]})),so=Wr((function(t){return hi(Oe(t,Ho))})),oo=Wr((function(t){var e=zs(t);return Ho(e)&&(e=i),hi(Oe(t,Ho),ss(e,2))})),ao=Wr((function(t){var e=zs(t);return e="function"==typeof e?e:i,hi(Oe(t,Ho),i,e)})),uo=Wr(no),_o=Wr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,ro(t,n)}));function co(t){var e=xn(t);return e.__chain__=!0,e}function lo(t,e){return e(t)}var ho=Zi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,s=function(e){return ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof jn&&fs(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:lo,args:[s],thisArg:i}),new kn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(s)})),To=Oi((function(t,e,n){Lt.call(t,n)?++t[n]:rr(t,n,1)})),po=Yi(ks),fo=Yi(js);function Eo(t,e){return(Go(t)?Re:cr)(t,ss(e,3))}function No(t,e){return(Go(t)?Ie:lr)(t,ss(e,3))}var So=Oi((function(t,e,n){Lt.call(t,n)?t[n].push(e):rr(t,n,[e])})),mo=Wr((function(t,e,n){var i=-1,s="function"==typeof e,o=Ko(t)?r(t.length):[];return cr(t,(function(t){o[++i]=s?ge(e,t,n):Or(t,e,n)})),o})),Ao=Oi((function(t,e,n){rr(t,n,e)}));function Po(t,e){return(Go(t)?ve:Ur)(t,ss(e,3))}var go=Oi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),yo=Wr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Es(t,e[0],e[1])?e=[]:n>2&&Es(e[0],e[1],e[2])&&(e=[e[0]]),kr(t,fr(e,1),[])})),Ro=_e||function(){return le.Date.now()};function Io(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,zi(t,_,i,i,i,i,e)}function Do(t,e){var n;if("function"!=typeof e)throw new Dt(s);return t=Ta(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Oo=Wr((function(t,e,n){var r=1;if(n.length){var i=an(n,is(Oo));r|=u}return zi(t,r,e,n,i)})),Co=Wr((function(t,e,n){var r=3;if(n.length){var i=an(n,is(Co));r|=u}return zi(e,r,t,n,i)}));function bo(t,e,n){var r,o,a,u,_,c,l=0,h=!1,T=!1,p=!0;if("function"!=typeof t)throw new Dt(s);function f(e){var n=r,s=o;return r=o=i,l=e,u=t.apply(s,n)}function E(t){var n=t-c;return c===i||n>=e||n<0||T&&t-l>=a}function d(){var t=Ro();if(E(t))return N(t);_=Ds(d,function(t){var n=e-(t-c);return T?dn(n,a-(t-l)):n}(t))}function N(t){return _=i,p&&r?f(t):(r=o=i,u)}function S(){var t=Ro(),n=E(t);if(r=arguments,o=this,c=t,n){if(_===i)return function(t){return l=t,_=Ds(d,e),h?f(t):u}(c);if(T)return Si(_),_=Ds(d,e),f(c)}return _===i&&(_=Ds(d,e)),u}return e=fa(e)||0,Zo(n)&&(h=!!n.leading,a=(T="maxWait"in n)?En(fa(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),S.cancel=function(){_!==i&&Si(_),l=0,r=c=o=_=i},S.flush=function(){return _===i?u:N(Ro())},S}var vo=Wr((function(t,e){return ur(t,1,e)})),wo=Wr((function(t,e,n){return ur(t,fa(e)||0,n)}));function Lo(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Dt(s);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Lo.Cache||Kn),n}function Bo(t){if("function"!=typeof t)throw new Dt(s);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Lo.Cache=Kn;var Yo=di((function(t,e){var n=(e=1==e.length&&Go(e[0])?ve(e[0],Qe(ss())):ve(fr(e,1),Qe(ss()))).length;return Wr((function(r){for(var i=-1,s=dn(r.length,n);++i<s;)r[i]=e[i].call(this,r[i]);return ge(t,this,r)}))})),Uo=Wr((function(t,e){var n=an(e,is(Uo));return zi(t,u,i,e,n)})),Mo=Wr((function(t,e){var n=an(e,is(Mo));return zi(t,64,i,e,n)})),xo=Zi((function(t,e){return zi(t,256,i,i,i,e)}));function Vo(t,e){return t===e||t!=t&&e!=e}var Fo=Gi(yr),ko=Gi((function(t,e){return t>=e})),jo=Cr(function(){return arguments}())?Cr:function(t){return ta(t)&&Lt.call(t,"callee")&&!Ht.call(t,"callee")},Go=r.isArray,qo=de?Qe(de):function(t){return ta(t)&&gr(t)==v};function Ko(t){return null!=t&&Jo(t.length)&&!Xo(t)}function Ho(t){return ta(t)&&Ko(t)}var Wo=Ee||fu,zo=Ne?Qe(Ne):function(t){return ta(t)&&gr(t)==N};function Qo(t){if(!ta(t))return!1;var e=gr(t);return e==S||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Xo(t){if(!Zo(t))return!1;var e=gr(t);return e==m||e==A||"[object AsyncFunction]"==e||"[object Proxy]"==e}function $o(t){return"number"==typeof t&&t==Ta(t)}function Jo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Zo(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=Se?Qe(Se):function(t){return ta(t)&&ls(t)==P};function na(t){return"number"==typeof t||ta(t)&&gr(t)==g}function ra(t){if(!ta(t)||gr(t)!=y)return!1;var e=qt(t);if(null===e)return!0;var n=Lt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&wt.call(n)==Mt}var ia=me?Qe(me):function(t){return ta(t)&&gr(t)==I},sa=Ae?Qe(Ae):function(t){return ta(t)&&ls(t)==D};function oa(t){return"string"==typeof t||!Go(t)&&ta(t)&&gr(t)==O}function aa(t){return"symbol"==typeof t||ta(t)&&gr(t)==C}var ua=Pe?Qe(Pe):function(t){return ta(t)&&Jo(t.length)&&!!ie[gr(t)]},_a=Gi(Yr),ca=Gi((function(t,e){return t<=e}));function la(t){if(!t)return[];if(Ko(t))return oa(t)?ln(t):Ii(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=ls(t);return(e==P?sn:e==D?un:Va)(t)}function ha(t){return t?(t=fa(t))===c||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function Ta(t){var e=ha(t),n=e%1;return e==e?n?e-n:e:0}function pa(t){return t?sr(Ta(t),0,T):0}function fa(t){if("number"==typeof t)return t;if(aa(t))return h;if(Zo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ze(t);var n=pt.test(t);return n||Et.test(t)?ue(t.slice(2),n?2:8):Tt.test(t)?h:+t}function Ea(t){return Di(t,va(t))}function da(t){return null==t?"":oi(t)}var Na=Ci((function(t,e){if(ms(e)||Ko(e))Di(e,ba(e),t);else for(var n in e)Lt.call(e,n)&&Zn(t,n,e[n])})),Sa=Ci((function(t,e){Di(e,va(e),t)})),ma=Ci((function(t,e,n,r){Di(e,va(e),t,r)})),Aa=Ci((function(t,e,n,r){Di(e,ba(e),t,r)})),Pa=Zi(ir),ga=Wr((function(t,e){t=yt(t);var n=-1,r=e.length,s=r>2?e[2]:i;for(s&&Es(e[0],e[1],s)&&(r=1);++n<r;)for(var o=e[n],a=va(o),u=-1,_=a.length;++u<_;){var c=a[u],l=t[c];(l===i||Vo(l,bt[c])&&!Lt.call(t,c))&&(t[c]=o[c])}return t})),ya=Wr((function(t){return t.push(i,Xi),ge(La,i,t)}));function Ra(t,e,n){var r=null==t?i:Ar(t,e);return r===i?n:r}function Ia(t,e){return null!=t&&hs(t,e,Ir)}var Da=xi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ut.call(e)),t[e]=n}),Za(nu)),Oa=xi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ut.call(e)),Lt.call(t,e)?t[e].push(n):t[e]=[n]}),ss),Ca=Wr(Or);function ba(t){return Ko(t)?zn(t):Br(t)}function va(t){return Ko(t)?zn(t,!0):function(t){if(!Zo(t))return function(t){var e=[];if(null!=t)for(var n in yt(t))e.push(n);return e}(t);var e=ms(t),n=[];for(var r in t)("constructor"!=r||!e&&Lt.call(t,r))&&n.push(r);return n}(t)}var wa=Ci((function(t,e,n){Vr(t,e,n)})),La=Ci((function(t,e,n,r){Vr(t,e,n,r)})),Ba=Zi((function(t,e){var n={};if(null==t)return n;var r=!1;e=ve(e,(function(e){return e=Ei(e,t),r||(r=e.length>1),e})),Di(t,es(t),n),r&&(n=or(n,7,$i));for(var i=e.length;i--;)ui(n,e[i]);return n})),Ya=Zi((function(t,e){return null==t?{}:function(t,e){return jr(t,e,(function(e,n){return Ia(t,n)}))}(t,e)}));function Ua(t,e){if(null==t)return{};var n=ve(es(t),(function(t){return[t]}));return e=ss(e),jr(t,n,(function(t,n){return e(t,n[0])}))}var Ma=Wi(ba),xa=Wi(va);function Va(t){return null==t?[]:Xe(t,ba(t))}var Fa=Li((function(t,e,n){return e=e.toLowerCase(),t+(n?ka(e):e)}));function ka(t){return Qa(da(t).toLowerCase())}function ja(t){return(t=da(t))&&t.replace(Nt,tn).replace($t,"")}var Ga=Li((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),qa=Li((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ka=wi("toLowerCase"),Ha=Li((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Wa=Li((function(t,e,n){return t+(n?" ":"")+Qa(e)})),za=Li((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Qa=wi("toUpperCase");function Xa(t,e,n){return t=da(t),(e=n?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var $a=Wr((function(t,e){try{return ge(t,i,e)}catch(t){return Qo(t)?t:new At(t)}})),Ja=Zi((function(t,e){return Re(e,(function(e){e=Ys(e),rr(t,e,Oo(t[e],t))})),t}));function Za(t){return function(){return t}}var tu=Ui(),eu=Ui(!0);function nu(t){return t}function ru(t){return Lr("function"==typeof t?t:or(t,1))}var iu=Wr((function(t,e){return function(n){return Or(n,t,e)}})),su=Wr((function(t,e){return function(n){return Or(t,n,e)}}));function ou(t,e,n){var r=ba(e),i=mr(e,r);null!=n||Zo(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=mr(e,ba(e)));var s=!(Zo(n)&&"chain"in n&&!n.chain),o=Xo(t);return Re(i,(function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,we([this.value()],arguments))})})),t}function au(){}var uu=Fi(ve),_u=Fi(De),cu=Fi(Ye);function lu(t){return ds(t)?Ge(Ys(t)):function(t){return function(e){return Ar(e,t)}}(t)}var hu=ji(),Tu=ji(!0);function pu(){return[]}function fu(){return!1}var Eu,du=Vi((function(t,e){return t+e}),0),Nu=Ki("ceil"),Su=Vi((function(t,e){return t/e}),1),mu=Ki("floor"),Au=Vi((function(t,e){return t*e}),1),Pu=Ki("round"),gu=Vi((function(t,e){return t-e}),0);return xn.after=function(t,e){if("function"!=typeof e)throw new Dt(s);return t=Ta(t),function(){if(--t<1)return e.apply(this,arguments)}},xn.ary=Io,xn.assign=Na,xn.assignIn=Sa,xn.assignInWith=ma,xn.assignWith=Aa,xn.at=Pa,xn.before=Do,xn.bind=Oo,xn.bindAll=Ja,xn.bindKey=Co,xn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Go(t)?t:[t]},xn.chain=co,xn.chunk=function(t,e,n){e=(n?Es(t,e,n):e===i)?1:En(Ta(e),0);var s=null==t?0:t.length;if(!s||e<1)return[];for(var o=0,a=0,u=r(he(s/e));o<s;)u[a++]=ti(t,o,o+=e);return u},xn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i},xn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return we(Go(n)?Ii(n):[n],fr(e,1))},xn.cond=function(t){var e=null==t?0:t.length,n=ss();return t=e?ve(t,(function(t){if("function"!=typeof t[1])throw new Dt(s);return[n(t[0]),t[1]]})):[],Wr((function(n){for(var r=-1;++r<e;){var i=t[r];if(ge(i[0],this,n))return ge(i[1],this,n)}}))},xn.conforms=function(t){return function(t){var e=ba(t);return function(n){return ar(n,t,e)}}(or(t,1))},xn.constant=Za,xn.countBy=To,xn.create=function(t,e){var n=Vn(t);return null==e?n:nr(n,e)},xn.curry=function t(e,n,r){var s=zi(e,8,i,i,i,i,i,n=r?i:n);return s.placeholder=t.placeholder,s},xn.curryRight=function t(e,n,r){var s=zi(e,16,i,i,i,i,i,n=r?i:n);return s.placeholder=t.placeholder,s},xn.debounce=bo,xn.defaults=ga,xn.defaultsDeep=ya,xn.defer=vo,xn.delay=wo,xn.difference=xs,xn.differenceBy=Vs,xn.differenceWith=Fs,xn.drop=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,(e=n||e===i?1:Ta(e))<0?0:e,r):[]},xn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,0,(e=r-(e=n||e===i?1:Ta(e)))<0?0:e):[]},xn.dropRightWhile=function(t,e){return t&&t.length?ci(t,ss(e,3),!0,!0):[]},xn.dropWhile=function(t,e){return t&&t.length?ci(t,ss(e,3),!0):[]},xn.fill=function(t,e,n,r){var s=null==t?0:t.length;return s?(n&&"number"!=typeof n&&Es(t,e,n)&&(n=0,r=s),function(t,e,n,r){var s=t.length;for((n=Ta(n))<0&&(n=-n>s?0:s+n),(r=r===i||r>s?s:Ta(r))<0&&(r+=s),r=n>r?0:pa(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},xn.filter=function(t,e){return(Go(t)?Oe:pr)(t,ss(e,3))},xn.flatMap=function(t,e){return fr(Po(t,e),1)},xn.flatMapDeep=function(t,e){return fr(Po(t,e),c)},xn.flatMapDepth=function(t,e,n){return n=n===i?1:Ta(n),fr(Po(t,e),n)},xn.flatten=Gs,xn.flattenDeep=function(t){return null!=t&&t.length?fr(t,c):[]},xn.flattenDepth=function(t,e){return null!=t&&t.length?fr(t,e=e===i?1:Ta(e)):[]},xn.flip=function(t){return zi(t,512)},xn.flow=tu,xn.flowRight=eu,xn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},xn.functions=function(t){return null==t?[]:mr(t,ba(t))},xn.functionsIn=function(t){return null==t?[]:mr(t,va(t))},xn.groupBy=So,xn.initial=function(t){return null!=t&&t.length?ti(t,0,-1):[]},xn.intersection=Ks,xn.intersectionBy=Hs,xn.intersectionWith=Ws,xn.invert=Da,xn.invertBy=Oa,xn.invokeMap=mo,xn.iteratee=ru,xn.keyBy=Ao,xn.keys=ba,xn.keysIn=va,xn.map=Po,xn.mapKeys=function(t,e){var n={};return e=ss(e,3),Nr(t,(function(t,r,i){rr(n,e(t,r,i),t)})),n},xn.mapValues=function(t,e){var n={};return e=ss(e,3),Nr(t,(function(t,r,i){rr(n,r,e(t,r,i))})),n},xn.matches=function(t){return Mr(or(t,1))},xn.matchesProperty=function(t,e){return xr(t,or(e,1))},xn.memoize=Lo,xn.merge=wa,xn.mergeWith=La,xn.method=iu,xn.methodOf=su,xn.mixin=ou,xn.negate=Bo,xn.nthArg=function(t){return t=Ta(t),Wr((function(e){return Fr(e,t)}))},xn.omit=Ba,xn.omitBy=function(t,e){return Ua(t,Bo(ss(e)))},xn.once=function(t){return Do(2,t)},xn.orderBy=function(t,e,n,r){return null==t?[]:(Go(e)||(e=null==e?[]:[e]),Go(n=r?i:n)||(n=null==n?[]:[n]),kr(t,e,n))},xn.over=uu,xn.overArgs=Yo,xn.overEvery=_u,xn.overSome=cu,xn.partial=Uo,xn.partialRight=Mo,xn.partition=go,xn.pick=Ya,xn.pickBy=Ua,xn.property=lu,xn.propertyOf=function(t){return function(e){return null==t?i:Ar(t,e)}},xn.pull=Qs,xn.pullAll=Xs,xn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,ss(n,2)):t},xn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,i,n):t},xn.pullAt=$s,xn.range=hu,xn.rangeRight=Tu,xn.rearg=xo,xn.reject=function(t,e){return(Go(t)?Oe:pr)(t,Bo(ss(e,3)))},xn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],s=t.length;for(e=ss(e,3);++r<s;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return qr(t,i),n},xn.rest=function(t,e){if("function"!=typeof t)throw new Dt(s);return Wr(t,e=e===i?e:Ta(e))},xn.reverse=Js,xn.sampleSize=function(t,e,n){return e=(n?Es(t,e,n):e===i)?1:Ta(e),(Go(t)?Xn:Qr)(t,e)},xn.set=function(t,e,n){return null==t?t:Xr(t,e,n)},xn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:Xr(t,e,n,r)},xn.shuffle=function(t){return(Go(t)?$n:Zr)(t)},xn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Es(t,e,n)?(e=0,n=r):(e=null==e?0:Ta(e),n=n===i?r:Ta(n)),ti(t,e,n)):[]},xn.sortBy=yo,xn.sortedUniq=function(t){return t&&t.length?ii(t):[]},xn.sortedUniqBy=function(t,e){return t&&t.length?ii(t,ss(e,2)):[]},xn.split=function(t,e,n){return n&&"number"!=typeof n&&Es(t,e,n)&&(e=n=i),(n=n===i?T:n>>>0)?(t=da(t))&&("string"==typeof e||null!=e&&!ia(e))&&!(e=oi(e))&&rn(t)?Ni(ln(t),0,n):t.split(e,n):[]},xn.spread=function(t,e){if("function"!=typeof t)throw new Dt(s);return e=null==e?0:En(Ta(e),0),Wr((function(n){var r=n[e],i=Ni(n,0,e);return r&&we(i,r),ge(t,this,i)}))},xn.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},xn.take=function(t,e,n){return t&&t.length?ti(t,0,(e=n||e===i?1:Ta(e))<0?0:e):[]},xn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,(e=r-(e=n||e===i?1:Ta(e)))<0?0:e,r):[]},xn.takeRightWhile=function(t,e){return t&&t.length?ci(t,ss(e,3),!1,!0):[]},xn.takeWhile=function(t,e){return t&&t.length?ci(t,ss(e,3)):[]},xn.tap=function(t,e){return e(t),t},xn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Dt(s);return Zo(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),bo(t,e,{leading:r,maxWait:e,trailing:i})},xn.thru=lo,xn.toArray=la,xn.toPairs=Ma,xn.toPairsIn=xa,xn.toPath=function(t){return Go(t)?ve(t,Ys):aa(t)?[t]:Ii(Bs(da(t)))},xn.toPlainObject=Ea,xn.transform=function(t,e,n){var r=Go(t),i=r||Wo(t)||ua(t);if(e=ss(e,4),null==n){var s=t&&t.constructor;n=i?r?new s:[]:Zo(t)&&Xo(s)?Vn(qt(t)):{}}return(i?Re:Nr)(t,(function(t,r,i){return e(n,t,r,i)})),n},xn.unary=function(t){return Io(t,1)},xn.union=Zs,xn.unionBy=to,xn.unionWith=eo,xn.uniq=function(t){return t&&t.length?ai(t):[]},xn.uniqBy=function(t,e){return t&&t.length?ai(t,ss(e,2)):[]},xn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ai(t,i,e):[]},xn.unset=function(t,e){return null==t||ui(t,e)},xn.unzip=no,xn.unzipWith=ro,xn.update=function(t,e,n){return null==t?t:_i(t,e,fi(n))},xn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:_i(t,e,fi(n),r)},xn.values=Va,xn.valuesIn=function(t){return null==t?[]:Xe(t,va(t))},xn.without=io,xn.words=Xa,xn.wrap=function(t,e){return Uo(fi(e),t)},xn.xor=so,xn.xorBy=oo,xn.xorWith=ao,xn.zip=uo,xn.zipObject=function(t,e){return Ti(t||[],e||[],Zn)},xn.zipObjectDeep=function(t,e){return Ti(t||[],e||[],Xr)},xn.zipWith=_o,xn.entries=Ma,xn.entriesIn=xa,xn.extend=Sa,xn.extendWith=ma,ou(xn,xn),xn.add=du,xn.attempt=$a,xn.camelCase=Fa,xn.capitalize=ka,xn.ceil=Nu,xn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=fa(n))==n?n:0),e!==i&&(e=(e=fa(e))==e?e:0),sr(fa(t),e,n)},xn.clone=function(t){return or(t,4)},xn.cloneDeep=function(t){return or(t,5)},xn.cloneDeepWith=function(t,e){return or(t,5,e="function"==typeof e?e:i)},xn.cloneWith=function(t,e){return or(t,4,e="function"==typeof e?e:i)},xn.conformsTo=function(t,e){return null==e||ar(t,e,ba(e))},xn.deburr=ja,xn.defaultTo=function(t,e){return null==t||t!=t?e:t},xn.divide=Su,xn.endsWith=function(t,e,n){t=da(t),e=oi(e);var r=t.length,s=n=n===i?r:sr(Ta(n),0,r);return(n-=e.length)>=0&&t.slice(n,s)==e},xn.eq=Vo,xn.escape=function(t){return(t=da(t))&&z.test(t)?t.replace(H,en):t},xn.escapeRegExp=function(t){return(t=da(t))&&nt.test(t)?t.replace(et,"\\$&"):t},xn.every=function(t,e,n){var r=Go(t)?De:hr;return n&&Es(t,e,n)&&(e=i),r(t,ss(e,3))},xn.find=po,xn.findIndex=ks,xn.findKey=function(t,e){return Me(t,ss(e,3),Nr)},xn.findLast=fo,xn.findLastIndex=js,xn.findLastKey=function(t,e){return Me(t,ss(e,3),Sr)},xn.floor=mu,xn.forEach=Eo,xn.forEachRight=No,xn.forIn=function(t,e){return null==t?t:Er(t,ss(e,3),va)},xn.forInRight=function(t,e){return null==t?t:dr(t,ss(e,3),va)},xn.forOwn=function(t,e){return t&&Nr(t,ss(e,3))},xn.forOwnRight=function(t,e){return t&&Sr(t,ss(e,3))},xn.get=Ra,xn.gt=Fo,xn.gte=ko,xn.has=function(t,e){return null!=t&&hs(t,e,Rr)},xn.hasIn=Ia,xn.head=qs,xn.identity=nu,xn.includes=function(t,e,n,r){t=Ko(t)?t:Va(t),n=n&&!r?Ta(n):0;var i=t.length;return n<0&&(n=En(i+n,0)),oa(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ve(t,e,n)>-1},xn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Ta(n);return i<0&&(i=En(r+i,0)),Ve(t,e,i)},xn.inRange=function(t,e,n){return e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n){return t>=dn(e,n)&&t<En(e,n)}(t=fa(t),e,n)},xn.invoke=Ca,xn.isArguments=jo,xn.isArray=Go,xn.isArrayBuffer=qo,xn.isArrayLike=Ko,xn.isArrayLikeObject=Ho,xn.isBoolean=function(t){return!0===t||!1===t||ta(t)&&gr(t)==d},xn.isBuffer=Wo,xn.isDate=zo,xn.isElement=function(t){return ta(t)&&1===t.nodeType&&!ra(t)},xn.isEmpty=function(t){if(null==t)return!0;if(Ko(t)&&(Go(t)||"string"==typeof t||"function"==typeof t.splice||Wo(t)||ua(t)||jo(t)))return!t.length;var e=ls(t);if(e==P||e==D)return!t.size;if(ms(t))return!Br(t).length;for(var n in t)if(Lt.call(t,n))return!1;return!0},xn.isEqual=function(t,e){return br(t,e)},xn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?br(t,e,i,n):!!r},xn.isError=Qo,xn.isFinite=function(t){return"number"==typeof t&&Ue(t)},xn.isFunction=Xo,xn.isInteger=$o,xn.isLength=Jo,xn.isMap=ea,xn.isMatch=function(t,e){return t===e||vr(t,e,as(e))},xn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,vr(t,e,as(e),n)},xn.isNaN=function(t){return na(t)&&t!=+t},xn.isNative=function(t){if(Ss(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return wr(t)},xn.isNil=function(t){return null==t},xn.isNull=function(t){return null===t},xn.isNumber=na,xn.isObject=Zo,xn.isObjectLike=ta,xn.isPlainObject=ra,xn.isRegExp=ia,xn.isSafeInteger=function(t){return $o(t)&&t>=-9007199254740991&&t<=l},xn.isSet=sa,xn.isString=oa,xn.isSymbol=aa,xn.isTypedArray=ua,xn.isUndefined=function(t){return t===i},xn.isWeakMap=function(t){return ta(t)&&ls(t)==b},xn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==gr(t)},xn.join=function(t,e){return null==t?"":qe.call(t,e)},xn.kebabCase=Ga,xn.last=zs,xn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r;return n!==i&&(s=(s=Ta(n))<0?En(r+s,0):dn(s,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,s):xe(t,ke,s,!0)},xn.lowerCase=qa,xn.lowerFirst=Ka,xn.lt=_a,xn.lte=ca,xn.max=function(t){return t&&t.length?Tr(t,nu,yr):i},xn.maxBy=function(t,e){return t&&t.length?Tr(t,ss(e,2),yr):i},xn.mean=function(t){return je(t,nu)},xn.meanBy=function(t,e){return je(t,ss(e,2))},xn.min=function(t){return t&&t.length?Tr(t,nu,Yr):i},xn.minBy=function(t,e){return t&&t.length?Tr(t,ss(e,2),Yr):i},xn.stubArray=pu,xn.stubFalse=fu,xn.stubObject=function(){return{}},xn.stubString=function(){return""},xn.stubTrue=function(){return!0},xn.multiply=Au,xn.nth=function(t,e){return t&&t.length?Fr(t,Ta(e)):i},xn.noConflict=function(){return le._===this&&(le._=xt),this},xn.noop=au,xn.now=Ro,xn.pad=function(t,e,n){t=da(t);var r=(e=Ta(e))?cn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return ki(Te(i),n)+t+ki(he(i),n)},xn.padEnd=function(t,e,n){t=da(t);var r=(e=Ta(e))?cn(t):0;return e&&r<e?t+ki(e-r,n):t},xn.padStart=function(t,e,n){t=da(t);var r=(e=Ta(e))?cn(t):0;return e&&r<e?ki(e-r,n)+t:t},xn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Sn(da(t).replace(rt,""),e||0)},xn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Es(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=ha(t),e===i?(e=t,t=0):e=ha(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var s=mn();return dn(t+s*(e-t+ae("1e-"+((s+"").length-1))),e)}return Kr(t,e)},xn.reduce=function(t,e,n){var r=Go(t)?Le:Ke,i=arguments.length<3;return r(t,ss(e,4),n,i,cr)},xn.reduceRight=function(t,e,n){var r=Go(t)?Be:Ke,i=arguments.length<3;return r(t,ss(e,4),n,i,lr)},xn.repeat=function(t,e,n){return e=(n?Es(t,e,n):e===i)?1:Ta(e),Hr(da(t),e)},xn.replace=function(){var t=arguments,e=da(t[0]);return t.length<3?e:e.replace(t[1],t[2])},xn.result=function(t,e,n){var r=-1,s=(e=Ei(e,t)).length;for(s||(s=1,t=i);++r<s;){var o=null==t?i:t[Ys(e[r])];o===i&&(r=s,o=n),t=Xo(o)?o.call(t):o}return t},xn.round=Pu,xn.runInContext=t,xn.sample=function(t){return(Go(t)?Qn:zr)(t)},xn.size=function(t){if(null==t)return 0;if(Ko(t))return oa(t)?cn(t):t.length;var e=ls(t);return e==P||e==D?t.size:Br(t).length},xn.snakeCase=Ha,xn.some=function(t,e,n){var r=Go(t)?Ye:ei;return n&&Es(t,e,n)&&(e=i),r(t,ss(e,3))},xn.sortedIndex=function(t,e){return ni(t,e)},xn.sortedIndexBy=function(t,e,n){return ri(t,e,ss(n,2))},xn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ni(t,e);if(r<n&&Vo(t[r],e))return r}return-1},xn.sortedLastIndex=function(t,e){return ni(t,e,!0)},xn.sortedLastIndexBy=function(t,e,n){return ri(t,e,ss(n,2),!0)},xn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ni(t,e,!0)-1;if(Vo(t[n],e))return n}return-1},xn.startCase=Wa,xn.startsWith=function(t,e,n){return t=da(t),n=null==n?0:sr(Ta(n),0,t.length),e=oi(e),t.slice(n,n+e.length)==e},xn.subtract=gu,xn.sum=function(t){return t&&t.length?He(t,nu):0},xn.sumBy=function(t,e){return t&&t.length?He(t,ss(e,2)):0},xn.template=function(t,e,n){var r=xn.templateSettings;n&&Es(t,e,n)&&(e=i),t=da(t),e=ma({},e,r,Qi);var s,o,a=ma({},e.imports,r.imports,Qi),u=ba(a),_=Xe(a,u),c=0,l=e.interpolate||St,h="__p += '",T=Rt((e.escape||St).source+"|"+l.source+"|"+(l===$?lt:St).source+"|"+(e.evaluate||St).source+"|$","g"),p="//# sourceURL="+(Lt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(T,(function(e,n,r,i,a,u){return r||(r=i),h+=t.slice(c,u).replace(mt,nn),n&&(s=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),h+="';\n";var f=Lt.call(e,"variable")&&e.variable;if(f){if(_t.test(f))throw new At("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(j,""):h).replace(G,"$1").replace(q,"$1;"),h="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var E=$a((function(){return Pt(u,p+"return "+h).apply(i,_)}));if(E.source=h,Qo(E))throw E;return E},xn.times=function(t,e){if((t=Ta(t))<1||t>l)return[];var n=T,r=dn(t,T);e=ss(e),t-=T;for(var i=We(r,e);++n<t;)e(n);return i},xn.toFinite=ha,xn.toInteger=Ta,xn.toLength=pa,xn.toLower=function(t){return da(t).toLowerCase()},xn.toNumber=fa,xn.toSafeInteger=function(t){return t?sr(Ta(t),-9007199254740991,l):0===t?t:0},xn.toString=da,xn.toUpper=function(t){return da(t).toUpperCase()},xn.trim=function(t,e,n){if((t=da(t))&&(n||e===i))return ze(t);if(!t||!(e=oi(e)))return t;var r=ln(t),s=ln(e);return Ni(r,Je(r,s),Ze(r,s)+1).join("")},xn.trimEnd=function(t,e,n){if((t=da(t))&&(n||e===i))return t.slice(0,hn(t)+1);if(!t||!(e=oi(e)))return t;var r=ln(t);return Ni(r,0,Ze(r,ln(e))+1).join("")},xn.trimStart=function(t,e,n){if((t=da(t))&&(n||e===i))return t.replace(rt,"");if(!t||!(e=oi(e)))return t;var r=ln(t);return Ni(r,Je(r,ln(e))).join("")},xn.truncate=function(t,e){var n=30,r="...";if(Zo(e)){var s="separator"in e?e.separator:s;n="length"in e?Ta(e.length):n,r="omission"in e?oi(e.omission):r}var o=(t=da(t)).length;if(rn(t)){var a=ln(t);o=a.length}if(n>=o)return t;var u=n-cn(r);if(u<1)return r;var _=a?Ni(a,0,u).join(""):t.slice(0,u);if(s===i)return _+r;if(a&&(u+=_.length-u),ia(s)){if(t.slice(u).search(s)){var c,l=_;for(s.global||(s=Rt(s.source,da(ht.exec(s))+"g")),s.lastIndex=0;c=s.exec(l);)var h=c.index;_=_.slice(0,h===i?u:h)}}else if(t.indexOf(oi(s),u)!=u){var T=_.lastIndexOf(s);T>-1&&(_=_.slice(0,T))}return _+r},xn.unescape=function(t){return(t=da(t))&&W.test(t)?t.replace(K,Tn):t},xn.uniqueId=function(t){var e=++Bt;return da(t)+e},xn.upperCase=za,xn.upperFirst=Qa,xn.each=Eo,xn.eachRight=No,xn.first=qs,ou(xn,(Eu={},Nr(xn,(function(t,e){Lt.call(xn.prototype,e)||(Eu[e]=t)})),Eu),{chain:!1}),xn.VERSION="4.17.21",Re(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){xn[t].placeholder=xn})),Re(["drop","take"],(function(t,e){jn.prototype[t]=function(n){n=n===i?1:En(Ta(n),0);var r=this.__filtered__&&!e?new jn(this):this.clone();return r.__filtered__?r.__takeCount__=dn(n,r.__takeCount__):r.__views__.push({size:dn(n,T),type:t+(r.__dir__<0?"Right":"")}),r},jn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Re(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;jn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ss(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Re(["head","last"],(function(t,e){var n="take"+(e?"Right":"");jn.prototype[t]=function(){return this[n](1).value()[0]}})),Re(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");jn.prototype[t]=function(){return this.__filtered__?new jn(this):this[n](1)}})),jn.prototype.compact=function(){return this.filter(nu)},jn.prototype.find=function(t){return this.filter(t).head()},jn.prototype.findLast=function(t){return this.reverse().find(t)},jn.prototype.invokeMap=Wr((function(t,e){return"function"==typeof t?new jn(this):this.map((function(n){return Or(n,t,e)}))})),jn.prototype.reject=function(t){return this.filter(Bo(ss(t)))},jn.prototype.slice=function(t,e){t=Ta(t);var n=this;return n.__filtered__&&(t>0||e<0)?new jn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=Ta(e))<0?n.dropRight(-e):n.take(e-t)),n)},jn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},jn.prototype.toArray=function(){return this.take(T)},Nr(jn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),s=xn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);s&&(xn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof jn,_=a[0],c=u||Go(e),l=function(t){var e=s.apply(xn,we([t],a));return r&&h?e[0]:e};c&&n&&"function"==typeof _&&1!=_.length&&(u=c=!1);var h=this.__chain__,T=!!this.__actions__.length,p=o&&!h,f=u&&!T;if(!o&&c){e=f?e:new jn(this);var E=t.apply(e,a);return E.__actions__.push({func:lo,args:[l],thisArg:i}),new kn(E,h)}return p&&f?t.apply(this,a):(E=this.thru(l),p?r?E.value()[0]:E.value():E)})})),Re(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ot[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);xn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Go(i)?i:[],t)}return this[n]((function(n){return e.apply(Go(n)?n:[],t)}))}})),Nr(jn.prototype,(function(t,e){var n=xn[e];if(n){var r=n.name+"";Lt.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:e,func:n})}})),Cn[Mi(i,2).name]=[{name:"wrapper",func:i}],jn.prototype.clone=function(){var t=new jn(this.__wrapped__);return t.__actions__=Ii(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ii(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ii(this.__views__),t},jn.prototype.reverse=function(){if(this.__filtered__){var t=new jn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},jn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Go(t),r=e<0,i=n?t.length:0,s=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=dn(e,t+o);break;case"takeRight":t=En(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=s.start,a=s.end,u=a-o,_=r?a:o-1,c=this.__iteratees__,l=c.length,h=0,T=dn(u,this.__takeCount__);if(!n||!r&&i==u&&T==u)return li(t,this.__actions__);var p=[];t:for(;u--&&h<T;){for(var f=-1,E=t[_+=e];++f<l;){var d=c[f],N=d.iteratee,S=d.type,m=N(E);if(2==S)E=m;else if(!m){if(1==S)continue t;break t}}p[h++]=E}return p},xn.prototype.at=ho,xn.prototype.chain=function(){return co(this)},xn.prototype.commit=function(){return new kn(this.value(),this.__chain__)},xn.prototype.next=function(){this.__values__===i&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},xn.prototype.plant=function(t){for(var e,n=this;n instanceof Fn;){var r=Ms(n);r.__index__=0,r.__values__=i,e?s.__wrapped__=r:e=r;var s=r;n=n.__wrapped__}return s.__wrapped__=t,e},xn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof jn){var e=t;return this.__actions__.length&&(e=new jn(this)),(e=e.reverse()).__actions__.push({func:lo,args:[Js],thisArg:i}),new kn(e,this.__chain__)}return this.thru(Js)},xn.prototype.toJSON=xn.prototype.valueOf=xn.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},xn.prototype.first=xn.prototype.head,Qt&&(xn.prototype[Qt]=function(){return this}),xn}();le._=pn,(r=function(){return pn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},134:function(t,e,n){var r;t=n.nmd(t),function(){function i(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function s(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}function o(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function a(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function u(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function _(t,e){for(var n=-1,r=null==t?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function c(t,e){return!(null==t||!t.length)&&S(t,e,0)>-1}function l(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function h(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function T(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function p(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function f(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function E(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function d(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function N(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}function S(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):N(t,A,n)}function m(t,e,n,r){for(var i=n-1,s=t.length;++i<s;)if(r(t[i],e))return i;return-1}function A(t){return t!=t}function P(t,e){var n=null==t?0:t.length;return n?I(t,e)/n:Z}function g(t){return function(e){return null==e?K:e[t]}}function y(t){return function(e){return null==t?K:t[e]}}function R(t,e,n,r,i){return i(t,(function(t,i,s){n=r?(r=!1,t):e(n,t,i,s)})),n}function I(t,e){for(var n,r=-1,i=t.length;++r<i;){var s=e(t[r]);s!==K&&(n=n===K?s:n+s)}return n}function D(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function O(t){return t?t.slice(0,G(t)+1).replace(Ht,""):t}function C(t){return function(e){return t(e)}}function b(t,e){return h(e,(function(e){return t[e]}))}function v(t,e){return t.has(e)}function w(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n}function L(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n}function B(t){return"\\"+Qe[t]}function Y(t){return Ge.test(t)}function U(t){return qe.test(t)}function M(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function x(t,e){return function(n){return t(e(n))}}function V(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n];o!==e&&o!==z||(t[n]=z,s[i++]=n)}return s}function F(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function k(t){return Y(t)?function(t){for(var e=ke.lastIndex=0;ke.test(t);)++e;return e}(t):Tn(t)}function j(t){return Y(t)?function(t){return t.match(ke)||[]}(t):function(t){return t.split("")}(t)}function G(t){for(var e=t.length;e--&&Wt.test(t.charAt(e)););return e}function q(t){return t.match(je)||[]}var K,H="Expected a function",W="__lodash_hash_undefined__",z="__lodash_placeholder__",Q=32,X=128,$=1/0,J=9007199254740991,Z=NaN,tt=4294967295,et=tt-1,nt=tt>>>1,rt=[["ary",X],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Q],["partialRight",64],["rearg",256]],it="[object Arguments]",st="[object Array]",ot="[object Boolean]",at="[object Date]",ut="[object Error]",_t="[object Function]",ct="[object GeneratorFunction]",lt="[object Map]",ht="[object Number]",Tt="[object Object]",pt="[object Promise]",ft="[object RegExp]",Et="[object Set]",dt="[object String]",Nt="[object Symbol]",St="[object WeakMap]",mt="[object ArrayBuffer]",At="[object DataView]",Pt="[object Float32Array]",gt="[object Float64Array]",yt="[object Int8Array]",Rt="[object Int16Array]",It="[object Int32Array]",Dt="[object Uint8Array]",Ot="[object Uint8ClampedArray]",Ct="[object Uint16Array]",bt="[object Uint32Array]",vt=/\b__p \+= '';/g,wt=/\b(__p \+=) '' \+/g,Lt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bt=/&(?:amp|lt|gt|quot|#39);/g,Yt=/[&<>"']/g,Ut=RegExp(Bt.source),Mt=RegExp(Yt.source),xt=/<%-([\s\S]+?)%>/g,Vt=/<%([\s\S]+?)%>/g,Ft=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jt=/^\w*$/,Gt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/[\\^$.*+?()[\]{}|]/g,Kt=RegExp(qt.source),Ht=/^\s+/,Wt=/\s/,zt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Qt=/\{\n\/\* \[wrapped with (.+)\] \*/,Xt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Jt=/[()=,{}\[\]\/\s]/,Zt=/\\(\\)?/g,te=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ee=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,re=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,oe=/^(?:0|[1-9]\d*)$/,ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,ce="\\ud800-\\udfff",le="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\u2700-\\u27bf",Te="a-z\\xdf-\\xf6\\xf8-\\xff",pe="A-Z\\xc0-\\xd6\\xd8-\\xde",fe="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",de="["+ce+"]",Ne="["+Ee+"]",Se="["+le+"]",me="\\d+",Ae="["+he+"]",Pe="["+Te+"]",ge="[^"+ce+Ee+me+he+Te+pe+"]",ye="\\ud83c[\\udffb-\\udfff]",Re="[^"+ce+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="["+pe+"]",Ce="\\u200d",be="(?:"+Pe+"|"+ge+")",ve="(?:"+Oe+"|"+ge+")",we="(?:['’](?:d|ll|m|re|s|t|ve))?",Le="(?:['’](?:D|LL|M|RE|S|T|VE))?",Be="(?:"+Se+"|"+ye+")?",Ye="["+fe+"]?",Ue=Ye+Be+"(?:"+Ce+"(?:"+[Re,Ie,De].join("|")+")"+Ye+Be+")*",Me="(?:"+[Ae,Ie,De].join("|")+")"+Ue,xe="(?:"+[Re+Se+"?",Se,Ie,De,de].join("|")+")",Ve=RegExp("['’]","g"),Fe=RegExp(Se,"g"),ke=RegExp(ye+"(?="+ye+")|"+xe+Ue,"g"),je=RegExp([Oe+"?"+Pe+"+"+we+"(?="+[Ne,Oe,"$"].join("|")+")",ve+"+"+Le+"(?="+[Ne,Oe+be,"$"].join("|")+")",Oe+"?"+be+"+"+we,Oe+"+"+Le,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Me].join("|"),"g"),Ge=RegExp("["+Ce+ce+le+fe+"]"),qe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ke=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],He=-1,We={};We[Pt]=We[gt]=We[yt]=We[Rt]=We[It]=We[Dt]=We[Ot]=We[Ct]=We[bt]=!0,We[it]=We[st]=We[mt]=We[ot]=We[At]=We[at]=We[ut]=We[_t]=We[lt]=We[ht]=We[Tt]=We[ft]=We[Et]=We[dt]=We[St]=!1;var ze={};ze[it]=ze[st]=ze[mt]=ze[At]=ze[ot]=ze[at]=ze[Pt]=ze[gt]=ze[yt]=ze[Rt]=ze[It]=ze[lt]=ze[ht]=ze[Tt]=ze[ft]=ze[Et]=ze[dt]=ze[Nt]=ze[Dt]=ze[Ot]=ze[Ct]=ze[bt]=!0,ze[ut]=ze[_t]=ze[St]=!1;var Qe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xe=parseFloat,$e=parseInt,Je="object"==typeof global&&global&&global.Object===Object&&global,Ze="object"==typeof self&&self&&self.Object===Object&&self,tn=Je||Ze||Function("return this")(),en=e&&!e.nodeType&&e,nn=en&&t&&!t.nodeType&&t,rn=nn&&nn.exports===en,sn=rn&&Je.process,on=function(){try{return nn&&nn.require&&nn.require("util").types||sn&&sn.binding&&sn.binding("util")}catch(t){}}(),an=on&&on.isArrayBuffer,un=on&&on.isDate,_n=on&&on.isMap,cn=on&&on.isRegExp,ln=on&&on.isSet,hn=on&&on.isTypedArray,Tn=g("length"),pn=y({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),fn=y({"&":"&","<":"<",">":">",'"':""","'":"'"}),En=y({"&":"&","<":"<",">":">",""":'"',"'":"'"}),dn=function t(e){function n(t){if(Ui(t)&&!Ia(t)&&!(t instanceof Wt)){if(t instanceof y)return t;if(Rs.call(t,"__wrapped__"))return ui(t)}return new y(t)}function r(){}function y(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=K}function Wt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=tt,this.__views__=[]}function ce(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function le(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function he(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Te(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new he;++e<n;)this.add(t[e])}function pe(t){this.size=(this.__data__=new le(t)).size}function fe(t,e){var n=Ia(t),r=!n&&Ra(t),i=!n&&!r&&Oa(t),s=!n&&!r&&!i&&La(t),o=n||r||i||s,a=o?D(t.length,Ns):[],u=a.length;for(var _ in t)!e&&!Rs.call(t,_)||o&&("length"==_||i&&("offset"==_||"parent"==_)||s&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||Hr(_,u))||a.push(_);return a}function Ee(t){var e=t.length;return e?t[Cn(0,e-1)]:K}function de(t,e){return ii(or(t),Ie(e,0,t.length))}function Ne(t){return ii(or(t))}function Se(t,e,n){(n===K||Oi(t[e],n))&&(n!==K||e in t)||ye(t,e,n)}function me(t,e,n){var r=t[e];Rs.call(t,e)&&Oi(r,n)&&(n!==K||e in t)||ye(t,e,n)}function Ae(t,e){for(var n=t.length;n--;)if(Oi(t[n][0],e))return n;return-1}function Pe(t,e,n,r){return yo(t,(function(t,i,s){e(r,t,n(t),s)})),r}function ge(t,e){return t&&ar(e,Xi(e),t)}function ye(t,e,n){"__proto__"==e&&Gs?Gs(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Re(t,e){for(var n=-1,r=e.length,i=ls(r),s=null==t;++n<r;)i[n]=s?K:zi(t,e[n]);return i}function Ie(t,e,n){return t==t&&(n!==K&&(t=t<=n?t:n),e!==K&&(t=t>=e?t:e)),t}function De(t,e,n,r,i,s){var a,u=1&e,_=2&e,c=4&e;if(n&&(a=i?n(t,r,i,s):n(t)),a!==K)return a;if(!Yi(t))return t;var l=Ia(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rs.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return or(t,a)}else{var h=Uo(t),T=h==_t||h==ct;if(Oa(t))return tr(t,u);if(h==Tt||h==it||T&&!i){if(a=_||T?{}:qr(t),!u)return _?function(t,e){return ar(t,Yo(t),e)}(t,function(t,e){return t&&ar(e,$i(e),t)}(a,t)):function(t,e){return ar(t,Bo(t),e)}(t,ge(a,t))}else{if(!ze[h])return i?t:{};a=function(t,e,n){var r=t.constructor;switch(e){case mt:return er(t);case ot:case at:return new r(+t);case At:return function(t,e){return new t.constructor(e?er(t.buffer):t.buffer,t.byteOffset,t.byteLength)}(t,n);case Pt:case gt:case yt:case Rt:case It:case Dt:case Ot:case Ct:case bt:return nr(t,n);case lt:return new r;case ht:case dt:return new r(t);case ft:return function(t){var e=new t.constructor(t.source,ee.exec(t));return e.lastIndex=t.lastIndex,e}(t);case Et:return new r;case Nt:return function(t){return Ao?Es(Ao.call(t)):{}}(t)}}(t,h,u)}}s||(s=new pe);var p=s.get(t);if(p)return p;s.set(t,a),wa(t)?t.forEach((function(r){a.add(De(r,e,n,r,t,s))})):ba(t)&&t.forEach((function(r,i){a.set(i,De(r,e,n,i,t,s))}));var f=l?K:(c?_?Ur:Yr:_?$i:Xi)(t);return o(f||t,(function(r,i){f&&(r=t[i=r]),me(a,i,De(r,e,n,i,t,s))})),a}function Oe(t,e,n){var r=n.length;if(null==t)return!r;for(t=Es(t);r--;){var i=n[r],s=e[i],o=t[i];if(o===K&&!(i in t)||!s(o))return!1}return!0}function Ce(t,e,n){if("function"!=typeof t)throw new Ss(H);return Vo((function(){t.apply(K,n)}),e)}function be(t,e,n,r){var i=-1,s=c,o=!0,a=t.length,u=[],_=e.length;if(!a)return u;n&&(e=h(e,C(n))),r?(s=l,o=!1):e.length>=200&&(s=v,o=!1,e=new Te(e));t:for(;++i<a;){var T=t[i],p=null==n?T:n(T);if(T=r||0!==T?T:0,o&&p==p){for(var f=_;f--;)if(e[f]===p)continue t;u.push(T)}else s(e,p,r)||u.push(T)}return u}function ve(t,e){var n=!0;return yo(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function we(t,e,n){for(var r=-1,i=t.length;++r<i;){var s=t[r],o=e(s);if(null!=o&&(a===K?o==o&&!Fi(o):n(o,a)))var a=o,u=s}return u}function Le(t,e){var n=[];return yo(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function Be(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=Kr),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?Be(a,e-1,n,r,i):T(i,a):r||(i[i.length]=a)}return i}function Ye(t,e){return t&&Io(t,e,Xi)}function Ue(t,e){return t&&Do(t,e,Xi)}function Me(t,e){return _(e,(function(e){return wi(t[e])}))}function xe(t,e){for(var n=0,r=(e=Jn(e,t)).length;null!=t&&n<r;)t=t[si(e[n++])];return n&&n==r?t:K}function ke(t,e,n){var r=e(t);return Ia(t)?r:T(r,n(t))}function je(t){return null==t?t===K?"[object Undefined]":"[object Null]":js&&js in Es(t)?function(t){var e=Rs.call(t,js),n=t[js];try{t[js]=K;var r=!0}catch(t){}var i=Os.call(t);return r&&(e?t[js]=n:delete t[js]),i}(t):function(t){return Os.call(t)}(t)}function Ge(t,e){return t>e}function qe(t,e){return null!=t&&Rs.call(t,e)}function Qe(t,e){return null!=t&&e in Es(t)}function Je(t,e,n){for(var r=n?l:c,i=t[0].length,s=t.length,o=s,a=ls(s),u=1/0,_=[];o--;){var T=t[o];o&&e&&(T=h(T,C(e))),u=eo(T.length,u),a[o]=!n&&(e||i>=120&&T.length>=120)?new Te(o&&T):K}T=t[0];var p=-1,f=a[0];t:for(;++p<i&&_.length<u;){var E=T[p],d=e?e(E):E;if(E=n||0!==E?E:0,!(f?v(f,d):r(_,d,n))){for(o=s;--o;){var N=a[o];if(!(N?v(N,d):r(t[o],d,n)))continue t}f&&f.push(d),_.push(E)}}return _}function Ze(t,e,n){var r=null==(t=ti(t,e=Jn(e,t)))?t:t[si(Ti(e))];return null==r?K:i(r,t,n)}function en(t){return Ui(t)&&je(t)==it}function nn(t,e,n,r,i){return t===e||(null==t||null==e||!Ui(t)&&!Ui(e)?t!=t&&e!=e:function(t,e,n,r,i,s){var o=Ia(t),a=Ia(e),u=o?st:Uo(t),_=a?st:Uo(e),c=(u=u==it?Tt:u)==Tt,l=(_=_==it?Tt:_)==Tt,h=u==_;if(h&&Oa(t)){if(!Oa(e))return!1;o=!0,c=!1}if(h&&!c)return s||(s=new pe),o||La(t)?Lr(t,e,n,r,i,s):function(t,e,n,r,i,s,o){switch(n){case At:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case mt:return!(t.byteLength!=e.byteLength||!s(new Bs(t),new Bs(e)));case ot:case at:case ht:return Oi(+t,+e);case ut:return t.name==e.name&&t.message==e.message;case ft:case dt:return t==e+"";case lt:var a=M;case Et:var u=1&r;if(a||(a=F),t.size!=e.size&&!u)return!1;var _=o.get(t);if(_)return _==e;r|=2,o.set(t,e);var c=Lr(a(t),a(e),r,i,s,o);return o.delete(t),c;case Nt:if(Ao)return Ao.call(t)==Ao.call(e)}return!1}(t,e,u,n,r,i,s);if(!(1&n)){var T=c&&Rs.call(t,"__wrapped__"),p=l&&Rs.call(e,"__wrapped__");if(T||p){var f=T?t.value():t,E=p?e.value():e;return s||(s=new pe),i(f,E,n,r,s)}}return!!h&&(s||(s=new pe),function(t,e,n,r,i,s){var o=1&n,a=Yr(t),u=a.length;if(u!=Yr(e).length&&!o)return!1;for(var _=u;_--;){var c=a[_];if(!(o?c in e:Rs.call(e,c)))return!1}var l=s.get(t),h=s.get(e);if(l&&h)return l==e&&h==t;var T=!0;s.set(t,e),s.set(e,t);for(var p=o;++_<u;){var f=t[c=a[_]],E=e[c];if(r)var d=o?r(E,f,c,e,t,s):r(f,E,c,t,e,s);if(!(d===K?f===E||i(f,E,n,r,s):d)){T=!1;break}p||(p="constructor"==c)}if(T&&!p){var N=t.constructor,S=e.constructor;N!=S&&"constructor"in t&&"constructor"in e&&!("function"==typeof N&&N instanceof N&&"function"==typeof S&&S instanceof S)&&(T=!1)}return s.delete(t),s.delete(e),T}(t,e,n,r,i,s))}(t,e,n,r,nn,i))}function sn(t,e,n,r){var i=n.length,s=i,o=!r;if(null==t)return!s;for(t=Es(t);i--;){var a=n[i];if(o&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<s;){var u=(a=n[i])[0],_=t[u],c=a[1];if(o&&a[2]){if(_===K&&!(u in t))return!1}else{var l=new pe;if(r)var h=r(_,c,u,t,e,l);if(!(h===K?nn(c,_,3,r,l):h))return!1}}return!0}function on(t){return!(!Yi(t)||function(t){return!!Ds&&Ds in t}(t))&&(wi(t)?vs:ie).test(oi(t))}function Tn(t){return"function"==typeof t?t:null==t?is:"object"==typeof t?Ia(t)?Pn(t[0],t[1]):An(t):us(t)}function Nn(t){if(!Xr(t))return Zs(t);var e=[];for(var n in Es(t))Rs.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Sn(t,e){return t<e}function mn(t,e){var n=-1,r=Ci(t)?ls(t.length):[];return yo(t,(function(t,i,s){r[++n]=e(t,i,s)})),r}function An(t){var e=kr(t);return 1==e.length&&e[0][2]?Jr(e[0][0],e[0][1]):function(n){return n===t||sn(n,t,e)}}function Pn(t,e){return zr(t)&&$r(e)?Jr(si(t),e):function(n){var r=zi(n,t);return r===K&&r===e?Qi(n,t):nn(e,r,3)}}function gn(t,e,n,r,i){t!==e&&Io(e,(function(s,o){if(i||(i=new pe),Yi(s))!function(t,e,n,r,i,s,o){var a=ei(t,n),u=ei(e,n),_=o.get(u);if(_)return Se(t,n,_),K;var c=s?s(a,u,n+"",t,e,o):K,l=c===K;if(l){var h=Ia(u),T=!h&&Oa(u),p=!h&&!T&&La(u);c=u,h||T||p?Ia(a)?c=a:bi(a)?c=or(a):T?(l=!1,c=tr(u,!0)):p?(l=!1,c=nr(u,!0)):c=[]:xi(u)||Ra(u)?(c=a,Ra(a)?c=Hi(a):Yi(a)&&!wi(a)||(c=qr(u))):l=!1}l&&(o.set(u,c),i(c,u,r,s,o),o.delete(u)),Se(t,n,c)}(t,e,o,n,gn,r,i);else{var a=r?r(ei(t,o),s,o+"",t,e,i):K;a===K&&(a=s),Se(t,o,a)}}),$i)}function yn(t,e){var n=t.length;if(n)return Hr(e+=e<0?n:0,n)?t[e]:K}function Rn(t,e,n){e=e.length?h(e,(function(t){return Ia(t)?function(e){return xe(e,1===t.length?t[0]:t)}:t})):[is];var r=-1;return e=h(e,C(Vr())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(mn(t,(function(t,n,i){return{criteria:h(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,s=e.criteria,o=i.length,a=n.length;++r<o;){var u=rr(i[r],s[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function In(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=xe(t,o);n(a,o)&&Bn(s,Jn(o,t),a)}return s}function Dn(t,e,n,r){var i=r?m:S,s=-1,o=e.length,a=t;for(t===e&&(e=or(e)),n&&(a=h(t,C(n)));++s<o;)for(var u=0,_=e[s],c=n?n(_):_;(u=i(a,c,u,r))>-1;)a!==t&&Vs.call(a,u,1),Vs.call(t,u,1);return t}function On(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==s){var s=i;Hr(i)?Vs.call(t,i,1):qn(t,i)}}return t}function Cn(t,e){return t+zs(io()*(e-t+1))}function bn(t,e){var n="";if(!t||e<1||e>J)return n;do{e%2&&(n+=t),(e=zs(e/2))&&(t+=t)}while(e);return n}function vn(t,e){return Fo(Zr(t,e,is),t+"")}function wn(t){return Ee(Zi(t))}function Ln(t,e){var n=Zi(t);return ii(n,Ie(e,0,n.length))}function Bn(t,e,n,r){if(!Yi(t))return t;for(var i=-1,s=(e=Jn(e,t)).length,o=s-1,a=t;null!=a&&++i<s;){var u=si(e[i]),_=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(i!=o){var c=a[u];(_=r?r(c,u,a):K)===K&&(_=Yi(c)?c:Hr(e[i+1])?[]:{})}me(a,u,_),a=a[u]}return t}function Yn(t){return ii(Zi(t))}function Un(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=ls(i);++r<i;)s[r]=t[r+e];return s}function Mn(t,e){var n;return yo(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function xn(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=nt){for(;r<i;){var s=r+i>>>1,o=t[s];null!==o&&!Fi(o)&&(n?o<=e:o<e)?r=s+1:i=s}return i}return Vn(t,e,is,n)}function Vn(t,e,n,r){var i=0,s=null==t?0:t.length;if(0===s)return 0;for(var o=(e=n(e))!=e,a=null===e,u=Fi(e),_=e===K;i<s;){var c=zs((i+s)/2),l=n(t[c]),h=l!==K,T=null===l,p=l==l,f=Fi(l);if(o)var E=r||p;else E=_?p&&(r||h):a?p&&h&&(r||!T):u?p&&h&&!T&&(r||!f):!T&&!f&&(r?l<=e:l<e);E?i=c+1:s=c}return eo(s,et)}function Fn(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n],a=e?e(o):o;if(!n||!Oi(a,u)){var u=a;s[i++]=0===o?0:o}}return s}function kn(t){return"number"==typeof t?t:Fi(t)?Z:+t}function jn(t){if("string"==typeof t)return t;if(Ia(t))return h(t,jn)+"";if(Fi(t))return Po?Po.call(t):"";var e=t+"";return"0"==e&&1/t==-$?"-0":e}function Gn(t,e,n){var r=-1,i=c,s=t.length,o=!0,a=[],u=a;if(n)o=!1,i=l;else if(s>=200){var _=e?null:wo(t);if(_)return F(_);o=!1,i=v,u=new Te}else u=e?[]:a;t:for(;++r<s;){var h=t[r],T=e?e(h):h;if(h=n||0!==h?h:0,o&&T==T){for(var p=u.length;p--;)if(u[p]===T)continue t;e&&u.push(T),a.push(h)}else i(u,T,n)||(u!==a&&u.push(T),a.push(h))}return a}function qn(t,e){return null==(t=ti(t,e=Jn(e,t)))||delete t[si(Ti(e))]}function Kn(t,e,n,r){return Bn(t,e,n(xe(t,e)),r)}function Hn(t,e,n,r){for(var i=t.length,s=r?i:-1;(r?s--:++s<i)&&e(t[s],s,t););return n?Un(t,r?0:s,r?s+1:i):Un(t,r?s+1:0,r?i:s)}function Wn(t,e){var n=t;return n instanceof Wt&&(n=n.value()),p(e,(function(t,e){return e.func.apply(e.thisArg,T([t],e.args))}),n)}function zn(t,e,n){var r=t.length;if(r<2)return r?Gn(t[0]):[];for(var i=-1,s=ls(r);++i<r;)for(var o=t[i],a=-1;++a<r;)a!=i&&(s[i]=be(s[i]||o,t[a],e,n));return Gn(Be(s,1),e,n)}function Qn(t,e,n){for(var r=-1,i=t.length,s=e.length,o={};++r<i;)n(o,t[r],r<s?e[r]:K);return o}function Xn(t){return bi(t)?t:[]}function $n(t){return"function"==typeof t?t:is}function Jn(t,e){return Ia(t)?t:zr(t,e)?[t]:ko(Wi(t))}function Zn(t,e,n){var r=t.length;return n=n===K?r:n,!e&&n>=r?t:Un(t,e,n)}function tr(t,e){if(e)return t.slice();var n=t.length,r=Ys?Ys(n):new t.constructor(n);return t.copy(r),r}function er(t){var e=new t.constructor(t.byteLength);return new Bs(e).set(new Bs(t)),e}function nr(t,e){return new t.constructor(e?er(t.buffer):t.buffer,t.byteOffset,t.length)}function rr(t,e){if(t!==e){var n=t!==K,r=null===t,i=t==t,s=Fi(t),o=e!==K,a=null===e,u=e==e,_=Fi(e);if(!a&&!_&&!s&&t>e||s&&o&&u&&!a&&!_||r&&o&&u||!n&&u||!i)return 1;if(!r&&!s&&!_&&t<e||_&&n&&i&&!r&&!s||a&&n&&i||!o&&i||!u)return-1}return 0}function ir(t,e,n,r){for(var i=-1,s=t.length,o=n.length,a=-1,u=e.length,_=to(s-o,0),c=ls(u+_),l=!r;++a<u;)c[a]=e[a];for(;++i<o;)(l||i<s)&&(c[n[i]]=t[i]);for(;_--;)c[a++]=t[i++];return c}function sr(t,e,n,r){for(var i=-1,s=t.length,o=-1,a=n.length,u=-1,_=e.length,c=to(s-a,0),l=ls(c+_),h=!r;++i<c;)l[i]=t[i];for(var T=i;++u<_;)l[T+u]=e[u];for(;++o<a;)(h||i<s)&&(l[T+n[o]]=t[i++]);return l}function or(t,e){var n=-1,r=t.length;for(e||(e=ls(r));++n<r;)e[n]=t[n];return e}function ar(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],u=r?r(n[a],t[a],a,n,t):K;u===K&&(u=t[a]),i?ye(n,a,u):me(n,a,u)}return n}function ur(t,e){return function(n,r){var i=Ia(n)?s:Pe,o=e?e():{};return i(n,t,Vr(r,2),o)}}function _r(t){return vn((function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:K,o=i>2?n[2]:K;for(s=t.length>3&&"function"==typeof s?(i--,s):K,o&&Wr(n[0],n[1],o)&&(s=i<3?K:s,i=1),e=Es(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e}))}function cr(t,e){return function(n,r){if(null==n)return n;if(!Ci(n))return t(n,r);for(var i=n.length,s=e?i:-1,o=Es(n);(e?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function lr(t){return function(e,n,r){for(var i=-1,s=Es(e),o=r(e),a=o.length;a--;){var u=o[t?a:++i];if(!1===n(s[u],u,s))break}return e}}function hr(t){return function(e){var n=Y(e=Wi(e))?j(e):K,r=n?n[0]:e.charAt(0),i=n?Zn(n,1).join(""):e.slice(1);return r[t]()+i}}function Tr(t){return function(e){return p(ns(es(e).replace(Ve,"")),t,"")}}function pr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=go(t.prototype),r=t.apply(n,e);return Yi(r)?r:n}}function fr(t,e,n){var r=pr(t);return function s(){for(var o=arguments.length,a=ls(o),u=o,_=xr(s);u--;)a[u]=arguments[u];var c=o<3&&a[0]!==_&&a[o-1]!==_?[]:V(a,_);return(o-=c.length)<n?Ir(t,e,Nr,s.placeholder,K,a,c,K,K,n-o):i(this&&this!==tn&&this instanceof s?r:t,this,a)}}function Er(t){return function(e,n,r){var i=Es(e);if(!Ci(e)){var s=Vr(n,3);e=Xi(e),n=function(t){return s(i[t],t,i)}}var o=t(e,n,r);return o>-1?i[s?e[o]:o]:K}}function dr(t){return Br((function(e){var n=e.length,r=n,i=y.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new Ss(H);if(i&&!o&&"wrapper"==Mr(s))var o=new y([],!0)}for(r=o?r:n;++r<n;){var a=Mr(s=e[r]),u="wrapper"==a?Lo(s):K;o=u&&Qr(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?o[Mr(u[0])].apply(o,u[3]):1==s.length&&Qr(s)?o[a]():o.thru(s)}return function(){var t=arguments,r=t[0];if(o&&1==t.length&&Ia(r))return o.plant(r).value();for(var i=0,s=n?e[i].apply(this,t):r;++i<n;)s=e[i].call(this,s);return s}}))}function Nr(t,e,n,r,i,s,o,a,u,_){var c=e&X,l=1&e,h=2&e,T=24&e,p=512&e,f=h?K:pr(t);return function E(){for(var d=arguments.length,N=ls(d),S=d;S--;)N[S]=arguments[S];if(T)var m=xr(E),A=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(N,m);if(r&&(N=ir(N,r,i,T)),s&&(N=sr(N,s,o,T)),d-=A,T&&d<_)return Ir(t,e,Nr,E.placeholder,n,N,V(N,m),a,u,_-d);var P=l?n:this,g=h?P[t]:t;return d=N.length,a?N=function(t,e){for(var n=t.length,r=eo(e.length,n),i=or(t);r--;){var s=e[r];t[r]=Hr(s,n)?i[s]:K}return t}(N,a):p&&d>1&&N.reverse(),c&&u<d&&(N.length=u),this&&this!==tn&&this instanceof E&&(g=f||pr(g)),g.apply(P,N)}}function Sr(t,e){return function(n,r){return function(t,e,n,r){return Ye(t,(function(t,i,s){e(r,n(t),i,s)})),r}(n,t,e(r),{})}}function mr(t,e){return function(n,r){var i;if(n===K&&r===K)return e;if(n!==K&&(i=n),r!==K){if(i===K)return r;"string"==typeof n||"string"==typeof r?(n=jn(n),r=jn(r)):(n=kn(n),r=kn(r)),i=t(n,r)}return i}}function Ar(t){return Br((function(e){return e=h(e,C(Vr())),vn((function(n){var r=this;return t(e,(function(t){return i(t,r,n)}))}))}))}function Pr(t,e){var n=(e=e===K?" ":jn(e)).length;if(n<2)return n?bn(e,t):e;var r=bn(e,Ws(t/k(e)));return Y(e)?Zn(j(r),0,t).join(""):r.slice(0,t)}function gr(t,e,n,r){var s=1&e,o=pr(t);return function e(){for(var a=-1,u=arguments.length,_=-1,c=r.length,l=ls(c+u),h=this&&this!==tn&&this instanceof e?o:t;++_<c;)l[_]=r[_];for(;u--;)l[_++]=arguments[++a];return i(h,s?n:this,l)}}function yr(t){return function(e,n,r){return r&&"number"!=typeof r&&Wr(e,n,r)&&(n=r=K),e=ji(e),n===K?(n=e,e=0):n=ji(n),function(t,e,n,r){for(var i=-1,s=to(Ws((e-t)/(n||1)),0),o=ls(s);s--;)o[r?s:++i]=t,t+=n;return o}(e,n,r=r===K?e<n?1:-1:ji(r),t)}}function Rr(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Ki(e),n=Ki(n)),t(e,n)}}function Ir(t,e,n,r,i,s,o,a,u,_){var c=8&e;e|=c?Q:64,4&(e&=~(c?64:Q))||(e&=-4);var l=[t,e,i,c?s:K,c?o:K,c?K:s,c?K:o,a,u,_],h=n.apply(K,l);return Qr(t)&&xo(h,l),h.placeholder=r,ni(h,t,e)}function Dr(t){var e=fs[t];return function(t,n){if(t=Ki(t),(n=null==n?0:eo(Gi(n),292))&&$s(t)){var r=(Wi(t)+"e").split("e");return+((r=(Wi(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}function Or(t){return function(e){var n=Uo(e);return n==lt?M(e):n==Et?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):function(t,e){return h(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Cr(t,e,n,r,i,s,o,a){var u=2&e;if(!u&&"function"!=typeof t)throw new Ss(H);var _=r?r.length:0;if(_||(e&=-97,r=i=K),o=o===K?o:to(Gi(o),0),a=a===K?a:Gi(a),_-=i?i.length:0,64&e){var c=r,l=i;r=i=K}var h=u?K:Lo(t),T=[t,e,n,r,i,c,l,s,o,a];if(h&&function(t,e){var n=t[1],r=e[1],i=n|r,s=i<131,o=r==X&&8==n||r==X&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!s&&!o)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var a=e[3];if(a){var u=t[3];t[3]=u?ir(u,a,e[4]):a,t[4]=u?V(t[3],z):e[4]}(a=e[5])&&(u=t[5],t[5]=u?sr(u,a,e[6]):a,t[6]=u?V(t[5],z):e[6]),(a=e[7])&&(t[7]=a),r&X&&(t[8]=null==t[8]?e[8]:eo(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(T,h),t=T[0],e=T[1],n=T[2],r=T[3],i=T[4],!(a=T[9]=T[9]===K?u?0:t.length:to(T[9]-_,0))&&24&e&&(e&=-25),e&&1!=e)p=8==e||16==e?fr(t,e,a):e!=Q&&33!=e||i.length?Nr.apply(K,T):gr(t,e,n,r);else var p=function(t,e,n){var r=1&e,i=pr(t);return function e(){return(this&&this!==tn&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return ni((h?Oo:xo)(p,T),t,e)}function br(t,e,n,r){return t===K||Oi(t,Ps[n])&&!Rs.call(r,n)?e:t}function vr(t,e,n,r,i,s){return Yi(t)&&Yi(e)&&(s.set(e,t),gn(t,e,K,vr,s),s.delete(e)),t}function wr(t){return xi(t)?K:t}function Lr(t,e,n,r,i,s){var o=1&n,a=t.length,u=e.length;if(a!=u&&!(o&&u>a))return!1;var _=s.get(t),c=s.get(e);if(_&&c)return _==e&&c==t;var l=-1,h=!0,T=2&n?new Te:K;for(s.set(t,e),s.set(e,t);++l<a;){var p=t[l],f=e[l];if(r)var d=o?r(f,p,l,e,t,s):r(p,f,l,t,e,s);if(d!==K){if(d)continue;h=!1;break}if(T){if(!E(e,(function(t,e){if(!v(T,e)&&(p===t||i(p,t,n,r,s)))return T.push(e)}))){h=!1;break}}else if(p!==f&&!i(p,f,n,r,s)){h=!1;break}}return s.delete(t),s.delete(e),h}function Br(t){return Fo(Zr(t,K,li),t+"")}function Yr(t){return ke(t,Xi,Bo)}function Ur(t){return ke(t,$i,Yo)}function Mr(t){for(var e=t.name+"",n=To[e],r=Rs.call(To,e)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==t)return i.name}return e}function xr(t){return(Rs.call(n,"placeholder")?n:t).placeholder}function Vr(){var t=n.iteratee||ss;return t=t===ss?Tn:t,arguments.length?t(arguments[0],arguments[1]):t}function Fr(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function kr(t){for(var e=Xi(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$r(i)]}return e}function jr(t,e){var n=function(t,e){return null==t?K:t[e]}(t,e);return on(n)?n:K}function Gr(t,e,n){for(var r=-1,i=(e=Jn(e,t)).length,s=!1;++r<i;){var o=si(e[r]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++r!=i?s:!!(i=null==t?0:t.length)&&Bi(i)&&Hr(o,i)&&(Ia(t)||Ra(t))}function qr(t){return"function"!=typeof t.constructor||Xr(t)?{}:go(Us(t))}function Kr(t){return Ia(t)||Ra(t)||!!(Fs&&t&&t[Fs])}function Hr(t,e){var n=typeof t;return!!(e=null==e?J:e)&&("number"==n||"symbol"!=n&&oe.test(t))&&t>-1&&t%1==0&&t<e}function Wr(t,e,n){if(!Yi(n))return!1;var r=typeof e;return!!("number"==r?Ci(n)&&Hr(e,n.length):"string"==r&&e in n)&&Oi(n[e],t)}function zr(t,e){if(Ia(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Fi(t))||jt.test(t)||!kt.test(t)||null!=e&&t in Es(e)}function Qr(t){var e=Mr(t),r=n[e];if("function"!=typeof r||!(e in Wt.prototype))return!1;if(t===r)return!0;var i=Lo(r);return!!i&&t===i[0]}function Xr(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ps)}function $r(t){return t==t&&!Yi(t)}function Jr(t,e){return function(n){return null!=n&&n[t]===e&&(e!==K||t in Es(n))}}function Zr(t,e,n){return e=to(e===K?t.length-1:e,0),function(){for(var r=arguments,s=-1,o=to(r.length-e,0),a=ls(o);++s<o;)a[s]=r[e+s];s=-1;for(var u=ls(e+1);++s<e;)u[s]=r[s];return u[e]=n(a),i(t,this,u)}}function ti(t,e){return e.length<2?t:xe(t,Un(e,0,-1))}function ei(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function ni(t,e,n){var r=e+"";return Fo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(zt,"{\n/* [wrapped with "+e+"] */\n")}(r,ai(function(t){var e=t.match(Qt);return e?e[1].split(Xt):[]}(r),n)))}function ri(t){var e=0,n=0;return function(){var r=no(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(K,arguments)}}function ii(t,e){var n=-1,r=t.length,i=r-1;for(e=e===K?r:e;++n<e;){var s=Cn(n,i),o=t[s];t[s]=t[n],t[n]=o}return t.length=e,t}function si(t){if("string"==typeof t||Fi(t))return t;var e=t+"";return"0"==e&&1/t==-$?"-0":e}function oi(t){if(null!=t){try{return ys.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function ai(t,e){return o(rt,(function(n){var r="_."+n[0];e&n[1]&&!c(t,r)&&t.push(r)})),t.sort()}function ui(t){if(t instanceof Wt)return t.clone();var e=new y(t.__wrapped__,t.__chain__);return e.__actions__=or(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function _i(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Gi(n);return i<0&&(i=to(r+i,0)),N(t,Vr(e,3),i)}function ci(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==K&&(i=Gi(n),i=n<0?to(r+i,0):eo(i,r-1)),N(t,Vr(e,3),i,!0)}function li(t){return null!=t&&t.length?Be(t,1):[]}function hi(t){return t&&t.length?t[0]:K}function Ti(t){var e=null==t?0:t.length;return e?t[e-1]:K}function pi(t,e){return t&&t.length&&e&&e.length?Dn(t,e):t}function fi(t){return null==t?t:so.call(t)}function Ei(t){if(!t||!t.length)return[];var e=0;return t=_(t,(function(t){if(bi(t))return e=to(t.length,e),!0})),D(e,(function(e){return h(t,g(e))}))}function di(t,e){if(!t||!t.length)return[];var n=Ei(t);return null==e?n:h(n,(function(t){return i(e,K,t)}))}function Ni(t){var e=n(t);return e.__chain__=!0,e}function Si(t,e){return e(t)}function mi(t,e){return(Ia(t)?o:yo)(t,Vr(e,3))}function Ai(t,e){return(Ia(t)?a:Ro)(t,Vr(e,3))}function Pi(t,e){return(Ia(t)?h:mn)(t,Vr(e,3))}function gi(t,e,n){return e=n?K:e,e=t&&null==e?t.length:e,Cr(t,X,K,K,K,K,e)}function yi(t,e){var n;if("function"!=typeof e)throw new Ss(H);return t=Gi(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=K),n}}function Ri(t,e,n){function r(e){var n=u,r=_;return u=_=K,p=e,l=t.apply(r,n)}function i(t){var n=t-T;return T===K||n>=e||n<0||E&&t-p>=c}function s(){var t=pa();return i(t)?o(t):(h=Vo(s,function(t){var n=e-(t-T);return E?eo(n,c-(t-p)):n}(t)),K)}function o(t){return h=K,d&&u?r(t):(u=_=K,l)}function a(){var t=pa(),n=i(t);if(u=arguments,_=this,T=t,n){if(h===K)return function(t){return p=t,h=Vo(s,e),f?r(t):l}(T);if(E)return vo(h),h=Vo(s,e),r(T)}return h===K&&(h=Vo(s,e)),l}var u,_,c,l,h,T,p=0,f=!1,E=!1,d=!0;if("function"!=typeof t)throw new Ss(H);return e=Ki(e)||0,Yi(n)&&(f=!!n.leading,c=(E="maxWait"in n)?to(Ki(n.maxWait)||0,e):c,d="trailing"in n?!!n.trailing:d),a.cancel=function(){h!==K&&vo(h),p=0,u=T=_=h=K},a.flush=function(){return h===K?l:o(pa())},a}function Ii(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Ss(H);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Ii.Cache||he),n}function Di(t){if("function"!=typeof t)throw new Ss(H);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Oi(t,e){return t===e||t!=t&&e!=e}function Ci(t){return null!=t&&Bi(t.length)&&!wi(t)}function bi(t){return Ui(t)&&Ci(t)}function vi(t){if(!Ui(t))return!1;var e=je(t);return e==ut||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!xi(t)}function wi(t){if(!Yi(t))return!1;var e=je(t);return e==_t||e==ct||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Li(t){return"number"==typeof t&&t==Gi(t)}function Bi(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=J}function Yi(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ui(t){return null!=t&&"object"==typeof t}function Mi(t){return"number"==typeof t||Ui(t)&&je(t)==ht}function xi(t){if(!Ui(t)||je(t)!=Tt)return!1;var e=Us(t);if(null===e)return!0;var n=Rs.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ys.call(n)==Cs}function Vi(t){return"string"==typeof t||!Ia(t)&&Ui(t)&&je(t)==dt}function Fi(t){return"symbol"==typeof t||Ui(t)&&je(t)==Nt}function ki(t){if(!t)return[];if(Ci(t))return Vi(t)?j(t):or(t);if(ks&&t[ks])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ks]());var e=Uo(t);return(e==lt?M:e==Et?F:Zi)(t)}function ji(t){return t?(t=Ki(t))===$||t===-$?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function Gi(t){var e=ji(t),n=e%1;return e==e?n?e-n:e:0}function qi(t){return t?Ie(Gi(t),0,tt):0}function Ki(t){if("number"==typeof t)return t;if(Fi(t))return Z;if(Yi(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Yi(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=O(t);var n=re.test(t);return n||se.test(t)?$e(t.slice(2),n?2:8):ne.test(t)?Z:+t}function Hi(t){return ar(t,$i(t))}function Wi(t){return null==t?"":jn(t)}function zi(t,e,n){var r=null==t?K:xe(t,e);return r===K?n:r}function Qi(t,e){return null!=t&&Gr(t,e,Qe)}function Xi(t){return Ci(t)?fe(t):Nn(t)}function $i(t){return Ci(t)?fe(t,!0):function(t){if(!Yi(t))return function(t){var e=[];if(null!=t)for(var n in Es(t))e.push(n);return e}(t);var e=Xr(t),n=[];for(var r in t)("constructor"!=r||!e&&Rs.call(t,r))&&n.push(r);return n}(t)}function Ji(t,e){if(null==t)return{};var n=h(Ur(t),(function(t){return[t]}));return e=Vr(e),In(t,n,(function(t,n){return e(t,n[0])}))}function Zi(t){return null==t?[]:b(t,Xi(t))}function ts(t){return su(Wi(t).toLowerCase())}function es(t){return(t=Wi(t))&&t.replace(ae,pn).replace(Fe,"")}function ns(t,e,n){return t=Wi(t),(e=n?K:e)===K?U(t)?q(t):function(t){return t.match($t)||[]}(t):t.match(e)||[]}function rs(t){return function(){return t}}function is(t){return t}function ss(t){return Tn("function"==typeof t?t:De(t,1))}function os(t,e,n){var r=Xi(e),i=Me(e,r);null!=n||Yi(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Me(e,Xi(e)));var s=!(Yi(n)&&"chain"in n&&!n.chain),a=wi(t);return o(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=or(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,T([this.value()],arguments))})})),t}function as(){}function us(t){return zr(t)?g(si(t)):function(t){return function(e){return xe(e,t)}}(t)}function _s(){return[]}function cs(){return!1}var ls=(e=null==e?tn:dn.defaults(tn.Object(),e,dn.pick(tn,Ke))).Array,hs=e.Date,Ts=e.Error,ps=e.Function,fs=e.Math,Es=e.Object,ds=e.RegExp,Ns=e.String,Ss=e.TypeError,ms=ls.prototype,As=ps.prototype,Ps=Es.prototype,gs=e["__core-js_shared__"],ys=As.toString,Rs=Ps.hasOwnProperty,Is=0,Ds=function(){var t=/[^.]+$/.exec(gs&&gs.keys&&gs.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Os=Ps.toString,Cs=ys.call(Es),bs=tn._,vs=ds("^"+ys.call(Rs).replace(qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ws=rn?e.Buffer:K,Ls=e.Symbol,Bs=e.Uint8Array,Ys=ws?ws.allocUnsafe:K,Us=x(Es.getPrototypeOf,Es),Ms=Es.create,xs=Ps.propertyIsEnumerable,Vs=ms.splice,Fs=Ls?Ls.isConcatSpreadable:K,ks=Ls?Ls.iterator:K,js=Ls?Ls.toStringTag:K,Gs=function(){try{var t=jr(Es,"defineProperty");return t({},"",{}),t}catch(t){}}(),qs=e.clearTimeout!==tn.clearTimeout&&e.clearTimeout,Ks=hs&&hs.now!==tn.Date.now&&hs.now,Hs=e.setTimeout!==tn.setTimeout&&e.setTimeout,Ws=fs.ceil,zs=fs.floor,Qs=Es.getOwnPropertySymbols,Xs=ws?ws.isBuffer:K,$s=e.isFinite,Js=ms.join,Zs=x(Es.keys,Es),to=fs.max,eo=fs.min,no=hs.now,ro=e.parseInt,io=fs.random,so=ms.reverse,oo=jr(e,"DataView"),ao=jr(e,"Map"),uo=jr(e,"Promise"),_o=jr(e,"Set"),co=jr(e,"WeakMap"),lo=jr(Es,"create"),ho=co&&new co,To={},po=oi(oo),fo=oi(ao),Eo=oi(uo),No=oi(_o),So=oi(co),mo=Ls?Ls.prototype:K,Ao=mo?mo.valueOf:K,Po=mo?mo.toString:K,go=function(){function t(){}return function(e){if(!Yi(e))return{};if(Ms)return Ms(e);t.prototype=e;var n=new t;return t.prototype=K,n}}();n.templateSettings={escape:xt,evaluate:Vt,interpolate:Ft,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,y.prototype=go(r.prototype),y.prototype.constructor=y,Wt.prototype=go(r.prototype),Wt.prototype.constructor=Wt,ce.prototype.clear=function(){this.__data__=lo?lo(null):{},this.size=0},ce.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ce.prototype.get=function(t){var e=this.__data__;if(lo){var n=e[t];return n===W?K:n}return Rs.call(e,t)?e[t]:K},ce.prototype.has=function(t){var e=this.__data__;return lo?e[t]!==K:Rs.call(e,t)},ce.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=lo&&e===K?W:e,this},le.prototype.clear=function(){this.__data__=[],this.size=0},le.prototype.delete=function(t){var e=this.__data__,n=Ae(e,t);return!(n<0||(n==e.length-1?e.pop():Vs.call(e,n,1),--this.size,0))},le.prototype.get=function(t){var e=this.__data__,n=Ae(e,t);return n<0?K:e[n][1]},le.prototype.has=function(t){return Ae(this.__data__,t)>-1},le.prototype.set=function(t,e){var n=this.__data__,r=Ae(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},he.prototype.clear=function(){this.size=0,this.__data__={hash:new ce,map:new(ao||le),string:new ce}},he.prototype.delete=function(t){var e=Fr(this,t).delete(t);return this.size-=e?1:0,e},he.prototype.get=function(t){return Fr(this,t).get(t)},he.prototype.has=function(t){return Fr(this,t).has(t)},he.prototype.set=function(t,e){var n=Fr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Te.prototype.add=Te.prototype.push=function(t){return this.__data__.set(t,W),this},Te.prototype.has=function(t){return this.__data__.has(t)},pe.prototype.clear=function(){this.__data__=new le,this.size=0},pe.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},pe.prototype.get=function(t){return this.__data__.get(t)},pe.prototype.has=function(t){return this.__data__.has(t)},pe.prototype.set=function(t,e){var n=this.__data__;if(n instanceof le){var r=n.__data__;if(!ao||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new he(r)}return n.set(t,e),this.size=n.size,this};var yo=cr(Ye),Ro=cr(Ue,!0),Io=lr(),Do=lr(!0),Oo=ho?function(t,e){return ho.set(t,e),t}:is,Co=Gs?function(t,e){return Gs(t,"toString",{configurable:!0,enumerable:!1,value:rs(e),writable:!0})}:is,bo=vn,vo=qs||function(t){return tn.clearTimeout(t)},wo=_o&&1/F(new _o([,-0]))[1]==$?function(t){return new _o(t)}:as,Lo=ho?function(t){return ho.get(t)}:as,Bo=Qs?function(t){return null==t?[]:(t=Es(t),_(Qs(t),(function(e){return xs.call(t,e)})))}:_s,Yo=Qs?function(t){for(var e=[];t;)T(e,Bo(t)),t=Us(t);return e}:_s,Uo=je;(oo&&Uo(new oo(new ArrayBuffer(1)))!=At||ao&&Uo(new ao)!=lt||uo&&Uo(uo.resolve())!=pt||_o&&Uo(new _o)!=Et||co&&Uo(new co)!=St)&&(Uo=function(t){var e=je(t),n=e==Tt?t.constructor:K,r=n?oi(n):"";if(r)switch(r){case po:return At;case fo:return lt;case Eo:return pt;case No:return Et;case So:return St}return e});var Mo=gs?wi:cs,xo=ri(Oo),Vo=Hs||function(t,e){return tn.setTimeout(t,e)},Fo=ri(Co),ko=function(t){var e=Ii((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Gt,(function(t,n,r,i){e.push(r?i.replace(Zt,"$1"):n||t)})),e}),(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}(),jo=vn((function(t,e){return bi(t)?be(t,Be(e,1,bi,!0)):[]})),Go=vn((function(t,e){var n=Ti(e);return bi(n)&&(n=K),bi(t)?be(t,Be(e,1,bi,!0),Vr(n,2)):[]})),qo=vn((function(t,e){var n=Ti(e);return bi(n)&&(n=K),bi(t)?be(t,Be(e,1,bi,!0),K,n):[]})),Ko=vn((function(t){var e=h(t,Xn);return e.length&&e[0]===t[0]?Je(e):[]})),Ho=vn((function(t){var e=Ti(t),n=h(t,Xn);return e===Ti(n)?e=K:n.pop(),n.length&&n[0]===t[0]?Je(n,Vr(e,2)):[]})),Wo=vn((function(t){var e=Ti(t),n=h(t,Xn);return(e="function"==typeof e?e:K)&&n.pop(),n.length&&n[0]===t[0]?Je(n,K,e):[]})),zo=vn(pi),Qo=Br((function(t,e){var n=null==t?0:t.length,r=Re(t,e);return On(t,h(e,(function(t){return Hr(t,n)?+t:t})).sort(rr)),r})),Xo=vn((function(t){return Gn(Be(t,1,bi,!0))})),$o=vn((function(t){var e=Ti(t);return bi(e)&&(e=K),Gn(Be(t,1,bi,!0),Vr(e,2))})),Jo=vn((function(t){var e=Ti(t);return e="function"==typeof e?e:K,Gn(Be(t,1,bi,!0),K,e)})),Zo=vn((function(t,e){return bi(t)?be(t,e):[]})),ta=vn((function(t){return zn(_(t,bi))})),ea=vn((function(t){var e=Ti(t);return bi(e)&&(e=K),zn(_(t,bi),Vr(e,2))})),na=vn((function(t){var e=Ti(t);return e="function"==typeof e?e:K,zn(_(t,bi),K,e)})),ra=vn(Ei),ia=vn((function(t){var e=t.length,n=e>1?t[e-1]:K;return n="function"==typeof n?(t.pop(),n):K,di(t,n)})),sa=Br((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Re(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Wt&&Hr(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Si,args:[i],thisArg:K}),new y(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(K),t}))):this.thru(i)})),oa=ur((function(t,e,n){Rs.call(t,n)?++t[n]:ye(t,n,1)})),aa=Er(_i),ua=Er(ci),_a=ur((function(t,e,n){Rs.call(t,n)?t[n].push(e):ye(t,n,[e])})),ca=vn((function(t,e,n){var r=-1,s="function"==typeof e,o=Ci(t)?ls(t.length):[];return yo(t,(function(t){o[++r]=s?i(e,t,n):Ze(t,e,n)})),o})),la=ur((function(t,e,n){ye(t,n,e)})),ha=ur((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Ta=vn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Wr(t,e[0],e[1])?e=[]:n>2&&Wr(e[0],e[1],e[2])&&(e=[e[0]]),Rn(t,Be(e,1),[])})),pa=Ks||function(){return tn.Date.now()},fa=vn((function(t,e,n){var r=1;if(n.length){var i=V(n,xr(fa));r|=Q}return Cr(t,r,e,n,i)})),Ea=vn((function(t,e,n){var r=3;if(n.length){var i=V(n,xr(Ea));r|=Q}return Cr(e,r,t,n,i)})),da=vn((function(t,e){return Ce(t,1,e)})),Na=vn((function(t,e,n){return Ce(t,Ki(e)||0,n)}));Ii.Cache=he;var Sa=bo((function(t,e){var n=(e=1==e.length&&Ia(e[0])?h(e[0],C(Vr())):h(Be(e,1),C(Vr()))).length;return vn((function(r){for(var s=-1,o=eo(r.length,n);++s<o;)r[s]=e[s].call(this,r[s]);return i(t,this,r)}))})),ma=vn((function(t,e){return Cr(t,Q,K,e,V(e,xr(ma)))})),Aa=vn((function(t,e){return Cr(t,64,K,e,V(e,xr(Aa)))})),Pa=Br((function(t,e){return Cr(t,256,K,K,K,e)})),ga=Rr(Ge),ya=Rr((function(t,e){return t>=e})),Ra=en(function(){return arguments}())?en:function(t){return Ui(t)&&Rs.call(t,"callee")&&!xs.call(t,"callee")},Ia=ls.isArray,Da=an?C(an):function(t){return Ui(t)&&je(t)==mt},Oa=Xs||cs,Ca=un?C(un):function(t){return Ui(t)&&je(t)==at},ba=_n?C(_n):function(t){return Ui(t)&&Uo(t)==lt},va=cn?C(cn):function(t){return Ui(t)&&je(t)==ft},wa=ln?C(ln):function(t){return Ui(t)&&Uo(t)==Et},La=hn?C(hn):function(t){return Ui(t)&&Bi(t.length)&&!!We[je(t)]},Ba=Rr(Sn),Ya=Rr((function(t,e){return t<=e})),Ua=_r((function(t,e){if(Xr(e)||Ci(e))return ar(e,Xi(e),t),K;for(var n in e)Rs.call(e,n)&&me(t,n,e[n])})),Ma=_r((function(t,e){ar(e,$i(e),t)})),xa=_r((function(t,e,n,r){ar(e,$i(e),t,r)})),Va=_r((function(t,e,n,r){ar(e,Xi(e),t,r)})),Fa=Br(Re),ka=vn((function(t,e){t=Es(t);var n=-1,r=e.length,i=r>2?e[2]:K;for(i&&Wr(e[0],e[1],i)&&(r=1);++n<r;)for(var s=e[n],o=$i(s),a=-1,u=o.length;++a<u;){var _=o[a],c=t[_];(c===K||Oi(c,Ps[_])&&!Rs.call(t,_))&&(t[_]=s[_])}return t})),ja=vn((function(t){return t.push(K,vr),i(Wa,K,t)})),Ga=Sr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Os.call(e)),t[e]=n}),rs(is)),qa=Sr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Os.call(e)),Rs.call(t,e)?t[e].push(n):t[e]=[n]}),Vr),Ka=vn(Ze),Ha=_r((function(t,e,n){gn(t,e,n)})),Wa=_r((function(t,e,n,r){gn(t,e,n,r)})),za=Br((function(t,e){var n={};if(null==t)return n;var r=!1;e=h(e,(function(e){return e=Jn(e,t),r||(r=e.length>1),e})),ar(t,Ur(t),n),r&&(n=De(n,7,wr));for(var i=e.length;i--;)qn(n,e[i]);return n})),Qa=Br((function(t,e){return null==t?{}:function(t,e){return In(t,e,(function(e,n){return Qi(t,n)}))}(t,e)})),Xa=Or(Xi),$a=Or($i),Ja=Tr((function(t,e,n){return e=e.toLowerCase(),t+(n?ts(e):e)})),Za=Tr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),tu=Tr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),eu=hr("toLowerCase"),nu=Tr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),ru=Tr((function(t,e,n){return t+(n?" ":"")+su(e)})),iu=Tr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),su=hr("toUpperCase"),ou=vn((function(t,e){try{return i(t,K,e)}catch(t){return vi(t)?t:new Ts(t)}})),au=Br((function(t,e){return o(e,(function(e){e=si(e),ye(t,e,fa(t[e],t))})),t})),uu=dr(),_u=dr(!0),cu=vn((function(t,e){return function(n){return Ze(n,t,e)}})),lu=vn((function(t,e){return function(n){return Ze(t,n,e)}})),hu=Ar(h),Tu=Ar(u),pu=Ar(E),fu=yr(),Eu=yr(!0),du=mr((function(t,e){return t+e}),0),Nu=Dr("ceil"),Su=mr((function(t,e){return t/e}),1),mu=Dr("floor"),Au=mr((function(t,e){return t*e}),1),Pu=Dr("round"),gu=mr((function(t,e){return t-e}),0);return n.after=function(t,e){if("function"!=typeof e)throw new Ss(H);return t=Gi(t),function(){if(--t<1)return e.apply(this,arguments)}},n.ary=gi,n.assign=Ua,n.assignIn=Ma,n.assignInWith=xa,n.assignWith=Va,n.at=Fa,n.before=yi,n.bind=fa,n.bindAll=au,n.bindKey=Ea,n.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ia(t)?t:[t]},n.chain=Ni,n.chunk=function(t,e,n){e=(n?Wr(t,e,n):e===K)?1:to(Gi(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var i=0,s=0,o=ls(Ws(r/e));i<r;)o[s++]=Un(t,i,i+=e);return o},n.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i},n.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ls(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return T(Ia(n)?or(n):[n],Be(e,1))},n.cond=function(t){var e=null==t?0:t.length,n=Vr();return t=e?h(t,(function(t){if("function"!=typeof t[1])throw new Ss(H);return[n(t[0]),t[1]]})):[],vn((function(n){for(var r=-1;++r<e;){var s=t[r];if(i(s[0],this,n))return i(s[1],this,n)}}))},n.conforms=function(t){return function(t){var e=Xi(t);return function(n){return Oe(n,t,e)}}(De(t,1))},n.constant=rs,n.countBy=oa,n.create=function(t,e){var n=go(t);return null==e?n:ge(n,e)},n.curry=function t(e,n,r){var i=Cr(e,8,K,K,K,K,K,n=r?K:n);return i.placeholder=t.placeholder,i},n.curryRight=function t(e,n,r){var i=Cr(e,16,K,K,K,K,K,n=r?K:n);return i.placeholder=t.placeholder,i},n.debounce=Ri,n.defaults=ka,n.defaultsDeep=ja,n.defer=da,n.delay=Na,n.difference=jo,n.differenceBy=Go,n.differenceWith=qo,n.drop=function(t,e,n){var r=null==t?0:t.length;return r?Un(t,(e=n||e===K?1:Gi(e))<0?0:e,r):[]},n.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Un(t,0,(e=r-(e=n||e===K?1:Gi(e)))<0?0:e):[]},n.dropRightWhile=function(t,e){return t&&t.length?Hn(t,Vr(e,3),!0,!0):[]},n.dropWhile=function(t,e){return t&&t.length?Hn(t,Vr(e,3),!0):[]},n.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Wr(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=Gi(n))<0&&(n=-n>i?0:i+n),(r=r===K||r>i?i:Gi(r))<0&&(r+=i),r=n>r?0:qi(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},n.filter=function(t,e){return(Ia(t)?_:Le)(t,Vr(e,3))},n.flatMap=function(t,e){return Be(Pi(t,e),1)},n.flatMapDeep=function(t,e){return Be(Pi(t,e),$)},n.flatMapDepth=function(t,e,n){return n=n===K?1:Gi(n),Be(Pi(t,e),n)},n.flatten=li,n.flattenDeep=function(t){return null!=t&&t.length?Be(t,$):[]},n.flattenDepth=function(t,e){return null!=t&&t.length?Be(t,e=e===K?1:Gi(e)):[]},n.flip=function(t){return Cr(t,512)},n.flow=uu,n.flowRight=_u,n.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},n.functions=function(t){return null==t?[]:Me(t,Xi(t))},n.functionsIn=function(t){return null==t?[]:Me(t,$i(t))},n.groupBy=_a,n.initial=function(t){return null!=t&&t.length?Un(t,0,-1):[]},n.intersection=Ko,n.intersectionBy=Ho,n.intersectionWith=Wo,n.invert=Ga,n.invertBy=qa,n.invokeMap=ca,n.iteratee=ss,n.keyBy=la,n.keys=Xi,n.keysIn=$i,n.map=Pi,n.mapKeys=function(t,e){var n={};return e=Vr(e,3),Ye(t,(function(t,r,i){ye(n,e(t,r,i),t)})),n},n.mapValues=function(t,e){var n={};return e=Vr(e,3),Ye(t,(function(t,r,i){ye(n,r,e(t,r,i))})),n},n.matches=function(t){return An(De(t,1))},n.matchesProperty=function(t,e){return Pn(t,De(e,1))},n.memoize=Ii,n.merge=Ha,n.mergeWith=Wa,n.method=cu,n.methodOf=lu,n.mixin=os,n.negate=Di,n.nthArg=function(t){return t=Gi(t),vn((function(e){return yn(e,t)}))},n.omit=za,n.omitBy=function(t,e){return Ji(t,Di(Vr(e)))},n.once=function(t){return yi(2,t)},n.orderBy=function(t,e,n,r){return null==t?[]:(Ia(e)||(e=null==e?[]:[e]),Ia(n=r?K:n)||(n=null==n?[]:[n]),Rn(t,e,n))},n.over=hu,n.overArgs=Sa,n.overEvery=Tu,n.overSome=pu,n.partial=ma,n.partialRight=Aa,n.partition=ha,n.pick=Qa,n.pickBy=Ji,n.property=us,n.propertyOf=function(t){return function(e){return null==t?K:xe(t,e)}},n.pull=zo,n.pullAll=pi,n.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Dn(t,e,Vr(n,2)):t},n.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Dn(t,e,K,n):t},n.pullAt=Qo,n.range=fu,n.rangeRight=Eu,n.rearg=Pa,n.reject=function(t,e){return(Ia(t)?_:Le)(t,Di(Vr(e,3)))},n.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],s=t.length;for(e=Vr(e,3);++r<s;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return On(t,i),n},n.rest=function(t,e){if("function"!=typeof t)throw new Ss(H);return vn(t,e=e===K?e:Gi(e))},n.reverse=fi,n.sampleSize=function(t,e,n){return e=(n?Wr(t,e,n):e===K)?1:Gi(e),(Ia(t)?de:Ln)(t,e)},n.set=function(t,e,n){return null==t?t:Bn(t,e,n)},n.setWith=function(t,e,n,r){return r="function"==typeof r?r:K,null==t?t:Bn(t,e,n,r)},n.shuffle=function(t){return(Ia(t)?Ne:Yn)(t)},n.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Wr(t,e,n)?(e=0,n=r):(e=null==e?0:Gi(e),n=n===K?r:Gi(n)),Un(t,e,n)):[]},n.sortBy=Ta,n.sortedUniq=function(t){return t&&t.length?Fn(t):[]},n.sortedUniqBy=function(t,e){return t&&t.length?Fn(t,Vr(e,2)):[]},n.split=function(t,e,n){return n&&"number"!=typeof n&&Wr(t,e,n)&&(e=n=K),(n=n===K?tt:n>>>0)?(t=Wi(t))&&("string"==typeof e||null!=e&&!va(e))&&!(e=jn(e))&&Y(t)?Zn(j(t),0,n):t.split(e,n):[]},n.spread=function(t,e){if("function"!=typeof t)throw new Ss(H);return e=null==e?0:to(Gi(e),0),vn((function(n){var r=n[e],s=Zn(n,0,e);return r&&T(s,r),i(t,this,s)}))},n.tail=function(t){var e=null==t?0:t.length;return e?Un(t,1,e):[]},n.take=function(t,e,n){return t&&t.length?Un(t,0,(e=n||e===K?1:Gi(e))<0?0:e):[]},n.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Un(t,(e=r-(e=n||e===K?1:Gi(e)))<0?0:e,r):[]},n.takeRightWhile=function(t,e){return t&&t.length?Hn(t,Vr(e,3),!1,!0):[]},n.takeWhile=function(t,e){return t&&t.length?Hn(t,Vr(e,3)):[]},n.tap=function(t,e){return e(t),t},n.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Ss(H);return Yi(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ri(t,e,{leading:r,maxWait:e,trailing:i})},n.thru=Si,n.toArray=ki,n.toPairs=Xa,n.toPairsIn=$a,n.toPath=function(t){return Ia(t)?h(t,si):Fi(t)?[t]:or(ko(Wi(t)))},n.toPlainObject=Hi,n.transform=function(t,e,n){var r=Ia(t),i=r||Oa(t)||La(t);if(e=Vr(e,4),null==n){var s=t&&t.constructor;n=i?r?new s:[]:Yi(t)&&wi(s)?go(Us(t)):{}}return(i?o:Ye)(t,(function(t,r,i){return e(n,t,r,i)})),n},n.unary=function(t){return gi(t,1)},n.union=Xo,n.unionBy=$o,n.unionWith=Jo,n.uniq=function(t){return t&&t.length?Gn(t):[]},n.uniqBy=function(t,e){return t&&t.length?Gn(t,Vr(e,2)):[]},n.uniqWith=function(t,e){return e="function"==typeof e?e:K,t&&t.length?Gn(t,K,e):[]},n.unset=function(t,e){return null==t||qn(t,e)},n.unzip=Ei,n.unzipWith=di,n.update=function(t,e,n){return null==t?t:Kn(t,e,$n(n))},n.updateWith=function(t,e,n,r){return r="function"==typeof r?r:K,null==t?t:Kn(t,e,$n(n),r)},n.values=Zi,n.valuesIn=function(t){return null==t?[]:b(t,$i(t))},n.without=Zo,n.words=ns,n.wrap=function(t,e){return ma($n(e),t)},n.xor=ta,n.xorBy=ea,n.xorWith=na,n.zip=ra,n.zipObject=function(t,e){return Qn(t||[],e||[],me)},n.zipObjectDeep=function(t,e){return Qn(t||[],e||[],Bn)},n.zipWith=ia,n.entries=Xa,n.entriesIn=$a,n.extend=Ma,n.extendWith=xa,os(n,n),n.add=du,n.attempt=ou,n.camelCase=Ja,n.capitalize=ts,n.ceil=Nu,n.clamp=function(t,e,n){return n===K&&(n=e,e=K),n!==K&&(n=(n=Ki(n))==n?n:0),e!==K&&(e=(e=Ki(e))==e?e:0),Ie(Ki(t),e,n)},n.clone=function(t){return De(t,4)},n.cloneDeep=function(t){return De(t,5)},n.cloneDeepWith=function(t,e){return De(t,5,e="function"==typeof e?e:K)},n.cloneWith=function(t,e){return De(t,4,e="function"==typeof e?e:K)},n.conformsTo=function(t,e){return null==e||Oe(t,e,Xi(e))},n.deburr=es,n.defaultTo=function(t,e){return null==t||t!=t?e:t},n.divide=Su,n.endsWith=function(t,e,n){t=Wi(t),e=jn(e);var r=t.length,i=n=n===K?r:Ie(Gi(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},n.eq=Oi,n.escape=function(t){return(t=Wi(t))&&Mt.test(t)?t.replace(Yt,fn):t},n.escapeRegExp=function(t){return(t=Wi(t))&&Kt.test(t)?t.replace(qt,"\\$&"):t},n.every=function(t,e,n){var r=Ia(t)?u:ve;return n&&Wr(t,e,n)&&(e=K),r(t,Vr(e,3))},n.find=aa,n.findIndex=_i,n.findKey=function(t,e){return d(t,Vr(e,3),Ye)},n.findLast=ua,n.findLastIndex=ci,n.findLastKey=function(t,e){return d(t,Vr(e,3),Ue)},n.floor=mu,n.forEach=mi,n.forEachRight=Ai,n.forIn=function(t,e){return null==t?t:Io(t,Vr(e,3),$i)},n.forInRight=function(t,e){return null==t?t:Do(t,Vr(e,3),$i)},n.forOwn=function(t,e){return t&&Ye(t,Vr(e,3))},n.forOwnRight=function(t,e){return t&&Ue(t,Vr(e,3))},n.get=zi,n.gt=ga,n.gte=ya,n.has=function(t,e){return null!=t&&Gr(t,e,qe)},n.hasIn=Qi,n.head=hi,n.identity=is,n.includes=function(t,e,n,r){t=Ci(t)?t:Zi(t),n=n&&!r?Gi(n):0;var i=t.length;return n<0&&(n=to(i+n,0)),Vi(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&S(t,e,n)>-1},n.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Gi(n);return i<0&&(i=to(r+i,0)),S(t,e,i)},n.inRange=function(t,e,n){return e=ji(e),n===K?(n=e,e=0):n=ji(n),function(t,e,n){return t>=eo(e,n)&&t<to(e,n)}(t=Ki(t),e,n)},n.invoke=Ka,n.isArguments=Ra,n.isArray=Ia,n.isArrayBuffer=Da,n.isArrayLike=Ci,n.isArrayLikeObject=bi,n.isBoolean=function(t){return!0===t||!1===t||Ui(t)&&je(t)==ot},n.isBuffer=Oa,n.isDate=Ca,n.isElement=function(t){return Ui(t)&&1===t.nodeType&&!xi(t)},n.isEmpty=function(t){if(null==t)return!0;if(Ci(t)&&(Ia(t)||"string"==typeof t||"function"==typeof t.splice||Oa(t)||La(t)||Ra(t)))return!t.length;var e=Uo(t);if(e==lt||e==Et)return!t.size;if(Xr(t))return!Nn(t).length;for(var n in t)if(Rs.call(t,n))return!1;return!0},n.isEqual=function(t,e){return nn(t,e)},n.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:K)?n(t,e):K;return r===K?nn(t,e,K,n):!!r},n.isError=vi,n.isFinite=function(t){return"number"==typeof t&&$s(t)},n.isFunction=wi,n.isInteger=Li,n.isLength=Bi,n.isMap=ba,n.isMatch=function(t,e){return t===e||sn(t,e,kr(e))},n.isMatchWith=function(t,e,n){return n="function"==typeof n?n:K,sn(t,e,kr(e),n)},n.isNaN=function(t){return Mi(t)&&t!=+t},n.isNative=function(t){if(Mo(t))throw new Ts("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return on(t)},n.isNil=function(t){return null==t},n.isNull=function(t){return null===t},n.isNumber=Mi,n.isObject=Yi,n.isObjectLike=Ui,n.isPlainObject=xi,n.isRegExp=va,n.isSafeInteger=function(t){return Li(t)&&t>=-J&&t<=J},n.isSet=wa,n.isString=Vi,n.isSymbol=Fi,n.isTypedArray=La,n.isUndefined=function(t){return t===K},n.isWeakMap=function(t){return Ui(t)&&Uo(t)==St},n.isWeakSet=function(t){return Ui(t)&&"[object WeakSet]"==je(t)},n.join=function(t,e){return null==t?"":Js.call(t,e)},n.kebabCase=Za,n.last=Ti,n.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==K&&(i=(i=Gi(n))<0?to(r+i,0):eo(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):N(t,A,i,!0)},n.lowerCase=tu,n.lowerFirst=eu,n.lt=Ba,n.lte=Ya,n.max=function(t){return t&&t.length?we(t,is,Ge):K},n.maxBy=function(t,e){return t&&t.length?we(t,Vr(e,2),Ge):K},n.mean=function(t){return P(t,is)},n.meanBy=function(t,e){return P(t,Vr(e,2))},n.min=function(t){return t&&t.length?we(t,is,Sn):K},n.minBy=function(t,e){return t&&t.length?we(t,Vr(e,2),Sn):K},n.stubArray=_s,n.stubFalse=cs,n.stubObject=function(){return{}},n.stubString=function(){return""},n.stubTrue=function(){return!0},n.multiply=Au,n.nth=function(t,e){return t&&t.length?yn(t,Gi(e)):K},n.noConflict=function(){return tn._===this&&(tn._=bs),this},n.noop=as,n.now=pa,n.pad=function(t,e,n){t=Wi(t);var r=(e=Gi(e))?k(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Pr(zs(i),n)+t+Pr(Ws(i),n)},n.padEnd=function(t,e,n){t=Wi(t);var r=(e=Gi(e))?k(t):0;return e&&r<e?t+Pr(e-r,n):t},n.padStart=function(t,e,n){t=Wi(t);var r=(e=Gi(e))?k(t):0;return e&&r<e?Pr(e-r,n)+t:t},n.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),ro(Wi(t).replace(Ht,""),e||0)},n.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Wr(t,e,n)&&(e=n=K),n===K&&("boolean"==typeof e?(n=e,e=K):"boolean"==typeof t&&(n=t,t=K)),t===K&&e===K?(t=0,e=1):(t=ji(t),e===K?(e=t,t=0):e=ji(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=io();return eo(t+i*(e-t+Xe("1e-"+((i+"").length-1))),e)}return Cn(t,e)},n.reduce=function(t,e,n){var r=Ia(t)?p:R,i=arguments.length<3;return r(t,Vr(e,4),n,i,yo)},n.reduceRight=function(t,e,n){var r=Ia(t)?f:R,i=arguments.length<3;return r(t,Vr(e,4),n,i,Ro)},n.repeat=function(t,e,n){return e=(n?Wr(t,e,n):e===K)?1:Gi(e),bn(Wi(t),e)},n.replace=function(){var t=arguments,e=Wi(t[0]);return t.length<3?e:e.replace(t[1],t[2])},n.result=function(t,e,n){var r=-1,i=(e=Jn(e,t)).length;for(i||(i=1,t=K);++r<i;){var s=null==t?K:t[si(e[r])];s===K&&(r=i,s=n),t=wi(s)?s.call(t):s}return t},n.round=Pu,n.runInContext=t,n.sample=function(t){return(Ia(t)?Ee:wn)(t)},n.size=function(t){if(null==t)return 0;if(Ci(t))return Vi(t)?k(t):t.length;var e=Uo(t);return e==lt||e==Et?t.size:Nn(t).length},n.snakeCase=nu,n.some=function(t,e,n){var r=Ia(t)?E:Mn;return n&&Wr(t,e,n)&&(e=K),r(t,Vr(e,3))},n.sortedIndex=function(t,e){return xn(t,e)},n.sortedIndexBy=function(t,e,n){return Vn(t,e,Vr(n,2))},n.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=xn(t,e);if(r<n&&Oi(t[r],e))return r}return-1},n.sortedLastIndex=function(t,e){return xn(t,e,!0)},n.sortedLastIndexBy=function(t,e,n){return Vn(t,e,Vr(n,2),!0)},n.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=xn(t,e,!0)-1;if(Oi(t[n],e))return n}return-1},n.startCase=ru,n.startsWith=function(t,e,n){return t=Wi(t),n=null==n?0:Ie(Gi(n),0,t.length),e=jn(e),t.slice(n,n+e.length)==e},n.subtract=gu,n.sum=function(t){return t&&t.length?I(t,is):0},n.sumBy=function(t,e){return t&&t.length?I(t,Vr(e,2)):0},n.template=function(t,e,r){var i=n.templateSettings;r&&Wr(t,e,r)&&(e=K),t=Wi(t),e=xa({},e,i,br);var s,o,a=xa({},e.imports,i.imports,br),u=Xi(a),_=b(a,u),c=0,l=e.interpolate||ue,h="__p += '",T=ds((e.escape||ue).source+"|"+l.source+"|"+(l===Ft?te:ue).source+"|"+(e.evaluate||ue).source+"|$","g"),p="//# sourceURL="+(Rs.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++He+"]")+"\n";t.replace(T,(function(e,n,r,i,a,u){return r||(r=i),h+=t.slice(c,u).replace(_e,B),n&&(s=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),h+="';\n";var f=Rs.call(e,"variable")&&e.variable;if(f){if(Jt.test(f))throw new Ts("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(vt,""):h).replace(wt,"$1").replace(Lt,"$1;"),h="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var E=ou((function(){return ps(u,p+"return "+h).apply(K,_)}));if(E.source=h,vi(E))throw E;return E},n.times=function(t,e){if((t=Gi(t))<1||t>J)return[];var n=tt,r=eo(t,tt);e=Vr(e),t-=tt;for(var i=D(r,e);++n<t;)e(n);return i},n.toFinite=ji,n.toInteger=Gi,n.toLength=qi,n.toLower=function(t){return Wi(t).toLowerCase()},n.toNumber=Ki,n.toSafeInteger=function(t){return t?Ie(Gi(t),-J,J):0===t?t:0},n.toString=Wi,n.toUpper=function(t){return Wi(t).toUpperCase()},n.trim=function(t,e,n){if((t=Wi(t))&&(n||e===K))return O(t);if(!t||!(e=jn(e)))return t;var r=j(t),i=j(e);return Zn(r,w(r,i),L(r,i)+1).join("")},n.trimEnd=function(t,e,n){if((t=Wi(t))&&(n||e===K))return t.slice(0,G(t)+1);if(!t||!(e=jn(e)))return t;var r=j(t);return Zn(r,0,L(r,j(e))+1).join("")},n.trimStart=function(t,e,n){if((t=Wi(t))&&(n||e===K))return t.replace(Ht,"");if(!t||!(e=jn(e)))return t;var r=j(t);return Zn(r,w(r,j(e))).join("")},n.truncate=function(t,e){var n=30,r="...";if(Yi(e)){var i="separator"in e?e.separator:i;n="length"in e?Gi(e.length):n,r="omission"in e?jn(e.omission):r}var s=(t=Wi(t)).length;if(Y(t)){var o=j(t);s=o.length}if(n>=s)return t;var a=n-k(r);if(a<1)return r;var u=o?Zn(o,0,a).join(""):t.slice(0,a);if(i===K)return u+r;if(o&&(a+=u.length-a),va(i)){if(t.slice(a).search(i)){var _,c=u;for(i.global||(i=ds(i.source,Wi(ee.exec(i))+"g")),i.lastIndex=0;_=i.exec(c);)var l=_.index;u=u.slice(0,l===K?a:l)}}else if(t.indexOf(jn(i),a)!=a){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+r},n.unescape=function(t){return(t=Wi(t))&&Ut.test(t)?t.replace(Bt,En):t},n.uniqueId=function(t){var e=++Is;return Wi(t)+e},n.upperCase=iu,n.upperFirst=su,n.each=mi,n.eachRight=Ai,n.first=hi,os(n,function(){var t={};return Ye(n,(function(e,r){Rs.call(n.prototype,r)||(t[r]=e)})),t}(),{chain:!1}),n.VERSION="4.17.21",o(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){n[t].placeholder=n})),o(["drop","take"],(function(t,e){Wt.prototype[t]=function(n){n=n===K?1:to(Gi(n),0);var r=this.__filtered__&&!e?new Wt(this):this.clone();return r.__filtered__?r.__takeCount__=eo(n,r.__takeCount__):r.__views__.push({size:eo(n,tt),type:t+(r.__dir__<0?"Right":"")}),r},Wt.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),o(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Wt.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Vr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),o(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Wt.prototype[t]=function(){return this[n](1).value()[0]}})),o(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Wt.prototype[t]=function(){return this.__filtered__?new Wt(this):this[n](1)}})),Wt.prototype.compact=function(){return this.filter(is)},Wt.prototype.find=function(t){return this.filter(t).head()},Wt.prototype.findLast=function(t){return this.reverse().find(t)},Wt.prototype.invokeMap=vn((function(t,e){return"function"==typeof t?new Wt(this):this.map((function(n){return Ze(n,t,e)}))})),Wt.prototype.reject=function(t){return this.filter(Di(Vr(t)))},Wt.prototype.slice=function(t,e){t=Gi(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Wt(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==K&&(n=(e=Gi(e))<0?n.dropRight(-e):n.take(e-t)),n)},Wt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Wt.prototype.toArray=function(){return this.take(tt)},Ye(Wt.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),s=n[i?"take"+("last"==e?"Right":""):e],o=i||/^find/.test(e);s&&(n.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,u=e instanceof Wt,_=a[0],c=u||Ia(e),l=function(t){var e=s.apply(n,T([t],a));return i&&h?e[0]:e};c&&r&&"function"==typeof _&&1!=_.length&&(u=c=!1);var h=this.__chain__,p=!!this.__actions__.length,f=o&&!h,E=u&&!p;if(!o&&c){e=E?e:new Wt(this);var d=t.apply(e,a);return d.__actions__.push({func:Si,args:[l],thisArg:K}),new y(d,h)}return f&&E?t.apply(this,a):(d=this.thru(l),f?i?d.value()[0]:d.value():d)})})),o(["pop","push","shift","sort","splice","unshift"],(function(t){var e=ms[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);n.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var n=this.value();return e.apply(Ia(n)?n:[],t)}return this[r]((function(n){return e.apply(Ia(n)?n:[],t)}))}})),Ye(Wt.prototype,(function(t,e){var r=n[e];if(r){var i=r.name+"";Rs.call(To,i)||(To[i]=[]),To[i].push({name:e,func:r})}})),To[Nr(K,2).name]=[{name:"wrapper",func:K}],Wt.prototype.clone=function(){var t=new Wt(this.__wrapped__);return t.__actions__=or(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=or(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=or(this.__views__),t},Wt.prototype.reverse=function(){if(this.__filtered__){var t=new Wt(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Wt.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ia(t),r=e<0,i=n?t.length:0,s=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=eo(e,t+o);break;case"takeRight":t=to(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=s.start,a=s.end,u=a-o,_=r?a:o-1,c=this.__iteratees__,l=c.length,h=0,T=eo(u,this.__takeCount__);if(!n||!r&&i==u&&T==u)return Wn(t,this.__actions__);var p=[];t:for(;u--&&h<T;){for(var f=-1,E=t[_+=e];++f<l;){var d=c[f],N=d.iteratee,S=d.type,m=N(E);if(2==S)E=m;else if(!m){if(1==S)continue t;break t}}p[h++]=E}return p},n.prototype.at=sa,n.prototype.chain=function(){return Ni(this)},n.prototype.commit=function(){return new y(this.value(),this.__chain__)},n.prototype.next=function(){this.__values__===K&&(this.__values__=ki(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?K:this.__values__[this.__index__++]}},n.prototype.plant=function(t){for(var e,n=this;n instanceof r;){var i=ui(n);i.__index__=0,i.__values__=K,e?s.__wrapped__=i:e=i;var s=i;n=n.__wrapped__}return s.__wrapped__=t,e},n.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Wt){var e=t;return this.__actions__.length&&(e=new Wt(this)),(e=e.reverse()).__actions__.push({func:Si,args:[fi],thisArg:K}),new y(e,this.__chain__)}return this.thru(fi)},n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=function(){return Wn(this.__wrapped__,this.__actions__)},n.prototype.first=n.prototype.head,ks&&(n.prototype[ks]=function(){return this}),n}();tn._=dn,void 0===(r=function(){return dn}.call(e,n,e,t))||(t.exports=r)}.call(this)},7105:(t,e,n)=>{var r=n(1708);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},3125:t=>{t.exports=function(){}},1972:(t,e,n)=>{var r=n(6233),i=n(9192),s=n(3704),o=n(8328),a=n(5634),u=n(5589),_=n(565),c=n(6628),l=_((function(t,e){var n={};if(null==t)return n;var _=!1;e=r(e,(function(e){return e=o(e,t),_||(_=e.length>1),e})),a(t,c(t),n),_&&(n=i(n,7,u));for(var l=e.length;l--;)s(n,e[l]);return n}));t.exports=l},8644:(t,e,n)=>{var r=n(3612),i=n(565)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},416:(t,e,n)=>{var r=n(4024),i=n(4822),s=n(3297),o=n(1966);t.exports=function(t){return s(t)?r(o(t)):i(t)}},220:(t,e,n)=>{var r=n(5951),i=n(5004),s=n(8339),o=n(4661),a=s((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=a},4093:(t,e,n)=>{var r=n(2222),i=n(4367),s=r((function(t,e,n){return t+(n?" ":"")+i(e)}));t.exports=s},3864:t=>{t.exports=function(){return[]}},8042:t=>{t.exports=function(){return!1}},8753:(t,e,n)=>{var r=n(8761);t.exports=function(t){return null==t?"":r(t)}},5116:(t,e,n)=>{var r=n(4900);t.exports=function(t){return t&&t.length?r(t):[]}},4557:(t,e,n)=>{var r=n(535),i=n(4900);t.exports=function(t,e){return t&&t.length?i(t,r(e,2)):[]}},4367:(t,e,n)=>{var r=n(2032)("toUpperCase");t.exports=r},6376:(t,e,n)=>{var r=n(6564),i=n(8683),s=n(8753),o=n(4160);t.exports=function(t,e,n){return t=s(t),void 0===(e=n?void 0:e)?i(t)?o(t):r(t):t.match(e)||[]}},4258:(t,e,n)=>{"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=n(8790),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),_=a.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},T=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();r=function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===s.call(t),r=o(t),a=e&&"[object String]"===s.call(t),h=[];if(!e&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var p=_&&n;if(a&&t.length>0&&!i.call(t,0))for(var f=0;f<t.length;++f)h.push(String(f));if(r&&t.length>0)for(var E=0;E<t.length;++E)h.push(String(E));else for(var d in t)p&&"prototype"===d||!i.call(t,d)||h.push(String(d));if(u)for(var N=function(t){if("undefined"==typeof window||!T)return l(t);try{return l(t)}catch(t){return!1}}(t),S=0;S<c.length;++S)N&&"constructor"===c[S]||!i.call(t,c[S])||h.push(c[S]);return h}}t.exports=r},698:(t,e,n)=>{"use strict";var r=Array.prototype.slice,i=n(8790),s=Object.keys,o=s?function(t){return s(t)}:n(4258),a=Object.keys;o.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?a(r.call(t)):a(t)})}else Object.keys=o;return Object.keys||o},t.exports=o},8790:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var n=e.call(t),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),r}},2988:(t,e,n)=>{t.exports=n(6434)},856:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(2269),s=n(8041);t.exports=class{get condition(){return this._impl.getCondition()}set condition(t){s.assertPropValue("string"==typeof t,"condition"),this._impl.setCondition(t)}get consumerName(){return this._impl.getConsumerName()}set consumerName(t){s.assertPropValue("string"==typeof t,"consumerName"),this._impl.setConsumerName(t)}get correlation(){return this._impl.getCorrelation()}set correlation(t){s.assertPropValue("string"==typeof t,"correlation"),this._impl.setCorrelation(t)}get mode(){return this._impl.getMode()}set mode(t){s.assertPropValue(t===i.AQ_DEQ_MODE_BROWSE||t===i.AQ_DEQ_MODE_LOCKED||t===i.AQ_DEQ_MODE_REMOVE||t===i.AQ_DEQ_MODE_REMOVE_NO_DATA,"mode"),this._impl.setMode(t)}get msgId(){return this._impl.getMsgId()}set msgId(t){s.assertPropValue(r.isBuffer(t),"msgId"),this._impl.setMsgId(t)}get navigation(){return this._impl.getNavigation()}set navigation(t){s.assertPropValue(t===i.AQ_DEQ_NAV_FIRST_MSG||t===i.AQ_DEQ_NAV_NEXT_TRANSACTION||t===i.AQ_DEQ_NAV_NEXT_MSG,"navigation"),this._impl.setNavigation(t)}get transformation(){return this._impl.getTransformation()}set transformation(t){s.assertPropValue("string"==typeof t,"transformation"),this._impl.setTransformation(t)}get visibility(){return this._impl.getVisibility()}set visibility(t){s.assertPropValue(t===i.AQ_VISIBILITY_IMMEDIATE||t===i.AQ_VISIBILITY_ON_COMMIT,"visibility"),this._impl.setVisibility(t)}get wait(){return this._impl.getWait()}set wait(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"wait"),this._impl.setWait(t)}}},596:(t,e,n)=>{"use strict";const r=n(2269),i=n(8041);t.exports=class{get deliveryMode(){return this._impl.getDeliveryMode()}set deliveryMode(t){i.assertPropValue(t===r.AQ_MSG_DELIV_MODE_PERSISTENT||t===r.AQ_MSG_DELIV_MODE_BUFFERED||t===r.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,"deliveryMode"),this._impl.setDeliveryMode(t)}get transformation(){return this._impl.getTransformation()}set transformation(t){i.assertPropValue("string"==typeof t,"transformation"),this._impl.setTransformation(t)}get visibility(){return this._impl.getVisibility()}set visibility(t){i.assertPropValue(t===r.AQ_VISIBILITY_IMMEDIATE||t===r.AQ_VISIBILITY_ON_COMMIT,"visibility"),this._impl.setVisibility(t)}}},1425:(t,e,n)=>{"use strict";const r=n(3034);t.exports=class{get correlation(){return this._impl.getCorrelation()}get delay(){return this._impl.getDelay()}get deliveryMode(){return this._impl.getDeliveryMode()}get exceptionQueue(){return this._impl.getExceptionQueue()}get expiration(){return this._impl.getExpiration()}get msgId(){return this._impl.getMsgId()}get numAttempts(){return this._impl.getNumAttempts()}get originalMsgId(){return this._impl.getOriginalMsgId()}get payload(){const t=this._impl.getPayload();if(t instanceof r){const e=Object.create(this._payloadTypeClass.prototype);return e._impl=t,e}return t}get priority(){return this._impl.getPriority()}get state(){return this._impl.getState()}}},1337:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(8041),s=n(6770),o=n(856),a=n(596),u=n(1425),_=n(7647),c=n(7207),l=n(6893);class h{_isPayload(t){return"string"==typeof t||r.isBuffer(t)||t instanceof _}_makeMessage(t){const e=new u;return e._impl=t,e._payloadTypeClass=this._payloadTypeClass,e}_verifyMessage(t){let e;return this._isPayload(t)?(e=t,t={}):(t={...t},this._isJson||this._isPayload(t.payload)?e=t.payload:this._payloadTypeClass?e=new this._payloadTypeClass(t.payload):i.throwErr(i.ERR_INVALID_AQ_MESSAGE)),this._isJson?t.payload=c.transformJsonValue(e):"string"==typeof e?t.payload=r.from(e):r.isBuffer(e)?t.payload=e:t.payload=e._impl,void 0!==t.correlation&&i.assertParamPropValue("string"==typeof t.correlation,1,"correlation"),void 0!==t.delay&&i.assertParamPropValue(Number.isInteger(t.delay),1,"delay"),void 0!==t.exceptionQueue&&i.assertParamPropValue("string"==typeof t.exceptionQueue,1,"exceptionQueue"),void 0!==t.expiration&&i.assertParamPropValue(Number.isInteger(t.expiration),1,"expiration"),void 0!==t.priority&&i.assertParamPropValue(Number.isInteger(t.priority),1,"priority"),void 0!==t.recipients&&i.assertParamPropValue(s.isArrayOfStrings(t.recipients),1,"recipients"),t}async create(t,e,n){if(n.payloadType===l.DB_TYPE_JSON)this._isJson=!0,this._payloadType=l.DB_TYPE_JSON,this._payloadTypeName="JSON";else if(void 0===n.payloadType||n.payloadType===l.DB_TYPE_RAW)this._payloadType=l.DB_TYPE_RAW,this._payloadTypeName="RAW";else{if("string"==typeof n.payloadType){const e=await t._getDbObjectClassForName(n.payloadType);this._payloadTypeClass=e,n.payloadType=e}else i.assertParamPropValue(s.isObject(n.payloadType)&&n.payloadType.prototype instanceof _,2,"payloadType"),this._payloadTypeClass=n.payloadType;this._payloadType=l.DB_TYPE_OBJECT,this._payloadTypeName=this._payloadTypeClass.prototype.name}this._name=e,this._impl=await t._impl.getQueue(e,this._payloadTypeClass,this._payloadType)}async deqMany(t){return i.assertArgCount(arguments,1,1),i.assertParamValue(Number.isInteger(t)&&t>0,1),(await this._impl.deq(t)).map((t=>this._makeMessage(t)))}async deqOne(){i.assertArgCount(arguments,0,0);const t=await this._impl.deq(1);if(t.length>0)return this._makeMessage(t[0])}get deqOptions(){if(!this._deqOptions){const t=new o;t._impl=this._impl.deqOptions,this._deqOptions=t}return this._deqOptions}async enqMany(t){i.assertArgCount(arguments,1,1),i.assertParamValue(Array.isArray(t)&&t.length>0,1);const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=this._verifyMessage(t[n]);return(await this._impl.enq(e)).map((t=>this._makeMessage(t)))}async enqOne(t){i.assertArgCount(arguments,1,1),t=this._verifyMessage(t);const e=await this._impl.enq([t]);return this._makeMessage(e[0])}get enqOptions(){if(!this._enqOptions){const t=new a;t._impl=this._impl.enqOptions,this._enqOptions=t}return this._enqOptions}get name(){return this._name}get payloadType(){return this._payloadType}get payloadTypeName(){return this._payloadTypeName}get payloadTypeClass(){return this._payloadTypeClass}}s.wrapFns(h.prototype,"deqOne","deqMany","enqOne","enqMany"),t.exports=h},6530:(t,e,n)=>{"use strict";const r=n(1337),i=n(7647),{Buffer:s}=n(2562),o=n(2733),a=n(9891),u=n(198),_=n(4434),c=n(8536),l=n(8041),h=n(6770),T=n(851),p=n(932),f=n(9023),E=n(2269),d=n(8023),N=n(7207),S=n(6893),m=n(7034),A=new Map;class P extends _{constructor(){super(),this._dbObjectClasses=new Map,this._closing=!1}_addDefaultsToExecOpts(t){t.connection=this,void 0===t.keepInStmtCache&&(t.keepInStmtCache=!0),d.addToOptions(t,"autoCommit","dbObjectAsPojo","fetchArraySize","fetchTypeHandler","maxRows","outFormat","prefetchRows")}_buildDbObjectClass(t){const e=function(e){if(this._impl=new T.DbObjectImpl(t),this.isCollection){const t=new Proxy(this,i._collectionProxyHandler);if(void 0!==e)for(let t=0;t<e.length;t++)this.append(e[t]);return t}void 0!==e&&Object.assign(this,e)};if((e.prototype=Object.create(i.prototype)).constructor=e,e.prototype._objType=t,t.elementTypeClass){const e=this._getDbObjectClass(t.elementTypeClass);t.elementTypeClass=e}if(t.isCollection&&(h.addTypeProperties(t,"elementType"),t.elementTypeInfo.type=t.elementType),t.attributes){const n={};for(const e of t.attributes){e.typeClass&&(e.typeClass=this._getDbObjectClass(e.typeClass)),h.addTypeProperties(e,"type");const t={get(){return this._getAttrValue(e)},set(t){this._setAttrValue(e,t)}};n[e.name]=t}Object.defineProperties(e.prototype,n)}return e.toString=function(){return"DbObjectClass ["+t.fqn+"]"},e}_getDbObjectClass(t){if(t.prototype instanceof i)return t;let e=this._dbObjectClasses.get(t);return e||(e=this._buildDbObjectClass(t),e._connection=this,e._objType=t,t._connection=this._impl,this._dbObjectClasses.set(t,e)),e}async _getDbObjectClassForName(t){let e=this._dbObjectClasses.get(t);if(!e){const n=await this._impl.getDbObjectClass(t);e=this._getDbObjectClass(n),this._dbObjectClasses.set(t,e)}return e}_isBindDir(t){return t===E.BIND_IN||t===E.BIND_OUT||t===E.BIND_INOUT}_isBindValue(t){return null==t||"number"==typeof t||"string"==typeof t||"boolean"==typeof t||"bigint"==typeof t||Array.isArray(t)||t instanceof Float32Array||t instanceof Float64Array||t instanceof Int8Array||s.isBuffer(t)||f.types.isDate(t)||t instanceof o||t instanceof a||t instanceof i}async _processBindUnit(t,e,n){let r=!1;if(void 0===e.dir?t.dir=E.BIND_IN:(l.assert(this._isBindDir(e.dir),l.ERR_INVALID_BIND_DIRECTION),t.dir=e.dir,r=!0),void 0!==e.type?("string"==typeof e.type?(t.type=S.DB_TYPE_OBJECT,t.typeClass=await this._getDbObjectClassForName(e.type),t.objType=t.typeClass._objType):e.type.prototype instanceof i?(t.type=S.DB_TYPE_OBJECT,t.typeClass=e.type,t.objType=t.typeClass._objType):(l.assert(e.type instanceof S.DbType,l.ERR_INVALID_BIND_DATA_TYPE,2),t.type=e.type),r=!0):n&&(t.name&&l.throwErr(l.ERR_MISSING_TYPE_BY_NAME,t.name),l.throwErr(l.ERR_MISSING_TYPE_BY_POS,t.pos)),(t.dir!==E.BIND_IN||n)&&(void 0!==e.maxSize?(l.assertParamPropValue(Number.isInteger(e.maxSize)&&e.maxSize>0,2,"maxSize"),t.maxSize=e.maxSize,t.checkSize=!0,r=!0):n?t.type!==S.DB_TYPE_VARCHAR&&t.type!==S.DB_TYPE_RAW||(t.name&&l.throwErr(l.ERR_MISSING_MAX_SIZE_BY_NAME,t.name),l.throwErr(l.ERR_MISSING_MAX_SIZE_BY_POS,t.pos)):t.maxSize=E.DEFAULT_MAX_SIZE_FOR_OUT_BINDS),t.isArray=!1,n||void 0!==e.maxArraySize&&(l.assertParamPropValue(Number.isInteger(e.maxArraySize)&&e.maxArraySize>0,2,"maxArraySize"),t.maxArraySize=e.maxArraySize,t.isArray=!0),!n&&void 0!==e.val)return e.val;r||l.throwErr(l.ERR_INVALID_BIND_UNIT)}async _processBindValue(t,e,n){const r=N.transformValueIn(t,e,n);t.isArray?t.values=r.concat(t.values.slice(r.length)):t.values[n.pos]=r,t.type===S.DB_TYPE_OBJECT&&void 0===t.typeClass&&(t.typeClass=await this._getDbObjectClass(e._objType),t.objType=t.typeClass._objType)}async _processExecuteBind(t,e){let n;if(t.isArray=!1,this._isBindValue(e)?(t.dir=E.BIND_IN,n=e):n=await this._processBindUnit(t,e,!1),t.dir!==E.BIND_OUT){const e={pos:0,allowArray:!0};await this._processBindValue(t,n,e)}void 0===t.type&&(t.type=S.DB_TYPE_VARCHAR,void 0===t.maxSize&&(t.maxSize=1)),t.isArray&&t.type!==S.DB_TYPE_VARCHAR&&t.type!==S.DB_TYPE_NVARCHAR&&t.type!==S.DB_TYPE_CHAR&&t.type!==S.DB_TYPE_NCHAR&&t.type!==S.DB_TYPE_NUMBER&&t.type!==S.DB_TYPE_BINARY_FLOAT&&t.type!==S.DB_TYPE_BINARY_DOUBLE&&t.type!==S.DB_TYPE_DATE&&t.type!==S.DB_TYPE_TIMESTAMP&&t.type!==S.DB_TYPE_TIMESTAMP_LTZ&&t.type!==S.DB_TYPE_TIMESTAMP_TZ&&t.type!==S.DB_TYPE_RAW&&l.throwErr(l.ERR_INVALID_TYPE_FOR_ARRAY_BIND)}async _processExecuteBinds(t){const e=[];if(Array.isArray(t))for(let n=0;n<t.length;n++){const r=e[n]={pos:n+1,values:[]};await this._processExecuteBind(r,t[n])}else{l.assertParamValue(h.isObject(t),2);const n=Object.getOwnPropertyNames(t);for(let r=0;r<n.length;r++){const i=e[r]={name:n[r],values:[]};await this._processExecuteBind(i,t[n[r]])}}return e}async _processExecuteManyBinds(t,e){const n=[];let r;if(void 0!==e)if(Array.isArray(e)){r=!0;for(let t=0;t<e.length;t++){const r=n[t]={pos:t+1,values:[]};await this._processBindUnit(r,e[t],!0)}}else{r=!1;const t=Object.getOwnPropertyNames(e);for(let r=0;r<t.length;r++){const i=n[r]={name:t[r],values:[]};await this._processBindUnit(i,e[t[r]],!0)}}else{const e=t[0];if(l.assertParamValue(h.isObjectOrArray(e),2),Array.isArray(e)){r=!0;for(let t=0;t<e.length;t++)n[t]={pos:t+1}}else{r=!1;const t=Object.getOwnPropertyNames(e);for(let e=0;e<t.length;e++)n[e]={name:t[e]}}for(let t=0;t<n.length;t++)n[t].dir=E.BIND_IN,n[t].isArray=!1,n[t].values=[]}for(let e=0;e<t.length;e++){const i=t[e],s={pos:e,allowArray:!1};l.assert(r&&Array.isArray(i)||!r&&h.isObject(i),l.ERR_MIXED_BIND);for(let t=0;t<n.length;t++){const e=n[t],o=r?i[t]:i[e.name];await this._processBindValue(e,o,s)}}for(let t=0;t<n.length;t++){const e=n[t];void 0===e.type&&(e.type=S.DB_TYPE_VARCHAR,e.maxSize=1)}return n}_transformOutBind(t,e){let n=t;if(Array.isArray(t)){n=[];for(let r=0;r<t.length;r++)n.push(this._transformOutBind(t[r],e))}else if(t instanceof T.ResultSetImpl)n=new a,n._setup(this,t);else if(t instanceof T.LobImpl)n=new o,n._setup(t,!0);else if(t instanceof T.DbObjectImpl){const r=this._dbObjectClasses.get(t._objType);n=Object.create(r.prototype),n._impl=t,e.dbObjectAsPojo?n=n._toPojo():n.isCollection&&(n=new Proxy(n,i._collectionProxyHandler))}return n}_verifyExecOpts(t,e){const n={};if(l.assertParamValue(h.isObject(t),3),void 0!==t.autoCommit&&(l.assertParamPropValue("boolean"==typeof t.autoCommit,3,"autoCommit"),n.autoCommit=t.autoCommit),void 0!==t.dbObjectAsPojo&&(l.assertParamPropValue("boolean"==typeof t.dbObjectAsPojo,3,"dbObjectAsPojo"),n.dbObjectAsPojo=t.dbObjectAsPojo),void 0!==t.keepInStmtCache&&(l.assertParamPropValue("boolean"==typeof t.keepInStmtCache,3,"keepInStmtCache"),n.keepInStmtCache=t.keepInStmtCache),e)void 0!==t.bindDefs&&(l.assertParamPropValue(h.isObjectOrArray(t.bindDefs),3,"bindDefs"),n.bindDefs=t.bindDefs),void 0!==t.batchErrors&&(l.assertParamPropValue("boolean"==typeof t.batchErrors,3,"batchErrors"),n.batchErrors=t.batchErrors),void 0!==t.dmlRowCounts&&(l.assertParamPropValue("boolean"==typeof t.dmlRowCounts,3,"dmlRowCounts"),n.dmlRowCounts=t.dmlRowCounts);else{if(l.assertParamPropUnsignedIntNonZero(t,3,"fetchArraySize"),n.fetchArraySize=t.fetchArraySize,void 0!==t.fetchInfo){l.assertParamPropValue(h.isObject(t.fetchInfo),3,"fetchInfo");const e=Object.getOwnPropertyNames(t.fetchInfo),r=new Map(d.fetchTypeMap);for(const n of e){const e=t.fetchInfo[n];void 0===e.type&&l.throwErr(l.ERR_NO_TYPE_FOR_CONVERSION),e.type!==E.DEFAULT&&e.type!==S.DB_TYPE_VARCHAR&&e.type!==S.DB_TYPE_RAW&&l.throwErr(l.ERR_INVALID_TYPE_FOR_CONVERSION),r.set(n,e.type)}n.fetchTypeMap=r}if(void 0!==t.fetchTypeHandler){const e=typeof t.fetchTypeHandler;l.assertParamPropValue("function"===e,3,"fetchTypeHandler"),n.fetchTypeHandler=t.fetchTypeHandler}void 0!==t.maxRows&&(l.assertParamPropValue(Number.isInteger(t.maxRows)&&t.maxRows>=0,3,"maxRows"),n.maxRows=t.maxRows),void 0!==t.outFormat&&(l.assertParamPropValue(t.outFormat===E.OUT_FORMAT_ARRAY||t.outFormat===E.OUT_FORMAT_OBJECT,3,"outFormat"),n.outFormat=t.outFormat),void 0!==t.prefetchRows&&(l.assertParamPropValue(Number.isInteger(t.prefetchRows)&&t.prefetchRows>=0,3,"prefetchRows"),n.prefetchRows=t.prefetchRows),void 0!==t.resultSet&&(l.assertParamPropValue("boolean"==typeof t.resultSet,3,"resultSet"),n.resultSet=t.resultSet)}return n}get action(){return null}set action(t){l.assertPropValue("string"==typeof t,"action"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setAction(t)}async breakExecution(){l.assertArgCount(arguments,0,0),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.breakExecution()}get callTimeout(){if(this._impl)return this._impl.getCallTimeout()}set callTimeout(t){l.assertPropValue(Number.isInteger(t)&&t>=0,"callTimeout"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setCallTimeout(t)}async changePassword(t,e,n){l.assertArgCount(arguments,3,3),l.assertParamValue("string"==typeof t,1),l.assertParamValue("string"==typeof e,2),l.assertParamValue("string"==typeof n,3),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.changePassword(t,e,n)}get clientId(){return null}set clientId(t){l.assertPropValue("string"==typeof t,"clientId"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setClientId(t)}get clientInfo(){return null}set clientInfo(t){l.assertPropValue("string"==typeof t,"clientInfo"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setClientInfo(t)}async close(t){let e={};l.assertArgCount(arguments,0,1),1==arguments.length&&(l.assertParamValue(h.isObject(t),1),e=t,l.assertParamPropBool(e,1,"drop")),l.assert(this._impl&&!this._closing,l.ERR_INVALID_CONNECTION),this._closing=!0;try{await this._impl.close(e)}finally{this._closing=!1}delete this._impl,this._dbObjectClasses.clear(),this.emit("_afterConnClose")}async commit(){l.assertArgCount(arguments,0,0),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.commit()}async createLob(t){l.assertArgCount(arguments,1,1),l.assertParamValue(t===S.DB_TYPE_CLOB||t===S.DB_TYPE_BLOB||t===S.DB_TYPE_NCLOB,1),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const e=new o;return e._setup(await this._impl.createLob(t),!1),e}get currentSchema(){if(this._impl)return this._impl.getCurrentSchema()}set currentSchema(t){l.assertPropValue("string"==typeof t,"currentSchema"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setCurrentSchema(t)}get dbOp(){return null}set dbOp(t){l.assertPropValue("string"==typeof t,"dbOp"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setDbOp(t)}get thin(){return d.thin}get ecid(){return null}set ecid(t){l.assertPropValue("string"==typeof t,"ecid"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setECID(t)}decodeOSON(t){return l.assertArgCount(arguments,1,1),l.assertParamValue(s.isBuffer(t),1),new m.OsonDecoder(t).decode()}encodeOSON(t){return(new m.OsonEncoder).encode(N.transformJsonValue(t),this._impl._osonMaxFieldNameSize)}async execute(t,e,n){let r,i=[],s={};h.isObject(t)&&"string"==typeof t.statement?(l.assertArgCount(arguments,1,2),t.values&&(i=await this._processExecuteBinds(t.values)),t=t.statement,2==arguments.length&&(s=this._verifyExecOpts(e,!1))):(l.assertArgCount(arguments,1,3),l.assertParamValue("string"==typeof t,1),arguments.length>=2&&(i=await this._processExecuteBinds(e)),3==arguments.length&&(s=this._verifyExecOpts(n,!1))),this._addDefaultsToExecOpts(s),l.assert(this._impl,l.ERR_INVALID_CONNECTION);try{r=await this._impl.execute(t,1,i,s,!1)}catch(t){throw 1406===t.errorNum&&l.throwErr(l.ERR_INSUFFICIENT_BUFFER_FOR_BINDS),t}if(r.warning&&(r.warning=l.transformErr(r.warning)),void 0!==r.resultSet){const t=new a;t._setup(this,r.resultSet),r.metaData=t._impl.metaData,s.resultSet?r.resultSet=t:(r.rows=await t._getAllRows(),delete r.resultSet)}if(void 0!==r.outBinds)for(const[t,e]of Object.entries(r.outBinds)){const n=this._transformOutBind(e,s);r.outBinds[t]=n}if(r.implicitResults)for(const[t,e]of Object.entries(r.implicitResults)){const n=new a;n._setup(this,e),s.resultSet?r.implicitResults[t]=n:r.implicitResults[t]=await n._getAllRows()}return r}async executeMany(t,e,n){let r,i={},s=[];l.assertArgCount(arguments,2,3),l.assertParamValue("string"==typeof t,1),3==arguments.length&&(i=this._verifyExecOpts(n,!0)),this._addDefaultsToExecOpts(i),"number"==typeof e?(l.assertParamValue(Number.isInteger(e)&&e>0,2),r=e,void 0!==i.bindDefs&&(s=await this._processExecuteManyBinds([],i.bindDefs))):(l.assertParamValue(Array.isArray(e)&&e.length>0,2),r=e.length,s=await this._processExecuteManyBinds(e,i.bindDefs)),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const o=await this._impl.execute(t,r,s,i,!0);if(o.warning&&(o.warning=l.transformErr(o.warning)),void 0!==o.outBinds)for(let t=0;t<o.outBinds.length;t++){const e=o.outBinds[t];for(const[t,n]of Object.entries(e))e[t]=this._transformOutBind(n,i)}return o}get externalName(){if(this._impl)return this._impl.getExternalName()}set externalName(t){l.assertPropValue("string"==typeof t,"externalName"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setExternalName(t)}get dbDomain(){return this._impl&&this._impl.getDbDomain()}get dbName(){return this._impl&&this._impl.getDbName()}async getDbObjectClass(t){return l.assertArgCount(arguments,1,1),l.assertParamValue("string"==typeof t,1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._getDbObjectClassForName(t)}async getQueue(t,e){let n={};l.assertArgCount(arguments,1,2),l.assertParamValue("string"==typeof t,1),2==arguments.length&&(l.assertParamValue(h.isObject(e),2),n={...e}),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const i=new r;return await i.create(this,t,n),i}getSodaDatabase(){l.assertArgCount(arguments,0,0),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const t=new u;return t._impl=this._impl.getSodaDatabase(),t}async getStatementInfo(t){l.assertArgCount(arguments,1,1),l.assertParamValue("string"==typeof t,1),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const e=await this._impl.getStatementInfo(t);if(e.metaData)for(let t=0;t<e.metaData.length;t++){const n=e.metaData[t];h.addTypeProperties(n,"dbType"),n.fetchType=S.DB_TYPE_FETCH_TYPE_MAP.get(n.dbType)}return e}get instanceName(){if(this._impl)return this._impl.getInstanceName()}get internalName(){if(this._impl)return this._impl.getInternalName()}set internalName(t){l.assertPropValue("string"==typeof t,"internalName"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setInternalName(t)}isHealthy(){return void 0!==this._impl&&!this._closing&&this._impl.isHealthy()}get maxOpenCursors(){return this._impl&&this._impl.getMaxOpenCursors()}get warning(){let t=this._impl.getWarning();return t&&(t=l.transformErr(t)),this._impl&&t}get module(){return null}set module(t){l.assertPropValue("string"==typeof t,"module"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setModule(t)}get oracleServerVersion(){if(this._impl)return this._impl.getOracleServerVersion()}get oracleServerVersionString(){if(this._impl)return this._impl.getOracleServerVersionString()}get serviceName(){return this._impl&&this._impl.getServiceName()}get transactionInProgress(){return this._impl&&this._impl.getTransactionInProgress()}async ping(){l.assertArgCount(arguments,0,0),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.ping()}queryStream(t,e,n){l.assertArgCount(arguments,1,3),l.assertParamValue("string"==typeof t,1),3==arguments.length?(l.assertParamValue(h.isObject(n),3),n={...n}):n={},n.resultSet=!0;const r=new c;return p.nextTick((async()=>{try{const i=await this.execute(t,e||[],n);i.resultSet||l.throwErr(l.ERR_NOT_A_QUERY),r._open(i.resultSet)}catch(t){return void r.destroy(t)}})),r}async rollback(){l.assertArgCount(arguments,0,0),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.rollback()}async shutdown(t){let e=E.SHUTDOWN_MODE_DEFAULT;l.assertArgCount(arguments,0,1),void 0!==t&&(l.assertParamValue("number"==typeof e,1),e=t),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.shutdown(e)}async startup(t){let e={};l.assertArgCount(arguments,0,1),1==arguments.length&&(l.assertParamValue("object"==typeof e,1),e=t,l.assertParamPropBool(e,1,"force"),l.assertParamPropBool(e,1,"restrict"),l.assertParamPropString(e,1,"pfile")),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.startup(e)}get stmtCacheSize(){if(this._impl)return this._impl.getStmtCacheSize()}set stmtCacheSize(t){l.assertPropValue(Number.isInteger(t)&&t>=0,"stmtCacheSize"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setStmtCacheSize(t)}async subscribe(t,e){l.assertArgCount(arguments,2,2),l.assertParamValue("string"==typeof t,1),l.assertParamValue(h.isObject(e),2),e={name:t,...e},l.assertParamPropUnsignedInt(e,2,"namespace"),void 0===e.namespace&&(e.namespace=E.SUBSCR_NAMESPACE_DBCHANGE),l.assertParamPropString(e,2,"ipAddress"),l.assertParamPropUnsignedInt(e,2,"port"),l.assertParamPropUnsignedInt(e,2,"timeout"),l.assertParamPropUnsignedInt(e,2,"operations"),l.assertParamPropUnsignedInt(e,2,"qos"),l.assertParamPropUnsignedInt(e,2,"groupingClass"),l.assertParamPropUnsignedInt(e,2,"groupingValue"),l.assertParamPropUnsignedInt(e,2,"groupingType"),l.assertParamPropBool(e,2,"clientInitiated"),l.assertParamPropFunction(e,2,"callback"),l.assert(e.callback,l.ERR_MISSING_SUBSCR_CALLBACK),e.namespace===E.SUBSCR_NAMESPACE_DBCHANGE&&(l.assertParamPropString(e,2,"sql"),l.assert(e.sql&&e.sql.length>0,l.ERR_MISSING_SUBSCR_SQL),void 0!==e.binds&&(e.binds=await this._processExecuteBinds(e.binds))),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const n=A.get(t),r=await this._impl.subscribe(n,e);let i;return e.namespace===E.SUBSCR_NAMESPACE_DBCHANGE?(i=r.subscription,delete r.subscription):i=r,A.set(t,i),r}get tag(){if(this._impl)return this._impl.getTag()}set tag(t){l.assertPropValue("string"==typeof t,"tag"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setTag(t)}async tpcBegin(t,e,n){l.assertArgCount(arguments,1,3),l.assertParamValue(h.isXid(t),1),arguments.length<3?n=60:l.assertParamValue("number"==typeof n,3),arguments.length<2?e=E.TPC_BEGIN_NEW:l.assertParamValue("number"==typeof e,2),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcBegin(t,e,n)}async tpcCommit(t,e){l.assertArgCount(arguments,0,2),arguments.length<2?e=!1:l.assertParamValue("boolean"==typeof e,2),arguments.length>=1&&l.assertParamValue(h.isXid(t),1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcCommit(t,e)}async tpcEnd(t,e){l.assertArgCount(arguments,0,2),arguments.length<2?e=E.TPC_END_NORMAL:l.assertParamValue("number"==typeof e,2),arguments.length>=1&&l.assertParamValue(h.isXid(t),1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcEnd(t,e)}async tpcForget(t){l.assertArgCount(arguments,1,1),l.assertParamValue(h.isXid(t),1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcForget(t)}async tpcPrepare(t){return l.assertArgCount(arguments,0,1),arguments.length>=1&&l.assertParamValue(h.isXid(t),1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcPrepare(t)}async tpcRecover(t){l.assertArgCount(arguments,0,1),1==arguments.length?l.assertParamValue("boolean"==typeof t,1):t=!0;const e={outFormat:E.OUT_FORMAT_OBJECT,resultSet:!1};return(await this.execute(t?'\n SELECT\n formatid as "formatId",\n UTL_RAW.CAST_TO_VARCHAR2(globalid) as "globalTransactionId",\n UTL_RAW.CAST_TO_VARCHAR2(branchid) as "branchQualifier"\n FROM DBA_PENDING_TRANSACTIONS':'\n SELECT\n formatid as "formatId",\n globalid as "globalTransactionId",\n branchid as "branchQualifier"\n FROM DBA_PENDING_TRANSACTIONS',{},e)).rows}async tpcRollback(t){l.assertArgCount(arguments,0,1),1==arguments.length&&l.assertParamValue(h.isXid(t),1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcRollback(t)}async unsubscribe(t){l.assertArgCount(arguments,1,1),l.assertParamValue("string"==typeof t,1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),l.assert(A.has(t),l.ERR_INVALID_SUBSCR),await this._impl.unsubscribe(A.get(t)),A.delete(t)}}P.prototype.break=h.callbackify(P.prototype.breakExecution),h.wrapFns(P.prototype,"changePassword","close","commit","createLob","execute","executeMany","getDbObjectClass","getQueue","getStatementInfo","ping","rollback","shutdown","startup","subscribe","tpcBegin","tpcCommit","tpcEnd","tpcForget","tpcPrepare","tpcRecover","tpcRollback","unsubscribe"),P.prototype.release=P.prototype.close,t.exports=P},2269:(t,e,n)=>{"use strict";const r=n(8196),i=r.VERSION_MAJOR+"."+r.VERSION_MINOR+"."+r.VERSION_PATCH+r.VERSION_SUFFIX;t.exports={VERSION_MAJOR:r.VERSION_MAJOR,VERSION_MINOR:r.VERSION_MINOR,VERSION_PATCH:r.VERSION_PATCH,VERSION_SUFFIX:r.VERSION_SUFFIX,VERSION_STRING:i,DEFAULT_DRIVER_NAME:"node-oracledb : "+i,DEFAULT_ERROR_URL:"https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html",DEFAULT_MAX_SIZE_FOR_OUT_BINDS:200,CSFRM_IMPLICIT:1,CSFRM_NCHAR:2,CQN_OPCODE_ALL_OPS:0,CQN_OPCODE_ALL_ROWS:1,CQN_OPCODE_ALTER:16,CQN_OPCODE_DELETE:8,CQN_OPCODE_DROP:32,CQN_OPCODE_INSERT:2,CQN_OPCODE_UPDATE:4,DEFAULT:0,STMT_TYPE_UNKNOWN:0,STMT_TYPE_SELECT:1,STMT_TYPE_UPDATE:2,STMT_TYPE_DELETE:3,STMT_TYPE_INSERT:4,STMT_TYPE_CREATE:5,STMT_TYPE_DROP:6,STMT_TYPE_ALTER:7,STMT_TYPE_BEGIN:8,STMT_TYPE_DECLARE:9,STMT_TYPE_CALL:10,STMT_TYPE_EXPLAIN_PLAN:15,STMT_TYPE_MERGE:16,STMT_TYPE_ROLLBACK:17,STMT_TYPE_COMMIT:21,SHUTDOWN_MODE_DEFAULT:0,SHUTDOWN_MODE_TRANSACTIONAL:1,SHUTDOWN_MODE_TRANSACTIONAL_LOCAL:2,SHUTDOWN_MODE_IMMEDIATE:3,SHUTDOWN_MODE_ABORT:4,SHUTDOWN_MODE_FINAL:5,STARTUP_MODE_DEFAULT:0,STARTUP_MODE_FORCE:1,STARTUP_MODE_RESTRICT:2,SUBSCR_EVENT_TYPE_SHUTDOWN:2,SUBSCR_EVENT_TYPE_SHUTDOWN_ANY:3,SUBSCR_EVENT_TYPE_STARTUP:1,SUBSCR_EVENT_TYPE_DEREG:5,SUBSCR_EVENT_TYPE_OBJ_CHANGE:6,SUBSCR_EVENT_TYPE_QUERY_CHANGE:7,SUBSCR_EVENT_TYPE_AQ:100,SUBSCR_GROUPING_CLASS_TIME:1,SUBSCR_GROUPING_TYPE_SUMMARY:1,SUBSCR_GROUPING_TYPE_LAST:2,SUBSCR_NAMESPACE_AQ:1,SUBSCR_NAMESPACE_DBCHANGE:2,SUBSCR_QOS_BEST_EFFORT:16,SUBSCR_QOS_DEREG_NFY:2,SUBSCR_QOS_QUERY:8,SUBSCR_QOS_RELIABLE:1,SUBSCR_QOS_ROWIDS:4,SYSASM:32768,SYSBACKUP:131072,SYSDBA:2,SYSDG:262144,SYSKM:524288,SYSOPER:4,SYSPRELIM:8,SYSRAC:1048576,BIND_IN:3001,BIND_INOUT:3002,BIND_OUT:3003,OUT_FORMAT_ARRAY:4001,OUT_FORMAT_OBJECT:4002,SODA_COLL_MAP_MODE:5001,POOL_STATUS_OPEN:6e3,POOL_STATUS_DRAINING:6001,POOL_STATUS_CLOSED:6002,POOL_STATUS_RECONFIGURING:6003,PURITY_DEFAULT:0,PURITY_NEW:1,PURITY_SELF:2,AQ_DEQ_NO_WAIT:0,AQ_DEQ_WAIT_FOREVER:4294967295,AQ_DEQ_MODE_BROWSE:1,AQ_DEQ_MODE_LOCKED:2,AQ_DEQ_MODE_REMOVE:3,AQ_DEQ_MODE_REMOVE_NO_DATA:4,AQ_DEQ_NAV_FIRST_MSG:1,AQ_DEQ_NAV_NEXT_TRANSACTION:2,AQ_DEQ_NAV_NEXT_MSG:3,AQ_MSG_DELIV_MODE_PERSISTENT:1,AQ_MSG_DELIV_MODE_BUFFERED:2,AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED:3,AQ_MSG_STATE_READY:0,AQ_MSG_STATE_WAITING:1,AQ_MSG_STATE_PROCESSED:2,AQ_MSG_STATE_EXPIRED:3,AQ_VISIBILITY_IMMEDIATE:1,AQ_VISIBILITY_ON_COMMIT:2,TPC_BEGIN_JOIN:2,TPC_BEGIN_NEW:1,TPC_BEGIN_PROMOTE:8,TPC_BEGIN_RESUME:4,TPC_END_NORMAL:0,TPC_END_SUSPEND:1048576,VECTOR_FORMAT_FLOAT32:2,VECTOR_FORMAT_FLOAT64:3,VECTOR_FORMAT_INT8:4}},7647:(t,e,n)=>{"use strict";const r=n(2733),i=n(851),s=n(8041),o=n(6893),a=n(9023);function u(t,e,n,r){let i,a=!1;if(n){switch(e.type){case o.DB_TYPE_VARCHAR:case o.DB_TYPE_NVARCHAR:case o.DB_TYPE_NCHAR:case o.DB_TYPE_CHAR:i=Buffer.byteLength(n),i>e.maxSize&&(a=!0);break;case o.DB_TYPE_RAW:i=n.length,i>e.maxSize&&(a=!0)}a&&(void 0!==r?s.throwErr(s.ERR_WRONG_LENGTH_FOR_DBOBJECT_ELEM,r,t.fqn,i,e.maxSize):s.throwErr(s.ERR_WRONG_LENGTH_FOR_DBOBJECT_ATTR,e.name,t.fqn,i,e.maxSize))}}class _{_getAttrValue(t){const e=this._impl.getAttrValue(t);return this._transformValueOut(e,t.typeClass)}_setAttrValue(t,e){const n={fqn:this._objType.fqn,attrName:t.name,type:t.type,typeClass:t.typeClass};e=l.transformValueIn(n,e,{allowArray:!1}),u(this._objType,t,e),this._impl.setAttrValue(t,e)}_toPojo(){if(this.isCollection){const t=this.getValues();if(this.elementType===o.DB_TYPE_OBJECT)for(let e=0;e<t.length;e++)t[e]=t[e]._toPojo();return t}const t={};for(const e in this.attributes){let n=this[e];n instanceof _&&(n=n._toPojo()),t[e]=n}return t}_transformValueOut(t,e){let n=t;return t instanceof i.LobImpl?(n=new r,n._setup(t,!0)):t instanceof i.DbObjectImpl&&(n=Object.create(e.prototype),n._impl=t,n.isCollection&&(n=new Proxy(n,_._collectionProxyHandler))),n}append(t){s.assertArgCount(arguments,1,1);const e={fqn:this._objType.fqn,type:this._objType.elementType,typeClass:this._objType.elementTypeClass};t=l.transformValueIn(e,t,{allowArray:!1});let n=this._impl.getLastIndex();n?n+=1:n=0,u(this._objType,this._objType.elementTypeInfo,t,n),this._impl.append(t)}get attributes(){if(!this._attributes){const t=this._objType.attributes||[],e={};for(let n=0;n<t.length;n++){const r=t[n],i={type:r.type,typeName:r.typeName};r.typeClass&&(i.typeClass=r.typeClass),e[r.name]=i}this._attributes=e}return this._attributes}deleteElement(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t),1),this._impl.deleteElement(t)}get elementType(){return this._objType.elementType}get elementTypeClass(){return this._objType.elementTypeClass}get elementTypeName(){return this._objType.elementTypeName}get fqn(){return this._objType.fqn}getElement(t){s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t),1);const e=this._impl.getElement(t);return this._transformValueOut(e,this.elementTypeClass)}getKeys(){return s.assertArgCount(arguments,0,0),this._impl.getKeys()}getFirstIndex(){return s.assertArgCount(arguments,0,0),this._impl.getFirstIndex()}getLastIndex(){return s.assertArgCount(arguments,0,0),this._impl.getLastIndex()}getNextIndex(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t),1),this._impl.getNextIndex(t)}getPrevIndex(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t),1),this._impl.getPrevIndex(t)}getValues(){s.assertArgCount(arguments,0,0);const t=this._impl.getValues();for(let e=0;e<t.length;e++)t[e]=this._transformValueOut(t[e],this.elementTypeClass);return t}hasElement(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t),1),this._impl.hasElement(t)}get isCollection(){return this._objType.isCollection}get name(){return this._objType.name}get schema(){return this._objType.schema}get packageName(){return this._objType.packageName}setElement(t,e){s.assertArgCount(arguments,2,2),s.assertParamValue(Number.isInteger(t),1);const n={fqn:this._objType.fqn,type:this._objType.elementType,typeClass:this._objType.elementTypeClass};e=l.transformValueIn(n,e,{allowArray:!1}),u(this._objType,this._objType.elementTypeInfo,e,t),this._impl.setElement(t,e)}trim(t){s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t)&&t>=0,1),this._impl.trim(t)}[a.inspect.custom](t,e){return"["+this.fqn+"] "+a.inspect(this._toPojo(),e)}[Symbol.iterator](){if(this.isCollection)return this.getValues()[Symbol.iterator]();throw TypeError("obj is not iterable")}[Symbol.toPrimitive](t){return"number"===t?NaN:"["+this.fqn+"] "+a.inspect(this._toPojo(),{})}get[Symbol.toStringTag](){return this.fqn}toJSON(){return this._toPojo()}toMap(){s.assertArgCount(arguments,0,0),this.isCollection||s.throwErr(s.ERR_OBJECT_IS_NOT_A_COLLECTION,this.name);const t=new Map;return this.getKeys().forEach((e=>{t.set(e,this.getElement(e))})),t}}function c(t){return function(){try{return t.apply(this,arguments)}catch(t){throw s.transformErr(t,s.transformErr)}}}!function(t){for(let e=1;e<arguments.length;e++){const n=arguments[e];t[n]=c(t[n])}}(_.prototype,"_getAttrValue","_setAttrValue","append","deleteElement","getElement","getKeys","getFirstIndex","getLastIndex","getNextIndex","getPrevIndex","getValues","toMap","hasElement","setElement","trim"),_._collectionProxyHandler={deleteProperty(t,e){if("string"==typeof e){const n=+e;if(!isNaN(n))return t.deleteElement(n)}return delete t[e]},get(t,e){if("string"==typeof e){const n=+e;if(!isNaN(n))return t.getElement(n)}const n=t[e];return"function"==typeof n?n.bind(t):n},set(t,e,n){if("string"==typeof e){const r=+e;if(!isNaN(r))return t.setElement(r,n),!0}return t[e]=n,!0}},t.exports=_;const l=n(7207)},8041:(t,e,n)=>{"use strict";const r=n(9023),i="NJS",s=68,o=500,a=new Map;a.set("DPI-1010",3),a.set("DPI-1024",[132,"at index ([0-9]+) does"]),a.set("DPI-1044",115),a.set("DPI-1055",105),a.set("DPI-1063",95),a.set("DPI-1067",[123,"call timeout of ([0-9]+) ms"]),a.set("DPI-1080",o),a.set("OCI-22303",[129,'type "([^"]*"."[^"]*)"']),a.set("OCI-22164",133),a.set("OCI-22165",[131,/index \[([0-9]+)\] must be in the range of \[([0-9]+)\] to \[([0-9]+)\]/]),a.set("ORA-00028",o),a.set("ORA-00600",o),a.set("ORA-24338",107),a.set("ORA-25708",87),a.set("ORA-24344",700);const u=new Map;function _(t){t||h(...Array.prototype.slice.call(arguments,1))}function c(t,e,n){_(t,7,n,e)}function l(t){let e=u.get(t),n=[...arguments];e||(n=[void 0,t],t=s,e=u.get(t));const o=t.toString().padStart(3,"0"),a=`${i}-${o}`;n[0]=`${a}: ${e}`;const _=new Error(r.format(...n));return _.code=a,Error.captureStackTrace(_,l),_}function h(){throw l(...arguments)}u.set(2,"invalid pool"),u.set(3,"invalid or closed connection"),u.set(4,'invalid value for property "%s"'),u.set(5,"invalid value for parameter %d"),u.set(7,'invalid value for "%s" in parameter %d'),u.set(9,"invalid number of parameters"),u.set(10,"unsupported data type %d in column %d"),u.set(11,"encountered bind value and type mismatch"),u.set(12,"encountered invalid bind data type in parameter %d"),u.set(13,"invalid bind direction"),u.set(15,"type was not specified for conversion"),u.set(16,"buffer is too small for OUT binds"),u.set(17,"concurrent operations on ResultSet are not allowed"),u.set(18,"invalid ResultSet"),u.set(19,"ResultSet cannot be returned for non-query statements"),u.set(21,"invalid type for conversion specified"),u.set(22,"invalid Lob"),u.set(23,"concurrent operations on a Lob are not allowed"),u.set(24,"memory allocation failed"),u.set(34,"data type is unsupported for array bind"),u.set(35,"maxArraySize is required for IN OUT array bind"),u.set(36,'length of given array is greater than "maxArraySize"'),u.set(37,'invalid data type at array index %d for bind ":%s"'),u.set(40,'connection request timeout. Request exceeded "queueTimeout" of %d'),u.set(41,"cannot convert ResultSet to QueryStream after invoking methods"),u.set(42,"cannot invoke ResultSet methods after converting to QueryStream"),u.set(43,"ResultSet already converted to QueryStream"),u.set(44,'bind object must contain one of the following attributes: "dir", "type", "maxSize", or "val"'),u.set(45,"cannot load a node-oracledb Thick mode binary for Node.js. Please try using Thin mode. %s"),u.set(46,'pool alias "%s" already exists in the connection pool cache'),u.set(47,'pool alias "%s" not found in connection pool cache'),u.set(52,"invalid data type at array index %d for bind position %d"),u.set(55,"binding by position and name cannot be mixed"),u.set(56,"maxSize for bind position %d must be specified and be greater than zero"),u.set(57,'maxSize for bind "%s" must be specified and greater than zero'),u.set(58,"maxSize of %d is too small for value of length %d in row %d"),u.set(59,"type must be specified for bind position %d"),u.set(60,'type must be specified for bind "%s"'),u.set(61,"invalid subscription"),u.set(62,"subscription notification callback missing"),u.set(63,"subscription notification SQL missing"),u.set(64,"connection pool is closing"),u.set(65,"connection pool was closed"),u.set(66,"invalid SODA document cursor"),u.set(67,"a pre-built node-oracledb Thick mode binary was not found for %s"),u.set(s,"invalid error number %d supplied"),u.set(69,"node-oracledb %s requires Node.js %s or later"),u.set(70,"message must be a string, buffer, database object or an object containing a payload property which itself is a string, buffer or database object"),u.set(75,'only one of "connectString" and "connectionString" can be used'),u.set(76,'connection request rejected. Pool queue length "queueMax" %d reached'),u.set(78,"unsupported data type %d in JSON value"),u.set(80,'only one of "user" and "username" can be used'),u.set(81,"concurrent operations on a connection are disabled"),u.set(82,"connection pool is being reconfigured"),u.set(83,"pool statistics are not enabled"),u.set(84,"invalid access token"),u.set(85,'invalid connection pool configuration with token-based authentication. The "homogeneous" and "externalAuth" attributes must be set to true'),u.set(86,'invalid standalone configuration with token-based authentication. The "externalAuth" attribute must be set to true'),u.set(87,"access token has expired"),u.set(89,"%s is not supported by node-oracledb in Thin mode"),u.set(90,"initOracleClient() was already called with different arguments"),u.set(91,"file %s is missing"),u.set(92,'"poolMax" %d must be greater than or equal to "poolMin" %d'),u.set(95,'setting "batchErrors" or "dmlRowCounts" to true is only permitted for DML statements'),u.set(97,'no bind placeholder named ":%s" was found in the statement text'),u.set(98,"%s positional bind values are required but %s were provided"),u.set(99,"internal error: buffer of length %s insufficient to hold %s bytes"),u.set(100,"national character set id %d is not supported by node-oracledb in Thin mode"),u.set(101,"no credentials specified"),u.set(102,"unexpected end of data: want %d bytes but only %d bytes are available"),u.set(103,"unexpected message type %d received at position %d of packet %d"),u.set(104,"connection pool cannot be closed because connections are busy"),u.set(105,"value is not a number (NaN) and cannot be used in Oracle Database numbers"),u.set(106,"internal error: %s"),u.set(107,"invalid cursor"),u.set(109,"invalid type number %d"),u.set(110,"invalid Oracle type number %d [csfrm: %d]"),u.set(111,"internal error: read a negative integer when expecting a positive integer at position %d of packet %d"),u.set(112,"internal error: read integer of length %d when expecting integer of no more than length %d at position %d of packet %d"),u.set(113,"unexpected data received: %s"),u.set(114,"OSON field names may not exceed %d UTF-8 encoded bytes"),u.set(115,"value cannot be represented as an Oracle Database number"),u.set(116,"password verifier type 0x%s is not supported by node-oracledb in Thin mode"),u.set(118,"node-oracledb Thick mode cannot be enabled because a Thin mode connection has already been created"),u.set(119,"conversion from type %s to type %s is not supported"),u.set(120,"fetchTypeHandler return value must be an object"),u.set(121,'fetchTypeHandler return value attribute "type" must be a valid database type'),u.set(122,'fetchTypeHandler return value attribute "converter" must be a function'),u.set(123,"call timeout of %d ms exceeded"),u.set(125,'"connectString" cannot be empty or undefined. Bequeath connections are not supported in Thin mode'),u.set(126,"OSON version %s is not supported"),u.set(127,"internal error: unknown server side piggyback opcode %s"),u.set(128,'internal error: unknown column type name "%s"'),u.set(129,'invalid object type name: "%s"'),u.set(130,"Oracle TDS data type %d is not supported"),u.set(131,"given index %d must be in the range of %d to %d"),u.set(132,"element at index %d does not exist"),u.set(133,"cannot delete elements of a VARRAY"),u.set(134,"value is of wrong type for attribute %s of object %s"),u.set(135,"value is of wrong type for an element of object %s"),u.set(136,"user name and password cannot be set when using external authentication"),u.set(137,'a bind variable replacement value for placeholder ":%s" was not provided'),u.set(138,"connections to this database server version are not supported by node-oracledb in Thin mode"),u.set(139,"unexpected XML type with flag %d"),u.set(140,"user name must be enclosed in [] when using external authentication with a proxy user"),u.set(141,"the number of batch errors from executemany() exceeds 65535"),u.set(142,"value too large for attribute %s of object %s (actual: %d, maximum: %d)"),u.set(143,"value too large for element %d of object %s (actual: %d, maximum: %d)"),u.set(144,"VECTOR format %d is not supported"),u.set(145,"VECTOR version %d is not supported"),u.set(146,"object %s is not a collection"),u.set(147,"cursor has been closed by the database"),u.set(149,'the bind variable placeholder "%s" cannot be used both before and after the RETURNING clause in a DML RETURNING statement'),u.set(o,"connection to the Oracle Database was broken"),u.set(501,"connection to host %s port %d terminated unexpectedly. (CONNECTION_ID=%s)\n%s"),u.set(503,"connection to host %s port %d could not be established. (CONNECTION_ID=%s)\n%s"),u.set(504,"connection establishment through a web proxy at host %s port %d failed. (CONNECTION_ID=%s)\n%s"),u.set(505,"unable to initiate TLS connection. Please check if wallet credentials are valid"),u.set(506,"connection to host %s port %d encountered TLS handshake failure. (CONNECTION_ID=%s)\n%s"),u.set(507,"TLS detected an invalid certificate. Server DN in certificate does not match the specified DN"),u.set(508,"TLS detected an invalid certificate. %s not present in certificate"),u.set(509,"internal error: invalid packet type or malformed packet received"),u.set(510,'connection to host %s port %d timed out. Request exceeded "%s" of %d seconds. (CONNECTION_ID=%s)'),u.set(511,"connection to listener at host %s port %d was refused. (CONNECTION_ID=%s)\nCause: %s"),u.set(512,"invalid connection string parameters.\n%s"),u.set(513,"error received through in-band notification: %s"),u.set(514,"syntax error in connection string"),u.set(515,"error in Easy Connect connection string: %s: %s"),u.set(516,"no configuration directory set or available to search for tnsnames.ora"),u.set(517,'cannot connect to Oracle Database. Unable to find "%s" in "%s"'),u.set(518,'cannot connect to Oracle Database. Service "%s" is not registered with the listener at host %s port %s. (CONNECTION_ID=%s)'),u.set(519,'cannot connect to Oracle Database. SID "%s" is not registered with the listener at host %s port %s. (CONNECTION_ID=%s)'),u.set(520,"cannot connect to Oracle Database. File tnsnames.ora not found in %s"),u.set(521,"connection to host %s port %d received end-of-file on communication channel. (CONNECTION_ID=%s)"),u.set(700,"creation succeeded with compilation errors"),t.exports={ERR_INTEGRITY_ERROR_CODES:[1,1400,1438,2290,2291,2292,21525,40479],ERR_INVALID_POOL:2,ERR_INVALID_CONNECTION:3,ERR_INVALID_PROPERTY_VALUE:4,ERR_INVALID_PARAMETER_VALUE:5,ERR_INVALID_PROPERTY_VALUE_IN_PARAM:7,ERR_INVALID_NUMBER_OF_PARAMETERS:9,ERR_UNSUPPORTED_DATA_TYPE:10,ERR_BIND_VALUE_AND_TYPE_MISMATCH:11,ERR_INVALID_BIND_DATA_TYPE:12,ERR_INVALID_BIND_DIRECTION:13,ERR_NO_TYPE_FOR_CONVERSION:15,ERR_INSUFFICIENT_BUFFER_FOR_BINDS:16,ERR_BUSY_RS:17,ERR_INVALID_RS:18,ERR_NOT_A_QUERY:19,ERR_INVALID_TYPE_FOR_CONVERSION:21,ERR_INVALID_LOB:22,ERR_BUSY_LOB:23,ERR_INSUFFICIENT_MEMORY:24,ERR_INVALID_TYPE_FOR_ARRAY_BIND:34,ERR_REQUIRED_MAX_ARRAY_SIZE:35,ERR_INVALID_ARRAY_SIZE:36,ERR_INCOMPATIBLE_TYPE_ARRAY_BIND:37,ERR_CONN_REQUEST_TIMEOUT:40,ERR_CANNOT_CONVERT_RS_TO_STREAM:41,ERR_CANNOT_INVOKE_RS_METHODS:42,ERR_RS_ALREADY_CONVERTED:43,ERR_INVALID_BIND_UNIT:44,ERR_CANNOT_LOAD_BINARY:45,ERR_POOL_WITH_ALIAS_ALREADY_EXISTS:46,ERR_POOL_WITH_ALIAS_NOT_FOUND:47,ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND:52,ERR_MIXED_BIND:55,ERR_MISSING_MAX_SIZE_BY_POS:56,ERR_MISSING_MAX_SIZE_BY_NAME:57,ERR_MAX_SIZE_TOO_SMALL:58,ERR_MISSING_TYPE_BY_POS:59,ERR_MISSING_TYPE_BY_NAME:60,ERR_INVALID_SUBSCR:61,ERR_MISSING_SUBSCR_CALLBACK:62,ERR_MISSING_SUBSCR_SQL:63,ERR_POOL_CLOSING:64,ERR_POOL_CLOSED:65,ERR_INVALID_SODA_DOC_CURSOR:66,ERR_NO_BINARY_AVAILABLE:67,ERR_INVALID_ERR_NUM:s,ERR_NODE_TOO_OLD:69,ERR_INVALID_AQ_MESSAGE:70,ERR_DBL_CONNECT_STRING:75,ERR_QUEUE_MAX_EXCEEDED:76,ERR_UNSUPPORTED_DATA_TYPE_IN_JSON:78,ERR_DBL_USER:80,ERR_CONCURRENT_OPS:81,ERR_POOL_RECONFIGURING:82,ERR_POOL_STATISTICS_DISABLED:83,ERR_TOKEN_BASED_AUTH:84,ERR_POOL_TOKEN_BASED_AUTH:85,ERR_CONN_TOKEN_BASED_AUTH:86,ERR_TOKEN_HAS_EXPIRED:87,ERR_NOT_IMPLEMENTED:89,ERR_INIT_ORACLE_CLIENT_ARGS:90,ERR_MISSING_FILE:91,ERR_INVALID_NUMBER_OF_CONNECTIONS:92,ERR_EXEC_MODE_ONLY_FOR_DML:95,ERR_CONNECTION_CLOSED:o,ERR_CONNECTION_LOSTCONTACT:501,ERR_CONNECTION_INCOMPLETE:503,ERR_PROXY_CONNECTION_FAILURE:504,ERR_TLS_INIT_FAILURE:505,ERR_TLS_AUTH_FAILURE:506,ERR_TLS_DNMATCH_FAILURE:507,ERR_TLS_HOSTMATCH_FAILURE:508,ERR_INVALID_PACKET:509,ERR_CONNECTION_TIMEDOUT:510,ERR_CONNECTION_REFUSED:511,ERR_INVALID_CONNECT_STRING_PARAMETERS:512,ERR_CONNECTION_INBAND:513,ERR_INVALID_CONNECT_STRING_SYNTAX:514,ERR_INVALID_EZCONNECT_SYNTAX:515,ERR_NO_CONFIG_DIR:516,ERR_TNS_ENTRY_NOT_FOUND:517,ERR_CONNECTION_EOF:521,ERR_INVALID_BIND_NAME:97,ERR_WRONG_NUMBER_OF_POSITIONAL_BINDS:98,ERR_BUFFER_LENGTH_INSUFFICIENT:99,ERR_NCHAR_CS_NOT_SUPPORTED:100,ERR_MISSING_CREDENTIALS:101,ERR_UNEXPECTED_END_OF_DATA:102,ERR_UNEXPECTED_MESSAGE_TYPE:103,ERR_POOL_HAS_BUSY_CONNECTIONS:104,ERR_INTERNAL:106,ERR_INVALID_REF_CURSOR:107,ERR_UNSUPPORTED_VERIFIER_TYPE:116,ERR_NAN_VALUE:105,ERR_ORACLE_NUMBER_NO_REPR:115,ERR_INVALID_SERVICE_NAME:518,ERR_INVALID_SID:519,ERR_TNS_NAMES_FILE_MISSING:520,ERR_INVALID_TYPE_NUM:109,ERR_INVALID_ORACLE_TYPE_NUM:110,ERR_UNEXPECTED_NEGATIVE_INTEGER:111,ERR_INTEGER_TOO_LARGE:112,ERR_UNEXPECTED_DATA:113,ERR_OSON_FIELD_NAME_LIMITATION:114,ERR_OSON_VERSION_NOT_SUPPORTED:126,ERR_THIN_CONNECTION_ALREADY_CREATED:118,ERR_UNSUPPORTED_CONVERSION:119,ERR_FETCH_TYPE_HANDLER_RETURN_VALUE:120,ERR_FETCH_TYPE_HANDLER_TYPE:121,ERR_FETCH_TYPE_HANDLER_CONVERTER:122,ERR_CALL_TIMEOUT_EXCEEDED:123,ERR_EMPTY_CONNECT_STRING:125,ERR_UNKOWN_SERVER_SIDE_PIGGYBACK:127,ERR_UNKNOWN_COLUMN_TYPE_NAME:128,ERR_INVALID_OBJECT_TYPE_NAME:129,ERR_TDS_TYPE_NOT_SUPPORTED:130,ERR_INVALID_COLL_INDEX_SET:131,ERR_INVALID_COLL_INDEX_GET:132,ERR_DELETE_ELEMENTS_OF_VARRAY:133,ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR:134,ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM:135,ERR_WRONG_CRED_FOR_EXTAUTH:136,ERR_MISSING_BIND_VALUE:137,ERR_SERVER_VERSION_NOT_SUPPORTED:138,ERR_UNEXPECTED_XML_TYPE:139,ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY:140,ERR_TOO_MANY_BATCH_ERRORS:141,ERR_WRONG_LENGTH_FOR_DBOBJECT_ATTR:142,ERR_WRONG_LENGTH_FOR_DBOBJECT_ELEM:143,ERR_VECTOR_FORMAT_NOT_SUPPORTED:144,ERR_VECTOR_VERSION_NOT_SUPPORTED:145,ERR_OBJECT_IS_NOT_A_COLLECTION:146,ERR_CURSOR_HAS_BEEN_CLOSED:147,ERR_DML_RETURNING_DUP_BINDS:149,ERR_CONNECTION_CLOSED_CODE:`${i}-500`,WRN_COMPILATION_CREATE:700,assert:_,assertArgCount:function(t,e,n){_(t.length>=e&&t.length<=n,9)},assertParamPropBool:function(t,e,n){void 0!==t[n]&&c("boolean"==typeof t[n],e,n)},assertParamPropFunction:function(t,e,n){void 0!==t[n]&&c("function"==typeof t[n],e,n)},assertParamPropInt:function(t,e,n){void 0!==t[n]&&c(Number.isInteger(t[n]),e,n)},assertParamPropString:function(t,e,n){void 0!==t[n]&&c("string"==typeof t[n],e,n)},assertParamPropUnsignedInt:function(t,e,n){void 0!==t[n]&&c(Number.isInteger(t[n])&&t[n]>=0,e,n)},assertParamPropUnsignedIntNonZero:function(t,e,n){void 0!==t[n]&&c(Number.isInteger(t[n])&&t[n]>0,e,n)},assertParamPropValue:c,assertParamValue:function(t,e){_(t,5,e)},assertPropValue:function(t,e){_(t,4,e)},getErr:l,throwErr:h,throwNotImplemented:function(t){h(89,t)},transformErr:function(t,e){if(!t.code){const e=t.message.indexOf(":");if(e>0){t.code=t.message.substr(0,e);const r=n(8023);if(t.errorNum&&r.thin&&(t.message+=`\nHelp: https://docs.oracle.com/error-help/db/ora-${t.errorNum.toString().padStart(5,"0")}/`),a.has(t.code)){let e,n=[];const r=a.get(t.code);if("number"==typeof r)e=r;else{e=r[0];const i=r[1],s=t.message.match(i);s&&(n=s.slice(1))}const i=l(e,...n);t.code=i.code,t.message=i.message+"\n"+t.message}}}return t.requiresStackCapture&&(delete t.requiresStackCapture,Error.captureStackTrace(t,e)),t}}},5377:(t,e,n)=>{"use strict";const r=n(8041);t.exports=new class{constructor(){this._featureFlags={},this._featureFlags.oldJsonColumnAsObj=!1}get oldJsonColumnAsObj(){return this._featureFlags.oldJsonColumnAsObj}set oldJsonColumnAsObj(t){r.assertPropValue("boolean"==typeof t,"oldJsonColumnAsObj"),this._featureFlags.oldJsonColumnAsObj=t}}},1905:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{getCondition(){r.throwNotImplemented("getting condition (dequeue options)")}getConsumerName(){r.throwNotImplemented("getting consumer name (dequeue options)")}getCorrelation(){r.throwNotImplemented("getting correlation (dequeue options)")}getMode(){r.throwNotImplemented("getting mode (dequeue options)")}getMsgId(){r.throwNotImplemented("getting message id (dequeue options)")}getNavigation(){r.throwNotImplemented("getting navigation (dequeue options)")}getTransformation(){r.throwNotImplemented("getting transformation (dequeue options)")}getVisibility(){r.throwNotImplemented("getting visibility (dequeue options)")}getWait(){r.throwNotImplemented("getting wait (dequeue options)")}setCondition(){r.throwNotImplemented("setting condition (dequeue options)")}setConsumerName(){r.throwNotImplemented("setting consumer name (dequeue options)")}setCorrelation(){r.throwNotImplemented("setting correlation (dequeue options)")}setMode(){r.throwNotImplemented("setting mode (dequeue options)")}setMsgId(){r.throwNotImplemented("setting message id (dequeue options)")}setNavigation(){r.throwNotImplemented("setting navigation (dequeue options)")}setTransformation(){r.throwNotImplemented("setting transformation (dequeue options)")}setVisibility(){r.throwNotImplemented("setting visibility (dequeue options)")}setWait(){r.throwNotImplemented("setting wait (dequeue options)")}}},4117:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{getDeliveryMode(){r.throwNotImplemented("getting delivery mode (enqueue options)")}getTransformation(){r.throwNotImplemented("getting transformation (enqueue options)")}getVisibility(){r.throwNotImplemented("getting visibility (enqueue options)")}setDeliveryMode(){r.throwNotImplemented("setting delivery mode (enqueue options)")}setTransformation(){r.throwNotImplemented("setting transformation (enqueue options)")}setVisibility(){r.throwNotImplemented("setting visibility (enqueue options)")}}},2894:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{getCorrelation(){r.throwNotImplemented("getting correlation (message)")}getDelay(){r.throwNotImplemented("getting delay (message)")}getDeliveryMode(){r.throwNotImplemented("getting delivery mode (message)")}getExceptionQueue(){r.throwNotImplemented("getting exception queue (message)")}getExpiration(){r.throwNotImplemented("getting expiration (message)")}getMsgId(){r.throwNotImplemented("getting message id (message)")}getNumAttempts(){r.throwNotImplemented("getting number of attempts (message)")}getOriginalMsgId(){r.throwNotImplemented("getting original message id (message)")}getPayload(){r.throwNotImplemented("getting payload (message)")}getPriority(){r.throwNotImplemented("getting priority (message)")}getState(){r.throwNotImplemented("getting state (message)")}}},4610:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{_getConnImpl(){return this._connection}deqMany(){r.throwNotImplemented("dequeuing multiple items from a queue")}deqOne(){r.throwNotImplemented("dequeuing a single item from a queue")}enqMany(){r.throwNotImplemented("enqueuing multiple items from a queue")}enqOne(){r.throwNotImplemented("enqueuing a single item from a queue")}}},44:(t,e,n)=>{"use strict";const r=n(8023),i=n(8041),s=n(9023);t.exports=class{constructor(){this._inProgress=!1,this._dbObjectTypes=new Map,this._requestQueue=[],this._osonMaxFieldNameSize=255}async _acquireLock(){this._inProgress&&(r.errorOnConcurrentExecute&&i.throwErr(i.ERR_CONCURRENT_OPS),await new Promise(((t,e)=>{const n={resolve:t,reject:e};this._requestQueue.push(n)}))),this._inProgress=!0}_getConnImpl(){return this}_getDbObjectType(t,e,n,r){let i;if(r&&(i=this._dbObjectTypes.get(r),i))return i;const s=n?`${t}.${n}.${e}`:`${t}.${e}`;return i=this._dbObjectTypes.get(s),i||(i={oid:r,fqn:s,schema:t,name:e,packageName:n,partial:!0,isXmlType:"SYS"===t&&"XMLTYPE"===e},this._dbObjectTypes.set(s,i)),r&&!i.oid&&(i.oid=r,this._dbObjectTypes.set(r,i)),i}_isDate(t){return s.types.isDate(t)}_releaseLock(){this._requestQueue.length>0?this._requestQueue.shift().resolve():this._inProgress=!1}breakExecution(){i.throwNotImplemented("getting Oracle Server version number")}changePassword(){i.throwNotImplemented("changing the password")}close(){i.throwNotImplemented("closing the connection")}commit(){i.throwNotImplemented("committing the transaction")}createLob(){i.throwNotImplemented("creating a temporary LOB")}execute(){i.throwNotImplemented("executing a SQL statement")}executeMany(){i.throwNotImplemented("executing a SQL statement multiple times")}getCallTimeout(){i.throwNotImplemented("getting call timeout")}getCurrentSchema(){i.throwNotImplemented("getting current schema")}getDbDomain(){i.throwNotImplemented("getting db domain")}getDbName(){i.throwNotImplemented("getting db name")}getDbObjectClass(){i.throwNotImplemented("getting a database object class")}getExternalName(){i.throwNotImplemented("getting the external name")}getInstanceName(){i.throwNotImplemented("getting the Oracle Database instance name.")}getInternalName(){i.throwNotImplemented("getting the internal name")}getMaxOpenCursors(){i.throwNotImplemented("getting max open cursors")}getOracleServerVersion(){i.throwNotImplemented("getting Oracle Server version number")}getOracleServerVersionString(){i.throwNotImplemented("getting Oracle Server version as a string")}getQueue(){i.throwNotImplemented("getting a queue")}getServiceName(){i.throwNotImplemented("getting service name")}getSodaDatabase(){i.throwNotImplemented("getting a SODA database")}getStatementInfo(){i.throwNotImplemented("getting information about a statement")}getStmtCacheSize(){i.throwNotImplemented("getting the statement cache size")}getTag(){i.throwNotImplemented("getting the tag for the connection")}getTransactionInProgress(){i.throwNotImplemented("getting the status of an active transaction on the connection")}getWarning(){i.throwNotImplemented("getting information about warning")}isHealthy(){i.throwNotImplemented("getting the health of the connection")}ping(){i.throwNotImplemented("sending a ping to the database")}rollback(){i.throwNotImplemented("rolling back a transaction")}setAction(){i.throwNotImplemented("setting end-to-end attribute 'action'")}setCallTimeout(){i.throwNotImplemented("setting call timeout")}setClientId(){i.throwNotImplemented("setting end-to-end attribute 'clientId'")}setClientInfo(){i.throwNotImplemented("setting end-to-end attribute 'clientInfo'")}setCurrentSchema(){i.throwNotImplemented("setting the current schema")}setDbOp(){i.throwNotImplemented("setting end-to-end attribute 'dbOp'")}setECID(){i.throwNotImplemented("setting end-to-end attribute 'ecid'")}setExternalName(){i.throwNotImplemented("setting the external name")}setInternalName(){i.throwNotImplemented("setting the internal name")}setStmtCacheSize(){i.throwNotImplemented("setting the size of the statement cache")}setModule(){i.throwNotImplemented("setting end-to-end attribute 'module'")}setTag(){i.throwNotImplemented("setting the tag for the connection")}shutdown(){i.throwNotImplemented("shutting down the database instance")}startup(){i.throwNotImplemented("starting up the database instance")}subscribe(){i.throwNotImplemented("subscribing to events in the database")}tpcBegin(){i.throwNotImplemented("starting a two-phase transaction")}tpcCommit(){i.throwNotImplemented("committing a two-phase transaction")}tpcEnd(){i.throwNotImplemented("ending a two-phase transaction")}tpcForget(){i.throwNotImplemented("forgetting a two-phase transaction")}tpcPrepare(){i.throwNotImplemented("preparing a two-phase transaction")}tpcRollback(){i.throwNotImplemented("rolling back a two-phase transaction")}unsubscribe(){i.throwNotImplemented("unsubscribing from events")}}},1559:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(5068),s=n(8041),o=n(6893),a=n(6770);class u{constructor(t){"number"==typeof t?(this.buf=r.alloc(t),this.size=0,this.maxSize=t):t&&(this.buf=t,this.size=this.maxSize=t.length),this.pos=0}_grow(t){s.throwErr(s.ERR_BUFFER_LENGTH_INSUFFICIENT,this.numBytesLeft(),t)}_readBytesWithLength(t){return this.readBytes(t)}_readInteger(t,e,n){let r=!1,i=this.readUInt8();if(0===i)return 0;if(128&i&&(e||s.throwErr(s.ERR_UNEXPECTED_NEGATIVE_INTEGER,this.pos,this.packetNum),r=!0,i&=127),i>t&&s.throwErr(s.ERR_INTEGER_TOO_LARGE,i,t,this.pos,this.packetNum),!n){const t=this.readBytes(i).readUIntBE(0,i);return r?-t:t}this.skipBytes(i)}numBytesLeft(){return this.size-this.pos}parseBinaryDouble(t){return 128&(t=r.from(t))[0]?t[0]&=127:(t[0]^=255,t[1]^=255,t[2]^=255,t[3]^=255,t[4]^=255,t[5]^=255,t[6]^=255,t[7]^=255),t.readDoubleBE()}parseBinaryFloat(t){return 128&(t=r.from(t))[0]?t[0]&=127:(t[0]^=255,t[1]^=255,t[2]^=255,t[3]^=255),t.readFloatBE()}parseOracleDate(t,e=!0){let n=0;t.length>=11&&(n=Math.floor(t.readUInt32BE(7)/1e6));const r=100*(t[0]-100)+t[1]-100;return a.makeDate(e,r,t[2],t[3],t[4]-1,t[5]-1,t[6]-1,n,0)}parseOracleNumber(t){let e=t[0];const n=Boolean(128&e);n||(e^=255),e-=193;let r=2*e+2;if(1===t.length)return n?"0":"-1e126";let i,s=t.length;n||102!==t[t.length-1]||(s-=1);const o=[];for(let e=1;e<s;e++){i=n?t[e]-1:101-t[e];let a=Math.floor(i/10);0===a&&1===e?r-=1:10===a?(o.push("1"),o.push("0"),r+=1):(0!==a||e>1)&&o.push(a.toString()),a=i%10,(0!==a||e<s-1)&&o.push(a.toString())}const a=[];n||a.push("-"),r<=0&&(a.push("."),r<0&&a.push("0".repeat(-r)));for(let t=0;t<o.length;t++)t>0&&t===r&&a.push("."),a.push(o[t]);if(r>o.length)for(let t=o.length;t<r;t++)a.push("0");return a.join("")}readBinaryDouble(){const t=this.readBytesWithLength();return t?this.parseBinaryDouble(t):null}readBinaryFloat(){const t=this.readBytesWithLength();return t?this.parseBinaryFloat(t):null}readBinaryInteger(){const t=this.readBytesWithLength();return t?(t.length>4&&s.throwErr(s.ERR_INTEGER_TOO_LARGE,t.length,4,this.pos,this.packetNum),t.readIntBE(0,t.length)):0}readBool(){const t=this.readBytesWithLength();return t?1===t[t.length-1]:null}readBytes(t){const e=this.numBytesLeft();t>e&&s.throwErr(s.ERR_UNEXPECTED_END_OF_DATA,t,e);const n=this.buf.subarray(this.pos,this.pos+t);return this.pos+=t,n}readBytesWithLength(){const t=this.readUInt8();return 0===t||t===i.TNS_NULL_LENGTH_INDICATOR?null:this._readBytesWithLength(t)}readDbObject(){const t={};let e=this.readUB4();return e>0&&(t.toid=r.from(this.readBytesWithLength())),e=this.readUB4(),e>0&&(t.oid=r.from(this.readBytesWithLength())),e=this.readUB4(),e>0&&(t.snapshot=r.from(this.readBytesWithLength())),this.skipUB2(),e=this.readUB4(),this.skipUB2(),e>0&&(t.packedData=r.from(this.readBytesWithLength())),t}readInt8(){return this.readBytes(1).readInt8()}readOracleDate(t){const e=this.readBytesWithLength();return e?this.parseOracleDate(e,t):null}readOracleNumber(){const t=this.readBytesWithLength();return t?this.parseOracleNumber(t):null}readSB2(){return this._readInteger(2,!0,!1)}readSB4(){return this._readInteger(4,!0,!1)}readSB8(){return this._readInteger(8,!0,!1)}readStr(t){const e=this.readBytesWithLength();return e?t===i.CSFRM_IMPLICIT?e.toString():r.from(e).swap16().toString("utf16le"):null}readUB2(){return this._readInteger(2,!1,!1)}readUB4(){return this._readInteger(4,!1,!1)}readUB8(){return this._readInteger(8,!1,!1)}readUInt8(){return this.readBytes(1)[0]}readUInt16BE(){return this.readBytes(2).readUInt16BE()}readUInt16LE(){return this.readBytes(2).readUInt16LE()}readUInt32BE(){return this.readBytes(4).readUInt32BE()}reserveBytes(t){t>this.numBytesLeft()&&this._grow(this.pos+t);const e=this.pos;return this.pos+=t,e}skipBytes(t){t>this.numBytesLeft()&&s.throwErr(s.ERR_UNEXPECTED_END_OF_DATA),this.pos+=t}skipSB4(){return this._readInteger(4,!0,!0)}skipUB1(){this.skipBytes(1)}skipUB2(){return this._readInteger(2,!1,!0)}skipUB4(){return this._readInteger(4,!1,!0)}skipUB8(){return this._readInteger(8,!1,!0)}writeBinaryDouble(t,e){e||(e=this.reserveBytes(8)),this.buf.writeDoubleBE(t,e),128&this.buf[e]?(this.buf[e]^=255,this.buf[e+1]^=255,this.buf[e+2]^=255,this.buf[e+3]^=255,this.buf[e+4]^=255,this.buf[e+5]^=255,this.buf[e+6]^=255,this.buf[e+7]^=255):this.buf[e]|=128}writeBinaryFloat(t,e){e||(e=this.reserveBytes(4)),this.buf.writeFloatBE(t,e),128&this.buf[e]?(this.buf[e]^=255,this.buf[e+1]^=255,this.buf[e+2]^=255,this.buf[e+3]^=255):this.buf[e]|=128}writeBytes(t){let e=0,n=t.length;for(;n>0;){const r=this.numBytesLeft();0===r&&this._grow(this.pos+n);const i=Math.min(r,n);t.copy(this.buf,this.pos,e,e+i),this.pos+=i,e+=i,n-=i}}_writeRawBytesAndLength(t,e){if(e<=i.TNS_MAX_SHORT_LENGTH)this.writeUInt8(e),e>0&&this.writeBytes(t);else{let n=0;for(this.writeUInt8(i.TNS_LONG_LENGTH_INDICATOR);e>0;){const r=Math.min(e,i.BUFFER_CHUNK_SIZE);this.writeUB4(r),this.writeBytes(t.subarray(n,n+r)),e-=r,n+=r}this.writeUB4(0)}}writeBytesWithLength(t){const e=t.length;this._writeRawBytesAndLength(t,e)}writeDbObject(t){this.writeUB4(t.toid.length),this.writeBytesWithLength(t.toid),t.oid?(this.writeUB4(t.oid.length),this.writeBytesWithLength(t.oid)):this.writeUB4(0),this.writeUB4(0),this.writeUB4(0);const e=t._getPackedData();this.writeUB4(e.length),this.writeUB4(t.flags),this.writeBytesWithLength(e)}writeOracleDate(t,e,n=!0){let r,s=e._bufferSizeFactor;s>7&&(r=1e3*t.getUTCMilliseconds()*1e3,0===r&&s<=11&&(s=7)),n&&this.writeUInt8(s);const a=this.reserveBytes(s);if(e===o.DB_TYPE_DATE||e==o.DB_TYPE_TIMESTAMP){const e=t.getFullYear();this.buf[a]=Math.trunc(e/100)+100,this.buf[a+1]=e%100+100,this.buf[a+2]=t.getMonth()+1,this.buf[a+3]=t.getDate(),this.buf[a+4]=t.getHours()+1,this.buf[a+5]=t.getMinutes()+1,this.buf[a+6]=t.getSeconds()+1}else{const e=t.getUTCFullYear();this.buf[a]=Math.trunc(e/100)+100,this.buf[a+1]=e%100+100,this.buf[a+2]=t.getUTCMonth()+1,this.buf[a+3]=t.getUTCDate(),this.buf[a+4]=t.getUTCHours()+1,this.buf[a+5]=t.getUTCMinutes()+1,this.buf[a+6]=t.getUTCSeconds()+1}s>7&&(this.buf.writeInt32BE(r,a+7),s>11&&(this.buf[a+11]=i.TZ_HOUR_OFFSET,this.buf[a+12]=i.TZ_MINUTE_OFFSET))}writeOracleNumber(t){let e=!1;"-"===t[0]&&(e=!0,t=t.substring(1));let n=0;const r=t.indexOf("e");r>0&&(n=Number(t.substring(r+1)),t=t.substring(0,r));const o=t.indexOf(".");if(o>0&&(n-=t.length-o-1,t=t.substring(0,o)+t.substring(o+1)),"0"===t[0]&&(t=t.replace(/^0+/,"")),t.length>0&&"0"===t[t.length-1]){const e=t.replace(/0+$/,"");n+=t.length-e.length,t=e}(t.length>i.NUMBER_MAX_DIGITS||n>=126||n<=-131)&&s.throwErr(s.ERR_ORACLE_NUMBER_NO_REPR),(n>0&&n%2==1||n<0&&n%2==-1)&&(n--,t+="0"),t.length%2==1&&(t="0"+t);const a=e&&t.length<i.NUMBER_MAX_DIGITS,u=t.length/2;let _=(n+t.length)/2+192;e?_^=255:0===t.length&&0===n&&(_=128);let c=this.reserveBytes(u+2+a);this.buf[c++]=u+1+a,this.buf[c++]=_;for(let n=0;n<t.length;n+=2){const r=Number(t.substring(n,n+2));this.buf[c++]=e?101-r:r+1}a&&(this.buf[c]=102)}writeStr(t){this.writeBytes(r.from(t))}writeInt32BE(t){const e=this.reserveBytes(4);this.buf.writeInt32BE(t,e)}writeUB4(t){0===t?this.writeUInt8(0):t<=255?(this.writeUInt8(1),this.writeUInt8(t)):t<=65535?(this.writeUInt8(2),this.writeUInt16BE(t)):(this.writeUInt8(4),this.writeUInt32BE(t))}writeUB2(t){0===t?this.writeUInt8(0):t<=255?(this.writeUInt8(1),this.writeUInt8(t)):(this.writeUInt8(2),this.writeUInt16BE(t))}writeUB8(t){0===t?this.writeUInt8(0):t<=255?(this.writeUInt8(1),this.writeUInt8(t)):t<=65535?(this.writeUInt8(2),this.writeUInt16BE(t)):t<=4294967295?(this.writeUInt8(4),this.writeUInt32BE(t)):(this.writeUInt8(8),this.writeUInt64BE(t))}writeUInt8(t){const e=this.reserveBytes(1);this.buf[e]=t}writeSB1(t){const e=this.reserveBytes(1);this.buf[e]=t}writeUInt16BE(t){const e=this.reserveBytes(2);this.buf.writeUInt16BE(t,e)}writeUInt32BE(t){const e=this.reserveBytes(4);this.buf.writeUInt32BE(t,e)}writeUInt64BE(t){const e=this.reserveBytes(8);this.buf.writeUInt32BE(0,e),this.buf.writeUInt32BE(t,e+4)}writeUInt16LE(t){const e=this.reserveBytes(2);this.buf.writeUInt16LE(t,e)}}t.exports={BaseBuffer:u,GrowableBuffer:class extends u{constructor(t){t?super(t):(super(i.BUFFER_CHUNK_SIZE),this.size=this.maxSize)}_grow(t){const e=t%i.BUFFER_CHUNK_SIZE;e>0&&(t+=i.BUFFER_CHUNK_SIZE-e);const n=r.allocUnsafe(t);this.buf.copy(n),this.buf=n,this.maxSize=this.size=t}}}},5068:(t,e,n)=>{"use strict";const r=n(2269);t.exports={TNS_VECTOR_MAGIC_BYTE:219,TNS_VECTOR_VERSION:0,TNS_VECTOR_FLAG_NORMSRC:16,TNS_VECTOR_FLAG_NORM:2,TNS_JSON_MAGIC_BYTE_1:255,TNS_JSON_MAGIC_BYTE_2:74,TNS_JSON_MAGIC_BYTE_3:90,TNS_JSON_VERSION_MAX_FNAME_255:1,TNS_JSON_VERSION_MAX_FNAME_65535:3,TNS_JSON_FLAG_HASH_ID_UINT8:256,TNS_JSON_FLAG_HASH_ID_UINT16:512,TNS_JSON_FLAG_NUM_FNAMES_UINT16:1024,TNS_JSON_FLAG_FNAMES_SEG_UINT32:2048,TNS_JSON_FLAG_TINY_NODES_STAT:8192,TNS_JSON_FLAG_TREE_SEG_UINT32:4096,TNS_JSON_FLAG_REL_OFFSET_MODE:1,TNS_JSON_FLAG_INLINE_LEAF:2,TNS_JSON_FLAG_LEN_IN_PCODE:4,TNS_JSON_FLAG_NUM_FNAMES_UINT32:8,TNS_JSON_FLAG_IS_SCALAR:16,TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16:256,TNS_JSON_TYPE_NULL:48,TNS_JSON_TYPE_TRUE:49,TNS_JSON_TYPE_FALSE:50,TNS_JSON_TYPE_STRING_LENGTH_UINT8:51,TNS_JSON_TYPE_NUMBER_LENGTH_UINT8:52,TNS_JSON_TYPE_BINARY_DOUBLE:54,TNS_JSON_TYPE_STRING_LENGTH_UINT16:55,TNS_JSON_TYPE_STRING_LENGTH_UINT32:56,TNS_JSON_TYPE_TIMESTAMP:57,TNS_JSON_TYPE_BINARY_LENGTH_UINT16:58,TNS_JSON_TYPE_BINARY_LENGTH_UINT32:59,TNS_JSON_TYPE_DATE:60,TNS_JSON_TYPE_INTERVAL_YM:61,TNS_JSON_TYPE_INTERVAL_DS:62,TNS_JSON_TYPE_TIMESTAMP_TZ:124,TNS_JSON_TYPE_TIMESTAMP7:125,TNS_JSON_TYPE_BINARY_FLOAT:127,TNS_JSON_TYPE_OBJECT:132,TNS_JSON_TYPE_ARRAY:192,TNS_JSON_TYPE_EXTENDED:123,TNS_JSON_TYPE_VECTOR:1,TNS_JSON_TYPE_ID:126,TZ_HOUR_OFFSET:20,TZ_MINUTE_OFFSET:60,TNS_MAX_SHORT_LENGTH:252,TNS_DURATION_MID:2147483648,TNS_DURATION_OFFSET:60,TNS_CHUNK_SIZE:32767,TNS_HAS_REGION_ID:128,NUMBER_MAX_DIGITS:40,BUFFER_CHUNK_SIZE:65536,CSFRM_IMPLICIT:r.CSFRM_IMPLICIT,VECTOR_FORMAT_FLOAT32:r.VECTOR_FORMAT_FLOAT32,VECTOR_FORMAT_FLOAT64:r.VECTOR_FORMAT_FLOAT64,VECTOR_FORMAT_INT8:r.VECTOR_FORMAT_INT8,TNS_NULL_LENGTH_INDICATOR:255,TNS_LONG_LENGTH_INDICATOR:254}},7034:(t,e,n)=>{"use strict";const{BaseBuffer:r,GrowableBuffer:i}=n(1559),{Buffer:s}=n(2562),o=n(5068),a=n(8041),u=n(6893),_=n(9023),c=n(8774),l=n(6770);class h{constructor(t,e){this.name=t,this.nameBytes=s.from(t),this.nameBytes.length>e&&a.throwErr(a.ERR_OSON_FIELD_NAME_LIMITATION,e),this.hashId=0x811C9DC5n;for(let t=0;t<this.nameBytes.length;t++){const e=BigInt(this.nameBytes[t]);this.hashId=16777619n*(this.hashId^e)&4294967295n}this.hashId=255&Number(this.hashId)}}class T extends i{constructor(){super(),this.fieldNames=[]}addName(t){t.offset=this.pos,t.nameBytes.length<=255?this.writeUInt8(t.nameBytes.length):this.writeUInt16BE(t.nameBytes.length),this.writeBytes(t.nameBytes),this.fieldNames.push(t)}_processFieldNames(t){this.fieldNames.sort(((t,e)=>t.hashId<e.hashId?-1:t.hashId>e.hashId?1:t.nameBytes.length<e.nameBytes.length?-1:t.nameBytes.length>e.nameBytes.length?1:t.name<e.name?-1:t.name>e.name?1:0));for(let e=0;e<this.fieldNames.length;e++)this.fieldNames[e].fieldId=t+e+1;this.fieldNames.length<256?this.fieldIdSize=1:this.fieldNames.length<65536?this.fieldIdSize=2:this.fieldIdSize=4}}class p extends i{_encodeArray(t,e){this._encodeContainer(o.TNS_JSON_TYPE_ARRAY,t.length);const n=4*t.length;let r=this.reserveBytes(n);for(const n of t)this.buf.writeUInt32BE(this.pos,r),r+=4,this.encodeNode(n,e)}_encodeContainer(t,e){t|=32,e>65535?t|=16:e>255&&(t|=8),this.writeUInt8(t),e<256?this.writeUInt8(e):e<65536?this.writeUInt16BE(e):this.writeUInt32BE(e)}_encodeObject(t,e){const n=t.values.length;this._encodeContainer(o.TNS_JSON_TYPE_OBJECT,n);let r=this.pos,i=this.pos+n*e.fieldIdSize;const s=i+4*n;this.reserveBytes(s-this.pos);for(let n=0;n<t.fields.length;n++){const s=e.fieldNamesMap.get(t.fields[n]);1==e.fieldIdSize?this.buf[r]=s.fieldId:2==e.fieldIdSize?this.buf.writeUInt16BE(s.fieldId,r):this.buf.writeUInt32BE(s.fieldId,r),this.buf.writeUInt32BE(this.pos,i),r+=e.fieldIdSize,i+=4,this.encodeNode(t.values[n],e)}}encodeNode(t,e){if(null==t)this.writeUInt8(o.TNS_JSON_TYPE_NULL);else if("boolean"==typeof t)t?this.writeUInt8(o.TNS_JSON_TYPE_TRUE):this.writeUInt8(o.TNS_JSON_TYPE_FALSE);else if("number"==typeof t)this.writeUInt8(o.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8),this.writeOracleNumber(t.toString());else if("string"==typeof t){const e=s.from(t);e.length<256?(this.writeUInt8(o.TNS_JSON_TYPE_STRING_LENGTH_UINT8),this.writeUInt8(e.length)):e.length<65536?(this.writeUInt8(o.TNS_JSON_TYPE_STRING_LENGTH_UINT16),this.writeUInt16BE(e.length)):(this.writeUInt8(o.TNS_JSON_TYPE_STRING_LENGTH_UINT32),this.writeUInt32BE(e.length)),e.length>0&&this.writeBytes(e)}else if(_.types.isDate(t))0===t.getUTCMilliseconds()?(this.writeUInt8(o.TNS_JSON_TYPE_TIMESTAMP7),this.writeOracleDate(t,u.DB_TYPE_DATE,!1)):(this.writeUInt8(o.TNS_JSON_TYPE_TIMESTAMP),this.writeOracleDate(t,u.DB_TYPE_TIMESTAMP,!1));else if(s.isBuffer(t))t.length<65536?(this.writeUInt8(o.TNS_JSON_TYPE_BINARY_LENGTH_UINT16),this.writeUInt16BE(t.length)):(this.writeUInt8(o.TNS_JSON_TYPE_BINARY_LENGTH_UINT32),this.writeUInt32BE(t.length)),this.writeBytes(t);else if(Array.isArray(t))this._encodeArray(t,e);else if(l.isVectorValue(t)){this.writeUInt8(o.TNS_JSON_TYPE_EXTENDED),this.writeUInt8(o.TNS_JSON_TYPE_VECTOR);const e=(new c.VectorEncoder).encode(t);this.writeUInt32BE(e.length),this.writeBytes(e)}else t instanceof u.JsonId?(this.writeUInt8(o.TNS_JSON_TYPE_ID),this.writeUInt8(t.length),this.writeBytes(s.from(t.buffer))):this._encodeObject(t,e)}}t.exports={OsonDecoder:class extends r{_decodeContainerNode(t){let e,n,r;const i=this.pos-this.treeSegPos-1;let s=this._getNumChildren(t);const o=!(64&t);if(void 0===s){const i=this._getOffset(t);n=this.pos,this.pos=this.treeSegPos+i;const a=this.readUInt8();s=this._getNumChildren(a),e=o?{}:new Array(s),r=this.pos}else o?(e={},r=this.pos,n=this.pos+this.fieldIdLength*s):(e=new Array(s),n=this.pos);for(let a=0;a<s;a++){let s;if(o){let t;t=1===this.fieldIdLength?this.buf[r]:2==this.fieldIdLength?this.buf.readUInt16BE(r):this.buf.readUInt32BE(r),s=this.fieldNames[t-1],r+=this.fieldIdLength}this.pos=n;let u=this._getOffset(t);this.relativeOffsets&&(u+=i),n=this.pos,this.pos=this.treeSegPos+u,o?e[s]=this._decodeNode():e[a]=this._decodeNode()}return e}_decodeNode(){let t=this.readUInt8();if(128&t)return this._decodeContainerNode(t);if(t===o.TNS_JSON_TYPE_NULL)return null;if(t===o.TNS_JSON_TYPE_TRUE)return!0;if(t===o.TNS_JSON_TYPE_FALSE)return!1;if(t===o.TNS_JSON_TYPE_DATE||t===o.TNS_JSON_TYPE_TIMESTAMP7)return this.parseOracleDate(this.readBytes(7));if(t===o.TNS_JSON_TYPE_TIMESTAMP)return this.parseOracleDate(this.readBytes(11));if(t===o.TNS_JSON_TYPE_TIMESTAMP_TZ)return this.parseOracleDate(this.readBytes(13));if(t===o.TNS_JSON_TYPE_BINARY_FLOAT)return this.parseBinaryFloat(this.readBytes(4));if(t===o.TNS_JSON_TYPE_BINARY_DOUBLE)return this.parseBinaryDouble(this.readBytes(8));if(t===o.TNS_JSON_TYPE_STRING_LENGTH_UINT8)return this.readBytes(this.readUInt8()).toString();if(t===o.TNS_JSON_TYPE_STRING_LENGTH_UINT16)return this.readBytes(this.readUInt16BE()).toString();if(t===o.TNS_JSON_TYPE_STRING_LENGTH_UINT32)return this.readBytes(this.readUInt32BE()).toString();if(t===o.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8)return parseFloat(this.readOracleNumber());if(t===o.TNS_JSON_TYPE_ID){const t=this.readBytes(this.readUInt8()),e=new u.JsonId(t.length);return t.copy(e),e}if(t===o.TNS_JSON_TYPE_BINARY_LENGTH_UINT16)return s.from(this.readBytes(this.readUInt16BE()));if(t===o.TNS_JSON_TYPE_BINARY_LENGTH_UINT32)return s.from(this.readBytes(this.readUInt32BE()));if(t===o.TNS_JSON_TYPE_EXTENDED&&(t=this.readUInt8(),t===o.TNS_JSON_TYPE_VECTOR)){const t=this.readBytes(this.readUInt32BE());return new c.VectorDecoder(t).decode()}const e=240&t;if(32===e||96===e){const e=15&t;return parseFloat(this.parseOracleNumber(this.readBytes(e+1)))}if(64===e||80===e){const e=15&t;return parseFloat(this.parseOracleNumber(this.readBytes(e)))}if(!(224&t))return 0===t?"":this.readBytes(t).toString();a.throwErr(a.ERR_UNSUPPORTED_DATA_TYPE_IN_JSON,t)}_getNumChildren(t){const e=24&t;return 0===e?this.readUInt8():8===e?this.readUInt16BE():16===e?this.readUInt32BE():void 0}_getOffset(t){return 32&t?this.readUInt32BE():this.readUInt16BE()}_getFieldNames(t,e,n,r,i){this.skipBytes(e*i);const s=this.pos;this.skipBytes(e*n);const o=this.readBytes(r),a=this.pos;let u;this.pos=s;for(let r=t;r<t+e;r++){let t;u=2===n?this.readUInt16BE():this.readUInt32BE(),t=1===i?o.readUInt8(u):o.readUInt16BE(u),this.fieldNames[r]=o.subarray(u+i,u+t+i).toString()}this.pos=a}decode(){const t=this.readBytes(3);t[0]===o.TNS_JSON_MAGIC_BYTE_1&&t[1]===o.TNS_JSON_MAGIC_BYTE_2&&t[2]===o.TNS_JSON_MAGIC_BYTE_3||a.throwErr(a.ERR_UNEXPECTED_DATA,t.toString("hex"));const e=this.readUInt8();e!==o.TNS_JSON_VERSION_MAX_FNAME_255&&e!==o.TNS_JSON_VERSION_MAX_FNAME_65535&&a.throwErr(a.ERR_OSON_VERSION_NOT_SUPPORTED,e);const n=this.readUInt16BE();if(this.relativeOffsets=n&o.TNS_JSON_FLAG_REL_OFFSET_MODE,n&o.TNS_JSON_FLAG_IS_SCALAR)return n&o.TNS_JSON_FLAG_TREE_SEG_UINT32?this.skipBytes(4):this.skipBytes(2),this._decodeNode();let r,i,s,u,_;n&o.TNS_JSON_FLAG_NUM_FNAMES_UINT32?(r=this.readUInt32BE(),this.fieldIdLength=4):n&o.TNS_JSON_FLAG_NUM_FNAMES_UINT16?(r=this.readUInt16BE(),this.fieldIdLength=2):(r=this.readUInt8(),this.fieldIdLength=1),n&o.TNS_JSON_FLAG_FNAMES_SEG_UINT32?(i=4,s=this.readUInt32BE()):(i=2,s=this.readUInt16BE());let c=0;return e===o.TNS_JSON_VERSION_MAX_FNAME_65535&&(u=this.readUInt16BE()&o.TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16?2:4,c=this.readUInt32BE(),_=this.readUInt32BE()),n&o.TNS_JSON_FLAG_TREE_SEG_UINT32?this.skipBytes(4):this.skipBytes(2),this.skipBytes(2),this.fieldNames=new Array(r+c),r>0&&this._getFieldNames(0,r,i,s,1),c>0&&this._getFieldNames(r,c,u,_,2),this.treeSegPos=this.pos,this._decodeNode()}},OsonEncoder:class extends i{_addFieldName(t){const e=new h(t,this.maxFieldNameSize);this.fieldNamesMap.set(t,e),e.nameBytes.length<=255?this.shortFieldNamesSeg.addName(e):(this.longFieldNamesSeg||(this.longFieldNamesSeg=new T),this.longFieldNamesSeg.addName(e))}_examineNode(t){if(Array.isArray(t))for(const e of t)this._examineNode(e);else if(t&&Array.isArray(t.fields))for(let e=0;e<t.fields.length;e++){const n=t.fields[e],r=t.values[e];this.fieldNamesMap.has(n)||this._addFieldName(n),this._examineNode(r)}}_writeExtendedHeader(){if(1===this.fieldIdSize?this.writeUInt8(this.shortFieldNamesSeg.fieldNames.length):2===this.fieldIdSize?this.writeUInt16BE(this.shortFieldNamesSeg.fieldNames.length):this.writeUInt32BE(this.shortFieldNamesSeg.fieldNames.length),this.shortFieldNamesSeg.pos<65536?this.writeUInt16BE(this.shortFieldNamesSeg.pos):this.writeUInt32BE(this.shortFieldNamesSeg.pos),this.longFieldNamesSeg){let t=0;this.longFieldNamesSeg.pos<65536&&(t=o.TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16),this.writeUInt16BE(t),this.writeUInt32BE(this.longFieldNamesSeg.fieldNames.length),this.writeUInt32BE(this.longFieldNamesSeg.pos)}}_writeFieldNamesSeg(t){for(const e of t.fieldNames)e.nameBytes.length<=255?this.writeUInt8(e.hashId):this.writeUInt16BE(e.hashId);for(const e of t.fieldNames)t.pos<65536?this.writeUInt16BE(e.offset):this.writeUInt32BE(e.offset);t.pos>0&&this.writeBytes(t.buf.subarray(0,t.pos))}encode(t,e){this.maxFieldNameSize=e;let n=o.TNS_JSON_FLAG_INLINE_LEAF;if(Array.isArray(t)||t&&Array.isArray(t.fields)){this.fieldNamesMap=new Map,this.shortFieldNamesSeg=new T,this._examineNode(t);let e=0;this.shortFieldNamesSeg&&(this.shortFieldNamesSeg._processFieldNames(0),e+=this.shortFieldNamesSeg.fieldNames.length),this.longFieldNamesSeg&&(this.longFieldNamesSeg._processFieldNames(e),e+=this.longFieldNamesSeg.fieldNames.length),n|=o.TNS_JSON_FLAG_HASH_ID_UINT8|o.TNS_JSON_FLAG_TINY_NODES_STAT,e>65535?(n|=o.TNS_JSON_FLAG_NUM_FNAMES_UINT32,this.fieldIdSize=4):e>255?(n|=o.TNS_JSON_FLAG_NUM_FNAMES_UINT16,this.fieldIdSize=2):this.fieldIdSize=1,this.shortFieldNamesSeg.pos>65535&&(n|=o.TNS_JSON_FLAG_FNAMES_SEG_UINT32)}else n|=o.TNS_JSON_FLAG_IS_SCALAR;const r=new p;return r.encodeNode(t,this),r.pos>65535&&(n|=o.TNS_JSON_FLAG_TREE_SEG_UINT32),this.writeUInt8(o.TNS_JSON_MAGIC_BYTE_1),this.writeUInt8(o.TNS_JSON_MAGIC_BYTE_2),this.writeUInt8(o.TNS_JSON_MAGIC_BYTE_3),this.longFieldNamesSeg?this.writeUInt8(o.TNS_JSON_VERSION_MAX_FNAME_65535):this.writeUInt8(o.TNS_JSON_VERSION_MAX_FNAME_255),this.writeUInt16BE(n),this.shortFieldNamesSeg&&this._writeExtendedHeader(),r.pos<65536?this.writeUInt16BE(r.pos):this.writeUInt32BE(r.pos),this.shortFieldNamesSeg&&(this.writeUInt16BE(0),this._writeFieldNamesSeg(this.shortFieldNamesSeg),this.longFieldNamesSeg&&this._writeFieldNamesSeg(this.longFieldNamesSeg)),this.writeBytes(r.buf.subarray(0,r.pos)),this.buf.subarray(0,this.pos)}}}},8774:(t,e,n)=>{"use strict";const{BaseBuffer:r,GrowableBuffer:i}=n(1559),{Buffer:s}=n(2562),o=n(5068),a=n(8041);t.exports={VectorDecoder:class extends r{decode(){const t=this.readUInt8();t!=o.TNS_VECTOR_MAGIC_BYTE&&a.throwErr(a.ERR_UNEXPECTED_DATA,s.from([t]).toString("hex"));const e=this.readUInt8();e!=o.TNS_VECTOR_VERSION&&a.throwErr(a.ERR_VECTOR_VERSION_NOT_SUPPORTED,e);const n=this.readUInt16BE(),r=this.readUInt8(),i=this.readUInt32BE();let u,_;r===o.VECTOR_FORMAT_FLOAT32?(u=4,_=new Float32Array(i)):r===o.VECTOR_FORMAT_FLOAT64?(u=8,_=new Float64Array(i)):r===o.VECTOR_FORMAT_INT8?(u=1,_=new Int8Array(i)):a.throwErr(a.ERR_VECTOR_FORMAT_NOT_SUPPORTED,r),n&o.TNS_VECTOR_FLAG_NORM&&this.skipBytes(8);for(let t=0;t<i;t++){const e=this.readBytes(u);r===o.VECTOR_FORMAT_FLOAT32?_[t]=this.parseBinaryFloat(e):r===o.VECTOR_FORMAT_FLOAT64?_[t]=this.parseBinaryDouble(e):_[t]=e[0]}return _}},VectorEncoder:class extends i{encode(t){let e=o.VECTOR_FORMAT_FLOAT32,n=this.writeBinaryFloat.bind(this);Array.isArray(t)||t instanceof Float64Array?(e=o.VECTOR_FORMAT_FLOAT64,n=this.writeBinaryDouble.bind(this)):t instanceof Int8Array&&(e=o.VECTOR_FORMAT_INT8,n=this.writeSB1.bind(this));const r=o.TNS_VECTOR_FLAG_NORM|o.TNS_VECTOR_FLAG_NORMSRC;return this.writeUInt8(o.TNS_VECTOR_MAGIC_BYTE),this.writeUInt8(o.TNS_VECTOR_VERSION),this.writeUInt16BE(r),this.writeUInt8(e),this.writeUInt32BE(t.length),this.reserveBytes(8),t.forEach((t=>{n(t)})),this.buf.subarray(0,this.pos)}}}},3034:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{constructor(t){this._objType=t}append(){r.throwNotImplemented("appending element to collection")}copy(){r.throwNotImplemented("copying an object")}deleteElement(){r.throwNotImplemented("deleting an element from a collection")}getElement(){r.throwNotImplemented("getting an element from a collection")}getFirstIndex(){r.throwNotImplemented("getting the first index in a collection")}getKeys(){r.throwNotImplemented("returning the keys of a collection")}getLastIndex(){r.throwNotImplemented("getting the last index in a collection")}getNextIndex(){r.throwNotImplemented("getting the next index in a collection")}getPrevIndex(){r.throwNotImplemented("getting the previous index in a collection")}getValues(){r.throwNotImplemented("getting the values in a collection")}hasElement(){r.throwNotImplemented("getting if value exists in a collection")}setElement(){r.throwNotImplemented("setting an element in a collection")}trim(){r.throwNotImplemented("trimming elements from a collection")}}},851:(t,e,n)=>{"use strict";const r=n(1905),i=n(4117),s=n(2894),o=n(4610),a=n(3034),u=n(44),_=n(6634),c=n(1217),l=n(9700),h=n(2870),T=n(6243),p=n(2216),f=n(3559),E=n(301);t.exports={AqDeqOptionsImpl:r,AqEnqOptionsImpl:i,AqMessageImpl:s,AqQueueImpl:o,DbObjectImpl:a,ConnectionImpl:u,LobImpl:_,PoolImpl:c,ResultSetImpl:l,SodaCollectionImpl:h,SodaDatabaseImpl:T,SodaDocCursorImpl:p,SodaDocumentImpl:f,SodaOperationImpl:E}},6634:(t,e,n)=>{"use strict";const r=n(44),i=n(8041);t.exports=class{_getConnImpl(){let t=this._parentObj;for(;!(t instanceof r);)t=t._parentObj;return t}close(){i.throwNotImplemented("closing a LOB")}getData(){i.throwNotImplemented("getting all of the data from a LOB")}read(){i.throwNotImplemented("reading from a LOB")}write(){i.throwNotImplemented("writing to a LOB")}}},1217:(t,e,n)=>{"use strict";const r=n(8041),i=n(6770);t.exports=class{async _accessTokenHandler(t,e,n,s){let o;try{let e=t(n,s);e instanceof Promise&&(e=await e),i.isTokenValid(e)||r.throwErr(r.ERR_TOKEN_HAS_EXPIRED),"object"==typeof e&&void 0!==e.privateKey&&(e.privateKey=i.denormalizePrivateKey(e.privateKey)),o=e}finally{this.returnAccessToken(e,o)}}close(){r.throwNotImplemented("closing the pool")}create(){r.throwNotImplemented("creating the pool")}getConnection(){r.throwNotImplemented("getting a connection from the pool")}getConnectionsInUse(){r.throwNotImplemented("getting num connection in use")}getConnectionsOpen(){r.throwNotImplemented("getting num connection open")}getPoolIncrement(){r.throwNotImplemented("getting the pool increment")}getPoolMax(){r.throwNotImplemented("getting the pool max")}getPoolMaxPerShard(){r.throwNotImplemented("getting the pool max per shard")}getPoolMin(){r.throwNotImplemented("getting the pool min")}getPoolPingInterval(){r.throwNotImplemented("getting the pool ping interval")}getPoolPingTimeout(){r.throwNotImplemented("getting the pool ping Timeout")}getPoolTimeout(){r.throwNotImplemented("getting the pool timeout")}getStmtCacheSize(){r.throwNotImplemented("getting the pool statement cache size")}getSodaMetaDataCache(){r.throwNotImplemented("getting the SODA metadata cache flag")}reconfigure(){r.throwNotImplemented("reconfiguring the pool")}setAccessToken(){r.throwNotImplemented("sets the access token")}}},9700:(t,e,n)=>{"use strict";const r=n(2269),i=n(8041),s=n(6770),o=n(8023),a=n(5377),u=n(6893),_=n(2733),c=n(7034);t.exports=class{_determineFetchType(t,e){if(delete t.fetchType,delete t.converter,e.fetchTypeHandler){const n=e.fetchTypeHandler(t);void 0!==n&&(i.assert("object"==typeof n,i.ERR_FETCH_TYPE_HANDLER_RETURN_VALUE),void 0!==n.type&&i.assert(n.type instanceof u.DbType,i.ERR_FETCH_TYPE_HANDLER_TYPE),void 0!==n.converter&&i.assert("function"==typeof n.converter,i.ERR_FETCH_TYPE_HANDLER_CONVERTER),t.fetchType=n.type,t.converter=n.converter)}if(t.fetchType||(e.fetchTypeMap&&e.fetchTypeMap.has(t.name)?(t.fetchType=e.fetchTypeMap.get(t.name),t.fetchType===r.DEFAULT&&(t.fetchType=u.DB_TYPE_FETCH_TYPE_MAP.get(t.dbType))):t.fetchType=o.fetchTypeMap.get(t.dbType)),t.fetchType!==t.dbType){const e=u.DB_TYPE_CONVERSION_MAP.get(t.dbType),n=e&&e.get(t.fetchType);n||i.throwErr(i.ERR_UNSUPPORTED_CONVERSION,t.dbType.name,t.fetchType.name),t.fetchType=n}let n;const s=t.converter;if(t.dbType!==u.DB_TYPE_JSON&&a.oldJsonColumnAsObj&&void 0===s){let e;t.isOson?(e=async function(t){if(!t)return t;let e=t;return t instanceof _&&(e=await t.getData()),new c.OsonDecoder(e).decode()},n=e):t.isJson&&(e=async function(t){if(!t)return t;let e=t;return t instanceof _&&(e=await t.getData()),e instanceof Buffer&&(e=e.toString()),e=JSON.parse(e),e},n=e)}if(o.thin&&(t.dbType===u.DB_TYPE_NUMBER&&t.fetchType===u.DB_TYPE_NUMBER?n=t=>null===t?null:parseFloat(t):t.fetchType===u.DB_TYPE_VARCHAR?t.dbType===u.DB_TYPE_BINARY_DOUBLE||t.dbType===u.DB_TYPE_BINARY_FLOAT||t.dbType===u.DB_TYPE_DATE||t.dbType===u.DB_TYPE_TIMESTAMP||t.dbType===u.DB_TYPE_TIMESTAMP_LTZ||t.dbType===u.DB_TYPE_TIMESTAMP_TZ?n=t=>null===t?null:t.toString():t.dbType===u.DB_TYPE_RAW&&(n=t=>null===t?null:t.toString("hex").toUpperCase()):t.dbType===u.DB_TYPE_XMLTYPE&&(n=async function(t){return t?"string"==typeof t?t:await t.getData():t}),s&&n)){const t=n;n=e=>s(t(e))}n&&(t.converter=n)}_getConnImpl(){return this._parentObj}_setup(t,e){this._parentObj=t.connection._impl,this.metaData=e,this.lobIndices=[],this.dbObjectIndices=[],this.nestedCursorIndices=[],this.converterIndices=[],this.outFormat=t.outFormat,this.fetchArraySize=t.fetchArraySize,this.dbObjectAsPojo=t.dbObjectAsPojo,this.maxRows=t.maxRows;const n=new Map;for(let t=0;t<e.length;t++){const r=e[t].name;n.has(r)||n.set(r,t)}for(let r=0;r<e.length;r++){const i=e[r];if(i.dbTypeClass){const e=t.connection._getDbObjectClass(i.dbTypeClass);i.dbTypeClass=e}s.addTypeProperties(i,"dbType"),this._determineFetchType(i,t),i.fetchType===u.DB_TYPE_CURSOR?this.nestedCursorIndices.push(r):i.fetchType===u.DB_TYPE_CLOB||i.fetchType===u.DB_TYPE_NCLOB||i.fetchType===u.DB_TYPE_BLOB?this.lobIndices.push(r):i.fetchType===u.DB_TYPE_OBJECT&&this.dbObjectIndices.push(r),i.converter&&this.converterIndices.push(r);let o=i.name;if(n.get(o)!==r){let t=0;for(;n.has(o);)t+=1,o=`${i.name}_${t}`;n.set(o,r),i.name=o}}}close(){i.throwNotImplemented("closing a result set")}getRows(){i.throwNotImplemented("getting rows")}}},2870:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{_getConnImpl(){return this._database._connection}createIndex(){r.throwNotImplemented("creating an index on a SODA collection")}drop(){r.throwNotImplemented("dropping a SODA collection")}dropIndex(){r.throwNotImplemented("dropping an index on a SODA collection")}find(){r.throwNotImplemented("creating a SODA operation")}getDataGuide(){r.throwNotImplemented("getting the data guide for the collection")}getMetaData(){r.throwNotImplemented("getting the metadata for the collection")}getName(){r.throwNotImplemented("getting the name of the collection")}insertMany(){r.throwNotImplemented("inserting multiple docs into a collection")}insertManyAndGet(){r.throwNotImplemented("insert/return many docs in a collection")}insertOne(){r.throwNotImplemented("inserting a single doc into a collection")}insertOneAndGet(){r.throwNotImplemented("insert/return a single doc in a collection")}save(){r.throwNotImplemented("saving a single doc in a collection")}saveAndGet(){r.throwNotImplemented("saving a single doc in a collection")}truncate(){r.throwNotImplemented("removing all docs from a collection")}}},6243:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{_getConnImpl(){return this._connection}createCollection(){r.throwNotImplemented("creating a SODA collection")}createDocument(){r.throwNotImplemented("creating a SODA document")}getCollectionNames(){r.throwNotImplemented("getting a list of SODA collection names")}openCollection(){r.throwNotImplemented("getting a list of SODA collection names")}}},2216:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{_getConnImpl(){return this._operation._getConnImpl()}close(){r.throwNotImplemented("closing a SODA document cursor")}getNext(){r.throwNotImplemented("getting a document from a SODA doc cursor")}}},3559:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{getContentAsBuffer(){r.throwNotImplemented("getting doc content as a buffer")}getContentAsString(){r.throwNotImplemented("getting doc content as a string")}getCreatedOn(){r.throwNotImplemented("getting the created date of a document")}getKey(){r.throwNotImplemented("getting the key of a document")}getLastModified(){r.throwNotImplemented("getting the last modified date of a doc")}getMediaType(){r.throwNotImplemented("getting the media type of a document")}getVersion(){r.throwNotImplemented("getting the version of a document")}}},301:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{_getConnImpl(){return this._collection._database._connection}count(){r.throwNotImplemented("getting a count of documents")}getCursor(){r.throwNotImplemented("getting a cursor for documents")}getDocuments(){r.throwNotImplemented("getting a cursor for documents")}getOne(){r.throwNotImplemented("getting a single document")}remove(){r.throwNotImplemented("removing documents from a collection")}replaceOne(){r.throwNotImplemented("replacing a single document")}replaceOneAndGet(){r.throwNotImplemented("replacing/returning a single document")}}},2733:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),{Duplex:i}=n(2203),s=n(2269),o=n(8041),a=n(6770),u=n(6893);class _ extends i{constructor(){super({decodeStrings:!1}),this.offset=1,this._isActive=!1,this.once("finish",(function(){this._autoCloseLob&&this.destroy()}))}async _destroy(t,e){if(t&&t.message.startsWith("NJS-003:")&&delete this._impl,this._impl){const t=this._impl;delete this._impl;try{await t.close()}catch(t){return void e(t)}}e(t)}async _read(){try{const t=await this._serializedRead(this.offset);t?(this.offset+=t.length,this.push(t)):(this.push(null),this._autoCloseLob&&this.destroy())}catch(t){throw this._autoCloseLob&&this.destroy(t),t}}async _readData(t){o.assert(this._impl,o.ERR_INVALID_LOB);try{return await this._impl.read(t)}catch(t){throw o.transformErr(t,this._readData)}}_setup(t,e){this._impl=t,this._chunkSize=t.getChunkSize(),this._pieceSize=t.getPieceSize(),this._length=t.getLength(),this._type=t.getType(),"number"==typeof this._type&&(this._type=u.getTypeByNum(this._type)),this._autoCloseLob=e}async _write(t,e,n){this.type!=s.DB_TYPE_BLOB||r.isBuffer(t)?this.type==s.DB_TYPE_CLOB&&r.isBuffer(t)&&(t=t.toString()):t=r.from(t);try{await this._serializedWrite(this.offset,t)}catch(t){return this._autoCloseLob&&this.destroy(t),void n(t)}this.offset+=t.length,n(null)}async _writeData(t,e){o.assert(this._impl,o.ERR_INVALID_LOB);try{await this._impl.write(t,e)}catch(t){throw o.transformErr(t,this._writeData)}}get chunkSize(){return this._chunkSize}async close(){if(o.assertArgCount(arguments,0,0),this._impl){const t=this._impl;delete this._impl;try{await t.close(),this.emit("close")}catch(t){this.destroy(t)}}}async getData(t,e){return o.assertArgCount(arguments,0,2),void 0===t?t=1:o.assertParamValue(Number.isInteger(t)&&t>0,1),void 0===e?e=0:o.assertParamValue(Number.isInteger(e)&&e>0,2),o.assert(this._impl,o.ERR_INVALID_LOB),await this._impl.getData(t,e)}get length(){return this._length}get pieceSize(){return this._pieceSize}set pieceSize(t){o.assertPropValue(Number.isInteger(t)&&t>=0,"pieceSize"),o.assert(this._impl,o.ERR_INVALID_LOB),this._impl.setPieceSize(t),this._pieceSize=t}get type(){return this._type}}a.wrapFns(_.prototype,o.ERR_BUSY_LOB,"close","getData"),_.prototype._serializedRead=a.serialize(_.prototype._readData),_.prototype._serializedWrite=a.serialize(_.prototype._writeData),t.exports=_},6434:(t,e,n)=>{"use strict";const r=n(2269),i=n(6770),s=n(8041),o=n(6893),a=n(851),u=n(932),_=n(9023),c=u.version.substring(1).split(".").map(Number);s.assert(c[0]>14||14===c[0]&&c[1]>=6,s.ERR_NODE_TOO_OLD,i.PACKAGE_JSON_VERSION,"14.6");const l=n(856),h=n(596),T=n(1425),p=n(1337),f=n(5377),E=n(7647),d=n(6530),N=n(2733),S=n(7784),m=n(6287),A=n(9891),P=n(8023),g=n(198),y=n(7547),R=n(9947),I=n(3434),D=n(9698),O={},C={},b="default";let v;function w(){n(150)}async function L(t,e){const n={};if(void 0!==t.user&&(s.assertParamPropValue("string"==typeof t.user,1,"user"),n.user=t.user),void 0!==t.username&&(s.assert(void 0===n.user,s.ERR_DBL_USER),s.assertParamPropValue("string"==typeof t.username,1,"username"),n.user=t.username),void 0!==t.password&&(s.assertParamPropValue("string"==typeof t.password,1,"password"),n.password=t.password),void 0!==t.connectString&&(s.assertParamPropValue("string"==typeof t.connectString,1,"connectString"),n.connectString=t.connectString),void 0!==t.connectionString&&(s.assert(void 0===n.connectString,s.ERR_DBL_CONNECT_STRING),s.assertParamPropValue("string"==typeof t.connectionString,1,"connectionString"),n.connectString=t.connectionString),void 0!==t.walletPassword&&(s.assertParamPropValue("string"==typeof t.walletPassword,1,"walletPassword"),n.walletPassword=t.walletPassword),void 0!==t.walletLocation&&(s.assertParamPropValue("string"==typeof t.walletLocation,1,"walletLocation"),n.walletLocation=t.walletLocation),void 0!==t.edition&&(s.assertParamPropValue("string"==typeof t.edition,1,"edition"),n.edition=t.edition),void 0!==t.stmtCacheSize&&(s.assertParamPropValue(Number.isInteger(t.stmtCacheSize)&&t.stmtCacheSize>=0,1,"stmtCacheSize"),n.stmtCacheSize=t.stmtCacheSize),n.externalAuth=P.externalAuth,void 0!==t.externalAuth&&(s.assertParamPropValue("boolean"==typeof t.externalAuth,1,"externalAuth"),n.externalAuth=t.externalAuth),void 0!==t.events&&(s.assertParamPropValue("boolean"==typeof t.events,1,"events"),n.events=t.events),void 0!==t.poolAlias&&(s.assertParamPropValue("string"==typeof t.poolAlias&&t.poolAlias.length>0,1,"poolAlias"),n.poolAlias=t.poolAlias),void 0!==t.configDir&&(s.assertParamPropValue("string"==typeof t.configDir,1,"configDir"),n.configDir=t.configDir),void 0!==t.sslServerCertDN&&(s.assertParamPropValue("string"==typeof t.sslServerCertDN,1,"sslServerCertDN"),n.sslServerCertDN=t.sslServerCertDN),void 0!==t.sslServerDNMatch&&(s.assertParamPropValue("boolean"==typeof t.sslServerDNMatch,1,"sslServerDNMatch"),n.sslServerDNMatch=t.sslServerDNMatch),void 0!==t.sslAllowWeakDNMatch&&(s.assertParamPropValue("boolean"==typeof t.sslAllowWeakDNMatch,1,"sslAllowWeakDNMatch"),n.sslAllowWeakDNMatch=t.sslAllowWeakDNMatch),void 0!==t.httpsProxy&&(s.assertParamPropValue("string"==typeof t.httpsProxy,1,"httpsProxy"),n.httpsProxy=t.httpsProxy),void 0!==t.httpsProxyPort&&(s.assertParamPropValue(Number.isInteger(t.httpsProxyPort)&&t.httpsProxyPort>=0,1,"httpsProxyPort"),n.httpsProxyPort=t.httpsProxyPort),void 0!==t.retryCount&&(s.assertParamPropValue(Number.isInteger(t.retryCount)&&t.retryCount>=0,1,"retryCount"),n.retryCount=t.retryCount),void 0!==t.retryDelay&&(s.assertParamPropValue(Number.isInteger(t.retryDelay)&&t.retryDelay>=0,1,"retryDelay"),n.retryDelay=t.retryDelay),void 0!==t.connectTimeout&&(s.assertParamPropValue(Number.isInteger(t.connectTimeout)&&t.connectTimeout>=0,1,"connectTimeout"),n.connectTimeout=t.connectTimeout),void 0!==t.transportConnectTimeout&&(s.assertParamPropValue(Number.isInteger(t.transportConnectTimeout)&&t.transportConnectTimeout>=0,1,"transportConnectTimeout"),n.transportConnectTimeout=t.transportConnectTimeout),void 0!==t.expireTime&&(s.assertParamPropValue(Number.isInteger(t.expireTime)&&t.expireTime>=0,1,"expireTime"),n.expireTime=t.expireTime),void 0!==t.sdu&&(s.assertParamPropValue(Number.isInteger(t.sdu)&&t.sdu>0,1,"sdu"),n.sdu=t.sdu),void 0!==t.connectionIdPrefix&&(s.assertParamPropValue("string"==typeof t.connectionIdPrefix,1,"connectionIdPrefix"),n.connectionIdPrefix=t.connectionIdPrefix),void 0!==t.privilege&&(s.assertParamPropValue(i.isPrivilege(t.privilege),1,"privilege"),n.privilege=t.privilege),e)void 0!==t.poolMax&&(s.assertParamPropValue(Number.isInteger(t.poolMax)&&t.poolMax>0,1,"poolMax"),n.poolMax=t.poolMax),void 0!==t.poolMaxPerShard&&(s.assertParamPropValue(Number.isInteger(t.poolMaxPerShard)&&t.poolMaxPerShard>=0,1,"poolMaxPerShard"),n.poolMaxPerShard=t.poolMaxPerShard),void 0!==t.poolMin&&(s.assertParamPropValue(Number.isInteger(t.poolMin)&&t.poolMin>=0,1,"poolMin"),n.poolMin=t.poolMin),void 0!==t.poolIncrement&&(s.assertParamPropValue(Number.isInteger(t.poolIncrement)&&t.poolIncrement>=0,1,"poolIncrement"),n.poolIncrement=t.poolIncrement),void 0!==t.poolTimeout&&(s.assertParamPropValue(Number.isInteger(t.poolTimeout)&&t.poolTimeout>=0,1,"poolTimeout"),n.poolTimeout=t.poolTimeout),void 0!==t.poolPingInterval&&(s.assertParamPropValue(Number.isInteger(t.poolPingInterval)&&t.poolPingInterval>=-2147483648&&t.poolPingInterval<=2147483647,1,"poolPingInterval"),n.poolPingInterval=t.poolPingInterval),void 0!==t.poolPingTimeout&&(s.assertParamPropValue(Number.isInteger(t.poolPingTimeout)&&t.poolPingTimeout>=0,1,"poolPingTimeout"),n.poolPingTimeout=t.poolPingTimeout),n.homogeneous=!0,void 0!==t.homogeneous&&(s.assertParamPropValue("boolean"==typeof t.homogeneous,1,"homogeneous"),n.homogeneous=t.homogeneous),void 0!==t.queueTimeout&&(s.assertParamPropValue(Number.isInteger(t.queueTimeout)&&t.queueTimeout>=0,1,"queueTimeout"),n.queueTimeout=t.queueTimeout),void 0!==t.queueMax&&(s.assertParamPropValue(Number.isInteger(t.queueMax),1,"queueMax"),n.queueMax=t.queueMax),n.sodaMetaDataCache=!1,void 0!==t.sodaMetaDataCache&&(s.assertParamPropValue("boolean"==typeof t.sodaMetaDataCache,1,"sodaMetaDataCache"),n.sodaMetaDataCache=t.sodaMetaDataCache),void 0!==t.sessionCallback&&(s.assertParamPropValue("string"==typeof t.sessionCallback||"function"==typeof t.sessionCallback,1,"sessionCallback"),n.sessionCallback=t.sessionCallback),n.enableStatistics=!1,void 0!==t.enableStatistics&&(s.assertParamPropValue("boolean"==typeof t.enableStatistics,1,"enableStatistics"),n.enableStatistics=t.enableStatistics),n.enableStatistics||void 0===t._enableStats||(s.assertParamPropValue("boolean"==typeof t._enableStats,1,"_enableStats"),n.enableStatistics=t._enableStats);else{if(void 0!==t.newPassword&&(s.assertParamPropValue("string"==typeof t.newPassword,1,"newPassword"),n.newPassword=t.newPassword),void 0!==t.shardingKey){const e=t.shardingKey;s.assertParamPropValue(i.isShardingKey(e),1,"shardingKey"),n.shardingKey=t.shardingKey}if(void 0!==t.superShardingKey){const e=t.superShardingKey;s.assertParamPropValue(i.isShardingKey(e),1,"superShardingKey"),n.superShardingKey=t.superShardingKey}}if(void 0!==t.accessToken){let r;s.assert(void 0===n.user&&void 0===n.password,s.ERR_TOKEN_BASED_AUTH),e?s.assert(n.homogeneous&&n.externalAuth,s.ERR_POOL_TOKEN_BASED_AUTH):s.assert(n.externalAuth,s.ERR_CONN_TOKEN_BASED_AUTH),"function"==typeof t.accessToken?(n.accessTokenFn=t.accessToken,n.accessTokenConfig=t.accessTokenConfig,r=await t.accessToken(!1,t.accessTokenConfig),i.isTokenValid(r)||(r=await t.accessToken(!0,t.accessTokenConfig))):r=t.accessToken,s.assert(i.isTokenValid(r),s.ERR_TOKEN_HAS_EXPIRED),void 0!==r.privateKey&&(s.assert("string"==typeof r.privateKey,s.ERR_TOKEN_BASED_AUTH),r.privateKey=i.denormalizePrivateKey(r.privateKey)),"string"==typeof r?n.token=r:(n.token=r.token,n.privateKey=r.privateKey)}return void 0===n.token&&n.externalAuth&&(n.password&&s.throwErr(s.ERR_WRONG_CRED_FOR_EXTAUTH),n.user&&(e?s.throwErr(s.ERR_WRONG_CRED_FOR_EXTAUTH):"["===n.user[0]&&"]"===n.user.slice(-1)||s.throwErr(s.ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY))),n}t.exports={AqDeqOptions:l,AqEnqOptions:h,AqMessage:T,AqQueue:p,BaseDbObject:E,Connection:d,JsonId:o.JsonId,Lob:N,Pool:S,PoolStatistics:m,ResultSet:A,SodaDatabase:g,SodaCollection:y,SodaDocCursor:R,SodaDocument:I,SodaOperation:D,getConnection:i.callbackify((async function(t){let e,n={};if(s.assertArgCount(arguments,0,1),0==arguments.length?e=b:"string"==typeof t?e=t:(n=t,s.assertParamValue(i.isObject(n),1),e=n.poolAlias),e){const t=O[e];return s.assert(t,s.ERR_POOL_WITH_ALIAS_NOT_FOUND,e),await t.getConnection(n)}n=await L(n,!1),P.addToOptions(n,"connectionClass","edition","events","externalAuth","stmtCacheSize"),void 0!==v||P.thinDriverInitialized||w();const r=new d;return r._impl=new a.ConnectionImpl,await r._impl.connect(n),void 0===v&&(P.thinDriverInitialized=!0),r})),createPool:i.callbackify((async function(t){let e;s.assertArgCount(arguments,1,1),s.assertParamValue(i.isObject(t),1);const n=(t=await L(t,!0)).sessionCallback;"function"==typeof n&&delete t.sessionCallback,void 0!==t.poolAlias?e=t.poolAlias:void 0!==t.poolAlias||O[b]||C[b]||(e=b),(O[e]||C[e])&&s.throwErr(s.ERR_POOL_WITH_ALIAS_ALREADY_EXISTS,e),P.addToOptions(t,"connectionClass","edition","events","externalAuth","stmtCacheSize","poolMax","poolMaxPerShard","poolMin","poolIncrement","poolTimeout","poolPingInterval","poolPingTimeout","queueMax","queueTimeout"),t.poolMin>t.poolMax&&s.throwErr(s.ERR_INVALID_NUMBER_OF_CONNECTIONS,t.poolMax,t.poolMin),void 0!==v||P.thinDriverInitialized||w(),e&&(C[e]=!0);const r=new S;try{await r._impl.create(t)}finally{e&&delete C[e]}return e&&(O[e]=r),r._setup(t,e),r._sessionCallback=n,r.on("_afterPoolClose",(()=>{r.poolAlias&&delete O[r.poolAlias]})),void 0===v&&(P.thinDriverInitialized=!0),r})),getPool:function(t){s.assertArgCount(arguments,0,1),t&&s.assertParamValue("string"==typeof t||"number"==typeof t,1);const e=O[t=t||b];return e||s.throwErr(s.ERR_POOL_WITH_ALIAS_NOT_FOUND,t),e},initOracleClient:function(t){let e={};if(s.assertArgCount(arguments,0,1),void 0!==t&&(s.assertParamValue(i.isObject(t),1),e={...t},s.assertParamPropString(e,1,"libDir"),s.assertParamPropString(e,1,"configDir"),s.assertParamPropString(e,1,"errorUrl"),s.assertParamPropString(e,1,"driverName"),s.assertParamPropString(e,1,"binaryDir")),P.thinDriverInitialized&&s.throwErr(s.ERR_THIN_CONNECTION_ALREADY_CREATED),void 0===v){const o=function(t){const e="function"==typeof require?require:n(7342),r=["../"+i.RELEASE_DIR+"/"+i.BINARY_FILE,"../"+i.RELEASE_DIR+"/"+i.BUILD_FILE,"../build/Debug/"+i.BUILD_FILE,"./node_modules/oracledb/"+i.RELEASE_DIR+"/"+i.BINARY_FILE,"./node_modules/oracledb/"+i.RELEASE_DIR+"/"+i.BUILD_FILE];let o;void 0!==t.binaryDir&&r.splice(0,0,t.binaryDir+"/"+i.BINARY_FILE,t.binaryDir+"/"+i.BUILD_FILE);for(let t=0;t<r.length;t++)try{o=e(r[t]);break}catch(e){if("MODULE_NOT_FOUND"!==e.code||t==r.length-1){let t;t="MODULE_NOT_FOUND"===e.code?`\n Looked for ${r.map((t=>n(6928).resolve(__dirname,t))).join(", ")}\n ${i.getInstallURL()}\n`:`\n Node.js require('oracledb') error was:\n ${e.message}\n ${i.getInstallHelp()}\n`,s.throwErr(s.ERR_CANNOT_LOAD_BINARY,t)}}return o}(e);void 0===e.driverName&&(e.driverName=r.DEFAULT_DRIVER_NAME+" thk"),void 0===e.errorUrl&&(e.errorUrl=r.DEFAULT_ERROR_URL);try{o.initOracleClient(e,a,P)}catch(t){const e=s.transformErr(t);throw"DPI-1047"===e.code&&(e.message+="\n"+i.getInstallHelp()),e}v=t||{}}else _.isDeepStrictEqual(v,e)||s.throwErr(s.ERR_INIT_ORACLE_CLIENT_ARGS);P.thin=!1},shutdown:i.callbackify((async function(t,e){let n={},i=r.SHUTDOWN_MODE_DEFAULT;s.assertArgCount(arguments,0,2),2==arguments.length?(s.assertParamValue("object"==typeof t,1),s.assertParamValue("number"==typeof e,2),n=t,i=e):1==arguments.length&&(s.assertParamValue("object"==typeof t,1),n=t);const o={user:n.user,password:n.password,connectString:n.connectString,connectionString:n.connectionString,externalAuth:n.externalAuth,privilege:r.SYSOPER},a=await this.getConnection(o);await a.shutdown(i),i!=this.SHUTDOWN_MODE_ABORT&&(await a.execute("ALTER DATABASE CLOSE"),await a.execute("ALTER DATABASE DISMOUNT"),await a.shutdown(this.SHUTDOWN_MODE_FINAL)),await a.close()})),startup:i.callbackify((async function(t,e){let n={},r={};s.assertArgCount(arguments,0,2),2==arguments.length?(s.assertParamValue("object"==typeof t,1),s.assertParamValue("object"==typeof e,2),n=t,r=e):1==arguments.length&&(s.assertParamValue("object"==typeof t,1),n=t);const i={user:n.user,password:n.password,connectString:n.connectString,connectionString:n.connectionString,externalAuth:n.externalAuth,privilege:this.SYSOPER|this.SYSPRELIM};let o=await this.getConnection(i);await o.startup(r),await o.close(),i.privilege=this.SYSOPER,o=await this.getConnection(i),await o.execute("ALTER DATABASE MOUNT"),await o.execute("ALTER DATABASE OPEN"),await o.close()})),CQN_OPCODE_ALL_OPS:r.CQN_OPCODE_ALL_OPS,CQN_OPCODE_ALL_ROWS:r.CQN_OPCODE_ALL_ROWS,CQN_OPCODE_ALTER:r.CQN_OPCODE_ALTER,CQN_OPCODE_DELETE:r.CQN_OPCODE_DELETE,CQN_OPCODE_DROP:r.CQN_OPCODE_DROP,CQN_OPCODE_INSERT:r.CQN_OPCODE_INSERT,CQN_OPCODE_UPDATE:r.CQN_OPCODE_UPDATE,DB_TYPE_BFILE:o.DB_TYPE_BFILE,DB_TYPE_BINARY_DOUBLE:o.DB_TYPE_BINARY_DOUBLE,DB_TYPE_BINARY_FLOAT:o.DB_TYPE_BINARY_FLOAT,DB_TYPE_BINARY_INTEGER:o.DB_TYPE_BINARY_INTEGER,DB_TYPE_BLOB:o.DB_TYPE_BLOB,DB_TYPE_BOOLEAN:o.DB_TYPE_BOOLEAN,DB_TYPE_CHAR:o.DB_TYPE_CHAR,DB_TYPE_CLOB:o.DB_TYPE_CLOB,DB_TYPE_CURSOR:o.DB_TYPE_CURSOR,DB_TYPE_DATE:o.DB_TYPE_DATE,DB_TYPE_INTERVAL_DS:o.DB_TYPE_INTERVAL_DS,DB_TYPE_INTERVAL_YM:o.DB_TYPE_INTERVAL_YM,DB_TYPE_JSON:o.DB_TYPE_JSON,DB_TYPE_LONG:o.DB_TYPE_LONG,DB_TYPE_LONG_NVARCHAR:o.DB_TYPE_LONG_NVARCHAR,DB_TYPE_LONG_RAW:o.DB_TYPE_LONG_RAW,DB_TYPE_NCHAR:o.DB_TYPE_NCHAR,DB_TYPE_NCLOB:o.DB_TYPE_NCLOB,DB_TYPE_NUMBER:o.DB_TYPE_NUMBER,DB_TYPE_NVARCHAR:o.DB_TYPE_NVARCHAR,DB_TYPE_OBJECT:o.DB_TYPE_OBJECT,DB_TYPE_RAW:o.DB_TYPE_RAW,DB_TYPE_ROWID:o.DB_TYPE_ROWID,DB_TYPE_TIMESTAMP:o.DB_TYPE_TIMESTAMP,DB_TYPE_TIMESTAMP_LTZ:o.DB_TYPE_TIMESTAMP_LTZ,DB_TYPE_TIMESTAMP_TZ:o.DB_TYPE_TIMESTAMP_TZ,DB_TYPE_VARCHAR:o.DB_TYPE_VARCHAR,DB_TYPE_XMLTYPE:o.DB_TYPE_XMLTYPE,DB_TYPE_VECTOR:o.DB_TYPE_VECTOR,DEFAULT:r.DEFAULT,STMT_TYPE_UNKNOWN:r.STMT_TYPE_UNKNOWN,STMT_TYPE_SELECT:r.STMT_TYPE_SELECT,STMT_TYPE_UPDATE:r.STMT_TYPE_UPDATE,STMT_TYPE_DELETE:r.STMT_TYPE_DELETE,STMT_TYPE_INSERT:r.STMT_TYPE_INSERT,STMT_TYPE_CREATE:r.STMT_TYPE_CREATE,STMT_TYPE_DROP:r.STMT_TYPE_DROP,STMT_TYPE_ALTER:r.STMT_TYPE_ALTER,STMT_TYPE_BEGIN:r.STMT_TYPE_BEGIN,STMT_TYPE_DECLARE:r.STMT_TYPE_DECLARE,STMT_TYPE_CALL:r.STMT_TYPE_CALL,STMT_TYPE_EXPLAIN_PLAN:r.STMT_TYPE_EXPLAIN_PLAN,STMT_TYPE_MERGE:r.STMT_TYPE_MERGE,STMT_TYPE_ROLLBACK:r.STMT_TYPE_ROLLBACK,STMT_TYPE_COMMIT:r.STMT_TYPE_COMMIT,SHUTDOWN_MODE_DEFAULT:r.SHUTDOWN_MODE_DEFAULT,SHUTDOWN_MODE_TRANSACTIONAL:r.SHUTDOWN_MODE_TRANSACTIONAL,SHUTDOWN_MODE_TRANSACTIONAL_LOCAL:r.SHUTDOWN_MODE_TRANSACTIONAL_LOCAL,SHUTDOWN_MODE_IMMEDIATE:r.SHUTDOWN_MODE_IMMEDIATE,SHUTDOWN_MODE_ABORT:r.SHUTDOWN_MODE_ABORT,SHUTDOWN_MODE_FINAL:r.SHUTDOWN_MODE_FINAL,STARTUP_MODE_DEFAULT:r.STARTUP_MODE_DEFAULT,STARTUP_MODE_FORCE:r.STARTUP_MODE_FORCE,STARTUP_MODE_RESTRICT:r.STARTUP_MODE_RESTRICT,SUBSCR_EVENT_TYPE_SHUTDOWN:r.SUBSCR_EVENT_TYPE_SHUTDOWN,SUBSCR_EVENT_TYPE_SHUTDOWN_ANY:r.SUBSCR_EVENT_TYPE_SHUTDOWN_ANY,SUBSCR_EVENT_TYPE_STARTUP:r.SUBSCR_EVENT_TYPE_STARTUP,SUBSCR_EVENT_TYPE_DEREG:r.SUBSCR_EVENT_TYPE_DEREG,SUBSCR_EVENT_TYPE_OBJ_CHANGE:r.SUBSCR_EVENT_TYPE_OBJ_CHANGE,SUBSCR_EVENT_TYPE_QUERY_CHANGE:r.SUBSCR_EVENT_TYPE_QUERY_CHANGE,SUBSCR_EVENT_TYPE_AQ:r.SUBSCR_EVENT_TYPE_AQ,SUBSCR_GROUPING_CLASS_TIME:r.SUBSCR_GROUPING_CLASS_TIME,SUBSCR_GROUPING_TYPE_SUMMARY:r.SUBSCR_GROUPING_TYPE_SUMMARY,SUBSCR_GROUPING_TYPE_LAST:r.SUBSCR_GROUPING_TYPE_LAST,SUBSCR_NAMESPACE_AQ:r.SUBSCR_NAMESPACE_AQ,SUBSCR_NAMESPACE_DBCHANGE:r.SUBSCR_NAMESPACE_DBCHANGE,SUBSCR_QOS_BEST_EFFORT:r.SUBSCR_QOS_BEST_EFFORT,SUBSCR_QOS_DEREG_NFY:r.SUBSCR_QOS_DEREG_NFY,SUBSCR_QOS_QUERY:r.SUBSCR_QOS_QUERY,SUBSCR_QOS_RELIABLE:r.SUBSCR_QOS_RELIABLE,SUBSCR_QOS_ROWIDS:r.SUBSCR_QOS_ROWIDS,SYSASM:r.SYSASM,SYSBACKUP:r.SYSBACKUP,SYSDBA:r.SYSDBA,SYSDG:r.SYSDG,SYSKM:r.SYSKM,SYSOPER:r.SYSOPER,SYSPRELIM:r.SYSPRELIM,SYSRAC:r.SYSRAC,BIND_IN:r.BIND_IN,BIND_INOUT:r.BIND_INOUT,BIND_OUT:r.BIND_OUT,OUT_FORMAT_ARRAY:r.OUT_FORMAT_ARRAY,OUT_FORMAT_OBJECT:r.OUT_FORMAT_OBJECT,SODA_COLL_MAP_MODE:r.SODA_COLL_MAP_MODE,POOL_STATUS_OPEN:r.POOL_STATUS_OPEN,POOL_STATUS_DRAINING:r.POOL_STATUS_DRAINING,POOL_STATUS_CLOSED:r.POOL_STATUS_CLOSED,POOL_STATUS_RECONFIGURING:r.POOL_STATUS_RECONFIGURING,AQ_DEQ_NO_WAIT:r.AQ_DEQ_NO_WAIT,AQ_DEQ_WAIT_FOREVER:r.AQ_DEQ_WAIT_FOREVER,AQ_DEQ_MODE_BROWSE:r.AQ_DEQ_MODE_BROWSE,AQ_DEQ_MODE_LOCKED:r.AQ_DEQ_MODE_LOCKED,AQ_DEQ_MODE_REMOVE:r.AQ_DEQ_MODE_REMOVE,AQ_DEQ_MODE_REMOVE_NO_DATA:r.AQ_DEQ_MODE_REMOVE_NO_DATA,AQ_DEQ_NAV_FIRST_MSG:r.AQ_DEQ_NAV_FIRST_MSG,AQ_DEQ_NAV_NEXT_TRANSACTION:r.AQ_DEQ_NAV_NEXT_TRANSACTION,AQ_DEQ_NAV_NEXT_MSG:r.AQ_DEQ_NAV_NEXT_MSG,AQ_MSG_DELIV_MODE_PERSISTENT:r.AQ_MSG_DELIV_MODE_PERSISTENT,AQ_MSG_DELIV_MODE_BUFFERED:r.AQ_MSG_DELIV_MODE_BUFFERED,AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED:r.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,AQ_MSG_STATE_READY:r.AQ_MSG_STATE_READY,AQ_MSG_STATE_WAITING:r.AQ_MSG_STATE_WAITING,AQ_MSG_STATE_PROCESSED:r.AQ_MSG_STATE_PROCESSED,AQ_MSG_STATE_EXPIRED:r.AQ_MSG_STATE_EXPIRED,AQ_VISIBILITY_IMMEDIATE:r.AQ_VISIBILITY_IMMEDIATE,AQ_VISIBILITY_ON_COMMIT:r.AQ_VISIBILITY_ON_COMMIT,TPC_BEGIN_JOIN:r.TPC_BEGIN_JOIN,TPC_BEGIN_NEW:r.TPC_BEGIN_NEW,TPC_BEGIN_PROMOTE:r.TPC_BEGIN_PROMOTE,TPC_BEGIN_RESUME:r.TPC_BEGIN_RESUME,TPC_END_NORMAL:r.TPC_END_NORMAL,TPC_END_SUSPEND:r.TPC_END_SUSPEND,VECTOR_FORMAT_FLOAT32:r.VECTOR_FORMAT_FLOAT32,VECTOR_FORMAT_FLOAT64:r.VECTOR_FORMAT_FLOAT64,VECTOR_FORMAT_INT8:r.VECTOR_FORMAT_INT8,BLOB:o.DB_TYPE_BLOB,BUFFER:o.DB_TYPE_RAW,CLOB:o.DB_TYPE_CLOB,CURSOR:o.DB_TYPE_CURSOR,DATE:o.DB_TYPE_TIMESTAMP,NCLOB:o.DB_TYPE_NCLOB,NUMBER:o.DB_TYPE_NUMBER,STRING:o.DB_TYPE_VARCHAR,ARRAY:r.OUT_FORMAT_ARRAY,OBJECT:r.OUT_FORMAT_OBJECT,future:f,get autoCommit(){return P.autoCommit},get connectionClass(){return P.connectionClass},get dbObjectAsPojo(){return P.dbObjectAsPojo},get edition(){return P.edition},get errorOnConcurrentExecute(){return P.errorOnConcurrentExecute},get events(){return P.events},get externalAuth(){return P.externalAuth},get fetchArraySize(){return P.fetchArraySize},get fetchAsBuffer(){return P.fetchAsBuffer},get fetchAsString(){return P.fetchAsString},get fetchTypeHandler(){return P.fetchTypeHandler},get lobPrefetchSize(){return P.lobPrefetchSize},get maxRows(){return P.maxRows},get oracleClientVersion(){return P.oracleClientVersion},get oracleClientVersionString(){return P.oracleClientVersionString},get outFormat(){return P.outFormat},get poolIncrement(){return P.poolIncrement},get poolMax(){return P.poolMax},get poolMaxPerShard(){return P.poolMaxPerShard},get poolMin(){return P.poolMin},get poolPingInterval(){return P.poolPingInterval},get poolPingTimeout(){return P.poolPingTimeout},get poolTimeout(){return P.poolTimeout},get prefetchRows(){return P.prefetchRows},get stmtCacheSize(){return P.stmtCacheSize},get thin(){return P.thin},get version(){return 1e4*r.VERSION_MAJOR+100*r.VERSION_MINOR+r.VERSION_PATCH},get versionString(){return r.VERSION_STRING},get versionSuffix(){return r.VERSION_SUFFIX},set autoCommit(t){s.assertPropValue("boolean"==typeof t,"autoCommit"),P.autoCommit=t},set connectionClass(t){s.assertPropValue("string"==typeof t,"connectionClass"),P.connectionClass=t},set dbObjectAsPojo(t){s.assertPropValue("boolean"==typeof t,"dbObjectAsPojo"),P.dbObjectAsPojo=t},set edition(t){s.assertPropValue("string"==typeof t,"edition"),P.edition=t},set errorOnConcurrentExecute(t){s.assertPropValue("boolean"==typeof t,"errorOnConcurrentExecute"),P.errorOnConcurrentExecute=t},set events(t){s.assertPropValue("boolean"==typeof t,"events"),P.events=t},set externalAuth(t){s.assertPropValue("boolean"==typeof t,"externalAuth"),P.externalAuth=t},set fetchArraySize(t){s.assertPropValue(Number.isInteger(t)&&t>0,"fetchArraySize"),P.fetchArraySize=t},set fetchAsBuffer(t){s.assertPropValue(Array.isArray(t),"fetchAsBuffer"),P.createFetchTypeMap(P.fetchAsString,t),P.fetchAsBuffer=t},set fetchAsString(t){s.assertPropValue(Array.isArray(t),"fetchAsString"),P.createFetchTypeMap(t,P.fetchAsBuffer),P.fetchAsString=t},set fetchTypeHandler(t){void 0!==t&&s.assertPropValue("function"==typeof t,"fetchTypeHandler"),P.fetchTypeHandler=t},set lobPrefetchSize(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"lobPrefetchSize"),P.lobPrefetchSize=t},set maxRows(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"maxRows"),P.maxRows=t},set outFormat(t){t!==r.OUT_FORMAT_ARRAY&&t!==r.OUT_FORMAT_OBJECT&&s.throwErr(s.ERR_INVALID_PROPERTY_VALUE,"outFormat"),P.outFormat=t},set poolIncrement(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolIncrement"),P.poolIncrement=t},set poolMax(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolMax"),P.poolMax=t},set poolMaxPerShard(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolMaxPerShard"),P.poolMaxPerShard=t},set poolMin(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolMin"),P.poolMin=t},set poolPingInterval(t){s.assertPropValue(Number.isInteger(t)&&t<2**31&&t>=(-2)**31,"poolPingInterval"),P.poolPingInterval=t},set poolPingTimeout(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolPingTimeout"),P.poolPingTimeout=t},set poolTimeout(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolTimeout"),P.poolTimeout=t},set prefetchRows(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"prefetchRows"),P.prefetchRows=t},set stmtCacheSize(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"stmtCacheSize"),P.stmtCacheSize=t}}},7784:(t,e,n)=>{"use strict";const r=n(6530),i=n(4434),s=n(2269),o=n(8041),a=n(8023),u=n(6770),_=n(851),c=n(6287);class l extends i{constructor(){super(),this._impl=new _.PoolImpl,this._queueMax=0,this._queueTimeout=0,this._enableStatistics=!1,this._timeOfReset=this._createdDate=Date.now(),this._sessionCallback=void 0,this._connRequestQueue=[],this._connectionClass=a.connectionClass}_checkPoolOpen(t){this.status===s.POOL_STATUS_DRAINING?o.throwErr(o.ERR_POOL_CLOSING):this.status===s.POOL_STATUS_CLOSED?o.throwErr(o.ERR_POOL_CLOSED):t||this.status===s.POOL_STATUS_RECONFIGURING&&o.throwErr(o.ERR_POOL_RECONFIGURING)}_checkRequestQueue(){let t=this._connectionsOut;for(;this._connRequestQueue.length>0&&t<this.poolMax;){t+=1;const e=this._connRequestQueue.shift();this._enableStatistics&&(this._totalRequestsDequeued+=1,this._updateWaitStatistics(e)),e.timeoutHandle&&clearTimeout(e.timeoutHandle),e.resolve()}}get _enableStats(){return this._enableStatistics}_resetStatistics(){this._timeOfReset=Date.now(),this._totalConnectionRequests=0,this._totalRequestsEnqueued=0,this._totalRequestsDequeued=0,this._totalFailedRequests=0,this._totalRequestsRejected=0,this._totalRequestTimeouts=0,this._maximumQueueLength=this._connRequestQueue.length,this._totalTimeInQueue=0,this._minTimeInQueue=0,this._maxTimeInQueue=0}_setup(t,e){this._queueTimeout=t.queueTimeout,this._queueMax=t.queueMax,this._enableStatistics=t.enableStatistics,this._edition=t.edition,this._eventsFlag=t.events,this._externalAuth=t.externalAuth,this._homogeneous=t.homogeneous,this._user=t.user,this._connectString=t.connectString,this._status=s.POOL_STATUS_OPEN,this._connectionsOut=0,this._poolAlias=e,this.on("_checkRequestQueue",this._checkRequestQueue),this._resetStatistics()}_updateWaitStatistics(t){const e=Date.now()-t.enqueuedTime;this._totalTimeInQueue+=e,0===this._minTimeInQueue?this._minTimeInQueue=e:this._minTimeInQueue=Math.min(this._minTimeInQueue,e),this._maxTimeInQueue=Math.max(this._maxTimeInQueue,e)}_verifyGetConnectionOptions(t){const e={};if(void 0!==t.user&&(o.assertParamPropValue("string"==typeof t.user,1,"user"),e.user=t.user),void 0!==t.username&&(o.assert(void 0===e.user,o.ERR_DBL_USER),o.assertParamPropValue("string"==typeof t.username,1,"username"),e.user=t.username),this.externalAuth&&e.user&&("["!==e.user[0]||"]"!==e.user.slice(-1))&&o.throwErr(o.ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY),void 0!==t.password&&(o.assertParamPropValue("string"==typeof t.password,1,"password"),this.externalAuth&&o.throwErr(o.ERR_WRONG_CRED_FOR_EXTAUTH),e.password=t.password),void 0!==t.tag&&(o.assertParamPropValue("string"==typeof t.tag,1,"tag"),e.tag=t.tag),void 0!==t.matchAnyTag&&(o.assertParamPropValue("boolean"==typeof t.matchAnyTag,1,"matchAnyTag"),e.matchAnyTag=t.matchAnyTag),void 0!==t.shardingKey){const n=t.shardingKey;o.assertParamPropValue(u.isShardingKey(n),1,"shardingKey"),e.shardingKey=t.shardingKey}if(void 0!==t.superShardingKey){const n=t.superShardingKey;o.assertParamPropValue(u.isShardingKey(n),1,"superShardingKey"),e.superShardingKey=t.superShardingKey}return void 0!==t.privilege&&(o.assertParamPropValue(u.isPrivilege(t.privilege),1,"privilege"),e.privilege=t.privilege),e}async close(t){let e=0,n=!1;o.assertArgCount(arguments,0,1),1==arguments.length&&(o.assertParamValue("number"==typeof t,1),(t<0||isNaN(t)||t>2**31)&&o.throwErr(o.ERR_INVALID_PARAMETER_VALUE,1),n=!0,this._connectionsOut>0&&(e=1e3*t)),this._checkPoolOpen(!1),e>0&&(this._status=s.POOL_STATUS_DRAINING,await new Promise((t=>{const n=setTimeout((()=>{this.removeAllListeners("_allCheckedIn"),t()}),e);this.once("_allCheckedIn",(()=>{clearTimeout(n),t()}))}))),!n&&this._connectionsOut>0&&o.throwErr(o.ERR_POOL_HAS_BUSY_CONNECTIONS),await this._impl.close(),this._status=s.POOL_STATUS_CLOSED,this.emit("_afterPoolClose")}get connectionsInUse(){return this._impl.getConnectionsInUse()}get connectionsOpen(){return this._impl.getConnectionsOpen()}get connectString(){return this._connectString}get thin(){return a.thin}get edition(){return this._edition}get enableStatistics(){return this._enableStatistics}get events(){return this._eventsFlag}get externalAuth(){return this._externalAuth}async getConnection(t){let e,n={};o.assertArgCount(arguments,0,1),1==arguments.length&&(o.assertParamValue(u.isObject(t),1),n=this._verifyGetConnectionOptions(t)),n.connectionClass=this._connectionClass,this._checkPoolOpen(!0),this._enableStatistics&&(this._totalConnectionRequests+=1);try{e=this.poolMax}catch(t){throw this._enableStatistics&&(this._totalFailedRequests+=1),t}(this._connectionsOut>=e||this.status===s.POOL_STATUS_RECONFIGURING)&&(this._connRequestQueue.length>=this._queueMax&&this._queueMax>=0&&(this._enableStatistics&&(this._totalRequestsRejected+=1),o.throwErr(o.ERR_QUEUE_MAX_EXCEEDED,this._queueMax)),await new Promise(((t,e)=>{const n={resolve:t,reject:e};0!==this._queueTimeout&&(n.timeoutHandle=setTimeout((()=>{const t=this._connRequestQueue.indexOf(n);t>=0&&this._connRequestQueue.splice(t,1),this._enableStatistics&&(this._totalRequestTimeouts+=1,this._updateWaitStatistics(n));try{o.throwErr(o.ERR_CONN_REQUEST_TIMEOUT,this._queueTimeout)}catch(t){e(t)}}),this._queueTimeout)),this._connRequestQueue.push(n),this._enableStatistics&&(n.enqueuedTime=Date.now(),this._totalRequestsEnqueued+=1,this._maximumQueueLength=Math.max(this._maximumQueueLength,this._connRequestQueue.length))})),this._checkPoolOpen(!0)),this._connectionsOut+=1;try{const t=new r;t._impl=await this._impl.getConnection(n),t._pool=this;const e=n.tag||"";if("function"==typeof this.sessionCallback&&(t._impl._newSession||t.tag!=e))try{await new Promise(((n,r)=>{this.sessionCallback(t,e,(function(t){t?r(t):n()}))}))}catch(e){throw await t.close({drop:!0}),e}return t.on("_afterConnClose",(()=>{this._connectionsOut-=1,this.emit("_checkRequestQueue"),0==this._connectionsOut&&this.emit("_allCheckedIn")})),t}catch(t){throw this._connectionsOut-=1,this._enableStatistics&&(this._totalFailedRequests+=1),this.emit("_checkRequestQueue"),t}}getStatistics(){return this._checkPoolOpen(!1),!0!==this._enableStatistics?null:new c(this)}get homogeneous(){return this._homogeneous}logStatistics(){const t=this.getStatistics();null===t&&o.throwErr(o.ERR_POOL_STATISTICS_DISABLED),t.logStatistics()}get poolAlias(){return this._poolAlias}get poolIncrement(){return this._impl.getPoolIncrement()}get poolMax(){return this._impl.getPoolMax()}get poolMaxPerShard(){return this._impl.getPoolMaxPerShard()}get poolMin(){return this._impl.getPoolMin()}get poolPingInterval(){return this._impl.getPoolPingInterval()}get poolPingTimeout(){return this._impl.getPoolPingTimeout()}get poolTimeout(){return this._impl.getPoolTimeout()}get queueMax(){return this._queueMax}get queueTimeout(){return this._queueTimeout}async reconfigure(t){o.assertArgCount(arguments,1,1),o.assertParamValue(u.isObject(t)),o.assertParamPropUnsignedInt(t,1,"queueMax"),o.assertParamPropUnsignedInt(t,1,"queueTimeout"),o.assertParamPropBool(t,1,"enableStatistics"),o.assertParamPropBool(t,1,"resetStatistics"),o.assertParamPropUnsignedInt(t,1,"poolMin"),o.assertParamPropUnsignedIntNonZero(t,1,"poolMax"),o.assertParamPropUnsignedInt(t,1,"poolMaxPerShard"),o.assertParamPropUnsignedInt(t,1,"poolIncrement"),o.assertParamPropInt(t,1,"poolPingInterval"),o.assertParamPropUnsignedInt(t,1,"poolTimeout"),o.assertParamPropUnsignedInt(t,1,"stmtCacheSize"),o.assertParamPropBool(t,1,"sodaMetaDataCache"),t.poolMin>t.poolMax&&o.throwErr(o.ERR_INVALID_NUMBER_OF_CONNECTIONS,t.poolMax,t.poolMin),this._checkPoolOpen(!1),this._status=s.POOL_STATUS_RECONFIGURING;try{await this._impl.reconfigure(t),(1==t.resetStatistics||1==t.enableStatistics&&0==this._enableStatistics)&&this._resetStatistics(),void 0!==t.queueMax&&(this._queueMax=t.queueMax),void 0!==t.queueTimeout&&(this._queueTimeout=t.queueTimeout),void 0!==t.enableStatistics&&(this._enableStatistics=t.enableStatistics)}finally{this._status=s.POOL_STATUS_OPEN}this.emit("_checkRequestQueue")}get sessionCallback(){return this._sessionCallback}async setAccessToken(t){o.assertArgCount(arguments,1,1),o.assertParamValue(u.isObject(t),1),o.assertParamPropString(t,1,"token"),o.assertParamPropString(t,1,"privateKey"),await this._impl.setAccessToken(t)}get sodaMetaDataCache(){return this._impl.getSodaMetaDataCache()}get status(){return this._status}get stmtCacheSize(){return this._impl.getStmtCacheSize()}get user(){return this._user}}l.prototype.close=u.callbackify(l.prototype.close),l.prototype.getConnection=u.callbackify(l.prototype.getConnection),l.prototype.reconfigure=u.callbackify(l.prototype.reconfigure),l.prototype.setAccessToken=u.callbackify(l.prototype.setAccessToken),l.prototype.terminate=l.prototype.close,l.prototype._logStats=l.prototype.logStatistics,t.exports=l},6287:(t,e,n)=>{"use strict";const r=n(932),i=n(8023);t.exports=class{constructor(t){let e=0;0!==t._totalRequestsEnqueued&&(e=Math.round(t._totalTimeInQueue/t._totalRequestsEnqueued)),this.gatheredDate=Date.now(),this.upTime=this.gatheredDate-t._createdDate,this.upTimeSinceReset=this.gatheredDate-t._timeOfReset,this.connectionRequests=t._totalConnectionRequests,this.requestsEnqueued=t._totalRequestsEnqueued,this.requestsDequeued=t._totalRequestsDequeued,this.failedRequests=t._totalFailedRequests,this.rejectedRequests=t._totalRequestsRejected,this.requestTimeouts=t._totalRequestTimeouts,this.maximumQueueLength=t._maximumQueueLength,this.currentQueueLength=t._connRequestQueue.length,this.timeInQueue=t._totalTimeInQueue,this.minimumTimeInQueue=t._minTimeInQueue,this.maximumTimeInQueue=t._maxTimeInQueue,this.averageTimeInQueue=e,this.connectionsInUse=t.connectionsInUse,this.connectionsOpen=t.connectionsOpen,this.connectString=t.connectString,this.edition=t.edition,this.events=t.events,this.externalAuth=t.externalAuth,this.homogeneous=t.homogeneous,this.poolAlias=t.poolAlias,this.poolIncrement=t.poolIncrement,this.poolMax=t.poolMax,this.poolMaxPerShard=t.poolMaxPerShard,this.poolMin=t.poolMin,this.poolPingInterval=t.poolPingInterval,this.poolPingTimeout=t.poolPingTimeout,this.poolTimeout=t.poolTimeout,this.queueMax=t.queueMax,this.queueTimeout=t.queueTimeout,this.sodaMetaDataCache=t.sodaMetaDataCache,this.stmtCacheSize=t.stmtCacheSize,this.user=t.user,this.threadPoolSize=r.env.UV_THREADPOOL_SIZE,this.thin=i.thin}logStatistics(){console.log("\nDriver:"),console.log("...thin mode:",this.thin),console.log("Pool statistics:"),console.log("...gathered at:",new Date(this.gatheredDate).toISOString()),console.log("...up time (milliseconds):",this.upTime),console.log("...up time from last reset (milliseconds)",this.upTimeSinceReset),console.log("...connection requests:",this.connectionRequests),console.log("...requests enqueued:",this.requestsEnqueued),console.log("...requests dequeued:",this.requestsDequeued),console.log("...requests failed:",this.failedRequests),console.log("...requests exceeding queueMax:",this.rejectedRequests),console.log("...requests exceeding queueTimeout:",this.requestTimeouts),console.log("...current queue length:",this.currentQueueLength),console.log("...maximum queue length:",this.maximumQueueLength),console.log("...sum of time in queue (milliseconds):",this.timeInQueue),console.log("...minimum time in queue (milliseconds):",this.minimumTimeInQueue),console.log("...maximum time in queue (milliseconds):",this.maximumTimeInQueue),console.log("...average time in queue (milliseconds):",this.averageTimeInQueue),console.log("...pool connections in use:",this.connectionsInUse),console.log("...pool connections open:",this.connectionsOpen),console.log("Pool attributes:"),console.log("...connectString:",this.connectString),console.log("...edition:",this.edition),console.log("...events:",this.events),console.log("...externalAuth:",this.externalAuth),console.log("...homogeneous:",this.homogeneous),console.log("...poolAlias:",this.poolAlias),console.log("...poolIncrement:",this.poolIncrement),console.log("...poolMax:",this.poolMax),console.log("...poolMaxPerShard:",this.poolMaxPerShard),console.log("...poolMin:",this.poolMin),console.log("...poolPingInterval (seconds):",this.poolPingInterval),console.log("...poolPingTimeout (milliseconds):",this.poolPingTimeout),console.log("...poolTimeout (seconds):",this.poolTimeout),console.log("...queueMax:",this.queueMax),console.log("...queueTimeout (milliseconds):",this.queueTimeout),console.log("...sessionCallback:",this.sessionCallback),console.log("...sodaMetaDataCache:",this.sodaMetaDataCache),console.log("...stmtCacheSize:",this.stmtCacheSize),console.log("...user:",this.user),console.log("Related environment variables:"),console.log("...UV_THREADPOOL_SIZE:",this.threadPoolSize)}}},8536:(t,e,n)=>{"use strict";const r=n(932),{Readable:i}=n(2203);t.exports=class extends i{constructor(t){super({objectMode:!0}),this._fetching=!1,this._numRows=0,t&&r.nextTick((()=>{this._open(t)}))}async _destroy(t,e){if(this._resultSet){const t=this._resultSet;this._resultSet=null,this._fetching&&await new Promise((t=>this.once("_doneFetching",t)));try{await t._impl.close()}catch(t){return void e(t)}}e(t)}_open(t){this._resultSet=t,this.emit("open"),this.emit("metadata",t.metaData)}async _read(){if(this._resultSet)try{this._fetching=!0,this._resultSet._allowGetRowCall=!0;const t=await this._resultSet.getRow();t?this.push(t):this.push(null)}catch(t){this.destroy(t)}finally{this._fetching=!1,this._resultSet?this._resultSet._allowGetRowCall=!1:this.emit("_doneFetching")}else this.once("open",this._read)}}},9891:(t,e,n)=>{"use strict";const r=n(8536),i=n(7647),s=n(6770),o=n(2269),a=n(2733),u=n(8041);class _{constructor(){this._rowCache=[],this._processingStarted=!1,this._convertedToStream=!1,this._allowGetRowCall=!1,this._isActive=!1}async _getAllRows(){try{let t=this._impl.maxRows,e=this._impl.fetchArraySize,n=[];for(;;){t>0&&e>=t&&(e=t);const r=await this._getRows(e);if(r&&(await this._processRows(r,!0),n=n.concat(r)),r.length==t||r.length<e)break;t>0&&(t-=r.length)}return n}finally{await this._impl.close(),delete this._impl}}async _getRows(t){let e={};return this._impl.nestedCursorIndices.length>0&&(e={connection:this._connection,outFormat:this._impl.outFormat,fetchArraySize:this._impl.fetchArraySize,dbObjectAsPojo:this._impl.dbObjectAsPojo,maxRows:this._impl.maxRows,fetchTypeMap:this._impl.fetchTypeMap}),await this._impl.getRows(t,e)}async _processRows(t,e){for(const n of this._impl.nestedCursorIndices)for(let r=0;r<t.length;r++){const i=t[r][n];if(i){const s=new _;s._setup(this._connection,i),this._impl.metaData[n].metaData=i.metaData,t[r][n]=e?await s._getAllRows():s}}for(const e of this._impl.lobIndices)for(let n=0;n<t.length;n++){const r=t[n][e];r&&(t[n][e]=new a)._setup(r,!0)}for(const e of this._impl.dbObjectIndices){const n=this._impl.metaData[e].dbTypeClass;for(let r=0;r<t.length;r++){const s=t[r][e];if(s){const o=t[r][e]=Object.create(n.prototype);o._impl=s,this._impl.dbObjectAsPojo?t[r][e]=o._toPojo():o.isCollection&&(t[r][e]=new Proxy(o,i._collectionProxyHandler))}}}for(const e of this._impl.converterIndices){const n=this._impl.metaData[e].converter;this._connection._impl._inProgress=!1;try{for(let r=0;r<t.length;r++){let i=n(t[r][e]);i instanceof Promise&&(i=await i),t[r][e]=i}}finally{this._connection._impl._inProgress=!0}}if(this._impl.outFormat===o.OUT_FORMAT_OBJECT)for(let e=0;e<t.length;e++){const n=t[e],r=t[e]={},i=this._impl.metaData;for(let t=0;t<i.length;t++)r[i[t].name]=n[t]}}_setup(t,e){this._connection=t,this._impl=e}async close(){u.assertArgCount(arguments,0,0),u.assert(this._impl&&this._connection._impl,u.ERR_INVALID_RS),this._convertedToStream&&u.throwErr(u.ERR_CANNOT_INVOKE_RS_METHODS),this._processingStarted=!0;const t=this._impl;delete this._impl,await t.close()}async getRow(){if(u.assertArgCount(arguments,0,0),u.assert(this._impl&&this._connection._impl,u.ERR_INVALID_RS),this._convertedToStream&&!this._allowGetRowCall&&u.throwErr(u.ERR_CANNOT_INVOKE_RS_METHODS),this._allowGetRowCall=!1,this._processingStarted=!0,0==this._rowCache.length){const t=await this._getRows(this._impl.fetchArraySize);await this._processRows(t,!1),this._rowCache=t}return this._rowCache.shift()}async getRows(t){let e,n;if(u.assertArgCount(arguments,0,1),u.assert(this._impl&&this._connection._impl,u.ERR_INVALID_RS),0==arguments.length?t=0:u.assertParamValue(Number.isInteger(t)&&t>=0,1),this._convertedToStream&&u.throwErr(u.ERR_CANNOT_INVOKE_RS_METHODS),this._processingStarted=!0,0==t){n=this._rowCache;const t=this._impl.fetchArraySize;for(;;){const e=await this._getRows(t);if(e&&(await this._processRows(e,!1),n=n.concat(e)),e.length<t)break}return n}if(0===this._rowCache.length)n=await this._getRows(t),await this._processRows(n,!1);else if(e=t-this._rowCache.length,e<=0)n=this._rowCache.splice(0,t);else{const t=await this._getRows(e);await this._processRows(t,!1),n=this._rowCache.concat(t),this._rowCache=[]}return n}get metaData(){if(this._impl)return this._impl.metaData}toQueryStream(){return u.assertArgCount(arguments,0,0),this._processingStarted&&u.throwErr(u.ERR_CANNOT_CONVERT_RS_TO_STREAM),this._convertedToStream&&u.throwErr(u.ERR_RS_ALREADY_CONVERTED),this._convertedToStream=!0,new r(this)}[Symbol.asyncIterator](){const t=this;return{async next(){const e=await t.getRow();return{value:e,done:void 0===e}},return:()=>({done:!0})}}}s.wrapFns(_.prototype,u.ERR_BUSY_RS,"close","getRow","getRows"),t.exports=_},8023:(t,e,n)=>{"use strict";const r=n(2269),i=n(8041),s=n(6893),o=n(6770),a=n(8774);t.exports=new class{constructor(){this.autoCommit=!1,this.connectionClass="",this.dbObjectAsPojo=!1,this.edition="",this.errorOnConcurrentExecute=!1,this.events=!1,this.externalAuth=!1,this.fetchArraySize=100,this.fetchAsBuffer=[],this.fetchAsString=[],this.lobPrefetchSize=16384,this.maxRows=0,this.outFormat=r.OUT_FORMAT_ARRAY,this.poolIncrement=1,this.poolMax=4,this.poolMaxPerShard=0,this.poolMin=0,this.poolPingInterval=60,this.poolPingTimeout=5e3,this.poolTimeout=60,this.prefetchRows=2,this.queueTimeout=6e4,this.queueMax=500,this.stmtCacheSize=30,this.thin=!0,this.thinDriverInitialized=!1,this.createFetchTypeMap(this.fetchAsString,this.fetchAsBuffer),this.fetchTypeHandler=void 0,this._JsonId=s.JsonId}_getDateComponents(t,e){return t?[e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),1e3*e.getMilliseconds()*1e3]:[e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),1e3*e.getUTCMilliseconds()*1e3]}_makeDate(t,e,n,r,i,s,a,u,_){return o.makeDate(t,e,n,r,i,s,a,u,_)}_decodeVector(t){return new a.VectorDecoder(t).decode()}_encodeVector(t){return(new a.VectorEncoder).encode(t)}addToOptions(t){for(let e=1;e<arguments.length;e++){const n=arguments[e];void 0===t[n]&&(t[n]=this[n])}}createFetchTypeMap(t,e){const n=new Map(s.DB_TYPE_FETCH_TYPE_MAP);for(const e of t)switch(e){case s.DB_TYPE_NUMBER:n.set(s.DB_TYPE_BINARY_DOUBLE,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_BINARY_FLOAT,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_BINARY_INTEGER,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_NUMBER,s.DB_TYPE_VARCHAR);break;case s.DB_TYPE_TIMESTAMP:n.set(s.DB_TYPE_DATE,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_TIMESTAMP,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_TIMESTAMP_TZ,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_TIMESTAMP_LTZ,s.DB_TYPE_VARCHAR);break;case s.DB_TYPE_CLOB:case s.DB_TYPE_NCLOB:n.set(s.DB_TYPE_CLOB,s.DB_TYPE_LONG),n.set(s.DB_TYPE_NCLOB,s.DB_TYPE_LONG_NVARCHAR);break;case s.DB_TYPE_VECTOR:n.set(s.DB_TYPE_VECTOR,s.DB_TYPE_LONG);break;case s.DB_TYPE_RAW:n.set(s.DB_TYPE_RAW,s.DB_TYPE_VARCHAR);break;case s.DB_TYPE_JSON:n.set(s.DB_TYPE_JSON,s.DB_TYPE_VARCHAR);break;default:i.throwErr(i.ERR_INVALID_TYPE_FOR_CONVERSION)}for(const t of e)t===s.DB_TYPE_BLOB?n.set(s.DB_TYPE_BLOB,s.DB_TYPE_LONG_RAW):i.throwErr(i.ERR_INVALID_TYPE_FOR_CONVERSION);this.fetchTypeMap=n}}},7547:(t,e,n)=>{"use strict";const r=n(3434),i=n(9698),s=n(8041),o=n(6770),a=n(8023);class u{async createIndex(t){s.assertArgCount(arguments,1,1),s.assertParamValue(o.isObject(t),1);const e={autoCommit:a.autoCommit};return await this._impl.createIndex(JSON.stringify(t),e)}async drop(){s.assertArgCount(arguments,0,0);const t={autoCommit:a.autoCommit};return await this._impl.drop(t)}async dropIndex(t,e){const n={autoCommit:a.autoCommit};return s.assertArgCount(arguments,1,2),s.assertParamValue("string"==typeof t,1),2==arguments.length&&(s.assertParamValue("object"==typeof e,2),void 0!==e.force&&(s.assertParamPropValue("boolean"==typeof e.force,2,"force"),n.force=e.force)),await this._impl.dropIndex(t,n)}find(){s.assertArgCount(arguments,0,0);const t=new i;return t._impl=this._impl.find(),t}async getDataGuide(){s.assertArgCount(arguments,0,0);const t=new r;return t._impl=await this._impl.getDataGuide(),t}async insertMany(t){s.assertArgCount(arguments,1,1),s.assertParamValue(Array.isArray(t)&&t.length>0,1);const e=Array(t.length);for(let n=0;n<t.length;n++)e[n]=o.verifySodaDoc(t[n]);const n={autoCommit:a.autoCommit};await this._impl.insertMany(e,n)}async insertManyAndGet(t,e){const n={autoCommit:a.autoCommit};s.assertArgCount(arguments,1,2),s.assertParamValue(Array.isArray(t)&&t.length>0,1),2==arguments.length&&(s.assertParamValue(o.isObject(e),2),void 0!==e.hint&&(s.assertParamPropValue("string"==typeof e.hint,2,"hint"),n.hint=e.hint));const i=Array(t.length);for(let e=0;e<t.length;e++)i[e]=o.verifySodaDoc(t[e]);const u=await this._impl.insertManyAndGet(i,n);for(let e=0;e<t.length;e++)(i[e]=new r)._impl=u[e];return i}async insertOne(t){s.assertArgCount(arguments,1,1),t=o.verifySodaDoc(t);const e={autoCommit:a.autoCommit};await this._impl.insertOne(t,e)}async insertOneAndGet(t,e){const n={autoCommit:a.autoCommit};s.assertArgCount(arguments,1,2),t=o.verifySodaDoc(t),2==arguments.length&&(s.assertParamValue(o.isObject(e),2),void 0!==e.hint&&(s.assertParamPropValue("string"==typeof e.hint,2,"hint"),n.hint=e.hint));const i=new r;return i._impl=await this._impl.insertOneAndGet(t,n),i}async listIndexes(){return(await this._impl.listIndexes()).map((t=>JSON.parse(t)))}get metaData(){return JSON.parse(this._impl.getMetaData())}get name(){return this._impl.getName()}async save(t){s.assertArgCount(arguments,1,1),t=o.verifySodaDoc(t);const e={autoCommit:a.autoCommit};await this._impl.save(t,e)}async saveAndGet(t,e){s.assertArgCount(arguments,1,2),t=o.verifySodaDoc(t);const n={autoCommit:a.autoCommit};2==arguments.length&&(s.assertParamValue(o.isObject(e),2),void 0!==e.hint&&(s.assertParamPropValue("string"==typeof e.hint,2,"hint"),n.hint=e.hint));const i=new r;return i._impl=await this._impl.saveAndGet(t,n),i}async truncate(){s.assertArgCount(arguments,0,0),await this._impl.truncate()}}o.wrapFns(u.prototype,"createIndex","drop","dropIndex","getDataGuide","insertMany","insertManyAndGet","insertOne","insertOneAndGet","listIndexes","save","saveAndGet","truncate"),t.exports=u},198:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(7547),s=n(3434),o=n(8041),a=n(6770),u=n(8023);class _{_getConnection(){return this._connection}async createCollection(t,e){const n={autoCommit:u.autoCommit};o.assertArgCount(arguments,1,2),o.assertParamValue("string"==typeof t,1),2==arguments.length&&(o.assertParamValue(a.isObject(e),2),void 0!==e.mode&&(o.assertParamPropValue(Number.isInteger(e.mode)&&e.mode>0,2,"mode"),n.mode=e.mode),void 0!==e.metaData&&(o.assertParamPropValue(a.isObject(e.metaData),2,"metaData"),n.metaData=JSON.stringify(e.metaData)));const r=new i;return r._impl=await this._impl.createCollection(t,n),r}createDocument(t,e){let n={};o.assertArgCount(arguments,1,2),o.assertParamValue(r.isBuffer(t)||"string"==typeof t||a.isObject(t),1),arguments.length>1&&(o.assertParamValue(a.isObject(e),2),n=e,o.assertParamPropString(n,2,"key"),o.assertParamPropString(n,2,"mediaType")),"string"==typeof t?t=r.from(t):a.isObject(t)&&(t=r.from(JSON.stringify(t)));const i=new s;return i._impl=this._impl.createDocument(t,n),i}async getCollectionNames(t){let e={};return o.assertArgCount(arguments,0,1),1==arguments.length&&(o.assertParamValue(a.isObject(t),1),e=t,void 0!==e.startsWith&&o.assertParamPropValue("string"==typeof e.startsWith,1,"startsWith"),void 0!==e.limit&&o.assertParamPropValue(Number.isInteger(e.limit),1,"limit")),await this._impl.getCollectionNames(e)}async openCollection(t){o.assertArgCount(arguments,1,1),o.assertParamValue("string"==typeof t,1);const e={autoCommit:u.autoCommit},n=await this._impl.openCollection(t,e);if(n){const t=new i;return t._impl=n,t}}}a.wrapFns(_.prototype,"createCollection","getCollectionNames","openCollection"),t.exports=_},9947:(t,e,n)=>{"use strict";const r=n(8041),i=n(6770),s=n(3434);class o{async close(){r.assertArgCount(arguments,0,0),r.assert(this._impl,r.ERR_INVALID_SODA_DOC_CURSOR),await this._impl.close(),delete this._impl}async getNext(){r.assertArgCount(arguments,0,0),r.assert(this._impl,r.ERR_INVALID_SODA_DOC_CURSOR);const t=await this._impl.getNext();if(t){const e=new s;return e._impl=t,e}}[Symbol.asyncIterator](){const t=this;return{async next(){const e=await t.getNext();return{value:e,done:void 0===e}},return:()=>({done:!0})}}}i.wrapFns(o.prototype,"close","getNext"),t.exports=o},3434:t=>{"use strict";class e{get createdOn(){return this._impl.getCreatedOn()}getContent(){return JSON.parse(this._impl.getContentAsString())}getContentAsBuffer(){return this._impl.getContentAsBuffer()}getContentAsString(){return this._impl.getContentAsString()}get key(){return this._impl.getKey()}get lastModified(){return this._impl.getLastModified()}get mediaType(){return this._impl.getMediaType()}get version(){return this._impl.getVersion()}}e.prototype._sodaDocumentMarker=!0,t.exports=e},9698:(t,e,n)=>{"use strict";const r=n(9947),i=n(3434),s=n(8041),o=n(6770),a=n(8023);class u{constructor(){this._options={autoCommit:a.autoCommit,fetchArraySize:a.fetchArraySize}}async count(){return s.assertArgCount(arguments,0,0),await this._impl.count(this._options)}async getCursor(){s.assertArgCount(arguments,0,0);const t=new r;return t._impl=await this._impl.getCursor(this._options),t}async getDocuments(){s.assertArgCount(arguments,0,0);const t=await this._impl.getDocuments(this._options),e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=new i,e[n]._impl=t[n];return e}async getOne(){s.assertArgCount(arguments,0,0);const t=await this._impl.getOne(this._options);if(t){const e=new i;return e._impl=t,e}}lock(){return s.assertArgCount(arguments,0,0),this._options.lock=!0,this}async replaceOne(t){return s.assertArgCount(arguments,1,1),t=o.verifySodaDoc(t),await this._impl.replaceOne(this._options,t)}async replaceOneAndGet(t){s.assertArgCount(arguments,1,1),t=o.verifySodaDoc(t);const e=await this._impl.replaceOneAndGet(this._options,t);if(e){const t=new i;return t._impl=e,t}}async remove(){return s.assertArgCount(arguments,0,0),await this._impl.remove(this._options)}fetchArraySize(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t)&&t>=0,1),this._options.fetchArraySize=t,this}filter(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(o.isObject(t),1),this._options.filter=JSON.stringify(t),this}hint(t){return s.assertArgCount(arguments,1,1),s.assertParamValue("string"==typeof t,1),this._options.hint=t,this}key(t){return s.assertArgCount(arguments,1,1),s.assertParamValue("string"==typeof t,1),this._options.key=t,this._options.keys=void 0,this}keys(t){s.assertArgCount(arguments,1,1),s.assertParamValue(Array.isArray(t),1);for(let e=0;e<t.length;e++)s.assertParamValue("string"==typeof t[e],1);return this._options.keys=t,this._options.key=void 0,this}limit(t){return s.assertArgCount(arguments,1,1),s.assertParamValue("number"==typeof t,1),this._options.limit=t,this}skip(t){return s.assertArgCount(arguments,1,1),s.assertParamValue("number"==typeof t,1),this._options.skip=t,this}version(t){return s.assertArgCount(arguments,1,1),s.assertParamValue("string"==typeof t,1),this._options.version=t,this}}o.wrapFns(u.prototype,"count","getCursor","getDocuments","getOne","remove","replaceOne","replaceOneAndGet"),t.exports=u},7468:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(44),s=n(8625),o=n(1159),a=n(4583),{BaseBuffer:u}=n(1559),{NetworkSession:_}=n(7696),{Statement:c}=n(3483),l=n(2456),h=n(8881),T=n(3762),p=n(932),f=n(6893),E=n(8041),d=n(9448),N=n(8073),S=new global.FinalizationRegistry((t=>{t.disconnect()}));class m extends u{}t.exports=class extends i{async close(){try{if(this._protocol.txnInProgress&&await this.rollback(),this._drcpEnabled&&(await this._sessRelease(),this._drcpEstablishSession=!0),this._pool&&!this._dropSess)await this._pool.release(this);else{if(!this._drcpEnabled){const t=new d.LogOffMessage(this);await this._protocol._processMessage(t)}this.nscon.disconnect()}}catch(t){this.nscon.disconnect(h.NSFIMM)}}async _sessRelease(){const t=new d.SessionReleaseMessage(this);this.isPooled()||(t.sessReleaseMode=T.DRCP_DEAUTHENTICATE),await this._protocol._processMessage(t)}async _getElementTypeObj(t){const e=[{name:"owner",type:f.DB_TYPE_VARCHAR,dir:T.BIND_IN,maxSize:128,values:[t.schema]},{name:"name",type:f.DB_TYPE_VARCHAR,dir:T.BIND_IN,maxSize:128,values:[t.name]},{name:"package_name",type:f.DB_TYPE_VARCHAR,dir:T.BIND_IN,maxSize:128,values:[t.packageName]}];let n;t.packageName?n="\n select\n elem_type_owner,\n elem_type_name,\n elem_type_package\n from all_plsql_coll_types\n where owner = :owner\n and type_name = :name\n and package_name = :package_name":(e.pop(),n="\n select\n elem_type_owner,\n elem_type_name\n from all_coll_types\n where owner = :owner\n and type_name = :name");const r={connection:{_impl:this},prefetchRows:2},i=await this.execute(n,1,e,r,!1),s=await i.resultSet.getRows(1,r);await i.resultSet.close();const o=s[0];t.elementTypeClass=this._getDbObjectType(o[0],o[1],o[2]),t.elementTypeClass.partial&&this._partialDbObjectTypes.push(t.elementTypeClass)}async _execute(t,e,n,r,i){const s=t.bindInfoList.length,o=n.length;s===o||0!==o&&n[0].name||E.throwErr(E.ERR_WRONG_NUMBER_OF_POSITIONAL_BINDS,s,o);for(let e=0;e<n.length;e++)await this._bind(t,n[e],e+1);t.isPlSql&&(r.batchErrors||r.dmlRowCounts)&&E.throwErr(E.ERR_EXEC_MODE_ONLY_FOR_DML);const a=new d.ExecuteMessage(this,t,r);a.numExecs=e,a.arrayDmlRowCounts=r.dmlRowCounts,a.batchErrors=r.batchErrors,t.isPlSql&&(0===t.cursorId||t.requiresFullExecute)&&(a.numExecs=1,a.noImplicitRelease=!0,await this._protocol._processMessage(a),t.requiresFullExecute=!1,a.numExecs=e-1,a.offset=1,a.noImplicitRelease=!1),a.numExecs>0&&(await this._protocol._processMessage(a),t.requiresFullExecute=!1),t.requiresDefine&&t.sql&&(t.requiresFullExecute=!0,await this._protocol._processMessage(a),t.requiresFullExecute=!1,t.requiresDefine=!1);const u={};if(a.warning&&(u.warning=a.warning),t.numQueryVars>0)u.resultSet=a.resultSet;else{t.bufferRowIndex=0;const n=l.getOutBinds(t,e,i);n&&(u.outBinds=n),i?(t.isPlSql||(u.rowsAffected=t.rowCount,delete t.rowCount),r.dmlRowCounts&&(u.dmlRowCounts=r.dmlRowCounts),r.batchErrors&&(u.batchErrors=r.batchErrors)):(t.isPlSql&&r.implicitResultSet&&(u.implicitResults=r.implicitResultSet),t.lastRowid&&(u.lastRowid=t.lastRowid,delete t.lastRowid),t.isPlSql?t.rowCount&&(u.rowsAffected=t.rowCount):u.rowsAffected=t.rowCount||0,t.rowCount&&delete t.rowCount),this._returnStatement(t)}return u}_parseTDSAttr(t,e){let n,r,i;for(;;)if(i=t.readUInt8(),i===T.TNS_OBJ_TDS_TYPE_EMBED_ADT_INFO)t.skipBytes(1);else if(i!==T.TNS_OBJ_TDS_TYPE_SUBTYPE_MARKER)break;switch(i){case T.TNS_OBJ_TDS_TYPE_NUMBER:return e.precision=t.readInt8(),e.scale=t.readInt8(),f.DB_TYPE_NUMBER;case T.TNS_OBJ_TDS_TYPE_FLOAT:return e.precision=t.readInt8(),f.DB_TYPE_NUMBER;case T.TNS_OBJ_TDS_TYPE_VARCHAR:case T.TNS_OBJ_TDS_TYPE_CHAR:return e.maxSize=t.readUInt16BE(),n=i===T.TNS_OBJ_TDS_TYPE_VARCHAR?T.TNS_DATA_TYPE_VARCHAR:T.TNS_DATA_TYPE_CHAR,r=t.readUInt8(),r&=127,t.skipBytes(2),f.getTypeByOraTypeNum(n,r);case T.TNS_OBJ_TDS_TYPE_RAW:return e.maxSize=t.readUInt16BE(),f.DB_TYPE_RAW;case T.TNS_OBJ_TDS_TYPE_BINARY_FLOAT:return f.DB_TYPE_BINARY_FLOAT;case T.TNS_OBJ_TDS_TYPE_BINARY_DOUBLE:return f.DB_TYPE_BINARY_DOUBLE;case T.TNS_OBJ_TDS_TYPE_DATE:return f.DB_TYPE_DATE;case T.TNS_OBJ_TDS_TYPE_TIMESTAMP:return t.skipBytes(1),f.DB_TYPE_TIMESTAMP;case T.TNS_OBJ_TDS_TYPE_TIMESTAMP_LTZ:return t.skipBytes(1),f.DB_TYPE_TIMESTAMP_LTZ;case T.TNS_OBJ_TDS_TYPE_TIMESTAMP_TZ:return t.skipBytes(1),f.DB_TYPE_TIMESTAMP_TZ;case T.TNS_OBJ_TDS_TYPE_BOOLEAN:return f.DB_TYPE_BOOLEAN;case T.TNS_OBJ_TDS_TYPE_CLOB:return f.DB_TYPE_CLOB;case T.TNS_OBJ_TDS_TYPE_BLOB:return f.DB_TYPE_BLOB;case T.TNS_OBJ_TDS_TYPE_OBJ:return t.skipBytes(5),f.DB_TYPE_OBJECT;case T.TNS_OBJ_TDS_TYPE_START_EMBED_ADT:for(;0!==this._parseTDSAttr(t,{}););return f.DB_TYPE_OBJECT;case T.TNS_OBJ_TDS_TYPE_END_EMBED_ADT:return 0;default:E.throwErr(E.ERR_TDS_TYPE_NOT_SUPPORTED,i)}}async _parseTDS(t,e){const n=new m(t);n.skipBytes(4),n.skipBytes(2),n.skipBytes(2);const r=n.readUInt16BE();if(n.skipBytes(1),n.skipBytes(1),n.skipBytes(2),n.skipBytes(4),e.isCollection=!1,1===r){const t=n.pos;n.readUInt8()===T.TNS_OBJ_TDS_TYPE_COLL?e.isCollection=!0:n.pos=t}if(e.isCollection){const t=n.readUInt32BE();e.maxNumElements=n.readUInt32BE(),e.collectionType=n.readUInt8(),e.collectionType===T.TNS_OBJ_PLSQL_INDEX_TABLE&&(e.collectionFlags=T.TNS_OBJ_HAS_INDEXES),n.pos=t,e.elementTypeInfo={},e.elementType=this._parseTDSAttr(n,e.elementTypeInfo),e.elementType===f.DB_TYPE_OBJECT&&await this._getElementTypeObj(e)}else if(e.attributes)for(const t of e.attributes)this._parseTDSAttr(n,t)}async _populateDbObjectTypeInfo(t){const e=[{name:"full_name",type:f.DB_TYPE_VARCHAR,dir:T.BIND_INOUT,maxSize:500,values:[t]},{name:"ret_val",type:f.DB_TYPE_BINARY_INTEGER,dir:T.BIND_OUT,values:[]},{name:"oid",type:f.DB_TYPE_RAW,maxSize:16,dir:T.BIND_OUT,values:[]},{name:"version",type:f.DB_TYPE_BINARY_INTEGER,dir:T.BIND_OUT,values:[]},{name:"tds",type:f.DB_TYPE_RAW,maxSize:2e3,dir:T.BIND_OUT,values:[]},{name:"attrs_rc",type:f.DB_TYPE_CURSOR,dir:T.BIND_OUT,values:[]},{name:"package_name",type:f.DB_TYPE_VARCHAR,maxSize:128,dir:T.BIND_OUT,values:[]},{name:"schema",type:f.DB_TYPE_VARCHAR,maxSize:128,dir:T.BIND_OUT,values:[]},{name:"name",type:f.DB_TYPE_VARCHAR,maxSize:128,dir:T.BIND_OUT,values:[]}],n={connection:{_impl:this},nullifyInvalidCursor:!0},r=await this.execute("\n declare\n t_Instantiable varchar2(3);\n t_SuperTypeOwner varchar2(128);\n t_SuperTypeName varchar2(128);\n t_SubTypeRefCursor sys_refcursor;\n t_Pos pls_integer;\n begin\n :ret_val := dbms_pickler.get_type_shape(:full_name, :oid,\n :version, :tds, t_Instantiable, t_SuperTypeOwner,\n t_SuperTypeName, :attrs_rc, t_SubTypeRefCursor);\n :package_name := null;\n if substr(:full_name, length(:full_name) - 7) = '%ROWTYPE' then\n t_Pos := instr(:full_name, '.');\n :schema := substr(:full_name, 1, t_Pos - 1);\n :name := substr(:full_name, t_Pos + 1);\n else\n begin\n select owner, type_name\n into :schema, :name\n from all_types\n where type_oid = :oid;\n exception\n when no_data_found then\n begin\n select owner, package_name, type_name\n into :schema, :package_name, :name\n from all_plsql_types\n where type_oid = :oid;\n exception\n when no_data_found then\n null;\n end;\n end;\n end if;\n end;",1,e,n,!1);0!==r.outBinds.ret_val&&E.throwErr(E.ERR_INVALID_OBJECT_TYPE_NAME,t);const i=this._getDbObjectType(r.outBinds.schema,r.outBinds.name,r.outBinds.package_name,r.outBinds.oid);if(!i.partial)return i;i.version=r.outBinds.version;const s=await r.outBinds.attrs_rc.getRows(1e3,{});if(s.length>0){i.attributes=[];for(const t of s){const e={name:t[1]};t[4]?(e.type=f.DB_TYPE_OBJECT,e.typeClass=this._getDbObjectType(t[4],t[3],t[5],t[6]),e.typeClass.partial&&this._partialDbObjectTypes.push(e.typeClass)):e.type=f.getTypeByColumnTypeName(t[3]),i.attributes.push(e)}}return await this._parseTDS(r.outBinds.tds,i),i.partial=!1,i}async _populatePartialDbObjectTypes(){for(;this._partialDbObjectTypes.length>0;){const t=this._partialDbObjectTypes.pop();let e,n="%ROWTYPE",r=t.name;r.endsWith(n)?r=r.substring(0,r.length-n.length):n="",e=t.packageName?`"${t.schema}"."${t.packageName}"."${r}"${n}`:`"${t.schema}"."${r}"${n}`,await this._populateDbObjectTypeInfo(e)}}async commit(){const t=new d.CommitMessage(this);await this._protocol._processMessage(t)}async breakExecution(){await this._protocol.breakMessage()}isHealthy(){try{return 0===this.nscon.recvInbandNotif()}catch{return!1}}isPooled(){return!!this._pool}async connect(t){let e;t.connectString||E.throwErr(E.ERR_EMPTY_CONNECT_STRING),l.checkCredentials(t),this.sessionID=0,this.serialNum=0,this.autoCommit=!1,this.serverVersion="",this.statementCache=null,this.currentSchema="",this.invokeSessionCallback=!0,this.statementCacheSize=t.stmtCacheSize,this._currentSchemaModified=!1,this._tempLobsToClose=[],this._tempLobsTotalSize=0,this._drcpEstablishSession=!1,this._cclass=null,this._clientIdentifier="",this._clientIdentifierModified=!1,this._action="",this._actionModified=!1,this._dbOp="",this._dbOpModified=!1,this._clientInfo="",this._clientInfoModified=!1,this._module="",this._moduleModified=!1,this._drcpEnabled=!1,this.serviceName="",this.remoteAddress="",this.comboKey=null,this.nscon=new _,S.register(this,this.nscon),await this.nscon.connect(t),this.isPooled()?(e=t._connInfo[0],this.serviceName=t._connInfo[2],this.purity=t._connInfo[3]|T.PURITY_DEFAULT,this.sid=t._connInfo[4]):(e=this.nscon.getOption(h.SERVERTYPE),this.serviceName=this.nscon.getOption(h.SVCNAME),this.sid=this.nscon.getOption(h.SID),this.purity=this.nscon.getOption(h.PURITY)|T.PURITY_DEFAULT),e&&(this._drcpEnabled="pooled"===e.toLowerCase()),this.remoteAddress=this.nscon.getOption(h.REMOTEADDR),this.connectionClass=t.connectionClass,this.purity===T.PURITY_DEFAULT&&this._drcpEnabled&&(this.isPooled()?this.purity=T.PURITY_SELF:this.purity=T.PURITY_NEW),this._protocol=new a(this),this._protocol.caps.protocolVersion<T.TNS_VERSION_MIN_ACCEPTED&&E.throwErr(E.ERR_SERVER_VERSION_NOT_SUPPORTED);try{const e=new d.ProtocolMessage(this),n=new d.DataTypeMessage(this),r=new d.AuthMessage(this,t);if(this.nscon.supportsFastAuth){const t=new d.FastAuthMessage(this);t.protocolMessage=e,t.dataTypeMessage=n,t.authMessage=r,await this._protocol._processMessage(t),t.reNegotiate&&(await this._protocol._processMessage(n),await this._protocol._processMessage(r))}else await this._protocol._processMessage(e),await this._protocol._processMessage(n),await this._protocol._processMessage(r);t.token||await this._protocol._processMessage(r)}catch(t){throw this.nscon.disconnect(),t}this.statementCache=new N(this.statementCacheSize),this._partialDbObjectTypes=[],t.debugJDWP?this.jdwpData=r.from(t.debugJDWP):p.env.ORA_DEBUG_JDWP&&(this.jdwpData=r.from(p.env.ORA_DEBUG_JDWP)),this._protocol.connInProgress=!1}_returnStatement(t){this.statementCache.returnStatement(t)}_prepare(t,e){const n=this._getStatement(t,e.keepInStmtCache);return n.bufferRowIndex=0,n.bufferRowCount=0,n.lastRowIndex=0,n.moreRowsToFetch=!0,n}async _bind(t,e,n=0){const r=t.bindInfoDict,i=t.bindInfoList;if(t.isPlSql&&e.maxSize>32767){e.type===f.DB_TYPE_RAW||e.type===f.DB_TYPE_LONG_RAW?e.type=f.DB_TYPE_BLOB:e.type._csfrm===T.CSFRM_NCHAR?e.type=f.DB_TYPE_NCLOB:e.type=f.DB_TYPE_CLOB;const t=e.maxSize;delete e.maxSize,e.outConverter=async function(e){if(null===e)return null;const n=await e.getData(),r=e._length;return n&&r>t&&E.throwErr(E.ERR_INSUFFICIENT_BUFFER_FOR_BINDS),n}}if(e.type===f.DB_TYPE_CLOB||e.type===f.DB_TYPE_NCLOB||e.type===f.DB_TYPE_BLOB)for(const[t,n]of e.values.entries())if(!(n instanceof o))if(n&&n.length>0){const r=new o;await r.create(this,e.type),await r.write(1,n),e.values[t]=r}else e.values[t]=null;if(e.name){let n;n=e.name.startsWith('"')&&e.name.endsWith('"')?e.name.substring(1,e.name.length-1):e.name.toUpperCase(),n.startsWith(":")&&(n=e.name.substring(1)),r.has(n)||E.throwErr(E.ERR_INVALID_BIND_NAME,n),r.get(n).forEach((n=>{t._setVariable(n,e)}))}else{const r=i[n-1];t._setVariable(r,e)}}_createResultSet(t,e){const n=new s;if(e||(e=new c),n._resultSetNew(this,e,t),e.queryVars.length>0){const r=l.getMetadataMany(e.queryVars);n._setup(t,r)}return n}async getDbObjectClass(t){const e=await this._populateDbObjectTypeInfo(t);return await this._populatePartialDbObjectTypes(),e}async getStatementInfo(t){const e={},n={},r=this._prepare(t,e);e.connection=this;try{if(!r.isDdl){const t=new d.ExecuteMessage(this,r,e);t.parseOnly=!0,await this._protocol._processMessage(t)}return r.numQueryVars>0&&(n.metaData=l.getMetadataMany(r.queryVars)),n.bindNames=Array.from(r.bindInfoDict.keys()),n.statementType=r.statementType,n}finally{this._returnStatement(r)}}async execute(t,e,n,r,i){const s=this._prepare(t,r);try{return await this._execute(s,e,n,r,i)}catch(t){throw this._returnStatement(s),t}}_getStatement(t,e=!1){return this.statementCache.getStatement(t,e,this._drcpEstablishSession)}async ping(){const t=new d.PingMessage(this);await this._protocol._processMessage(t)}async rollback(){const t=new d.RollbackMessage(this);await this._protocol._processMessage(t)}getOracleServerVersion(){return this.serverVersion}getOracleServerVersionString(){return this.serverVersionString}setCurrentSchema(t){this._currentSchemaModified=!0,this.currentSchema=t}getCurrentSchema(){return this.currentSchema}setClientId(t){this._clientIdentifierModified=!0,this._clientIdentifier=t}setDbOp(t){this._dbOpModified=!0,this._dbOp=t}setClientInfo(t){this._clientInfoModified=!0,this._clientInfo=t}setModule(t){this._moduleModified=!0,this._module=t,this._actionModified=!0}setAction(t){this._actionModified=!0,this._action=t}async changePassword(t,e,n){const r={user:t,newPassword:n,password:e,changePassword:!0},i=new d.AuthMessage(this,r);await this._protocol._processMessage(i)}async createLob(t){const e=new o;return await e.create(this,t),e}getStmtCacheSize(){return this.statementCache._maxSize}setCallTimeout(t){this._protocol.callTimeout=t}getCallTimeout(){return this._protocol.callTimeout}getTag(){return""}getInstanceName(){return this.instanceName}getDbDomain(){return this.dbDomain}getDbName(){return this.dbName}getMaxOpenCursors(){return this.maxOpenCursors}getServiceName(){return this.serviceName}getTransactionInProgress(){return this._protocol.txnInProgress}getWarning(){return this.warning}}},4785:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(8041),o=n(6893),a=n(3034),{GrowableBuffer:u}=n(1559),_=n(1159);class c extends u{_readBytesWithLength(t){return t===i.TNS_LONG_LENGTH_INDICATOR&&(t=this.readUInt32BE()),this.readBytes(t)}getIsAtomicNull(){const t=this.readUInt8();return t===i.TNS_OBJ_ATOMIC_NULL||t===i.TNS_NULL_LENGTH_INDICATOR||(this.pos-=1,!1)}readHeader(t){if(t.imageFlags=this.readUInt8(),t.imageVersion=this.readUInt8(),this.readLength(),!(t.imageFlags&i.TNS_OBJ_NO_PREFIX_SEG)){const t=this.readLength();this.skipBytes(t)}}readLength(){const t=this.readUInt8();return t!==i.TNS_LONG_LENGTH_INDICATOR?t:this.readUInt32BE()}writeHeader(t){this.writeUInt8(t.imageFlags),this.writeUInt8(t.imageVersion),this.writeUInt8(i.TNS_LONG_LENGTH_INDICATOR),this.writeUInt32BE(0),t._objType.isCollection&&(this.writeUInt8(1),this.writeUInt8(1))}writeLength(t){t<=i.TNS_OBJ_MAX_SHORT_LENGTH?this.writeUInt8(t):(this.writeUInt8(i.TNS_LONG_LENGTH_INDICATOR),this.writeUInt32BE(t))}_writeRawBytesAndLength(t,e){this.writeLength(e),this.writeBytes(t)}}class l extends a{constructor(t,e){if("function"==typeof t&&(t=t.prototype._objType),super(t),this.packedData=e,this.unpackedAttrs=new Map,e)this.unpackedAssocArray=new Map,this.unpackedAssocKeys=void 0;else if(t){const e=r.from([0,34,i.TNS_OBJ_NON_NULL_OID,i.TNS_OBJ_HAS_EXTENT_OID]);this.toid=r.concat([e,t.oid,i.TNS_EXTENT_OID]),this.flags=i.TNS_OBJ_TOP_LEVEL,this.imageFlags=i.TNS_OBJ_IS_VERSION_81,this.imageVersion=i.TNS_OBJ_IMAGE_VERSION,t.isCollection?(this.imageFlags|=i.TNS_OBJ_IS_COLLECTION,t.collectionType===i.TNS_OBJ_PLSQL_INDEX_TABLE?this.unpackedAssocArray=new Map:this.unpackedArray=[]):this.imageFlags|=i.TNS_OBJ_NO_PREFIX_SEG}}_ensureAssocKeys(){this.unpackedAssocKeys||(this.unpackedAssocKeys=[...this.unpackedAssocArray.keys()].sort())}_ensureUnpacked(){this.packedData&&this._unpackData()}_getPackedData(){if(this.packedData)return this.packedData;const t=new c;t.writeHeader(this),this._packData(t);const e=t.pos;return t.pos=3,t.writeUInt32BE(e),t.buf.subarray(0,e)}_packData(t){const e=this._objType;if(e.isCollection)if(t.writeUInt8(e.collectionFlags),e.collectionType===i.TNS_OBJ_PLSQL_INDEX_TABLE){this._ensureAssocKeys(),t.writeLength(this.unpackedAssocKeys.length);for(const n of this.unpackedAssocKeys)t.writeInt32BE(n),this._packValue(t,e.elementType,e.elementTypeClass,this.unpackedAssocArray.get(n))}else{t.writeLength(this.unpackedArray.length);for(const n of this.unpackedArray)this._packValue(t,e.elementType,e.elementTypeClass,n)}else for(const n of e.attributes)this._packValue(t,n.type,n.typeClass,this.unpackedAttrs.get(n.name))}_packValue(t,e,n,a){if(null==a)n&&!n.prototype.isCollection?t.writeUInt8(i.TNS_OBJ_ATOMIC_NULL):t.writeUInt8(i.TNS_NULL_LENGTH_INDICATOR);else switch(e){case o.DB_TYPE_CHAR:case o.DB_TYPE_VARCHAR:t.writeBytesWithLength(r.from(a));break;case o.DB_TYPE_NCHAR:case o.DB_TYPE_NVARCHAR:t.writeBytesWithLength(r.from(a,"utf16le").swap16());break;case o.DB_TYPE_NUMBER:t.writeOracleNumber(a.toString());break;case o.DB_TYPE_BINARY_INTEGER:case o.DB_TYPE_BOOLEAN:t.writeUInt8(4),t.writeUInt32BE(a);break;case o.DB_TYPE_RAW:t.writeBytesWithLength(a);break;case o.DB_TYPE_BINARY_DOUBLE:t.writeUInt8(8),t.writeBinaryDouble(a);break;case o.DB_TYPE_BINARY_FLOAT:t.writeUInt8(4),t.writeBinaryFloat(a);break;case o.DB_TYPE_DATE:case o.DB_TYPE_TIMESTAMP:case o.DB_TYPE_TIMESTAMP_LTZ:case o.DB_TYPE_TIMESTAMP_TZ:t.writeOracleDate(a,e);break;case o.DB_TYPE_OBJECT:this._objType.isCollection||a._objType.isCollection?t.writeBytesWithLength(a._getPackedData()):a._packData(t);break;default:s.throwErr(s.ERR_NOT_IMPLEMENTED,e)}}_unpackData(){const t=new c(this.packedData);t.readHeader(this),this._unpackDataFromBuf(t),this.packedData=void 0}_unpackDataFromBuf(t){let e,n,r,s;const o=this._objType;if(o.isCollection){o.collectionType===i.TNS_OBJ_PLSQL_INDEX_TABLE?n=new Map:e=[],this.collectionFlags=t.readUInt8();const s=t.readLength();for(let a=0;a<s;a++){o.collectionType===i.TNS_OBJ_PLSQL_INDEX_TABLE&&(r=t.readUInt32BE());const s=this._unpackValue(t,o.elementType,o.elementTypeClass);o.collectionType===i.TNS_OBJ_PLSQL_INDEX_TABLE?n.set(r,s):e.push(s)}}else{s=new Map;for(const e of o.attributes){const n=this._unpackValue(t,e.type,e.typeClass);s.set(e.name,n)}}this.unpackedAttrs=s,this.unpackedArray=e,this.unpackedAssocArray=n}_unpackValue(t,e,n){let a,u,_;switch(e){case o.DB_TYPE_NUMBER:return _=t.readOracleNumber(),null!==_&&(_=parseFloat(_)),_;case o.DB_TYPE_BINARY_INTEGER:return t.readBinaryInteger();case o.DB_TYPE_VARCHAR:case o.DB_TYPE_CHAR:return t.readStr(i.CSFRM_IMPLICIT);case o.DB_TYPE_NVARCHAR:case o.DB_TYPE_NCHAR:return t.readStr(i.CSFRM_NCHAR);case o.DB_TYPE_RAW:return _=t.readBytesWithLength(),null!==_&&(_=r.from(_)),_;case o.DB_TYPE_BINARY_DOUBLE:return t.readBinaryDouble();case o.DB_TYPE_BINARY_FLOAT:return t.readBinaryFloat();case o.DB_TYPE_DATE:case o.DB_TYPE_TIMESTAMP:return t.readOracleDate(!0);case o.DB_TYPE_TIMESTAMP_LTZ:case o.DB_TYPE_TIMESTAMP_TZ:return t.readOracleDate(!1);case o.DB_TYPE_BOOLEAN:return t.readBool();case o.DB_TYPE_OBJECT:return a=t.getIsAtomicNull(),a?null:(u=new l(n),u._objType.isCollection||this._objType.isCollection?u.packedData=r.from(t.readBytesWithLength()):u._unpackDataFromBuf(t),u);default:s.throwErr(s.ERR_NOT_IMPLEMENTED,e)}}append(t){if(this._ensureUnpacked(),this.unpackedArray){const e=this._objType;e.maxNumElements>0&&this.unpackedArray.length>=e.maxNumElements&&s.throwErr(s.ERR_INVALID_COLL_INDEX_SET,this.unpackedArray.length,0,e.maxNumElements),this.unpackedArray.push(t)}else{let e;if(this._ensureAssocKeys(),0===this.unpackedAssocKeys.length)e=0;else{const t=this.unpackedAssocKeys.length-1;e=this.unpackedAssocKeys[t]+1}this.unpackedAssocArray.set(e,t),this.unpackedAssocKeys.push(e)}}deleteElement(t){this._ensureUnpacked(),this.unpackedArray?(this._objType.collectionType==i.TNS_OBJ_VARRAY&&s.throwErr(s.ERR_DELETE_ELEMENTS_OF_VARRAY),this.unpackedArray.splice(t,1)):(this._unpackedAssocKeys=void 0,this.unpackedAssocArray.delete(t))}getAttrValue(t){this._ensureUnpacked();const e=this.unpackedAttrs.get(t.name);return void 0===e?null:e}getElement(t){let e;return this._ensureUnpacked(),e=this.unpackedArray?this.unpackedArray[t]:this.unpackedAssocArray.get(t),void 0===e&&s.throwErr(s.ERR_INVALID_COLL_INDEX_GET,t),e}getFirstIndex(){return this._ensureUnpacked(),this.unpackedArray?0:this.unpackedAssocArray?(this._ensureAssocKeys(),this.unpackedAssocKeys[0]):void 0}getKeys(){return this._ensureUnpacked(),this.unpackedArray?Array.from(this.unpackedArray.keys()):this.unpackedAssocArray?(this._ensureAssocKeys(),Array.from(this.unpackedAssocKeys)):[]}getLastIndex(){if(this._ensureUnpacked(),this.unpackedArray){if(this.unpackedArray.length>0)return this.unpackedArray.length-1}else if(this.unpackedAssocArray)return this._ensureAssocKeys(),this.unpackedAssocKeys[this.unpackedAssocKeys.length-1]}getNextIndex(t){if(this._ensureUnpacked(),this.unpackedArray){if(t+1<this.unpackedArray.length)return t+1}else if(this.unpackedAssocArray){this._ensureAssocKeys();for(const e of this.unpackedAssocKeys)if(e>t)return e}}getPrevIndex(t){if(this._ensureUnpacked(),this.unpackedArray){if(t>0)return t-1}else if(this.unpackedAssocArray){this._ensureAssocKeys();for(const e of this.unpackedAssocKeys.reverse())if(e<t)return e}}getValues(){const t=[];if(this._ensureUnpacked(),this.unpackedArray)return Array.from(this.unpackedArray);if(this.unpackedAssocArray){this._ensureAssocKeys();for(const e of this.unpackedAssocKeys)t.push(this.unpackedAssocArray.get(e))}return t}hasElement(t){return this._ensureUnpacked(),this.unpackedArray?t>=0&&t<this.unpackedArray.length:this.unpackedAssocArray.has(t)}setAttrValue(t,e){this._ensureUnpacked(),this.unpackedAttrs.set(t.name,e)}setElement(t,e){if(this._ensureUnpacked(),this.unpackedArray){const n=Math.max(this.unpackedArray.length-1,0);t>n&&s.throwErr(s.ERR_INVALID_COLL_INDEX_SET,t,0,n),this.unpackedArray[t]=e}else this.unpackedAssocArray.has(t)||(this.unpackedAssocKeys=void 0),this.unpackedAssocArray.set(t,e)}trim(t){this._ensureUnpacked(),t>0&&(this.unpackedArray=this.unpackedArray.slice(0,this.unpackedArray.length-t))}}t.exports={ThinDbObjectImpl:l,readXML:function(t,e){let n;const a=new c(e);a.readHeader({}),a.skipBytes(1);const u=a.readUInt32BE();u&i.TNS_XML_TYPE_FLAG_SKIP_NEXT_4&&a.skipBytes(4);const l=a.numBytesLeft(),h=a.readBytes(l);if(u&i.TNS_XML_TYPE_STRING)n=h.toString();else if(u&i.TNS_XML_TYPE_LOB){const e=new _,i=r.from(h);e.init(t,i,o.DB_TYPE_CLOB,0,0),n=e}else s.throwErr(s.ERR_UNEXPECTED_XML_TYPE,u);return n}}},150:(t,e,n)=>{"use strict";const r=n(7468),i=n(8625),s=n(6478),o=n(1159),{ThinDbObjectImpl:a}=n(4785),u=n(851);u.ConnectionImpl=r,u.ResultSetImpl=i,u.PoolImpl=s,u.LobImpl=o,u.DbObjectImpl=a},1159:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(6634),s=n(3762),o=n(5286),a=n(8041);t.exports=class extends i{_getConnImpl(){return this.conn}async _sendMessage(t){const e=new o(this.conn,t);return await this.conn._protocol._processMessage(e),t.operation===s.TNS_LOB_OP_READ?e.data?e.data:null:e.amount}getChunkSize(){return this._chunkSize}async _getChunkSizeAsync(){this.checkConn();const t={operation:s.TNS_LOB_OP_GET_CHUNK_SIZE,sourceLobImpl:this,sendAmount:!0};this._chunkSize=this._pieceSize=await this._sendMessage(t)}getLength(){return this._length}getPieceSize(){return this._pieceSize}setPieceSize(t){this._pieceSize=t}getType(){return this.dbType}async getData(t=1,e=this._length){return e||(e=this._length),await this.read(t,e)}async read(t,e){this.checkConn();const n={operation:s.TNS_LOB_OP_READ,sourceLobImpl:this,sourceOffset:t,sendAmount:!0,amount:e||this._pieceSize};return await this._sendMessage(n)}async write(t,e){this.checkConn();const n={operation:s.TNS_LOB_OP_WRITE,sourceLobImpl:this,sourceOffset:t,data:e};await this._sendMessage(n),this._length+=e.length}getCsfrm(){return this.dbType._csfrm!==s.CSFRM_NCHAR&&this._locator[s.TNS_LOB_LOC_OFFSET_FLAG_3]&s.TNS_LOB_LOC_FLAGS_VAR_LENGTH_CHARSET?s.CSFRM_NCHAR:this.dbType._csfrm}async create(t,e){this.dirtyLength=!1,this.conn=t,this.dbType=e,this._locator=r.alloc(40),this._isTempLob=!0,this._length=0;const n={operation:s.TNS_LOB_OP_CREATE_TEMP,sourceLobImpl:this,amount:s.TNS_DURATION_SESSION,destOffset:e._oraTypeNum,sourceOffset:e._csfrm,sendAmount:!0};await this._sendMessage(n),await this._getChunkSizeAsync()}checkConn(){this.conn.nscon.connected||a.throwErr(a.ERR_INVALID_CONNECTION)}close(){this.checkConn(),this._isTempLob&&(this.conn._tempLobsToClose.push(this._locator),this.conn._tempLobsTotalSize+=this._locator.length)}init(t,e,n,r,i){this.dirtyLength=!1,this.conn=t,this._locator=e,this._isTempLob=!1,(this._locator[s.TNS_LOB_LOC_OFFSET_FLAG_4]&s.TNS_LOB_LOC_FLAGS_TEMP==s.TNS_LOB_LOC_FLAGS_TEMP||this._locator[s.TNS_LOB_LOC_OFFSET_FLAG_1]&s.TNS_LOB_LOC_FLAGS_ABSTRACT==s.TNS_LOB_LOC_FLAGS_ABSTRACT)&&(this._isTempLob=!0),this.dbType=n,this._length=r,this._chunkSize=i,this._pieceSize=i}}},6478:(t,e,n)=>{"use strict";const r=n(1217),i=n(7468),s=n(5914),o=n(8041),a=n(8023),u=n(6770),_=n(2456),{getConnectionInfo:c}=n(7696),l=n(6982),h=n(4434),T=n(3557);t.exports=class extends r{_init(t){if(t.homogeneous||o.throwErr(o.ERR_NOT_IMPLEMENTED,"Heterogeneous Pooling"),_.checkCredentials(t),this._availableObjects=[],this._name="node-thin",this._poolMin=t.poolMin,this._poolMax=t.poolMax,this._poolIncrement=t.poolIncrement,this._poolTimeout=t.poolTimeout,this._poolPingInterval=t.poolPingInterval,this._poolPingTimeout=t.poolPingTimeout,this._stmtCacheSize=t.stmtCacheSize,this._userConfig=t,this._freeConnectionList=[],this._usedConnectionList=new Set,this._password=t.password,this._walletPassword=t.walletPassword,this._obfuscatedPassword=[],this._obfuscatedWalletPassword=[],this._token=t.token,this._obfuscatedToken=[],this._privateKey=t.privateKey,this._obfuscatedPrivateKey=[],this._schedulerJob=null,this._poolCloseWaiter=null,this._pendingRequests=[],void 0!==this._password){const t=s.setObfuscatedValue(this._password);this._password=t.value,this._obfuscatedPassword=t.obfuscatedValue,this._userConfig.password=null}if(void 0!==this._walletPassword){const t=s.setObfuscatedValue(this._walletPassword);this._walletPassword=t.value,this._obfuscatedWalletPassword=t.obfuscatedValue,this._userConfig.walletPassword=null}if(void 0!==this._token){const t=s.setObfuscatedValue(this._token);this._token=t.value,this._obfuscatedToken=t.obfuscatedValue,this._userConfig.token=null}if(void 0!==this._privateKey){const t=s.setObfuscatedValue(this._privateKey);this._privateKey=t.value,this._obfuscatedPrivateKey=t.obfuscatedValue,this._userConfig.privateKey=null}this._accessTokenFn=t.accessTokenFn,this._accessTokenConfig=t.accessTokenConfig,this._isDRCPEnabled=!1,this._implicitPool=null,this.eventEmitter=new h,this.eventEmitter.on("_removePoolConnection",(async t=>{await this._destroy(t)}))}async create(t){this._init(t),this._userConfig._connInfo=await c(t),this._isDRCPEnabled="pooled"===String(this._userConfig._connInfo[0]).toLowerCase(),this._isDRCPEnabled&&""===a.connectionClass&&this._generateConnectionClass(),this.bgThreadFunc()}setAccessToken(t){if(t.token){this._token=t.token;const e=s.setObfuscatedValue(this._token);this._token=e.value,this._obfuscatedToken=e.obfuscatedValue}if(t.privateKey){this._privateKey=t.privateKey;const e=s.setObfuscatedValue(this._privateKey);this._privateKey=e.value,this._obfuscatedPrivateKey=e.obfuscatedValue}}async _getConnAttrs(){let t;const e=Object.assign({},this._userConfig);if(null===e.password&&(e.password=s.getDeobfuscatedValue(this._password,this._obfuscatedPassword)),null===e.walletPassword&&(e.walletPassword=s.getDeobfuscatedValue(this._walletPassword,this._obfuscatedWalletPassword)),null===e.token&&(e.token=s.getDeobfuscatedValue(this._token,this._obfuscatedToken),u.isTokenExpired(e.token)))if("function"==typeof this._accessTokenFn){if(t=await this._accessTokenFn(!0,this._accessTokenConfig),"string"==typeof t)if(e.token=t,u.isTokenExpired(e.token))o.throwErr(o.ERR_TOKEN_HAS_EXPIRED);else{const t=s.setObfuscatedValue(e.token);this._token=t.value,this._obfuscatedToken=t.obfuscatedValue}else if("object"==typeof t)if(e.token=t.token,e.privateKey=t.privateKey,u.isTokenExpired(e.token))o.throwErr(o.ERR_TOKEN_HAS_EXPIRED);else{const t=s.setObfuscatedValue(e.token);this._token=t.value,this._obfuscatedToken=t.obfuscatedValue;const n=s.setObfuscatedValue(e.privateKey);this._privateKey=n.value,this._obfuscatedPrivateKey=n.obfuscatedValue}}else o.throwErr(o.ERR_TOKEN_HAS_EXPIRED);return null===e.privateKey&&(e.privateKey=s.getDeobfuscatedValue(this._privateKey,this._obfuscatedPrivateKey)),e}async getConnection(){return await this.acquire()}async _destroy(t){t.nscon.ntAdapter.connected&&(t._dropSess=!0,await t.close())}async close(){await new Promise((t=>{this._poolCloseWaiter=t,this.bgWaiter&&this.bgWaiter()})),this._schedulerJob&&(clearTimeout(this._schedulerJob),this._schedulerJob=null);for(const t of this._freeConnectionList)await this._destroy(t);for(const t of this._usedConnectionList)await this._destroy(t);this.eventEmitter.removeAllListeners()}getPoolMax(){return this._poolMax}getPoolMin(){return this._poolMin}getConnectionsInUse(){return this._usedConnectionList.size}getConnectionsOpen(){return this._freeConnectionList.length+this._usedConnectionList.size}getPoolIncrement(){return this._poolIncrement}getPoolMaxPerShard(){}getPoolPingInterval(){return this._poolPingInterval}getPoolPingTimeout(){return this._poolPingTimeout}getPoolTimeout(){return this._poolTimeout}getSodaMetaDataCache(){}getStmtCacheSize(){return this._stmtCacheSize}_setScheduler(){!this._schedulerJob&&this._poolTimeout>0&&this._freeConnectionList.length>0&&this._freeConnectionList.length+this._usedConnectionList.size>this._poolMin&&(this._schedulerJob=setTimeout((()=>{this._scanIdleConnection()}),1e3*this._poolTimeout))}_scanIdleConnection(){for(;this._usedConnectionList.size+this._freeConnectionList.length>this._poolMin&&this._freeConnectionList.length>0;){const t=this._freeConnectionList[0];if(Date.now()-t._lastTimeUsed<1e3*this._poolTimeout)break;this.eventEmitter.emit("_removePoolConnection",t),this._freeConnectionList.shift()}this._schedulerJob=null,this._setScheduler()}_getNumConnsToCreate(){const t=this._freeConnectionList.length+this._usedConnectionList.size;return t<this._poolMin?this._poolMin-t:this._pendingRequests.length>0?Math.min(this._poolIncrement,this._poolMax-t):0}async bgThreadFunc(){for(;!this._poolCloseWaiter;){let t=this._poolMax-this.getConnectionsOpen();for(;t>0&&this._freeConnectionList.length>0;){const e=this._freeConnectionList.shift();this.eventEmitter.emit("_removePoolConnection",e),t--}const e=this._getNumConnsToCreate();for(let t=0;t<e;t++){try{const t=await this._getConnAttrs(),e=new i;e._pool=this,await e.connect(t),e._newSession=!0,e._dropSess=!1,e._lastTimeUsed=Date.now(),this._freeConnectionList.push(e)}catch(t){this._bgErr=t}if(this._poolIncrement>1&&this._poolMax-this._usedConnectionList.size-this._freeConnectionList.length>1&&this._setScheduler(),this._pendingRequests.length>0&&this._pendingRequests.shift().resolve(),await new Promise((t=>T.setImmediate(t))),this._poolCloseWaiter)break}if(this._poolCloseWaiter)break;(0==this._pendingRequests.length||this._bgErr)&&(await new Promise((t=>{this.bgWaiter=t})),this.bgWaiter=null)}this._poolCloseWaiter()}async acquire(){for(;this._freeConnectionList.length>0;){const t=this._freeConnectionList.pop();if(!t.isHealthy()){this.eventEmitter.emit("_removePoolConnection",t);continue}let e=!1;if((0===this._poolPingInterval||this._poolPingInterval>0&&Date.now()-t._lastTimeUsed>1e3*this._poolPingInterval)&&(e=!0),e){let e;try{this._poolPingTimeout&&(e=setTimeout((()=>{t.nscon.forceDisconnect()}),this._poolPingTimeout)),await t.ping()}catch{t.nscon.forceDisconnect();continue}finally{clearTimeout(e)}}return this._usedConnectionList.add(t),t}if(await new Promise((t=>{this._pendingRequests.push({resolve:t}),this.bgWaiter&&this.bgWaiter()})),this._bgErr){const t=this._bgErr;throw this._bgErr=null,this._pendingRequests.length>0&&this.bgWaiter&&this.bgWaiter(),t}const t=this._freeConnectionList.pop();return this._usedConnectionList.add(t),t}release(t){t.warning=void 0,this._usedConnectionList.delete(t),t.nscon.connected&&(t._lastTimeUsed=Date.now(),t._newSession=!1,this._freeConnectionList.length+this._usedConnectionList.size<this._poolMax?this._freeConnectionList.push(t):this.eventEmitter.emit("_removePoolConnection",t)),this._setScheduler()}_generateConnectionClass(){this._userConfig.connectionClass=l.randomBytes(16).toString("base64"),this._userConfig.connectionClass="NJS:"+this._userConfig.connectionClass}reconfigure(t){void 0!==t.poolIncrement&&(this._poolIncrement=t.poolIncrement),void 0!==t.poolTimeout&&this._poolTimeout!==t.poolTimeout&&(this._poolTimeout=t.poolTimeout,this._schedulerJob&&(clearTimeout(this._schedulerJob),this._schedulerJob=null)),void 0!==t.poolPingInterval&&(this._poolPingInterval=t.poolPingInterval),void 0!==t.stmtCacheSize&&(this._stmtCacheSize=t.stmtCacheSize),void 0!==t.poolMax&&(this._poolMax=t.poolMax),void 0!==t.poolMin&&(this._poolMin=t.poolMin),this.bgWaiter&&this.bgWaiter()}}},6621:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(8041);t.exports=class{constructor(t){this.protocolVersion=t.sAtts.version,this.ttcFieldVersion=i.TNS_CCAP_FIELD_VERSION_MAX,this.supports12cLogon=!0,this.supportsOob=!1,this.nCharsetId=i.TNS_CHARSET_UTF16,this.compileCaps=r.alloc(i.TNS_CCAP_MAX),this.runtimeCaps=r.alloc(i.TNS_RCAP_MAX),this.initCompileCaps(t),this.initRuntimeCaps(),this.maxStringSize=0}adjustForServerCompileCaps(t,e){t[i.TNS_CCAP_FIELD_VERSION]<this.ttcFieldVersion&&(this.ttcFieldVersion=t[i.TNS_CCAP_FIELD_VERSION],this.compileCaps[i.TNS_CCAP_FIELD_VERSION]=this.ttcFieldVersion),this.ttcFieldVersion<i.TNS_CCAP_FIELD_VERSION_23_4&&e.endOfRequestSupport&&(this.compileCaps[i.TNS_CCAP_TTC4]^=i.TNS_CCAP_END_OF_REQUEST,e.endOfRequestSupport=!1)}adjustForServerRuntimeCaps(t){t[i.TNS_RCAP_TTC]&i.TNS_RCAP_TTC_32K?this.maxStringSize=32767:this.maxStringSize=4e3}initCompileCaps(t){this.compileCaps[i.TNS_CCAP_SQL_VERSION]=i.TNS_CCAP_SQL_VERSION_MAX,this.compileCaps[i.TNS_CCAP_LOGON_TYPES]=i.TNS_CCAP_O5LOGON|i.TNS_CCAP_O5LOGON_NP|i.TNS_CCAP_O7LOGON|i.TNS_CCAP_O8LOGON_LONG_IDENTIFIER|i.TNS_CCAP_O9LOGON_LONG_PASSWORD,this.compileCaps[i.TNS_CCAP_FIELD_VERSION]=this.ttcFieldVersion,this.compileCaps[i.TNS_CCAP_SERVER_DEFINE_CONV]=1,this.compileCaps[i.TNS_CCAP_TTC1]=i.TNS_CCAP_FAST_BVEC|i.TNS_CCAP_END_OF_CALL_STATUS|i.TNS_CCAP_IND_RCD,this.compileCaps[i.TNS_CCAP_OCI1]=i.TNS_CCAP_FAST_SESSION_PROPAGATE|i.TNS_CCAP_APP_CTX_PIGGYBACK,this.compileCaps[i.TNS_CCAP_TDS_VERSION]=i.TNS_CCAP_TDS_VERSION_MAX,this.compileCaps[i.TNS_CCAP_RPC_VERSION]=i.TNS_CCAP_RPC_VERSION_MAX,this.compileCaps[i.TNS_CCAP_RPC_SIG]=i.TNS_CCAP_RPC_SIG_VALUE,this.compileCaps[i.TNS_CCAP_DBF_VERSION]=i.TNS_CCAP_DBF_VERSION_MAX,this.compileCaps[i.TNS_CCAP_LOB]=i.TNS_CCAP_LOB_UB8_SIZE|i.TNS_CCAP_LOB_ENCS|i.TNS_CCAP_LOB_PREFETCH|i.TNS_CCAP_LOB_TEMP_SIZE|i.TNS_CCAP_LOB_12C|i.TNS_CCAP_LOB_PREFETCH_DATA,this.compileCaps[i.TNS_CCAP_UB2_DTY]=1,this.compileCaps[i.TNS_CCAP_LOB2]=i.TNS_CCAP_LOB2_QUASI|i.TNS_CCAP_LOB2_2GB_PREFETCH,this.compileCaps[i.TNS_CCAP_TTC3]=i.TNS_CCAP_IMPLICIT_RESULTS|i.TNS_CCAP_BIG_CHUNK_CLR|i.TNS_CCAP_KEEP_OUT_ORDER,this.compileCaps[i.TNS_CCAP_TTC2]=i.TNS_CCAP_ZLNP,this.compileCaps[i.TNS_CCAP_OCI2]=i.TNS_CCAP_DRCP,this.compileCaps[i.TNS_CCAP_CLIENT_FN]=i.TNS_CCAP_CLIENT_FN_MAX,this.compileCaps[i.TNS_CCAP_TTC4]=i.TNS_CCAP_INBAND_NOTIFICATION,t.endOfRequestSupport&&(this.compileCaps[i.TNS_CCAP_TTC4]|=i.TNS_CCAP_END_OF_REQUEST),this.compileCaps[i.TNS_CCAP_CTB_FEATURE_BACKPORT]=i.TNS_CCAP_CTB_IMPLICIT_POOL,this.compileCaps[i.TNS_CCAP_TTC5]=i.TNS_CCAP_VECTOR_SUPPORT}initRuntimeCaps(){this.runtimeCaps[i.TNS_RCAP_COMPAT]=i.TNS_RCAP_COMPAT_81,this.runtimeCaps[i.TNS_RCAP_TTC]=i.TNS_RCAP_TTC_ZERO_COPY|i.TNS_RCAP_TTC_32K}checkNCharsetId(){this.nCharsetId!==i.TNS_CHARSET_UTF16&&s.throwErr(s.ERR_NCHAR_CS_NOT_SUPPORTED,this.nCharsetId)}}},3762:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(2269),s=n(5068);t.exports={BIND_IN:i.BIND_IN,BIND_INOUT:i.BIND_INOUT,BIND_OUT:i.BIND_OUT,CLIENT_VERSION:i.VERSION_MAJOR<<24|i.VERSION_MINOR<<20|i.VERSION_PATCH<<12,CSFRM_IMPLICIT:i.CSFRM_IMPLICIT,CSFRM_NCHAR:i.CSFRM_NCHAR,DRIVER_NAME:i.DEFAULT_DRIVER_NAME+" thn",PURITY_DEFAULT:i.PURITY_DEFAULT,PURITY_NEW:i.PURITY_NEW,PURITY_SELF:i.PURITY_SELF,SYSASM:i.SYSASM,SYSBKP:i.SYSBKP,SYSDBA:i.SYSDBA,SYSDG:i.SYSDG,SYSKM:i.SYSKM,SYSOPER:i.SYSOPER,SYSRAC:i.SYSRAC,AUTH_MODE_DEFAULT:0,AUTH_MODE_PRELIM:8,AUTH_MODE_SYSASM:32768,AUTH_MODE_SYSBKP:131072,AUTH_MODE_SYSDBA:2,AUTH_MODE_SYSDGD:262144,AUTH_MODE_SYSKMT:524288,AUTH_MODE_SYSOPER:4,AUTH_MODE_SYSRAC:1048576,TNS_AUTH_MODE_LOGON:1,TNS_AUTH_MODE_CHANGE_PASSWORD:2,TNS_AUTH_MODE_SYSDBA:32,TNS_AUTH_MODE_SYSOPER:64,TNS_AUTH_MODE_PRELIM:128,TNS_AUTH_MODE_WITH_PASSWORD:256,TNS_AUTH_MODE_SYSASM:4194304,TNS_AUTH_MODE_SYSBKP:16777216,TNS_AUTH_MODE_SYSDGD:33554432,TNS_AUTH_MODE_SYSKMT:67108864,TNS_AUTH_MODE_SYSRAC:134217728,TNS_AUTH_MODE_IAM_TOKEN:536870912,TNS_PACKET_TYPE_CONNECT:1,TNS_PACKET_TYPE_ACCEPT:2,TNS_PACKET_TYPE_REFUSE:4,TNS_PACKET_TYPE_REDIRECT:5,TNS_PACKET_TYPE_DATA:6,TNS_PACKET_TYPE_RESEND:11,TNS_PACKET_TYPE_MARKER:12,TNS_PACKET_TYPE_CONTROL:14,TNS_DATA_TYPE_DEFAULT:0,TNS_DATA_TYPE_VARCHAR:1,TNS_DATA_TYPE_NUMBER:2,TNS_DATA_TYPE_BINARY_INTEGER:3,TNS_DATA_TYPE_FLOAT:4,TNS_DATA_TYPE_STR:5,TNS_DATA_TYPE_VNU:6,TNS_DATA_TYPE_PDN:7,TNS_DATA_TYPE_LONG:8,TNS_DATA_TYPE_VCS:9,TNS_DATA_TYPE_TIDDEF:10,TNS_DATA_TYPE_ROWID:11,TNS_DATA_TYPE_DATE:12,TNS_DATA_TYPE_VBI:15,TNS_DATA_TYPE_RAW:23,TNS_DATA_TYPE_LONG_RAW:24,TNS_DATA_TYPE_UB2:25,TNS_DATA_TYPE_UB4:26,TNS_DATA_TYPE_SB1:27,TNS_DATA_TYPE_SB2:28,TNS_DATA_TYPE_SB4:29,TNS_DATA_TYPE_SWORD:30,TNS_DATA_TYPE_UWORD:31,TNS_DATA_TYPE_PTRB:32,TNS_DATA_TYPE_PTRW:33,TNS_DATA_TYPE_OER8:290,TNS_DATA_TYPE_FUN:291,TNS_DATA_TYPE_AUA:292,TNS_DATA_TYPE_RXH7:293,TNS_DATA_TYPE_NA6:294,TNS_DATA_TYPE_OAC9:39,TNS_DATA_TYPE_AMS:40,TNS_DATA_TYPE_BRN:41,TNS_DATA_TYPE_BRP:298,TNS_DATA_TYPE_BRV:299,TNS_DATA_TYPE_KVA:300,TNS_DATA_TYPE_CLS:301,TNS_DATA_TYPE_CUI:302,TNS_DATA_TYPE_DFN:303,TNS_DATA_TYPE_DQR:304,TNS_DATA_TYPE_DSC:305,TNS_DATA_TYPE_EXE:306,TNS_DATA_TYPE_FCH:307,TNS_DATA_TYPE_GBV:308,TNS_DATA_TYPE_GEM:309,TNS_DATA_TYPE_GIV:310,TNS_DATA_TYPE_OKG:311,TNS_DATA_TYPE_HMI:312,TNS_DATA_TYPE_INO:313,TNS_DATA_TYPE_LNF:315,TNS_DATA_TYPE_ONT:316,TNS_DATA_TYPE_OPE:317,TNS_DATA_TYPE_OSQ:318,TNS_DATA_TYPE_SFE:319,TNS_DATA_TYPE_SPF:320,TNS_DATA_TYPE_VSN:321,TNS_DATA_TYPE_UD7:322,TNS_DATA_TYPE_DSA:323,TNS_DATA_TYPE_UIN:68,TNS_DATA_TYPE_PIN:327,TNS_DATA_TYPE_PFN:328,TNS_DATA_TYPE_PPT:329,TNS_DATA_TYPE_STO:331,TNS_DATA_TYPE_ARC:333,TNS_DATA_TYPE_MRS:334,TNS_DATA_TYPE_MRT:335,TNS_DATA_TYPE_MRG:336,TNS_DATA_TYPE_MRR:337,TNS_DATA_TYPE_MRC:338,TNS_DATA_TYPE_VER:339,TNS_DATA_TYPE_LON2:340,TNS_DATA_TYPE_INO2:341,TNS_DATA_TYPE_ALL:342,TNS_DATA_TYPE_UDB:343,TNS_DATA_TYPE_AQI:344,TNS_DATA_TYPE_ULB:345,TNS_DATA_TYPE_ULD:346,TNS_DATA_TYPE_SLS:91,TNS_DATA_TYPE_SID:348,TNS_DATA_TYPE_NA7:349,TNS_DATA_TYPE_LVC:94,TNS_DATA_TYPE_LVB:95,TNS_DATA_TYPE_CHAR:96,TNS_DATA_TYPE_AVC:97,TNS_DATA_TYPE_AL7:354,TNS_DATA_TYPE_K2RPC:355,TNS_DATA_TYPE_BINARY_FLOAT:100,TNS_DATA_TYPE_BINARY_DOUBLE:101,TNS_DATA_TYPE_CURSOR:102,TNS_DATA_TYPE_RDD:104,TNS_DATA_TYPE_XDP:359,TNS_DATA_TYPE_OSL:106,TNS_DATA_TYPE_OKO8:363,TNS_DATA_TYPE_EXT_NAMED:108,TNS_DATA_TYPE_INT_NAMED:109,TNS_DATA_TYPE_EXT_REF:110,TNS_DATA_TYPE_INT_REF:111,TNS_DATA_TYPE_CLOB:112,TNS_DATA_TYPE_BLOB:113,TNS_DATA_TYPE_BFILE:114,TNS_DATA_TYPE_CFILE:115,TNS_DATA_TYPE_RSET:116,TNS_DATA_TYPE_CWD:117,TNS_DATA_TYPE_JSON:119,TNS_DATA_TYPE_OAC122:120,TNS_DATA_TYPE_UD12:380,TNS_DATA_TYPE_AL8:381,TNS_DATA_TYPE_LFOP:382,TNS_DATA_TYPE_VECTOR:127,TNS_DATA_TYPE_FCRT:383,TNS_DATA_TYPE_DNY:384,TNS_DATA_TYPE_OPR:385,TNS_DATA_TYPE_PLS:386,TNS_DATA_TYPE_XID:387,TNS_DATA_TYPE_TXN:388,TNS_DATA_TYPE_DCB:389,TNS_DATA_TYPE_CCA:390,TNS_DATA_TYPE_WRN:391,TNS_DATA_TYPE_TLH:393,TNS_DATA_TYPE_TOH:394,TNS_DATA_TYPE_FOI:395,TNS_DATA_TYPE_SID2:396,TNS_DATA_TYPE_TCH:397,TNS_DATA_TYPE_PII:398,TNS_DATA_TYPE_PFI:399,TNS_DATA_TYPE_PPU:400,TNS_DATA_TYPE_PTE:401,TNS_DATA_TYPE_CLV:146,TNS_DATA_TYPE_RXH8:404,TNS_DATA_TYPE_N12:405,TNS_DATA_TYPE_AUTH:406,TNS_DATA_TYPE_KVAL:407,TNS_DATA_TYPE_DTR:152,TNS_DATA_TYPE_DUN:153,TNS_DATA_TYPE_DOP:154,TNS_DATA_TYPE_VST:155,TNS_DATA_TYPE_ODT:156,TNS_DATA_TYPE_FGI:413,TNS_DATA_TYPE_DSY:414,TNS_DATA_TYPE_DSYR8:415,TNS_DATA_TYPE_DSYH8:416,TNS_DATA_TYPE_DSYL:417,TNS_DATA_TYPE_DSYT8:418,TNS_DATA_TYPE_DSYV8:419,TNS_DATA_TYPE_DSYP:420,TNS_DATA_TYPE_DSYF:421,TNS_DATA_TYPE_DSYK:422,TNS_DATA_TYPE_DSYY:423,TNS_DATA_TYPE_DSYQ:424,TNS_DATA_TYPE_DSYC:425,TNS_DATA_TYPE_DSYA:426,TNS_DATA_TYPE_OT8:427,TNS_DATA_TYPE_DOL:172,TNS_DATA_TYPE_DSYTY:429,TNS_DATA_TYPE_AQE:430,TNS_DATA_TYPE_KV:431,TNS_DATA_TYPE_AQD:432,TNS_DATA_TYPE_AQ8:433,TNS_DATA_TYPE_TIME:178,TNS_DATA_TYPE_TIME_TZ:179,TNS_DATA_TYPE_TIMESTAMP:180,TNS_DATA_TYPE_TIMESTAMP_TZ:181,TNS_DATA_TYPE_INTERVAL_YM:182,TNS_DATA_TYPE_INTERVAL_DS:183,TNS_DATA_TYPE_EDATE:184,TNS_DATA_TYPE_ETIME:185,TNS_DATA_TYPE_ETTZ:186,TNS_DATA_TYPE_ESTAMP:187,TNS_DATA_TYPE_ESTZ:188,TNS_DATA_TYPE_EIYM:189,TNS_DATA_TYPE_EIDS:190,TNS_DATA_TYPE_RFS:449,TNS_DATA_TYPE_RXH10:450,TNS_DATA_TYPE_DCLOB:195,TNS_DATA_TYPE_DBLOB:196,TNS_DATA_TYPE_DBFILE:197,TNS_DATA_TYPE_DJSON:198,TNS_DATA_TYPE_KPN:454,TNS_DATA_TYPE_KPDNR:455,TNS_DATA_TYPE_DSYD:456,TNS_DATA_TYPE_DSYS:457,TNS_DATA_TYPE_DSYR:458,TNS_DATA_TYPE_DSYH:459,TNS_DATA_TYPE_DSYT:460,TNS_DATA_TYPE_DSYV:461,TNS_DATA_TYPE_AQM:462,TNS_DATA_TYPE_OER11:463,TNS_DATA_TYPE_UROWID:208,TNS_DATA_TYPE_AQL:466,TNS_DATA_TYPE_OTC:467,TNS_DATA_TYPE_KFNO:468,TNS_DATA_TYPE_KFNP:469,TNS_DATA_TYPE_KGT8:470,TNS_DATA_TYPE_RASB4:471,TNS_DATA_TYPE_RAUB2:472,TNS_DATA_TYPE_RAUB1:473,TNS_DATA_TYPE_RATXT:474,TNS_DATA_TYPE_RSSB4:475,TNS_DATA_TYPE_RSUB2:476,TNS_DATA_TYPE_RSUB1:477,TNS_DATA_TYPE_RSTXT:478,TNS_DATA_TYPE_RIDL:479,TNS_DATA_TYPE_GLRDD:480,TNS_DATA_TYPE_GLRDG:481,TNS_DATA_TYPE_GLRDC:482,TNS_DATA_TYPE_OKO:483,TNS_DATA_TYPE_DPP:484,TNS_DATA_TYPE_DPLS:485,TNS_DATA_TYPE_DPMOP:486,TNS_DATA_TYPE_TIMESTAMP_LTZ:231,TNS_DATA_TYPE_ESITZ:232,TNS_DATA_TYPE_UB8:233,TNS_DATA_TYPE_STAT:490,TNS_DATA_TYPE_RFX:491,TNS_DATA_TYPE_FAL:492,TNS_DATA_TYPE_CKV:493,TNS_DATA_TYPE_DRCX:494,TNS_DATA_TYPE_KGH:495,TNS_DATA_TYPE_AQO:496,TNS_DATA_TYPE_PNTY:241,TNS_DATA_TYPE_OKGT:498,TNS_DATA_TYPE_KPFC:499,TNS_DATA_TYPE_FE2:500,TNS_DATA_TYPE_SPFP:501,TNS_DATA_TYPE_DPULS:502,TNS_DATA_TYPE_BOOLEAN:252,TNS_DATA_TYPE_AQA:509,TNS_DATA_TYPE_KPBF:510,TNS_DATA_TYPE_TSM:513,TNS_DATA_TYPE_MSS:514,TNS_DATA_TYPE_KPC:516,TNS_DATA_TYPE_CRS:517,TNS_DATA_TYPE_KKS:518,TNS_DATA_TYPE_KSP:519,TNS_DATA_TYPE_KSPTOP:520,TNS_DATA_TYPE_KSPVAL:521,TNS_DATA_TYPE_PSS:522,TNS_DATA_TYPE_NLS:523,TNS_DATA_TYPE_ALS:524,TNS_DATA_TYPE_KSDEVTVAL:525,TNS_DATA_TYPE_KSDEVTTOP:526,TNS_DATA_TYPE_KPSPP:527,TNS_DATA_TYPE_KOL:528,TNS_DATA_TYPE_LST:529,TNS_DATA_TYPE_ACX:530,TNS_DATA_TYPE_SCS:531,TNS_DATA_TYPE_RXH:532,TNS_DATA_TYPE_KPDNS:533,TNS_DATA_TYPE_KPDCN:534,TNS_DATA_TYPE_KPNNS:535,TNS_DATA_TYPE_KPNCN:536,TNS_DATA_TYPE_KPS:537,TNS_DATA_TYPE_APINF:538,TNS_DATA_TYPE_TEN:539,TNS_DATA_TYPE_XSSCS:540,TNS_DATA_TYPE_XSSSO:541,TNS_DATA_TYPE_XSSAO:542,TNS_DATA_TYPE_KSRPC:543,TNS_DATA_TYPE_KVL:560,TNS_DATA_TYPE_SESSGET:563,TNS_DATA_TYPE_SESSREL:564,TNS_DATA_TYPE_XSSDEF:565,TNS_DATA_TYPE_PDQCINV:572,TNS_DATA_TYPE_PDQIDC:573,TNS_DATA_TYPE_KPDQCSTA:574,TNS_DATA_TYPE_KPRS:575,TNS_DATA_TYPE_KPDQIDC:576,TNS_DATA_TYPE_RTSTRM:578,TNS_DATA_TYPE_SESSRET:579,TNS_DATA_TYPE_SCN6:580,TNS_DATA_TYPE_KECPA:581,TNS_DATA_TYPE_KECPP:582,TNS_DATA_TYPE_SXA:583,TNS_DATA_TYPE_KVARR:584,TNS_DATA_TYPE_KPNGN:585,TNS_DATA_TYPE_XSNSOP:590,TNS_DATA_TYPE_XSATTR:591,TNS_DATA_TYPE_XSNS:592,TNS_DATA_TYPE_TXT:593,TNS_DATA_TYPE_XSSESSNS:594,TNS_DATA_TYPE_XSATTOP:595,TNS_DATA_TYPE_XSCREOP:596,TNS_DATA_TYPE_XSDETOP:597,TNS_DATA_TYPE_XSDESOP:598,TNS_DATA_TYPE_XSSETSP:599,TNS_DATA_TYPE_XSSIDP:600,TNS_DATA_TYPE_XSPRIN:601,TNS_DATA_TYPE_XSKVL:602,TNS_DATA_TYPE_XSSSDEF2:603,TNS_DATA_TYPE_XSNSOP2:604,TNS_DATA_TYPE_XSNS2:605,TNS_DATA_TYPE_IMPLRES:611,TNS_DATA_TYPE_OER19:612,TNS_DATA_TYPE_UB1ARRAY:613,TNS_DATA_TYPE_SESSSTATE:614,TNS_DATA_TYPE_AC_REPLAY:615,TNS_DATA_TYPE_AC_CONT:616,TNS_DATA_TYPE_KPDNREQ:622,TNS_DATA_TYPE_KPDNRNF:623,TNS_DATA_TYPE_KPNGNC:624,TNS_DATA_TYPE_KPNRI:625,TNS_DATA_TYPE_AQENQ:626,TNS_DATA_TYPE_AQDEQ:627,TNS_DATA_TYPE_AQJMS:628,TNS_DATA_TYPE_KPDNRPAY:629,TNS_DATA_TYPE_KPDNRACK:630,TNS_DATA_TYPE_KPDNRMP:631,TNS_DATA_TYPE_KPDNRDQ:632,TNS_DATA_TYPE_CHUNKINFO:636,TNS_DATA_TYPE_SCN:637,TNS_DATA_TYPE_SCN8:638,TNS_DATA_TYPE_UD21:639,TNS_DATA_TYPE_TNP:640,TNS_DATA_TYPE_OAC:646,TNS_DATA_TYPE_OER:652,TNS_DATA_TYPE_UDS:663,TNS_TYPE_REP_NATIVE:0,TNS_TYPE_REP_UNIVERSAL:1,TNS_TYPE_REP_ORACLE:10,TNS_MSG_TYPE_PROTOCOL:1,TNS_MSG_TYPE_DATA_TYPES:2,TNS_MSG_TYPE_FUNCTION:3,TNS_MSG_TYPE_ERROR:4,TNS_MSG_TYPE_ROW_HEADER:6,TNS_MSG_TYPE_ROW_DATA:7,TNS_MSG_TYPE_PARAMETER:8,TNS_MSG_TYPE_STATUS:9,TNS_MSG_TYPE_IO_VECTOR:11,TNS_MSG_TYPE_LOB_DATA:14,TNS_MSG_TYPE_WARNING:15,TNS_MSG_TYPE_DESCRIBE_INFO:16,TNS_MSG_TYPE_PIGGYBACK:17,TNS_MSG_TYPE_FLUSH_OUT_BINDS:19,TNS_MSG_TYPE_BIT_VECTOR:21,TNS_MSG_TYPE_SERVER_SIDE_PIGGYBACK:23,TNS_MSG_TYPE_ONEWAY_FN:26,TNS_MSG_TYPE_IMPLICIT_RESULTSET:27,TNS_MSG_TYPE_RENEGOTIATE:28,TNS_MSG_TYPE_END_OF_REQUEST:29,TNS_MSG_TYPE_FAST_AUTH:34,TNS_KEYWORD_NUM_CURRENT_SCHEMA:168,TNS_KEYWORD_NUM_EDITION:172,TNS_BIND_USE_INDICATORS:1,TNS_BIND_USE_LENGTH:2,TNS_BIND_ARRAY:64,TNS_BIND_DIR_OUTPUT:16,TNS_BIND_DIR_INPUT:32,TNS_BIND_DIR_INPUT_OUTPUT:48,TNS_EXEC_OPTION_PARSE:1,TNS_EXEC_OPTION_BIND:8,TNS_EXEC_OPTION_DEFINE:16,TNS_EXEC_OPTION_EXECUTE:32,TNS_EXEC_OPTION_FETCH:64,TNS_EXEC_OPTION_COMMIT:256,TNS_EXEC_OPTION_COMMIT_REEXECUTE:1,TNS_EXEC_OPTION_PLSQL_BIND:1024,TNS_EXEC_OPTION_DML_ROWCOUNTS:16384,TNS_EXEC_OPTION_NOT_PLSQL:32768,TNS_EXEC_OPTION_IMPLICIT_RESULTSET:32768,TNS_EXEC_OPTION_DESCRIBE:131072,TNS_EXEC_OPTION_NO_COMPRESSED_FETCH:262144,TNS_EXEC_OPTION_BATCH_ERRORS:524288,TNS_EXEC_OPTION_NO_IMPL_REL:2097152,TNS_SERVER_PIGGYBACK_QUERY_CACHE_INVALIDATION:1,TNS_SERVER_PIGGYBACK_OS_PID_MTS:2,TNS_SERVER_PIGGYBACK_TRACE_EVENT:3,TNS_SERVER_PIGGYBACK_SESS_RET:4,TNS_SERVER_PIGGYBACK_SYNC:5,TNS_SERVER_PIGGYBACK_LTXID:7,TNS_SERVER_PIGGYBACK_AC_REPLAY_CONTEXT:8,TNS_SERVER_PIGGYBACK_EXT_SYNC:9,TNS_SESSGET_SESSION_CHANGED:4,TNS_LOB_OP_GET_LENGTH:1,TNS_LOB_OP_READ:2,TNS_LOB_OP_TRIM:32,TNS_LOB_OP_WRITE:64,TNS_LOB_OP_GET_CHUNK_SIZE:16384,TNS_LOB_OP_CREATE_TEMP:272,TNS_LOB_OP_FREE_TEMP:273,TNS_LOB_OP_OPEN:32768,TNS_LOB_OP_CLOSE:65536,TNS_LOB_OP_IS_OPEN:69632,TNS_LOB_OP_ARRAY:524288,TNS_LOB_LOC_OFFSET_FLAG_1:4,TNS_LOB_LOC_OFFSET_FLAG_3:6,TNS_LOB_LOC_OFFSET_FLAG_4:7,TNS_LOB_QLOCATOR_VERSION:4,TNS_LOB_LOC_FLAGS_BLOB:1,TNS_LOB_LOC_FLAGS_VALUE_BASED:32,TNS_LOB_LOC_FLAGS_ABSTRACT:64,TNS_LOB_LOC_FLAGS_INIT:8,TNS_LOB_LOC_FLAGS_TEMP:1,TNS_LOB_LOC_FLAGS_VAR_LENGTH_CHARSET:128,TNS_LOB_OPEN_READ_WRITE:2,TNS_LOB_PREFETCH_FLAG:33554432,TNS_JSON_MAX_LENGTH:33554432,TNS_END_TO_END_ACTION:16,TNS_END_TO_END_CLIENT_IDENTIFIER:1,TNS_END_TO_END_CLIENT_INFO:256,TNS_END_TO_END_DBOP:512,TNS_END_TO_END_MODULE:8,TNS_VERSION_MIN_ACCEPTED:315,TNS_VERSION_MIN_LARGE_SDU:315,TNS_FUNC_AUTH_PHASE_ONE:118,TNS_FUNC_AUTH_PHASE_TWO:115,TNS_FUNC_CLOSE_CURSORS:105,TNS_FUNC_COMMIT:14,TNS_FUNC_EXECUTE:94,TNS_FUNC_FETCH:5,TNS_FUNC_LOB_OP:96,TNS_FUNC_LOGOFF:9,TNS_FUNC_PING:147,TNS_FUNC_ROLLBACK:15,TNS_FUNC_SET_END_TO_END_ATTR:135,TNS_FUNC_REEXECUTE:4,TNS_FUNC_REEXECUTE_AND_FETCH:78,TNS_FUNC_SET_SCHEMA:152,TNS_FUNC_SESSION_GET:162,TNS_FUNC_SESSION_RELEASE:163,TNS_FUNC_SESSION_STATE:176,TNS_FUNC_CANCEL_ALL:120,TNS_CHARSET_UTF8:873,TNS_CHARSET_UTF16:2e3,TNS_ENCODING_UTF8:"UTF-8",TNS_ENCODING_UTF16:"UTF-16LE",TNS_ENCODING_MULTI_BYTE:1,TNS_ENCODING_CONV_LENGTH:2,TNS_CCAP_SQL_VERSION:0,TNS_CCAP_LOGON_TYPES:4,TNS_CCAP_CTB_FEATURE_BACKPORT:5,TNS_CCAP_FIELD_VERSION:7,TNS_CCAP_SERVER_DEFINE_CONV:8,TNS_CCAP_TTC1:15,TNS_CCAP_OCI1:16,TNS_CCAP_TDS_VERSION:17,TNS_CCAP_RPC_VERSION:18,TNS_CCAP_RPC_SIG:19,TNS_CCAP_DBF_VERSION:21,TNS_CCAP_LOB:23,TNS_CCAP_TTC2:26,TNS_CCAP_UB2_DTY:27,TNS_CCAP_OCI2:31,TNS_CCAP_CLIENT_FN:34,TNS_CCAP_TTC3:37,TNS_CCAP_TTC4:40,TNS_CCAP_LOB2:42,TNS_CCAP_TTC5:44,TNS_CCAP_MAX:51,TNS_CCAP_SQL_VERSION_MAX:6,TNS_CCAP_FIELD_VERSION_11_2:6,TNS_CCAP_FIELD_VERSION_12_1:7,TNS_CCAP_FIELD_VERSION_12_2:8,TNS_CCAP_FIELD_VERSION_12_2_EXT1:9,TNS_CCAP_FIELD_VERSION_18_1:10,TNS_CCAP_FIELD_VERSION_18_1_EXT_1:11,TNS_CCAP_FIELD_VERSION_19_1:12,TNS_CCAP_FIELD_VERSION_19_1_EXT_1:13,TNS_CCAP_FIELD_VERSION_20_1:14,TNS_CCAP_FIELD_VERSION_20_1_EXT_1:15,TNS_CCAP_FIELD_VERSION_21_1:16,TNS_CCAP_FIELD_VERSION_23_1:17,TNS_CCAP_FIELD_VERSION_23_1_EXT_1:18,TNS_CCAP_FIELD_VERSION_23_1_EXT_2:19,TNS_CCAP_FIELD_VERSION_23_1_EXT_3:20,TNS_CCAP_FIELD_VERSION_23_1_EXT_4:21,TNS_CCAP_FIELD_VERSION_23_1_EXT_5:22,TNS_CCAP_FIELD_VERSION_23_1_EXT_6:23,TNS_CCAP_FIELD_VERSION_23_4:24,TNS_CCAP_FIELD_VERSION_MAX:24,TNS_CCAP_O5LOGON:8,TNS_CCAP_O5LOGON_NP:2,TNS_CCAP_O7LOGON:32,TNS_CCAP_O8LOGON_LONG_IDENTIFIER:64,TNS_CCAP_O9LOGON_LONG_PASSWORD:128,TNS_CCAP_END_OF_CALL_STATUS:1,TNS_CCAP_IND_RCD:8,TNS_CCAP_FAST_BVEC:32,TNS_CCAP_FAST_SESSION_PROPAGATE:16,TNS_CCAP_APP_CTX_PIGGYBACK:128,TNS_CCAP_TDS_VERSION_MAX:3,TNS_CCAP_RPC_VERSION_MAX:7,TNS_CCAP_RPC_SIG_VALUE:3,TNS_CCAP_DBF_VERSION_MAX:1,TNS_CCAP_IMPLICIT_RESULTS:16,TNS_CCAP_BIG_CHUNK_CLR:32,TNS_CCAP_KEEP_OUT_ORDER:128,TNS_CCAP_LOB_UB8_SIZE:1,TNS_CCAP_LOB_ENCS:2,TNS_CCAP_LOB_PREFETCH_DATA:4,TNS_CCAP_LOB_TEMP_SIZE:8,TNS_CCAP_LOB_PREFETCH:64,TNS_CCAP_LOB_12C:128,TNS_CCAP_DRCP:16,TNS_CCAP_ZLNP:4,TNS_CCAP_INBAND_NOTIFICATION:4,TNS_CCAP_END_OF_REQUEST:32,TNS_CCAP_CLIENT_FN_MAX:12,TNS_CCAP_LOB2_QUASI:1,TNS_CCAP_LOB2_2GB_PREFETCH:4,TNS_CCAP_CTB_IMPLICIT_POOL:8,TNS_CCAP_VECTOR_SUPPORT:8,TNS_RCAP_COMPAT:0,TNS_RCAP_TTC:6,TNS_RCAP_MAX:7,TNS_RCAP_COMPAT_81:2,TNS_RCAP_TTC_ZERO_COPY:1,TNS_RCAP_TTC_32K:4,TNS_VERIFIER_TYPE_11G_1:45394,TNS_VERIFIER_TYPE_11G_2:6949,TNS_VERIFIER_TYPE_12C:18453,TNS_UDS_FLAGS_IS_JSON:256,TNS_UDS_FLAGS_IS_OSON:2048,TNS_EOCS_FLAGS_TXN_IN_PROGRESS:2,TNS_EOCS_FLAGS_SESS_RELEASE:32768,TNS_ESCAPE_CHAR:253,TNS_LONG_LENGTH_INDICATOR:s.TNS_LONG_LENGTH_INDICATOR,TNS_NULL_LENGTH_INDICATOR:s.TNS_NULL_LENGTH_INDICATOR,TNS_MAX_ROWID_LENGTH:18,TNS_DURATION_SESSION:10,TNS_MAX_LONG_LENGTH:2147483647,TNS_SDU:8192,TNS_TDU:65535,TNS_MAX_CONNECT_DATA:230,TNS_MAX_UROWID_LENGTH:3950,TNS_SERVER_CONVERTS_CHARS:1,DRCP_DEAUTHENTICATE:2,TNS_OBJ_IS_VERSION_81:128,TNS_OBJ_IS_DEGENERATE:16,TNS_OBJ_IS_COLLECTION:8,TNS_OBJ_NO_PREFIX_SEG:4,TNS_OBJ_IMAGE_VERSION:1,TNS_OBJ_MAX_SHORT_LENGTH:245,TNS_OBJ_ATOMIC_NULL:253,TNS_OBJ_NON_NULL_OID:2,TNS_OBJ_HAS_EXTENT_OID:8,TNS_OBJ_TOP_LEVEL:1,TNS_OBJ_HAS_INDEXES:16,TNS_OBJ_PLSQL_INDEX_TABLE:1,TNS_OBJ_NESTED_TABLE:2,TNS_OBJ_VARRAY:3,TNS_OBJ_TDS_TYPE_CHAR:1,TNS_OBJ_TDS_TYPE_DATE:2,TNS_OBJ_TDS_TYPE_FLOAT:5,TNS_OBJ_TDS_TYPE_NUMBER:6,TNS_OBJ_TDS_TYPE_VARCHAR:7,TNS_OBJ_TDS_TYPE_BOOLEAN:8,TNS_OBJ_TDS_TYPE_RAW:19,TNS_OBJ_TDS_TYPE_TIMESTAMP:21,TNS_OBJ_TDS_TYPE_TIMESTAMP_TZ:23,TNS_OBJ_TDS_TYPE_OBJ:27,TNS_OBJ_TDS_TYPE_COLL:28,TNS_OBJ_TDS_TYPE_CLOB:29,TNS_OBJ_TDS_TYPE_BLOB:30,TNS_OBJ_TDS_TYPE_TIMESTAMP_LTZ:33,TNS_OBJ_TDS_TYPE_BINARY_FLOAT:37,TNS_OBJ_TDS_TYPE_START_EMBED_ADT:39,TNS_OBJ_TDS_TYPE_END_EMBED_ADT:40,TNS_OBJ_TDS_TYPE_SUBTYPE_MARKER:43,TNS_OBJ_TDS_TYPE_EMBED_ADT_INFO:44,TNS_OBJ_TDS_TYPE_BINARY_DOUBLE:45,TNS_XML_TYPE_LOB:1,TNS_XML_TYPE_STRING:4,TNS_XML_TYPE_FLAG_SKIP_NEXT_4:1048576,TNS_ERR_INCONSISTENT_DATA_TYPES:932,TNS_ERR_VAR_NOT_IN_SELECT_LIST:1007,TNS_ERR_INBAND_MESSAGE:12573,TNS_ERR_INVALID_SERVICE_NAME:12514,TNS_ERR_INVALID_SID:12505,TNS_ERR_NO_DATA_FOUND:1403,TNS_ERR_SESSION_SHUTDOWN:12572,TNS_WARN_COMPILATION_CREATE:32,TNS_VECTOR_MAX_LENGTH:1048576,VECTOR_FORMAT_FLEX:0,VECTOR_META_FLAG_FLEXIBLE_DIM:1,PACKET_HEADER_SIZE:8,NUMBER_AS_TEXT_CHARS:172,CHUNKED_BYTES_CHUNK_SIZE:65536,TNS_DATA_FLAGS_END_OF_REQUEST:8192,TNS_BASE64_ALPHABET_ARRAY:r.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),TNS_EXTENT_OID:r.from("00000000000000000000000000010001","hex")}},3605:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(6982);let s="aes-256-cbc";const o=r.from([0,1]),a=new class{_decrypt(t,e){const n=r.alloc(16,0),o=i.createDecipheriv(s,t,n);o.setAutoPadding(!1);let a=o.update(e);return a=r.concat([a,o.final()]),a}_encrypt(t,e,n){const o=r.alloc(16,0),a=16-e.length%16,u=r.alloc(a,a);a>0&&(n?e+=r.alloc(a):e=r.concat([e,u]));const _=i.createCipheriv(s,t,o);let c=_.update(e);return c=r.concat([c,_.final()]),n||(c=c.slice(0,e.length)),e.fill(0),c}_setEncryptedPasswordBuffers(t,e,n,s){const o=r.alloc(16);i.randomFillSync(o,0,16);const a=r.concat([o,t]);if(s.encodedPassword=this._encrypt(n,a),a.fill(0),s.encodedPassword=s.encodedPassword.slice().toString("hex").toUpperCase(),e){const t=r.concat([o,e]);s.encodedNewPassword=this._encrypt(n,t),t.fill(0),s.encodedNewPassword=s.encodedNewPassword.slice().toString("hex").toUpperCase()}t.fill(0),e&&e.fill(0)}updateVerifierData(t,e,n,o,a){let u=32,_="sha512";const c=r.from(t.AUTH_VFR_DATA,"hex"),l=r.from(t.AUTH_SESSKEY,"hex");let h=Number(t.AUTH_PBKDF2_VGEN_COUNT);const T=r.from(e,"utf8");let p,f,E;if(o){s="aes-192-cbc",u=24,_="sha1";const t=i.createHash(_);t.update(T),t.update(c);const e=t.digest();p=r.alloc(e.length+4),e.copy(p,0,0,e.length)}else{s="aes-256-cbc";const t=r.from("AUTH_PBKDF2_SPEEDY_KEY","utf8"),e=r.concat([c,t]);f=i.pbkdf2Sync(T,e,h,64,"sha512");const n=i.createHash(_);n.update(f),n.update(c),p=n.digest().slice(0,u)}n&&(E=r.from(n,"utf8"));const d=this._decrypt(p,l),N=r.alloc(d.length);i.randomFillSync(N);const S=this._encrypt(p,N);if(48===d.length){a.sessionKey=S.slice().toString("hex").toUpperCase().slice(0,96);const t=r.alloc(24);for(let e=16;e<=40;e++)t[e-16]=d[e]^N[e];const e=i.createHash("md5").update(t.subarray(0,16)).digest(),n=i.createHash("md5").update(t.subarray(16)).digest();a.comboKey=r.concat([e,n]).slice(0,u)}else{a.sessionKey=S.slice().toString("hex").toUpperCase().slice(0,64);const e=r.from(t.AUTH_PBKDF2_CSK_SALT,"hex");h=Number(t.AUTH_PBKDF2_SDER_COUNT);const n=r.concat([N.slice(0,u),d.slice(0,u)]).toString("hex").toUpperCase(),s=r.from(n,"utf8");a.comboKey=i.pbkdf2Sync(s,e,h,u,"sha512")}const m=r.alloc(16);if(!o){i.randomFillSync(m,0,16);const t=r.concat([m,f]);a.speedyKey=this._encrypt(a.comboKey,t),a.speedyKey=a.speedyKey.slice(0,80).toString("hex").toUpperCase()}this._setEncryptedPasswordBuffers(T,E,a.comboKey,a)}getEncryptedJSWPData(t,e){let n=this._encrypt(t,e,!0);return n=n.slice().toString("hex").toUpperCase(),n=r.concat([n,o]),n}updatePasswordsWithComboKey(t,e,n,i){const s=r.from(t,"utf8");let o;e&&(o=r.from(e,"utf8")),this._setEncryptedPasswordBuffers(s,o,n,i)}};t.exports=a},5732:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(8041),o=n(932),a=n(3605),u=n(3815),_=n(2456),c=_.CLIENT_INFO,l=n(6982);t.exports=class extends u{constructor(t,e){super(t),this.functionCode=i.TNS_FUNC_AUTH_PHASE_ONE,this.messageType=i.TNS_MSG_TYPE_FUNCTION,this.sessionData={},this.conn=t,this.sessionKey="",this.encodedPassword="",this.changePassword=!1,Object.defineProperty(this,"password",{enumerable:!1,value:e.password}),this.username=e.user,void 0===this.username?this.username="":this.username=this.username.trim(),this.schemaUser="",this.proxyUser="",this.proxyStatus=-1,0!==this.username.length&&(this.proxyStatusObj=_.checkProxyUserValidity(this.username),0===this.proxyStatusObj.status&&(this.proxyStatus=0,this.proxyUser=this.proxyStatusObj.proxyUser,this.schemaUser=this.proxyStatusObj.schemaUser,this.username=this.proxyUser)),this.newPassword=e.newPassword,e.changePassword&&(this.changePassword=!0,this.functionCode=i.TNS_FUNC_AUTH_PHASE_TWO),this.username?this.userByteLen=r.byteLength(this.username):this.userByteLen=0,this.token=e.token,this.token&&(this.functionCode=i.TNS_FUNC_AUTH_PHASE_TWO),this.privateKey=e.privateKey,this.privateKey&&(this.privateKey=_.normalizePrivateKey(this.privateKey)),this.serviceName=this.conn.serviceName,this.remoteAddress=this.conn.remoteAddress,this.setAuthMode(e)}setAuthMode(t){this.newPassword||(this.authMode=i.TNS_AUTH_MODE_LOGON),t.privilege&i.SYSDBA&&(this.authMode|=i.TNS_AUTH_MODE_SYSDBA),t.privilege&i.SYSOPER&&(this.authMode|=i.TNS_AUTH_MODE_SYSOPER),t.privilege&i.SYSASM&&(this.authMode|=i.TNS_AUTH_MODE_SYSASM),t.privilege&i.SYSBKP&&(this.authMode|=i.TNS_AUTH_MODE_SYSBKP),t.privilege&i.SYSDG&&(this.authMode|=i.TNS_AUTH_MODE_SYSDGD),t.privilege&i.SYSKM&&(this.authMode|=i.TNS_AUTH_MODE_SYSKMT),t.privilege&i.SYSRAC&&(this.authMode|=i.TNS_AUTH_MODE_SYSRAC),this.privateKey&&(this.authMode|=i.TNS_AUTH_MODE_IAM_TOKEN),this.newPassword&&(this.authMode|=i.TNS_AUTH_MODE_CHANGE_PASSWORD),this.token||(this.authMode|=i.TNS_AUTH_MODE_WITH_PASSWORD)}getAlterTimezoneStatement(){let t,e;if(o.env.ORA_SDTZ)e=o.env.ORA_SDTZ;else{const n=(new Date).getTimezoneOffset();let r=Math.trunc(n/60);const i=Math.abs((n-60*r)%60);r<0?(t="+",r=-r):t="-",r=r.toLocaleString("en-US",{minimumIntegerDigits:2}),e=`${t}${r}:${i}`}return`ALTER SESSION SET TIME_ZONE ='${e}'\0`}encode(t){let e=!1;if(this.writeFunctionHeader(t),this.userByteLen>0?t.writeUInt8(1):t.writeUInt8(0),t.writeUB4(this.userByteLen),t.writeUB4(this.authMode),this.functionCode===i.TNS_FUNC_AUTH_PHASE_ONE)t.writeUInt8(1),t.writeUB4(5),t.writeUInt8(0),t.writeUInt8(1),this.userByteLen>0&&t.writeBytesWithLength(r.from(this.username)),t.writeKeyValue("AUTH_TERMINAL",c.terminal),t.writeKeyValue("AUTH_PROGRAM_NM",c.program),t.writeKeyValue("AUTH_MACHINE",c.hostName),t.writeKeyValue("AUTH_PID",c.pid),t.writeKeyValue("AUTH_SID",c.userName);else{let n=0;if(this.changePassword?(a.updatePasswordsWithComboKey(this.password,this.newPassword,this.conn.comboKey,this),n=2):(n=4,this.token?n+=1:(n+=2,this.verifierType===i.TNS_VERIFIER_TYPE_11G_1||this.verifierType===i.TNS_VERIFIER_TYPE_11G_2?e=!0:this.verifierType!==i.TNS_VERIFIER_TYPE_12C?s.throwErr(s.ERR_UNSUPPORTED_VERIFIER_TYPE,this.verifierType.toString(16)):n+=1,a.updateVerifierData(this.sessionData,this.password,this.newPassword,e,this),this.conn.comboKey=this.comboKey,this.newPassword&&(n+=1)),this.privateKey&&(n+=2),this.conn.connectionClass&&(n+=1),this.conn.purity&&(n+=1),this.conn.jdwpData&&(this.encryptedJDWPData=a.getEncryptedJSWPData(this.sessionKey,this.conn.jdwpData),n+=1),0!==this.schemaUser.length&&(n+=1)),t.writeUInt8(1),t.writeUB4(n),t.writeUInt8(1),t.writeUInt8(1),this.userByteLen>0&&t.writeBytesWithLength(r.from(this.username)),this.token?t.writeKeyValue("AUTH_TOKEN",this.token):this.changePassword||(t.writeKeyValue("AUTH_SESSKEY",this.sessionKey,1),e||t.writeKeyValue("AUTH_PBKDF2_SPEEDY_KEY",this.speedyKey)),this.changePassword||(t.writeKeyValue("SESSION_CLIENT_CHARSET","873"),t.writeKeyValue("SESSION_CLIENT_DRIVER_NAME",i.DRIVER_NAME),t.writeKeyValue("SESSION_CLIENT_VERSION",i.CLIENT_VERSION.toString()),t.writeKeyValue("AUTH_ALTER_SESSION",this.getAlterTimezoneStatement(),1)),this.encodedPassword&&t.writeKeyValue("AUTH_PASSWORD",this.encodedPassword),0===this.proxyStatus&&t.writeKeyValue("PROXY_CLIENT_NAME",this.schemaUser),this.encodedNewPassword&&t.writeKeyValue("AUTH_NEWPASSWORD",this.encodedNewPassword),this.conn.connectionClass&&t.writeKeyValue("AUTH_KPPL_CONN_CLASS",this.conn.connectionClass),this.conn.purity&&t.writeKeyValue("AUTH_KPPL_PURITY",""+this.conn.purity),this.privateKey){const e="date: "+(new Date).toGMTString()+"\n(request-target): "+this.serviceName+"\nhost: "+this.remoteAddress,n=l.createSign("RSA-SHA256").update(e).sign(this.privateKey,"base64");t.writeKeyValue("AUTH_HEADER",e),t.writeKeyValue("AUTH_SIGNATURE",n)}this.conn.jdwpData&&t.writeKeyValue("AUTH_ORA_DEBUG_JDWP",this.encryptedJDWPData)}}processReturnParameter(t){const e=t.readUB2();for(let n=0;n<e;n++){t.skipUB4();const e=t.readStr(i.CSFRM_IMPLICIT);let n="";t.readUB4()>0&&(n=t.readStr(i.CSFRM_IMPLICIT));const r=t.readUB4();"AUTH_VFR_DATA"===e&&(this.verifierType=r),this.sessionData[e]=n}if(this.functionCode===i.TNS_FUNC_AUTH_PHASE_ONE)this.functionCode=i.TNS_FUNC_AUTH_PHASE_TWO;else{let e,n,r,s;this.conn.dbDomain=this.sessionData.AUTH_SC_DB_DOMAIN,this.conn.dbName=this.sessionData.AUTH_SC_DBUNIQUE_NAME,this.conn.maxOpenCursors=Number(this.sessionData.AUTH_MAX_OPEN_CURSORS||0),this.conn.serviceName=this.sessionData.AUTH_SC_SERVICE_NAME,this.conn.instanceName=this.sessionData.AUTH_INSTANCENAME;const o=Number(this.sessionData.AUTH_VERSION_NO),a=o>>24&255;this.conn.warning=this.warning,t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_18_1_EXT_1?(e=o>>16&255,n=o>>12&15,r=o>>4&255,s=15&o):(e=o>>20&15,n=o>>12&255,r=o>>8&15,s=255&o),this.conn.serverVersionString=a+"."+e+"."+n+"."+r+"."+s,this.conn.serverVersion=1e8*a+1e6*e+1e4*n+100*r+1*s}}}},3815:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(8041);t.exports=class{constructor(t){this.errorInfo={},this.connection=t,this.messageType=i.TNS_MSG_TYPE_FUNCTION,this.functionCode=0,this.callStatus=0,this.flushOutBinds=!1,this.endOfResponse=!1,this.endToEndSeqNum=0,this.errorOccurred=!1,this.warning=void 0}preProcess(){}async postProcess(){}writeFunctionHeader(t){t.writeUInt8(this.messageType),t.writeUInt8(this.functionCode),t.writeSeqNum(),t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_23_1_EXT_1&&t.writeUB8(0)}processErrorInfo(t){this.callStatus=t.readUB4(),t.skipUB2(),t.skipUB4(),t.skipUB2(),t.skipUB2(),t.skipUB2(),this.errorInfo.cursorId=t.readUB2();const e=t.readSB2();t.skipUB1(),t.skipUB1(),t.skipUB1(),t.skipUB1(),t.skipUB1(),t.readUInt8()&i.TNS_WARN_COMPILATION_CREATE&&(this.warning=s.getErr(s.WRN_COMPILATION_CREATE)),this.errorInfo.rowID=t.readRowID(),t.skipUB4(),t.skipUB1(),t.skipUB1(),t.skipUB2(),t.skipUB4(),t.readUB4()>0&&t.skipBytesChunked();const n=t.readUB2();if(n>0){this.errorInfo.batchErrors=[];const e=t.readUInt8();for(let r=0;r<n;r++){e===i.TNS_LONG_LENGTH_INDICATOR&&t.skipUB4();const n=t.readUB2();this.errorInfo.batchErrors.push(new Error(n))}e===i.TNS_LONG_LENGTH_INDICATOR&&t.skipBytes(1)}const r=t.readUB4();if(r>0){r>65535&&s.throwErr(s.ERR_TOO_MANY_BATCH_ERRORS);const e=t.readUInt8();let o;for(let s=0;s<r;s++)e===i.TNS_LONG_LENGTH_INDICATOR&&t.skipUB4(),o=t.readUB4(),s<n&&(this.errorInfo.batchErrors[s].offset=o);e===i.TNS_LONG_LENGTH_INDICATOR&&t.skipBytes(1)}const o=t.readUB2();if(o>0){t.skipBytes(1);for(let e=0;e<o;e++)t.skipUB2(),this.errorInfo.batchErrors[e].message=t.readStr(i.CSFRM_IMPLICIT),t.skipBytes(2)}this.errorInfo.num=t.readUB4(),this.errorInfo.rowCount=t.readUB8(),t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_20_1&&(t.skipUB4(),t.skipUB4()),0!==this.errorInfo.num&&(this.errorOccurred=!0,e>=0&&(this.errorInfo.pos=e),this.errorInfo.message=t.readStr(i.CSFRM_IMPLICIT),this.errorInfo.message=this.errorInfo.message.trim()),this.endOfResponse=!this.connection.nscon.endOfRequestSupport}processReturnParameter(){}processWarningInfo(t){const e=t.readUB2(),n=t.readUB2();if(t.skipUB2(),0!=e&&n>0){const n=t.readStr(i.CSFRM_IMPLICIT).trim();this.warning=new Error(n),this.warning.errorNum=e}}decode(t){this.process(t)}process(t){this.endOfResponse=!1,this.flushOutBinds=!1;do{this.savePoint(t);const e=t.readUInt8();this.processMessage(t,e)}while(!this.endOfResponse)}savePoint(t){t.savePoint()}processMessage(t,e){e===i.TNS_MSG_TYPE_ERROR?this.processErrorInfo(t):e===i.TNS_MSG_TYPE_WARNING?this.processWarningInfo(t):e===i.TNS_MSG_TYPE_STATUS?(this.callStatus=t.readUB4(),this.endToEndSeqNum=t.readUB2(),this.endOfResponse=!this.connection.nscon.endOfRequestSupport):e===i.TNS_MSG_TYPE_PARAMETER?this.processReturnParameter(t):e===i.TNS_MSG_TYPE_SERVER_SIDE_PIGGYBACK?this.processServerSidePiggyBack(t):e===i.TNS_MSG_TYPE_END_OF_REQUEST?this.endOfResponse=!0:s.throwErr(s.ERR_UNEXPECTED_MESSAGE_TYPE,e,t.pos,t.packetNum)}processServerSidePiggyBack(t){const e=t.readUInt8();if(e===i.TNS_SERVER_PIGGYBACK_LTXID)t.readUB4()>0&&t.skipBytesChunked();else if(e===i.TNS_SERVER_PIGGYBACK_QUERY_CACHE_INVALIDATION||e===i.TNS_SERVER_PIGGYBACK_TRACE_EVENT);else if(e===i.TNS_SERVER_PIGGYBACK_OS_PID_MTS){const e=t.readUB2();t.skipUB1(),t.skipBytes(e)}else if(e===i.TNS_SERVER_PIGGYBACK_SYNC){t.skipUB2(),t.skipUB1();const e=t.readUB4();t.skipBytes(1);for(let n=0;n<e;n++){let e=t.readUB2();e>0&&t.skipBytesChunked(),e=t.readUB2(),e>0&&t.skipBytesChunked(),t.skipUB2()}t.skipUB4()}else if(e===i.TNS_SERVER_PIGGYBACK_EXT_SYNC)t.skipUB2(),t.skipUB1();else if(e===i.TNS_SERVER_PIGGYBACK_AC_REPLAY_CONTEXT)t.skipUB2(),t.skipUB1(),t.skipUB4(),t.skipUB4(),t.skipUB1(),t.readUB4()>0&&t.skipBytesChunked();else if(e===i.TNS_SERVER_PIGGYBACK_SESS_RET){t.skipUB2(),t.skipUB1();const e=t.readUB2();if(e>0){t.skipUB1();for(let n=0;n<e;++n){let e=t.readUB2();e>0&&t.skipBytesChunked(),e=t.readUB2(),e>0&&t.skipBytesChunked(),t.skipUB2()}}t.readUB4()&i.TNS_SESSGET_SESSION_CHANGED&&this.connection._drcpEstablishSession&&this.connection.statementCache.clearCursors(),this.connection._drcpEstablishSession=!1,t.skipUB4(),t.skipUB2()}else s.throwErr(s.ERR_UNKOWN_SERVER_SIDE_PIGGYBACK,e)}writePiggybacks(t){this.connection._currentSchemaModified&&this._writeCurrentSchemaPiggyback(t),this.connection.statementCache._cursorsToClose.size>0&&!this.connection._drcpEstablishSession&&this.writeCloseCursorsPiggyBack(t),(this.connection._actionModified||this.connection._clientIdentifierModified||this.connection._dbopModified||this.connection._clientInfoModified||this.connection._moduleModified)&&this._writeEndToEndPiggybacks(t),this.connection._tempLobsTotalSize>0&&this.writeCloseTempLobsPiggyback(t)}writePiggybackHeader(t,e){t.writeUInt8(i.TNS_MSG_TYPE_PIGGYBACK),t.writeUInt8(e),t.writeSeqNum(),t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_23_1_EXT_1&&t.writeUB8(0)}writeCloseCursorsPiggyBack(t){this.writePiggybackHeader(t,i.TNS_FUNC_CLOSE_CURSORS),t.writeUInt8(1),this.connection.statementCache.writeCursorsToClose(t)}writeCloseTempLobsPiggyback(t){const e=this.connection._tempLobsToClose,n=i.TNS_LOB_OP_FREE_TEMP|i.TNS_LOB_OP_ARRAY;this.writePiggybackHeader(t,i.TNS_FUNC_LOB_OP),t.writeUInt8(1),t.writeUB4(this.connection._tempLobsTotalSize),t.writeUInt8(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUB4(n),t.writeUInt8(0),t.writeUB4(0),t.writeUB8(0),t.writeUB8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0);for(const n of e)t.writeBytes(n);this.connection._tempLobsToClose=[],this.connection._tempLobsTotalSize=0}_writeCurrentSchemaPiggyback(t){this.writePiggybackHeader(t,i.TNS_FUNC_SET_SCHEMA),t.writeUInt8(1);const e=r.byteLength(this.connection.currentSchema);t.writeUB4(e),t.writeBytesWithLength(r.from(this.connection.currentSchema))}_writeEndToEndPiggybacks(t){let e=0;this.connection._actionModified&&(e|=i.TNS_END_TO_END_ACTION),this.connection._clientIdentifierModified&&(e|=i.TNS_END_TO_END_CLIENT_IDENTIFIER),this.connection._clientInfoModified&&(e|=i.TNS_END_TO_END_CLIENT_INFO),this.connection._moduleModified&&(e|=i.TNS_END_TO_END_MODULE),this.connection._dbOpModified&&(e|=i.TNS_END_TO_END_DBOP),this.writePiggybackHeader(t,i.TNS_FUNC_SET_END_TO_END_ATTR),t.writeUInt8(0),t.writeUInt8(0),t.writeUB4(e);const n=this.writeEndEndTraceValue(t,this.connection._clientIdentifier,this.connection._clientIdentifierModified),r=this.writeEndEndTraceValue(t,this.connection._module,this.connection._moduleModified),s=this.writeEndEndTraceValue(t,this.connection._action,this.connection._actionModified);t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0);const o=this.writeEndEndTraceValue(t,this.connection._clientInfo,this.connection._clientInfoModified);t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0);const a=this.writeEndEndTraceValue(t,this.connection._dbOp,this.connection._dbOpModified);this.connection._clientIdentifierModified&&this.connection._clientIdentifier&&t.writeBytesWithLength(n),this.connection._moduleModified&&this.connection._module&&t.writeBytesWithLength(r),this.connection._actionModified&&this.connection._action&&t.writeBytesWithLength(s),this.connection._clientInfoModified&&this.connection._clientInfo&&t.writeBytesWithLength(o),this.connection._dbOpModified&&this.connection._dbOp&&t.writeBytesWithLength(a),this.connection._actionModified=!1,this.connection._action="",this.connection._clientIdentifierModified=!1,this.connection._clientIdentifier="",this.connection._clientInfoModified=!1,this.connection._clientInfo="",this.connection._dbOpModified=!1,this.connection._dbOp="",this.connection._moduleModified=!1,this.connection._module=""}writeEndEndTraceValue(t,e,n){let i;return n?(t.writeUInt8(1),e?(i=r.from(e),t.writeUB4(i.length)):t.writeUB4(0)):(t.writeUInt8(0),t.writeUB4(0)),i}saveDeferredErr(){this.deferredErr||(this.deferredErr=s.getErr(...arguments))}}},2283:(t,e,n)=>{"use strict";const r=n(3815),i=n(3762);t.exports=class extends r{constructor(t){super(t),this.functionCode=i.TNS_FUNC_COMMIT}encode(t){this.writeFunctionHeader(t)}}},7030:(t,e,n)=>{"use strict";const r=n(3762),i=n(3815),s=[[r.TNS_DATA_TYPE_VARCHAR,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_NUMBER,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_LONG,r.TNS_DATA_TYPE_LONG,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DATE,r.TNS_DATA_TYPE_DATE,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_RAW,r.TNS_DATA_TYPE_RAW,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LONG_RAW,r.TNS_DATA_TYPE_LONG_RAW,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UB2,r.TNS_DATA_TYPE_UB2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UB4,r.TNS_DATA_TYPE_UB4,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SB1,r.TNS_DATA_TYPE_SB1,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_SB2,r.TNS_DATA_TYPE_SB2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SB4,r.TNS_DATA_TYPE_SB4,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SWORD,r.TNS_DATA_TYPE_SWORD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UWORD,r.TNS_DATA_TYPE_UWORD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PTRB,r.TNS_DATA_TYPE_PTRB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PTRW,r.TNS_DATA_TYPE_PTRW,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TIDDEF,r.TNS_DATA_TYPE_TIDDEF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ROWID,r.TNS_DATA_TYPE_ROWID,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AMS,r.TNS_DATA_TYPE_AMS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BRN,r.TNS_DATA_TYPE_BRN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CWD,r.TNS_DATA_TYPE_CWD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OAC122,r.TNS_DATA_TYPE_OAC122,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OER8,r.TNS_DATA_TYPE_OER8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FUN,r.TNS_DATA_TYPE_FUN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AUA,r.TNS_DATA_TYPE_AUA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RXH7,r.TNS_DATA_TYPE_RXH7,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_NA6,r.TNS_DATA_TYPE_NA6,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BRP,r.TNS_DATA_TYPE_BRP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BRV,r.TNS_DATA_TYPE_BRV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KVA,r.TNS_DATA_TYPE_KVA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CLS,r.TNS_DATA_TYPE_CLS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CUI,r.TNS_DATA_TYPE_CUI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DFN,r.TNS_DATA_TYPE_DFN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DQR,r.TNS_DATA_TYPE_DQR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSC,r.TNS_DATA_TYPE_DSC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EXE,r.TNS_DATA_TYPE_EXE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FCH,r.TNS_DATA_TYPE_FCH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GBV,r.TNS_DATA_TYPE_GBV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GEM,r.TNS_DATA_TYPE_GEM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GIV,r.TNS_DATA_TYPE_GIV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OKG,r.TNS_DATA_TYPE_OKG,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_HMI,r.TNS_DATA_TYPE_HMI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INO,r.TNS_DATA_TYPE_INO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LNF,r.TNS_DATA_TYPE_LNF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ONT,r.TNS_DATA_TYPE_ONT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OPE,r.TNS_DATA_TYPE_OPE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OSQ,r.TNS_DATA_TYPE_OSQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SFE,r.TNS_DATA_TYPE_SFE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SPF,r.TNS_DATA_TYPE_SPF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_VSN,r.TNS_DATA_TYPE_VSN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UD7,r.TNS_DATA_TYPE_UD7,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSA,r.TNS_DATA_TYPE_DSA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PIN,r.TNS_DATA_TYPE_PIN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PFN,r.TNS_DATA_TYPE_PFN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PPT,r.TNS_DATA_TYPE_PPT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_STO,r.TNS_DATA_TYPE_STO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ARC,r.TNS_DATA_TYPE_ARC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MRS,r.TNS_DATA_TYPE_MRS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MRT,r.TNS_DATA_TYPE_MRT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MRG,r.TNS_DATA_TYPE_MRG,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MRR,r.TNS_DATA_TYPE_MRR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MRC,r.TNS_DATA_TYPE_MRC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_VER,r.TNS_DATA_TYPE_VER,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LON2,r.TNS_DATA_TYPE_LON2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INO2,r.TNS_DATA_TYPE_INO2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ALL,r.TNS_DATA_TYPE_ALL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UDB,r.TNS_DATA_TYPE_UDB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQI,r.TNS_DATA_TYPE_AQI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ULB,r.TNS_DATA_TYPE_ULB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ULD,r.TNS_DATA_TYPE_ULD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SID,r.TNS_DATA_TYPE_SID,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_NA7,r.TNS_DATA_TYPE_NA7,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AL7,r.TNS_DATA_TYPE_AL7,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_K2RPC,r.TNS_DATA_TYPE_K2RPC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XDP,r.TNS_DATA_TYPE_XDP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OKO8,r.TNS_DATA_TYPE_OKO8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UD12,r.TNS_DATA_TYPE_UD12,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AL8,r.TNS_DATA_TYPE_AL8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LFOP,r.TNS_DATA_TYPE_LFOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FCRT,r.TNS_DATA_TYPE_FCRT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DNY,r.TNS_DATA_TYPE_DNY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OPR,r.TNS_DATA_TYPE_OPR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PLS,r.TNS_DATA_TYPE_PLS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XID,r.TNS_DATA_TYPE_XID,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TXN,r.TNS_DATA_TYPE_TXN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DCB,r.TNS_DATA_TYPE_DCB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CCA,r.TNS_DATA_TYPE_CCA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_WRN,r.TNS_DATA_TYPE_WRN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TLH,r.TNS_DATA_TYPE_TLH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TOH,r.TNS_DATA_TYPE_TOH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FOI,r.TNS_DATA_TYPE_FOI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SID2,r.TNS_DATA_TYPE_SID2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TCH,r.TNS_DATA_TYPE_TCH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PII,r.TNS_DATA_TYPE_PII,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PFI,r.TNS_DATA_TYPE_PFI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PPU,r.TNS_DATA_TYPE_PPU,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PTE,r.TNS_DATA_TYPE_PTE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RXH8,r.TNS_DATA_TYPE_RXH8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_N12,r.TNS_DATA_TYPE_N12,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AUTH,r.TNS_DATA_TYPE_AUTH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KVAL,r.TNS_DATA_TYPE_KVAL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FGI,r.TNS_DATA_TYPE_FGI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSY,r.TNS_DATA_TYPE_DSY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYR8,r.TNS_DATA_TYPE_DSYR8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYH8,r.TNS_DATA_TYPE_DSYH8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYL,r.TNS_DATA_TYPE_DSYL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYT8,r.TNS_DATA_TYPE_DSYT8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYV8,r.TNS_DATA_TYPE_DSYV8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYP,r.TNS_DATA_TYPE_DSYP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYF,r.TNS_DATA_TYPE_DSYF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYK,r.TNS_DATA_TYPE_DSYK,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYY,r.TNS_DATA_TYPE_DSYY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYQ,r.TNS_DATA_TYPE_DSYQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYC,r.TNS_DATA_TYPE_DSYC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYA,r.TNS_DATA_TYPE_DSYA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OT8,r.TNS_DATA_TYPE_OT8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYTY,r.TNS_DATA_TYPE_DSYTY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQE,r.TNS_DATA_TYPE_AQE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KV,r.TNS_DATA_TYPE_KV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQD,r.TNS_DATA_TYPE_AQD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQ8,r.TNS_DATA_TYPE_AQ8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RFS,r.TNS_DATA_TYPE_RFS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RXH10,r.TNS_DATA_TYPE_RXH10,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPN,r.TNS_DATA_TYPE_KPN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNR,r.TNS_DATA_TYPE_KPDNR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYD,r.TNS_DATA_TYPE_DSYD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYS,r.TNS_DATA_TYPE_DSYS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYR,r.TNS_DATA_TYPE_DSYR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYH,r.TNS_DATA_TYPE_DSYH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYT,r.TNS_DATA_TYPE_DSYT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYV,r.TNS_DATA_TYPE_DSYV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQM,r.TNS_DATA_TYPE_AQM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OER11,r.TNS_DATA_TYPE_OER11,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQL,r.TNS_DATA_TYPE_AQL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OTC,r.TNS_DATA_TYPE_OTC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KFNO,r.TNS_DATA_TYPE_KFNO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KFNP,r.TNS_DATA_TYPE_KFNP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KGT8,r.TNS_DATA_TYPE_KGT8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RASB4,r.TNS_DATA_TYPE_RASB4,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RAUB2,r.TNS_DATA_TYPE_RAUB2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RAUB1,r.TNS_DATA_TYPE_RAUB1,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RATXT,r.TNS_DATA_TYPE_RATXT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RSSB4,r.TNS_DATA_TYPE_RSSB4,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RSUB2,r.TNS_DATA_TYPE_RSUB2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RSUB1,r.TNS_DATA_TYPE_RSUB1,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RSTXT,r.TNS_DATA_TYPE_RSTXT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RIDL,r.TNS_DATA_TYPE_RIDL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GLRDD,r.TNS_DATA_TYPE_GLRDD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GLRDG,r.TNS_DATA_TYPE_GLRDG,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GLRDC,r.TNS_DATA_TYPE_GLRDC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OKO,r.TNS_DATA_TYPE_OKO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DPP,r.TNS_DATA_TYPE_DPP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DPLS,r.TNS_DATA_TYPE_DPLS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DPMOP,r.TNS_DATA_TYPE_DPMOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_STAT,r.TNS_DATA_TYPE_STAT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RFX,r.TNS_DATA_TYPE_RFX,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FAL,r.TNS_DATA_TYPE_FAL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CKV,r.TNS_DATA_TYPE_CKV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DRCX,r.TNS_DATA_TYPE_DRCX,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KGH,r.TNS_DATA_TYPE_KGH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQO,r.TNS_DATA_TYPE_AQO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OKGT,r.TNS_DATA_TYPE_OKGT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPFC,r.TNS_DATA_TYPE_KPFC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FE2,r.TNS_DATA_TYPE_FE2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SPFP,r.TNS_DATA_TYPE_SPFP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DPULS,r.TNS_DATA_TYPE_DPULS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQA,r.TNS_DATA_TYPE_AQA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPBF,r.TNS_DATA_TYPE_KPBF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TSM,r.TNS_DATA_TYPE_TSM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MSS,r.TNS_DATA_TYPE_MSS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPC,r.TNS_DATA_TYPE_KPC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CRS,r.TNS_DATA_TYPE_CRS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KKS,r.TNS_DATA_TYPE_KKS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSP,r.TNS_DATA_TYPE_KSP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSPTOP,r.TNS_DATA_TYPE_KSPTOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSPVAL,r.TNS_DATA_TYPE_KSPVAL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PSS,r.TNS_DATA_TYPE_PSS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_NLS,r.TNS_DATA_TYPE_NLS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ALS,r.TNS_DATA_TYPE_ALS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSDEVTVAL,r.TNS_DATA_TYPE_KSDEVTVAL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSDEVTTOP,r.TNS_DATA_TYPE_KSDEVTTOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPSPP,r.TNS_DATA_TYPE_KPSPP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KOL,r.TNS_DATA_TYPE_KOL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LST,r.TNS_DATA_TYPE_LST,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ACX,r.TNS_DATA_TYPE_ACX,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SCS,r.TNS_DATA_TYPE_SCS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RXH,r.TNS_DATA_TYPE_RXH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNS,r.TNS_DATA_TYPE_KPDNS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDCN,r.TNS_DATA_TYPE_KPDCN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPNNS,r.TNS_DATA_TYPE_KPNNS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPNCN,r.TNS_DATA_TYPE_KPNCN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPS,r.TNS_DATA_TYPE_KPS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_APINF,r.TNS_DATA_TYPE_APINF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TEN,r.TNS_DATA_TYPE_TEN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSCS,r.TNS_DATA_TYPE_XSSCS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSSO,r.TNS_DATA_TYPE_XSSSO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSAO,r.TNS_DATA_TYPE_XSSAO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSRPC,r.TNS_DATA_TYPE_KSRPC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KVL,r.TNS_DATA_TYPE_KVL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSDEF,r.TNS_DATA_TYPE_XSSDEF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PDQCINV,r.TNS_DATA_TYPE_PDQCINV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PDQIDC,r.TNS_DATA_TYPE_PDQIDC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDQCSTA,r.TNS_DATA_TYPE_KPDQCSTA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPRS,r.TNS_DATA_TYPE_KPRS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDQIDC,r.TNS_DATA_TYPE_KPDQIDC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RTSTRM,r.TNS_DATA_TYPE_RTSTRM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SESSGET,r.TNS_DATA_TYPE_SESSGET,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SESSREL,r.TNS_DATA_TYPE_SESSREL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SESSRET,r.TNS_DATA_TYPE_SESSRET,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SCN6,r.TNS_DATA_TYPE_SCN6,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KECPA,r.TNS_DATA_TYPE_KECPA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KECPP,r.TNS_DATA_TYPE_KECPP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SXA,r.TNS_DATA_TYPE_SXA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KVARR,r.TNS_DATA_TYPE_KVARR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPNGN,r.TNS_DATA_TYPE_KPNGN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BINARY_INTEGER,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_FLOAT,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_STR,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_VNU,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_PDN,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_VCS,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_VBI,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OAC9,r.TNS_DATA_TYPE_OAC9,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UIN,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_SLS,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_LVC,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LVB,r.TNS_DATA_TYPE_RAW,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CHAR,r.TNS_DATA_TYPE_CHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AVC,r.TNS_DATA_TYPE_CHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BINARY_FLOAT,r.TNS_DATA_TYPE_BINARY_FLOAT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BINARY_DOUBLE,r.TNS_DATA_TYPE_BINARY_DOUBLE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CURSOR,r.TNS_DATA_TYPE_CURSOR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RDD,r.TNS_DATA_TYPE_ROWID,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OSL,r.TNS_DATA_TYPE_OSL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EXT_NAMED,r.TNS_DATA_TYPE_INT_NAMED,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INT_NAMED,r.TNS_DATA_TYPE_INT_NAMED,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EXT_REF,r.TNS_DATA_TYPE_INT_REF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INT_REF,r.TNS_DATA_TYPE_INT_REF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CLOB,r.TNS_DATA_TYPE_CLOB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BLOB,r.TNS_DATA_TYPE_BLOB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BFILE,r.TNS_DATA_TYPE_BFILE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CFILE,r.TNS_DATA_TYPE_CFILE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RSET,r.TNS_DATA_TYPE_CURSOR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_JSON,r.TNS_DATA_TYPE_JSON,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DJSON,r.TNS_DATA_TYPE_DJSON,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CLV,r.TNS_DATA_TYPE_CLV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DTR,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_DUN,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_DOP,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_VST,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ODT,r.TNS_DATA_TYPE_DATE,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_DOL,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_TIME,r.TNS_DATA_TYPE_TIME,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TIME_TZ,r.TNS_DATA_TYPE_TIME_TZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TIMESTAMP,r.TNS_DATA_TYPE_TIMESTAMP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TIMESTAMP_TZ,r.TNS_DATA_TYPE_TIMESTAMP_TZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INTERVAL_YM,r.TNS_DATA_TYPE_INTERVAL_YM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INTERVAL_DS,r.TNS_DATA_TYPE_INTERVAL_DS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EDATE,r.TNS_DATA_TYPE_DATE,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_ETIME,r.TNS_DATA_TYPE_ETIME,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ETTZ,r.TNS_DATA_TYPE_ETTZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ESTAMP,r.TNS_DATA_TYPE_ESTAMP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ESTZ,r.TNS_DATA_TYPE_ESTZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EIYM,r.TNS_DATA_TYPE_EIYM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EIDS,r.TNS_DATA_TYPE_EIDS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DCLOB,r.TNS_DATA_TYPE_CLOB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DBLOB,r.TNS_DATA_TYPE_BLOB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DBFILE,r.TNS_DATA_TYPE_BFILE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UROWID,r.TNS_DATA_TYPE_UROWID,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TIMESTAMP_LTZ,r.TNS_DATA_TYPE_TIMESTAMP_LTZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ESITZ,r.TNS_DATA_TYPE_TIMESTAMP_LTZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UB8,r.TNS_DATA_TYPE_UB8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PNTY,r.TNS_DATA_TYPE_INT_NAMED,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BOOLEAN,r.TNS_DATA_TYPE_BOOLEAN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSNSOP,r.TNS_DATA_TYPE_XSNSOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSATTR,r.TNS_DATA_TYPE_XSATTR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSNS,r.TNS_DATA_TYPE_XSNS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UB1ARRAY,r.TNS_DATA_TYPE_UB1ARRAY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SESSSTATE,r.TNS_DATA_TYPE_SESSSTATE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AC_REPLAY,r.TNS_DATA_TYPE_AC_REPLAY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AC_CONT,r.TNS_DATA_TYPE_AC_CONT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_IMPLRES,r.TNS_DATA_TYPE_IMPLRES,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OER19,r.TNS_DATA_TYPE_OER19,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TXT,r.TNS_DATA_TYPE_TXT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSESSNS,r.TNS_DATA_TYPE_XSSESSNS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSATTOP,r.TNS_DATA_TYPE_XSATTOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSCREOP,r.TNS_DATA_TYPE_XSCREOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSDETOP,r.TNS_DATA_TYPE_XSDETOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSDESOP,r.TNS_DATA_TYPE_XSDESOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSETSP,r.TNS_DATA_TYPE_XSSETSP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSIDP,r.TNS_DATA_TYPE_XSSIDP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSPRIN,r.TNS_DATA_TYPE_XSPRIN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSKVL,r.TNS_DATA_TYPE_XSKVL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSSDEF2,r.TNS_DATA_TYPE_XSSSDEF2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSNSOP2,r.TNS_DATA_TYPE_XSNSOP2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSNS2,r.TNS_DATA_TYPE_XSNS2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNREQ,r.TNS_DATA_TYPE_KPDNREQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNRNF,r.TNS_DATA_TYPE_KPDNRNF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPNGNC,r.TNS_DATA_TYPE_KPNGNC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPNRI,r.TNS_DATA_TYPE_KPNRI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQENQ,r.TNS_DATA_TYPE_AQENQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQDEQ,r.TNS_DATA_TYPE_AQDEQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQJMS,r.TNS_DATA_TYPE_AQJMS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNRPAY,r.TNS_DATA_TYPE_KPDNRPAY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNRACK,r.TNS_DATA_TYPE_KPDNRACK,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNRMP,r.TNS_DATA_TYPE_KPDNRMP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNRDQ,r.TNS_DATA_TYPE_KPDNRDQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SCN,r.TNS_DATA_TYPE_SCN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SCN8,r.TNS_DATA_TYPE_SCN8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CHUNKINFO,r.TNS_DATA_TYPE_CHUNKINFO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UD21,r.TNS_DATA_TYPE_UD21,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UDS,r.TNS_DATA_TYPE_UDS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TNP,r.TNS_DATA_TYPE_TNP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OER,r.TNS_DATA_TYPE_OER,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OAC,r.TNS_DATA_TYPE_OAC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_VECTOR,r.TNS_DATA_TYPE_VECTOR,r.TNS_TYPE_REP_UNIVERSAL]];t.exports=class extends i{processMessage(t,e){if(e===r.TNS_MSG_TYPE_DATA_TYPES){for(;0!==t.readUInt16BE();)0!==t.readUInt16BE()&&t.skipBytes(4);this.endOfResponse=!this.connection.nscon.endOfRequestSupport}else super.processMessage(t,e)}encode(t){t.writeUInt8(r.TNS_MSG_TYPE_DATA_TYPES),t.writeUInt16LE(r.TNS_CHARSET_UTF8),t.writeUInt16LE(r.TNS_CHARSET_UTF8),t.writeUInt8(r.TNS_ENCODING_MULTI_BYTE|r.TNS_ENCODING_CONV_LENGTH),t.writeBytesWithLength(t.caps.compileCaps),t.writeBytesWithLength(t.caps.runtimeCaps);for(const e of s)t.writeUInt16BE(e[0]),t.writeUInt16BE(e[1]),t.writeUInt16BE(e[2]),t.writeUInt16BE(0);t.writeUInt16BE(0)}}},1375:(t,e,n)=>{"use strict";const r=n(9386),i=n(3762),s=n(8041);t.exports=class extends r{constructor(t,e,n,r){super(t,e,n),!r&&e.isQuery&&(r=t._createResultSet(n,e)),this.resultSet=r,this.functionCode=i.TNS_FUNC_EXECUTE,this.bindParams=void 0,this.currentRow=0}writeExecuteMessage(t){let e=0,n=0,r=0,o=1;const a=this.statement,u=a.bindInfoList;if(this.noImplicitRelease&&(n|=i.TNS_EXEC_OPTION_NO_IMPL_REL),a.requiresDefine||this.parseOnly||!u||(r=u.length),a.requiresDefine?e|=i.TNS_EXEC_OPTION_DEFINE:!this.parseOnly&&a.sql&&(n|=i.TNS_EXEC_OPTION_IMPLICIT_RESULTSET,e|=i.TNS_EXEC_OPTION_EXECUTE),(0===a.cursorId||a.isDdl)&&(e|=i.TNS_EXEC_OPTION_PARSE),a.isQuery&&(this.parseOnly?e|=i.TNS_EXEC_OPTION_DESCRIBE:(o=0===a.cursorId||a.requiresDefine?this.options.prefetchRows:this.options.fetchArraySize,o>0&&!a.noPrefetch&&(e|=i.TNS_EXEC_OPTION_FETCH))),a.isPlSql||this.parseOnly?a.isPlSql&&r>0&&(e|=i.TNS_EXEC_OPTION_PLSQL_BIND):e|=i.TNS_EXEC_OPTION_NOT_PLSQL,r>0&&(e|=i.TNS_EXEC_OPTION_BIND),this.batchErrors&&(e|=i.TNS_EXEC_OPTION_BATCH_ERRORS),this.arrayDmlRowCounts&&(n=i.TNS_EXEC_OPTION_DML_ROWCOUNTS),this.options.autoCommit&&(e|=i.TNS_EXEC_OPTION_COMMIT),this.writePiggybacks(t),this.writeFunctionHeader(t),t.writeUB4(e),t.writeUB4(a.cursorId),0===a.cursorId||a.isDdl?(t.writeUInt8(1),t.writeUB4(a.sqlLength)):(t.writeUInt8(0),t.writeUB4(0)),t.writeUInt8(1),t.writeUB4(13),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUB4(o),t.writeUB4(i.TNS_MAX_LONG_LENGTH),0===r?(t.writeUInt8(0),t.writeUB4(0)):(t.writeUInt8(1),t.writeUB4(r)),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),a.requiresDefine?(t.writeUInt8(1),t.writeUB4(this.statement.queryVars.length)):(t.writeUInt8(0),t.writeUB4(0)),t.writeUB4(0),t.writeUInt8(0),t.writeUInt8(1),t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0),t.writeUB4(0),this.arrayDmlRowCounts?(t.writeUInt8(1),t.writeUB4(this.numExecs),t.writeUInt8(1)):(t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0)),t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_12_2&&(t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_12_2_EXT1&&(t.writeUInt8(0),t.writeUB4(0))),0===a.cursorId||a.isDdl?a.sql?(t.writeBytesWithLength(a.sqlBytes),t.writeUB4(1)):s.throwErr(s.ERR_INVALID_REF_CURSOR):t.writeUB4(0),a.isQuery?0===a.cursorId?t.writeUB4(0):t.writeUB4(o):t.writeUB4(this.numExecs),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(a.isQuery?1:0),t.writeUB4(0),t.writeUB4(n),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),a.requiresDefine)this.writeColumnMetadata(t,this.statement.queryVars);else if(r>0)return this.processBindParams(t,u)}writeReExecuteMessage(t){const e=this.statement;let n,r=e.bindInfoList,s=0,o=0;if(void 0!==r){e.isQuery||(this.outVariables=[],r.forEach((t=>{t.bindDir!==i.TNS_BIND_DIR_INPUT&&this.outVariables.push(t.bindVar)})));const t=[];r.forEach((e=>{e.bindDir===i.TNS_BIND_DIR_OUTPUT||e.isReturnBind||t.push(e)})),r=t}return this.functionCode===i.TNS_FUNC_REEXECUTE_AND_FETCH?(s|=i.TNS_EXEC_OPTION_EXECUTE,n=this.options.prefetchRows):(this.options.autoCommit&&(o|=i.TNS_EXEC_OPTION_COMMIT_REEXECUTE),n=this.numExecs),this.writePiggybacks(t),this.writeFunctionHeader(t),t.writeUB4(e.cursorId),t.writeUB4(n),t.writeUB4(s),t.writeUB4(o),r}encode(t){if(0===this.currentRow){const e=this.statement;0===e.cursorId||e.requiresFullExecute||this.parseOnly||e.requiresDefine||e.noPrefetch||e.isDdl||this.batchErrors?(this.functionCode=i.TNS_FUNC_EXECUTE,this.bindParams=this.writeExecuteMessage(t)):(e.isQuery&&this.options.prefetchRows>0?this.functionCode=i.TNS_FUNC_REEXECUTE_AND_FETCH:this.functionCode=i.TNS_FUNC_REEXECUTE,this.bindParams=this.writeReExecuteMessage(t))}if(this.bindParams&&this.bindParams.length>0){const e=t.nsi.ntAdapter;for(;this.currentRow<this.numExecs;)if(t.writeUInt8(i.TNS_MSG_TYPE_ROW_DATA),this.writeBindParamsRow(t,this.bindParams,this.currentRow),this.currentRow++,this.currentRow<this.numExecs&&e.shouldPauseWrite())return!0}this.currentRow=0,this.bindParams=void 0}}},4826:(t,e,n)=>{"use strict";const r=n(3762),i=n(3815);t.exports=class extends i{encode(t){t.writeUInt8(r.TNS_MSG_TYPE_FAST_AUTH),t.writeUInt8(1),t.writeUInt8(r.TNS_SERVER_CONVERTS_CHARS),t.writeUInt8(0),this.protocolMessage.encode(t),t.writeUInt16BE(0),t.writeUInt8(0),t.writeUInt16BE(0),t.caps.ttcFieldVersion=r.TNS_CCAP_FIELD_VERSION_19_1_EXT_1,t.writeUInt8(t.caps.ttcFieldVersion),this.dataTypeMessage.encode(t),this.authMessage.encode(t),t.caps.ttcFieldVersion=r.TNS_CCAP_FIELD_VERSION_MAX}processMessage(t,e){e===r.TNS_MSG_TYPE_RENEGOTIATE?this.reNegotiate=!0:e===r.TNS_MSG_TYPE_PROTOCOL?this.protocolMessage.processMessage(t,e):e===r.TNS_MSG_TYPE_DATA_TYPES?this.dataTypeMessage.processMessage(t,e):(this.authMessage.processMessage(t,e),this.endOfResponse=this.authMessage.endOfResponse)}}},2752:(t,e,n)=>{"use strict";const r=n(3762),i=n(9386),s=n(8041);t.exports=class extends i{constructor(t,e,n,i){super(t,e,n),this.resultSet=i,this.functionCode=r.TNS_FUNC_FETCH}encode(t){this.writeFunctionHeader(t),0===this.statement.cursorId&&s.throwErr(s.ERR_CURSOR_HAS_BEEN_CLOSED),t.writeUB4(this.statement.cursorId),t.writeUB4(this.options.fetchArraySize)}}},9448:(t,e,n)=>{"use strict";const r=n(5732),i=n(2283),s=n(7030),o=n(1375),a=n(2752),u=n(5286),_=n(3817),c=n(5674),l=n(3462),h=n(9630),T=n(8915),p=n(4826);t.exports={AuthMessage:r,CommitMessage:i,FastAuthMessage:p,DataTypeMessage:s,ExecuteMessage:o,FetchMessage:a,LobOpMessage:u,LogOffMessage:_,PingMessage:c,ProtocolMessage:l,RollbackMessage:h,SessionReleaseMessage:T}},5286:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(3815);t.exports=class extends s{constructor(t,e){super(t),this.sourceLobImpl=e.sourceLobImpl||null,this.operation=e.operation,this.destLobImpl=e.destLobImpl||null,this.sourceOffset=e.sourceOffset||0,this.destOffset=e.destOffset||0,this.boolFlag=!1,e.data&&(this.data=e.data),this.functionCode=i.TNS_FUNC_LOB_OP,this.sendAmount=e.sendAmount,this.amount=e.amount||0}encode(t){this.writeFunctionHeader(t),null===this.sourceLobImpl?(t.writeUInt8(0),t.writeUB4(0)):(t.writeUInt8(1),t.writeUB4(this.sourceLobImpl._locator.length)),null===this.destLobImpl?(t.writeUInt8(0),t.writeUB4(0)):(t.writeUInt8(1),t.writeUB4(this.destLobImpl._locator.length)),t.writeUB4(0),t.writeUB4(0),this.operation===i.TNS_LOB_OP_CREATE_TEMP?t.writeUInt8(1):t.writeUInt8(0),t.writeUInt8(0),this.operation===i.TNS_LOB_OP_CREATE_TEMP||this.operation===i.TNS_LOB_OP_IS_OPEN?t.writeUInt8(1):t.writeUInt8(0),t.writeUB4(this.operation),t.writeUInt8(0),t.writeUInt8(0),t.writeUB8(this.sourceOffset),t.writeUB8(this.destOffset),this.sendAmount?t.writeUInt8(1):t.writeUInt8(0);for(let e=0;e<3;e++)t.writeUInt16BE(0);if(this.sourceLobImpl&&t.writeBytes(this.sourceLobImpl._locator),this.destLobImpl&&t.writeBytes(this.destLobImpl._locator),this.operation===i.TNS_LOB_OP_CREATE_TEMP&&(this.sourceLobImpl.dbType._csfrm===i.CSFRM_NCHAR?(t.caps.checkNCharsetId(),t.writeUB4(i.TNS_CHARSET_UTF16)):t.writeUB4(i.TNS_CHARSET_UTF8)),this.data){let e;t.writeUInt8(i.TNS_MSG_TYPE_LOB_DATA),this.sourceLobImpl.dbType._oraTypeNum===i.TNS_DATA_TYPE_BLOB?e=this.data:this.sourceLobImpl.getCsfrm()===i.CSFRM_NCHAR?(e=this.data,r.isBuffer(this.data)&&(e=e.toString()),e=r.from(e,i.TNS_ENCODING_UTF16).swap16()):e=r.from(this.data),t.writeBytesWithLength(e)}this.sendAmount&&t.writeUB8(this.amount)}processMessage(t,e){if(e===i.TNS_MSG_TYPE_LOB_DATA){const e=this.sourceLobImpl.dbType._oraTypeNum;let n=t.readBytesWithLength();null!==n&&(n=e===i.TNS_DATA_TYPE_BLOB?r.from(n):this.sourceLobImpl.getCsfrm()===i.CSFRM_NCHAR?r.from(n).swap16().toString("utf16le"):n.toString()),this.data=n}else super.processMessage(t,e)}processReturnParameter(t){let e,n,r,s;null!==this.sourceLobImpl&&(s=this.sourceLobImpl._locator.length,e=t.readBytes(s),n=e.slice(0,s),n.copy(this.sourceLobImpl._locator)),null!==this.destLobImpl&&(s=this.destLobImpl._locator.length,e=t.readBytes(s),n=e.slice(0,s),n.copy(this.destLobImpl._locator)),this.operation===i.TNS_LOB_OP_CREATE_TEMP?(t.skipUB2(),t.skipBytes(3)):this.sendAmount&&(this.amount=t.readSB8()),this.operation===i.TNS_LOB_OP_IS_OPEN&&(r=t.readUB1(),this.boolFlag=r>0)}}},3817:(t,e,n)=>{"use strict";const r=n(3815),i=n(3762);t.exports=class extends r{constructor(t){super(t),this.functionCode=i.TNS_FUNC_LOGOFF}encode(t){this.writePiggybacks(t),this.writeFunctionHeader(t)}}},5674:(t,e,n)=>{"use strict";const r=n(3815),i=n(3762);t.exports=class extends r{constructor(t){super(t),this.functionCode=i.TNS_FUNC_PING}encode(t){this.writeFunctionHeader(t)}}},3462:(t,e,n)=>{"use strict";const r=n(3762),i=n(3815);t.exports=class extends i{encode(t){t.writeUInt8(r.TNS_MSG_TYPE_PROTOCOL),t.writeUInt8(6),t.writeUInt8(0),t.writeStr("node-oracledb"),t.writeUInt8(0)}processMessage(t,e){e===r.TNS_MSG_TYPE_PROTOCOL?(this.processProtocolInfo(t),this.endOfResponse=!this.connection.nscon.endOfRequestSupport):super.processMessage(t,e)}processProtocolInfo(t){this.serverVersion=t.readUInt8(),t.skipUB1(),this.serverBanner=t.readNullTerminatedBytes(48),t.caps.charSetID=t.readUInt16LE(),this.serverFlags=t.readUInt8();const e=t.readUInt16LE();e>0&&t.skipBytes(5*e);const n=t.readUInt16BE(),i=t.readBytes(n),s=6+i[5]+i[6];t.caps.nCharsetId=(i[s+3]<<8)+i[s+4];const o=t.readBytesWithLength();o&&(this.serverCompileCaps=Buffer.from(o),t.caps.adjustForServerCompileCaps(this.serverCompileCaps,this.connection.nscon),t.caps.ttcFieldVersion>=r.TNS_CCAP_FIELD_VERSION_23_1?this.connection._osonMaxFieldNameSize=65535:this.connection._osonMaxFieldNameSize=255);const a=t.readBytesWithLength();a&&(this.serverRunTimeCaps=Buffer.from(a),t.caps.adjustForServerRuntimeCaps(this.serverRunTimeCaps))}}},9630:(t,e,n)=>{"use strict";const r=n(3815),i=n(3762);t.exports=class extends r{constructor(t){super(t),this.functionCode=i.TNS_FUNC_ROLLBACK}encode(t){this.writeFunctionHeader(t)}}},8915:(t,e,n)=>{"use strict";const r=n(3815),i=n(3762);t.exports=class extends r{constructor(t){super(t),this.functionCode=i.TNS_FUNC_SESSION_RELEASE,this.messageType=i.TNS_MSG_TYPE_ONEWAY_FN,this.sessReleaseMode=0}encode(t){this.writeFunctionHeader(t),t.writeUInt8(0),t.writeUInt8(0),t.writeUB4(this.sessReleaseMode)}decode(){}}},9386:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(5914),s=n(3762),o=n(3815),{ThinDbObjectImpl:a,readXML:u}=n(4785),_=n(1159),c=n(8041),l=n(6893),h=t=>0===t||t===s.TNS_NULL_LENGTH_INDICATOR;t.exports=class extends o{constructor(t,e=null,n=null){super(t),this.statement=e,this.options=n,this.offset=0,this.numExecs=1,this.arrayDmlRowCounts=!1,this.requiresDefine=!1,this.rowIndex=e.bufferRowCount||0,this.dmlRowCounts=[],this.batchErrors=!1,this.outVariables=[],this.inFetch=!1,this.parseOnly=!1,this.resultSetsToSetup=[],this.deferredErr=null}processMessage(t,e){if(e===s.TNS_MSG_TYPE_DESCRIBE_INFO){t.skipBytesChunked();const e=this.statement.queryVars;this.statement.queryVars=[],this.statement.numQueryVars=0,this.statement.bufferRowCount=0,this.statement.bufferRowIndex=0,this.processDescribeInfo(t,this.resultSet,e),this.outVariables=this.statement.queryVars}else e===s.TNS_MSG_TYPE_ROW_HEADER?this.processRowHeader(t):e===s.TNS_MSG_TYPE_ROW_DATA?this.processRowData(t):e===s.TNS_MSG_TYPE_IMPLICIT_RESULTSET?this.processImplicitResultSet(t):e===s.TNS_MSG_TYPE_BIT_VECTOR?this.processBitVector(t):e===s.TNS_MSG_TYPE_IO_VECTOR?this.processIOVector(t):e===s.TNS_MSG_TYPE_FLUSH_OUT_BINDS?(this.flushOutBinds=!0,this.endOfResponse=!0):e===s.TNS_MSG_TYPE_ERROR?this.processErrorInfo(t):super.processMessage(t,e)}processErrorInfo(t){super.processErrorInfo(t),0!==this.errorInfo.cursorId&&(this.statement.cursorId=this.errorInfo.cursorId),this.statement.isPlSql||(this.statement.rowCount=this.errorInfo.rowCount),this.errorInfo.rowCount>0&&(this.statement.lastRowid=i.encodeRowID(this.errorInfo.rowID)),this.options.batchErrors=this.errorInfo.batchErrors,this.batchErrors&&null===this.options.batchErrors&&(this.options.batchErrors=[]),this.errorInfo.num===s.TNS_ERR_NO_DATA_FOUND&&this.statement.isQuery?(this.errorInfo.num=0,this.errorOccurred=!1,this.statement.moreRowsToFetch=!1):this.retry?this.retry=!1:!this.statement.isQuery||this.errorInfo.num!==s.TNS_ERR_VAR_NOT_IN_SELECT_LIST&&this.errorInfo.num!==s.TNS_ERR_INCONSISTENT_DATA_TYPES?0!==this.errorInfo.num&&0!==this.errorInfo.cursorId&&(c.ERR_INTEGRITY_ERROR_CODES.includes(this.errorInfo.num)||(this.connection.statementCache.clearCursor(this.statement),this.statement.returnToCache=!1)):(this.retry=!0,this.connection.statementCache.clearCursor(this.statement)),this.errorInfo.batchErrors&&(this.errorOccurred=!1)}_adjustFetchType(t,e){(e.fetchInfo.dbType._oraTypeNum===s.TNS_DATA_TYPE_CLOB&&t.fetchInfo.fetchType._oraTypeNum===s.TNS_DATA_TYPE_LONG||e.fetchInfo.dbType._oraTypeNum===s.TNS_DATA_TYPE_BLOB&&t.fetchInfo.fetchType._oraTypeNum===s.TNS_DATA_TYPE_LONG_RAW)&&(e.type=t.fetchInfo.fetchType,e.maxSize=t.maxSize)}processDescribeInfo(t,e,n){const r=e.statement;t.skipUB4(),r.numQueryVars=t.readUB4(),r.numQueryVars>0&&t.skipUB1(),e.metadata=[];const i=[],s=[];for(let e=0;e<r.numQueryVars;e++){const r=this.processColumnInfo(t,e+1);n&&e<n.length&&this._adjustFetchType(n[e],r),s.push(r),i.push(r.fetchInfo)}let o=t.readUB4();o>0&&t.skipBytesChunked(),t.skipUB4(),t.skipUB4(),t.skipUB4(),t.skipUB4(),o=t.readUB4(),o>0&&t.skipBytesChunked(),e.metadata=i,r.queryVars=s,this.resultSetsToSetup.push(e)}processColumnInfo(t,e){const n=t.readUInt8();t.skipUB1();const i=t.readInt8(),o=t.readInt8(),a=t.readUB4();let u;t.skipUB4(),t.skipUB8();let _=t.readUB4();_>0&&(u=r.from(t.readBytesWithLength())),t.skipUB2(),t.skipUB2();const c=t.readUInt8();let h=t.readUB4();n===s.TNS_DATA_TYPE_RAW&&(h=a),t.caps.ttcFieldVersion>=s.TNS_CCAP_FIELD_VERSION_12_2&&t.skipUB4();const T=Boolean(t.readUInt8());let p,f,E;t.skipUB1(),_=t.readUB4(),_>0&&(p=t.readStr(s.CSFRM_IMPLICIT)),_=t.readUB4(),_>0&&(f=t.readStr(s.CSFRM_IMPLICIT)),_=t.readUB4(),_>0&&(E=t.readStr(s.CSFRM_IMPLICIT)),t.skipUB2();const d=t.readUB4(),N={name:p,dbType:l.getTypeByOraTypeNum(n,c),nullable:T};if(N.isJson=Boolean(d&s.TNS_UDS_FLAGS_IS_JSON),N.isOson=Boolean(d&s.TNS_UDS_FLAGS_IS_OSON),t.caps.ttcFieldVersion>=s.TNS_CCAP_FIELD_VERSION_23_1&&(_=t.readUB4(),_>0&&(N.domainSchema=t.readStr(s.CSFRM_IMPLICIT)),_=t.readUB4(),_>0&&(N.domainName=t.readStr(s.CSFRM_IMPLICIT))),t.caps.ttcFieldVersion>=s.TNS_CCAP_FIELD_VERSION_23_1_EXT_3&&t.readUB4()>0){N.annotations={},t.skipUB1();const e=t.readUB4();let n,r;t.skipUB1();for(let i=0;i<e;i++)t.skipUB4(),r="",n=t.readStr(s.CSFRM_IMPLICIT),_=t.readUB4(),_>0&&(r=t.readStr(s.CSFRM_IMPLICIT)),N.annotations[n]=r,t.skipUB4();t.skipUB4()}if(t.caps.ttcFieldVersion>=s.TNS_CCAP_FIELD_VERSION_23_4){const e=t.readUB4(),n=t.readUInt8(),r=t.readUInt8();N.dbType===l.DB_TYPE_VECTOR&&(r&s.VECTOR_META_FLAG_FLEXIBLE_DIM||(N.vectorDimensions=e),n!==s.VECTOR_FORMAT_FLEX&&(N.vectorFormat=n))}switch(N.dbType){case l.DB_TYPE_VARCHAR:case l.DB_TYPE_NVARCHAR:case l.DB_TYPE_CHAR:case l.DB_TYPE_NCHAR:case l.DB_TYPE_RAW:N.byteSize=h;break;case l.DB_TYPE_NUMBER:N.precision=i;break;case l.DB_TYPE_TIMESTAMP:case l.DB_TYPE_TIMESTAMP_TZ:case l.DB_TYPE_TIMESTAMP_LTZ:N.precision=o;break;case l.DB_TYPE_OBJECT:N.dbTypeClass=this.connection._getDbObjectType(f,E,void 0,u),N.dbTypeClass.partial&&this.connection._partialDbObjectTypes.push(N.dbTypeClass),N.dbTypeClass.isXmlType&&(N.dbType=l.DB_TYPE_XMLTYPE)}return N.dbType===l.DB_TYPE_NUMBER&&(N.scale=o),{fetchInfo:N,type:N.dbType,maxSize:a,columnNum:e,values:new Array(this.options.fetchArraySize)}}processRowHeader(t){t.skipUB1(),t.skipUB2(),t.skipUB4(),t.skipUB4(),t.skipUB2();let e=t.readUB4();e>0&&(this.bitVector=r.from(t.readBytesWithLength())),e=t.readUB4(),e>0&&t.skipBytesChunked()}isDuplicateData(t){if(!this.bitVector)return!1;const e=Math.floor(t/8),n=t%8;return!(this.bitVector[e]&1<<n)}processRowData(t){let e;for(const[n,r]of this.outVariables.entries())if(r.isArray){r.numElementsInArray=t.readUB4();const n=new Array(r.numElementsInArray).fill(null);for(let i=0;i<r.numElementsInArray;i++)e=this.processColumnData(t,r,i),n[i]=e;r.values[this.rowIndex]=n}else if(this.statement.isReturning){const e=t.readUB4(),n=Array(e).fill(null);for(let i=0;i<e;i++)n[i]=this.processColumnData(t,r,i);r.values[this.rowIndex]=n}else this.isDuplicateData(n)?(e=0===this.rowIndex&&r.outConverter?r.lastRawValue:r.values[this.statement.lastRowIndex],r.values[this.rowIndex]=e):(e=this.processColumnData(t,r,this.rowIndex),r.values[this.rowIndex]=e);this.rowIndex++,this.inFetch&&(this.statement.lastRowIndex=this.rowIndex-1,this.statement.bufferRowCount++,this.bitVector=null)}processIOVector(t){let e;t.skipUB1();const n=t.readUB2(),r=256*t.readUB4()+n;t.skipUB4(),t.skipUB2(),e=t.readUB2(),e>0&&t.skipBytes(e),e=t.readUB2(),e>0&&t.skipBytes(e),this.outVariables=[];for(let e=0;e<r;e++){const n=this.statement.bindInfoList[e];n.bindDir=t.readUInt8(),n.bindDir!==s.TNS_BIND_DIR_INPUT&&this.outVariables.push(n.bindVar)}}processColumnData(t,e){const n=e.type,o=n._oraTypeNum,T=n._csfrm;let p=null;if(0===e.maxSize&&o!==s.TNS_DATA_TYPE_LONG&&o!==s.TNS_DATA_TYPE_LONG_RAW&&o!==s.TNS_DATA_TYPE_UROWID)p=null;else if(o===s.TNS_DATA_TYPE_VARCHAR||o===s.TNS_DATA_TYPE_CHAR||o===s.TNS_DATA_TYPE_LONG)T===s.CSFRM_NCHAR&&t.caps.checkNCharsetId(),p=t.readStr(T);else if(o===s.TNS_DATA_TYPE_RAW||o===s.TNS_DATA_TYPE_LONG_RAW)p=t.readBytesWithLength(),null!==p&&(p=r.from(p));else if(o===s.TNS_DATA_TYPE_NUMBER)p=t.readOracleNumber(),this.inFetch||null===p||(p=parseFloat(p));else if(o===s.TNS_DATA_TYPE_DATE||o===s.TNS_DATA_TYPE_TIMESTAMP||o===s.TNS_DATA_TYPE_TIMESTAMP_LTZ||o===s.TNS_DATA_TYPE_TIMESTAMP_TZ){const e=o===s.TNS_DATA_TYPE_DATE||o===s.TNS_DATA_TYPE_TIMESTAMP;p=t.readOracleDate(e)}else if(o===s.TNS_DATA_TYPE_ROWID)if(this.inFetch){const e=t.readUInt8();if(h(e))p=null;else{const e=t.readRowID();p=i.encodeRowID(e)}}else p=t.readStr(s.CSFRM_IMPLICIT);else if(o===s.TNS_DATA_TYPE_UROWID)p=this.inFetch?t.readURowID():t.readStr(s.CSFRM_IMPLICIT);else if(o===s.TNS_DATA_TYPE_BINARY_DOUBLE)p=t.readBinaryDouble();else if(o===s.TNS_DATA_TYPE_BINARY_FLOAT)p=t.readBinaryFloat();else if(o===s.TNS_DATA_TYPE_BINARY_INTEGER)p=t.readOracleNumber(),null!==p&&(p=parseFloat(p));else if(o===s.TNS_DATA_TYPE_CURSOR){const n=t.readUInt8();h(n)?p=null:(p=this.createCursorFromDescribe(t),p.statement.cursorId=t.readUB2(),0===p.statement.cursorId&&e.dir!==s.BIND_IN&&(this.options.nullifyInvalidCursor?p=null:c.throwErr(c.ERR_INVALID_REF_CURSOR)))}else if(o===s.TNS_DATA_TYPE_BOOLEAN)p=t.readBool();else if(o===s.TNS_DATA_TYPE_CLOB||o===s.TNS_DATA_TYPE_BLOB){if(t.readUB4()>0){p=new _;const e=t.readUB8(),i=t.readUB4(),s=r.from(t.readBytesWithLength());p.init(this.connection,s,n,e,i)}}else if(o===s.TNS_DATA_TYPE_JSON)p=t.readOson();else if(o===s.TNS_DATA_TYPE_VECTOR)p=t.readVector();else if(o===s.TNS_DATA_TYPE_INT_NAMED){const n=t.readDbObject();if(n.packedData){const t=e.fetchInfo?e.fetchInfo.dbTypeClass:e.typeClass;e.type===l.DB_TYPE_XMLTYPE?p=u(this.connection,n.packedData):(p=new a(t,n.packedData),p.toid=n.toid,p.oid=n.oid)}}else c.throwErr(c.ERR_UNSUPPORTED_DATA_TYPE,n.num,e.columnNum);if(this.inFetch)(o===s.TNS_DATA_TYPE_LONG||o===s.TNS_DATA_TYPE_LONG_RAW||e.maxSize>t.caps.maxStringSize)&&(t.skipSB4(),t.skipUB4());else{const e=t.readSB4();e<0&&o===s.TNS_DATA_TYPE_BOOLEAN?p=null:0!==e&&null!==p&&o!==s.TNS_DATA_TYPE_INT_NAMED&&this.saveDeferredErr(c.ERR_INSUFFICIENT_BUFFER_FOR_BINDS)}return p}processReturnParameter(t){let e,n=0,r=t.readUB2();for(let e=0;e<r;e++)t.skipUB4();let i=t.readUB2();i>0&&t.skipBytes(i),r=t.readUB2();for(let o=0;o<r;o++)i=t.readUB2(),i>0&&(e=t.readStr(s.CSFRM_IMPLICIT)),i=t.readUB2(),i>0&&t.skipBytesChunked(),n=t.readUB2(),n===s.TNS_KEYWORD_NUM_CURRENT_SCHEMA?this.connection.currentSchema=e:n===s.TNS_KEYWORD_NUM_EDITION&&(this.connection._edition=e);if(i=t.readUB2(),i>0&&t.skip(i),this.arrayDmlRowCounts){const e=t.readUB4(),n=this.options.dmlRowCounts=[];for(let r=0;r<e;r++){const e=t.readUB8();n.push(e)}}}async postProcess(){if(this.deferredErr)throw this.deferredErr;if(this.outVariables)for(const t of this.outVariables)if(t.isArray){if(t.outConverter)for(let e=0;e<t.numElementsInArray;e++)t.values[0][e]=await t.outConverter(t.values[0][e])}else t.outConverter&&(t.values[0]=await t.outConverter(t.values[0]));await this.connection._populatePartialDbObjectTypes();for(const t of this.resultSetsToSetup){t._setup(this.options,t.metadata);for(const e of t.statement.queryVars)e.type!==l.DB_TYPE_CLOB&&e.type!==l.DB_TYPE_NCLOB&&e.type!==l.DB_TYPE_BLOB&&e.type!==l.DB_TYPE_JSON&&e.type!==l.DB_TYPE_VECTOR||(e.type!==e.fetchInfo.fetchType&&(e.type=e.fetchInfo.fetchType,e.maxSize=s.TNS_MAX_LONG_LENGTH),t.statement.noPrefetch||(t.statement.requiresDefine=!0,t.statement.noPrefetch=!0))}}preProcess(){if(this.statement.isReturning&&!this.parseOnly){this.outVariables=[];for(const t of this.statement.bindInfoList)t.isReturnBind&&this.outVariables.push(t.bindVar)}if(this.statement.isQuery&&(this.inFetch=!0,this.statement.queryVars)){this.outVariables=[];for(let t=0;t<this.statement.queryVars.length;t++)this.outVariables.push(this.statement.queryVars[t])}}processBitVector(t){this.numColumnsSent=t.readUB2();let e=Math.floor(this.statement.numQueryVars/8);this.statement.numQueryVars%8>0&&(e+=1),this.bitVector=r.from(t.readBytes(e))}processBindParams(t,e){const n=[],r=[];for(const t of e)t.isReturnBind||r.push(t),n.push(t.bindVar);return this.writeColumnMetadata(t,n),r}writeColumnMetadata(t,e){for(const n of e){let e=n.type._oraTypeNum,r=n.maxSize||n.type._bufferSizeFactor,i=0;n.type._csfrm===s.CSFRM_NCHAR&&(r*=n.type._bufferSizeFactor),[s.TNS_DATA_TYPE_ROWID,s.TNS_DATA_TYPE_UROWID].includes(e)&&(e=s.TNS_DATA_TYPE_VARCHAR,r=s.TNS_MAX_UROWID_LENGTH);let o=s.TNS_BIND_USE_INDICATORS;n.isArray&&(o|=s.TNS_BIND_ARRAY);let a=0;if(n.type===l.DB_TYPE_BLOB||n.type===l.DB_TYPE_CLOB||n.type===l.DB_TYPE_NCLOB?a=s.TNS_LOB_PREFETCH_FLAG:n.type===l.DB_TYPE_JSON?(a=s.TNS_LOB_PREFETCH_FLAG,r=i=s.TNS_JSON_MAX_LENGTH):n.type===l.DB_TYPE_VECTOR&&(a=s.TNS_LOB_PREFETCH_FLAG,r=i=s.TNS_VECTOR_MAX_LENGTH),t.writeUInt8(e),t.writeUInt8(o),t.writeUInt8(0),t.writeUInt8(0),r>t.caps.maxStringSize?t.writeUB4(s.TNS_MAX_LONG_LENGTH):t.writeUB4(r),n.isArray?t.writeUB4(n.maxArraySize):t.writeUB4(0),t.writeUB4(a),n.objType){const e=n.objType;t.writeUB4(e.oid.length),t.writeBytesWithLength(e.oid),t.writeUB2(e.version)}else t.writeUB4(0),t.writeUB2(0);0!==n.type._csfrm?t.writeUB2(s.TNS_CHARSET_UTF8):t.writeUB2(0),t.writeUInt8(n.type._csfrm),t.writeUB4(i),t.caps.ttcFieldVersion>=s.TNS_CCAP_FIELD_VERSION_12_2&&t.writeUB4(0)}}writeBindParamsRow(t,e,n){const r=this.offset;let i=!1;for(const s of e){if(s.isReturnBind)continue;const e=s.bindVar;if(e.isArray){const n=e.values.length;t.writeUB4(n);for(let r=0;r<n;r++)this.writeBindParamsColumn(t,e,e.values[r])}else!this.statement.isPlSql&&e.maxSize>t.caps.maxStringSize?i=!0:this.writeBindParamsColumn(t,e,e.values[n+r])}if(i)for(const i of e){if(i.isReturnBind)continue;const e=i.bindVar;e.maxSize>t.caps.maxStringSize&&this.writeBindParamsColumn(t,e,e.values[n+r])}}writeBindParamsColumn(t,e,n){const i=e.type._oraTypeNum;let o;if(null==n&&i!==s.TNS_DATA_TYPE_CURSOR&&i!==s.TNS_DATA_TYPE_JSON)i===s.TNS_DATA_TYPE_BOOLEAN?(t.writeUInt8(s.TNS_ESCAPE_CHAR),t.writeUInt8(1)):i===s.TNS_DATA_TYPE_INT_NAMED?(t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(s.TNS_OBJ_TOP_LEVEL)):t.writeUInt8(0);else if(i===s.TNS_DATA_TYPE_NUMBER||i===s.TNS_DATA_TYPE_BINARY_INTEGER)o="boolean"==typeof n?n?"1":"0":n.toString(),t.writeOracleNumber(o);else if(i===s.TNS_DATA_TYPE_VARCHAR||i===s.TNS_DATA_TYPE_CHAR||i===s.TNS_DATA_TYPE_LONG||i===s.TNS_DATA_TYPE_RAW||i===s.TNS_DATA_TYPE_LONG_RAW)e.type._csfrm===s.CSFRM_NCHAR?(t.caps.checkNCharsetId(),n=r.from(n,s.TNS_ENCODING_UTF16).swap16()):n=r.from(n),t.writeBytesWithLength(n);else if(i===s.TNS_DATA_TYPE_DATE||i===s.TNS_DATA_TYPE_TIMESTAMP||i===s.TNS_DATA_TYPE_TIMESTAMP_TZ||i===s.TNS_DATA_TYPE_TIMESTAMP_LTZ)t.writeOracleDate(n,e.type);else if(i===s.TNS_DATA_TYPE_BINARY_DOUBLE)t.writeUInt8(8),t.writeBinaryDouble(n);else if(i===s.TNS_DATA_TYPE_BINARY_FLOAT)t.writeUInt8(4),t.writeBinaryFloat(n);else if(i===s.TNS_DATA_TYPE_CURSOR){let e=n;n||(e=this.connection._createResultSet()),0===e.statement.cursorId?(t.writeUInt8(1),t.writeUInt8(0)):(t.writeUB4(1),t.writeUB4(e.statement.cursorId))}else if(i===s.TNS_DATA_TYPE_BOOLEAN)n?(t.writeUInt8(2),t.writeUInt16BE(257)):t.writeUInt16BE(256);else if(i===s.TNS_DATA_TYPE_CLOB||i===s.TNS_DATA_TYPE_BLOB)t.writeUB4(n._locator.length),t.writeBytesWithLength(n._locator);else if([s.TNS_DATA_TYPE_ROWID,s.TNS_DATA_TYPE_UROWID].includes(i))t.writeBytesWithLength(r.from(n));else if(i===s.TNS_DATA_TYPE_JSON)t.writeOson(n,this.connection._osonMaxFieldNameSize);else if(i===s.TNS_DATA_TYPE_VECTOR)t.writeVector(n);else if(i===s.TNS_DATA_TYPE_INT_NAMED)t.writeDbObject(n);else{const t=`Binding data of type ${e.type}`;c.throwErr(c.ERR_NOT_IMPLEMENTED,t)}}createCursorFromDescribe(t){const e=this.connection._createResultSet(this.options);return e.options.moreRowsToFetch=!0,e.statement.isQuery=!0,e.statement.requiresFullExecute=!0,this.processDescribeInfo(t,e),e}processImplicitResultSet(t){this.options.implicitResultSet=[];const e=t.readUB4();for(let n=0;n<e;n++){const e=t.readUInt8();t.skipBytes(e);const n=this.createCursorFromDescribe(t);n.statement.cursorId=t.readUB2(),this.options.implicitResultSet.push(n)}}}},9827:(t,e,n)=>{"use strict";const{BaseBuffer:r}=n(1559),{Buffer:i}=n(2562),s=n(3762),o=n(7034),a=n(5914),u=n(8774),_=n(8041),c=i.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","utf8");class l{constructor(t){this.allocLen=t;const e=t%s.CHUNKED_BYTES_CHUNK_SIZE;e>0&&(this.allocLen+=s.CHUNKED_BYTES_CHUNK_SIZE-e),this.buf=i.allocUnsafe(this.allocLen),this.actualLen=0}}class h{constructor(){this.chunks=[]}endChunkedRead(){if(this.chunks.length>1){let t=0;for(const e of this.chunks)t+=e.actualLen;let e=0;const n=new l(t);for(const t of this.chunks)t.buf.copy(n.buf,e,0,t.actualLen),e+=t.actualLen;n.actualLen=t,this.chunks=[n]}const t=this.chunks[0];return t.buf.subarray(0,t.actualLen)}getBuf(t){let e;this.chunks.length>0&&(e=this.chunks[this.chunks.length-1],e.allocLen-e.actualLen<t&&(e=void 0)),e||(e=new l(t),this.chunks.push(e));const n=e.buf.subarray(e.actualLen,e.actualLen+t);return e.actualLen+=t,n}startChunkedRead(){this.chunks.length>0&&(this.chunks=this.chunks.splice(0,1),this.chunks[0].actualLen=0)}}t.exports={ReadPacket:class extends r{constructor(t,e){super(),this.nsi=t,this.caps=e,this.chunkedBytesBuf=new h}_readBytesWithLength(t){if(t!==s.TNS_LONG_LENGTH_INDICATOR)return this.readBytes(t);for(this.chunkedBytesBuf.startChunkedRead();;){const t=this.readUB4();if(0===t)break;this.readBytes(t,!0)}return this.chunkedBytesBuf.endChunkedRead()}skipBytes(t){this.pos===this.size&&this.receivePacket();const e=this.numBytesLeft();if(t<=e)this.pos+=t;else for(t-=e;t>0;){this.receivePacket();const e=Math.min(t,this.size-this.pos);this.pos+=e,t-=e}}readBytes(t,e=!1){this.pos===this.size&&this.receivePacket();const n=this.numBytesLeft();if(t<=n){let n;return e?(n=this.chunkedBytesBuf.getBuf(t),this.buf.copy(n,0,this.pos,this.pos+t)):n=this.buf.subarray(this.pos,this.pos+t),this.pos+=t,n}let r;r=e?this.chunkedBytesBuf.getBuf(t):i.allocUnsafe(t);let s=0;for(this.buf.copy(r,s,this.pos,this.pos+n),s+=n,t-=n;t>0;){this.receivePacket();const e=Math.min(t,this.size-this.pos);this.buf.copy(r,s,this.pos,this.pos+e),this.pos+=e,s+=e,t-=e}return r}receivePacket(){if(this.savedPacketPos===this.savedPackets.length){const t=this.nsi.syncRecvPacket();if(!t||this.nsi.isBreak)throw new a.OutOfPacketsError;this.savedPackets.push(t)}this.startPacket(this.savedPackets[this.savedPacketPos++])}restorePoint(){this.savedPacketPos=0,this.startPacket(this.savedPackets[this.savedPacketPos++]),this.pos=this.savedPos}savePoint(){this.savedPackets?this.savedPackets=this.savedPackets.splice(this.savedPacketPos-1):this.savedPackets=[this.packet],this.savedPacketPos=1,this.savedPos=this.pos}startPacket(t){this.packet=t,this.buf=t.buf,this.pos=10,this.size=t.buf.length,this.packetNum=t.num}async waitForPackets(t=!1){let e=await this.nsi.recvPacket();if(this.savedPackets?this.savedPackets.push(e):(this.savedPackets=[e],this.savedPacketPos=0),t&&this.nsi.endOfRequestSupport)for(;!(e.type!==s.TNS_PACKET_TYPE_DATA||e.buf.readUInt16BE(8)&s.TNS_DATA_FLAGS_END_OF_REQUEST||11===e.buf.length&&e.buf[10]===s.TNS_MSG_TYPE_END_OF_REQUEST);)e=await this.nsi.recvPacket(),this.savedPackets.push(e);this.startPacket(this.savedPackets[this.savedPacketPos++])}readOson(){if(0===this.readUB4())return null;this.skipUB8(),this.skipUB4();const t=new o.OsonDecoder(this.readBytesWithLength());return this.skipBytesChunked(),t.decode()}readURowID(){let t=0,e=1,n=this.readBytesWithLength();if(null===n)return null;n=this.readBytesWithLength();let r=n.length;if(n&&1===n[0]){const t=n.readUInt32BE(1),e=n.readUInt16BE(5),r=n.readUInt32BE(7),i=n.readUInt16BE(11);return a.encodeRowID({rba:t,partitionID:e,blockNum:r,slotNum:i})}let s=4*Math.floor(r/3);const o=r%3;1===o?s+=1:2===o&&(s+=3);const u=i.allocUnsafe(s);for(r-=1,u[0]=42,t+=1;r>0;){let i=n[e]>>2;if(u[t]=c[i],t+=1,i=(3&n[e])<<4,1==r){u[t]=c[i];break}if(e+=1,i|=(240&n[e])>>4,u[t]=c[i],t+=1,i=(15&n[e])<<2,2==r){u[t]=c[i];break}e+=1,i|=(192&n[e])>>6,u[t]=c[i],t+=1,i=63&n[e],u[t]=c[i],t+=1,e+=1,r-=3}return u.toString("utf-8")}readRowID(){const t=this.readUB4(),e=this.readUB2();return this.skipUB1(),{rba:t,partitionID:e,blockNum:this.readUB4(),slotNum:this.readUB2()}}readVector(){if(0===this.readUB4())return null;this.skipUB8(),this.skipUB4();const t=new u.VectorDecoder(this.readBytesWithLength());return this.skipBytesChunked(),t.decode()}skipBytesChunked(){const t=this.readUInt8();if(0!==t&&t!==s.TNS_NULL_LENGTH_INDICATOR)if(t!==s.TNS_LONG_LENGTH_INDICATOR)this.skipBytes(t);else for(;;){const t=this.readUB4();if(0===t)break;this.skipBytes(t)}}readNullTerminatedBytes(t=50){let e=0;const n=i.allocUnsafe(t);for(;e<t&&(n[e]=this.readUInt8(),0!==n[e]);)e+=1;if(e===t){const e=`Byte Arrray Exceeded MaxSize ${t}`;_.throwErr(_.ERR_INTERNAL,e)}return n.subarray(0,e+1)}},WritePacket:class extends r{constructor(t,e,n){super(t.sAtts.sdu),this.size=this.maxSize,this.isLargeSDU=t.sAtts.version>=s.TNS_VERSION_MIN_LARGE_SDU,this.protocol=n,this.packetType=s.TNS_PACKET_TYPE_DATA,this.caps=e,this.nsi=t}_grow(){this._sendPacket()}_sendPacket(t=!1){const e=this.pos;this.pos=0,this.isLargeSDU?this.writeUInt32BE(e):(this.writeUInt16BE(e),this.writeUInt16BE(0)),this.writeUInt8(this.packetType),this.writeUInt8(0),this.writeUInt16BE(0);let n=this.buf.subarray(0,e);t?this.buf.writeUInt16BE(2048,8):(n=i.from(n),this.startPacket()),this.nsi.ntAdapter||_.throwErr(_.ERR_INVALID_CONNECTION),this.nsi.ntAdapter.send(n)}startPacket(t=0){this.pos=s.PACKET_HEADER_SIZE,this.packetType===s.TNS_PACKET_TYPE_DATA&&this.writeUInt16BE(t)}startRequest(t,e=0){this.packetType=t,this.startPacket(e)}endRequest(){this.pos>s.PACKET_HEADER_SIZE&&this._sendPacket(!0)}writeKeyValue(t,e,n=0){const r=i.byteLength(t),s=i.byteLength(e);this.writeUB4(r),this.writeBytesWithLength(i.from(t)),this.writeUB4(s),s>0&&this.writeBytesWithLength(i.from(e)),this.writeUB4(n)}writeOson(t,e){const n=(new o.OsonEncoder).encode(t,e);this.writeQLocator(n.length),this.writeBytesWithLength(n)}writeSeqNum(){this.writeUInt8(this.protocol.sequenceId),this.protocol.sequenceId=(this.protocol.sequenceId+1)%256}writeVector(t){const e=(new u.VectorEncoder).encode(t);this.writeQLocator(e.length),this.writeBytesWithLength(e)}writeQLocator(t){this.writeUB4(40),this.writeUInt8(40),this.writeUInt16BE(38),this.writeUInt16BE(s.TNS_LOB_QLOCATOR_VERSION),this.writeUInt8(s.TNS_LOB_LOC_FLAGS_VALUE_BASED|s.TNS_LOB_LOC_FLAGS_BLOB|s.TNS_LOB_LOC_FLAGS_ABSTRACT),this.writeUInt8(s.TNS_LOB_LOC_FLAGS_INIT),this.writeUInt16BE(0),this.writeUInt16BE(1),this.writeUInt64BE(t),this.writeUInt16BE(0),this.writeUInt16BE(0),this.writeUInt16BE(0),this.writeUInt64BE(0),this.writeUInt64BE(0)}}}},4583:(t,e,n)=>{"use strict";const r=n(3762),i=n(6621),{WritePacket:s,ReadPacket:o}=n(9827),a=n(8041),u=n(5914);t.exports=class{constructor(t){this._breakInProgress=!1,this.txnInProgress=!1,this.connInProgress=!0,this.nsi=t.nscon,this.sequenceId=1,this.caps=new i(t.nscon),this.writeBuf=new s(t.nscon,this.caps,this),this.readBuf=new o(t.nscon,this.caps),this.callTimeout=0}async _decodeMessage(t){for(t.preProcess(),await this.readBuf.waitForPackets(!0);;){this.nsi.isBreak&&(await this.resetMessage(),delete this.readBuf.savedPackets,await this.readBuf.waitForPackets());try{t.decode(this.readBuf);break}catch(t){if(t instanceof u.OutOfPacketsError){this.nsi.isBreak||(await this.readBuf.waitForPackets(),this.readBuf.restorePoint());continue}throw t}}await t.postProcess()}async _encodeMessage(t){const e=this.nsi.ntAdapter;for(this.writeBuf.startRequest(r.TNS_PACKET_TYPE_DATA);t.encode(this.writeBuf);)await e.pauseWrite();this.writeBuf.endRequest()}async _recoverFromError(t,e){try{this.breakMessage(),this._breakInProgress=!1,await this.resetMessage(),await this.readBuf.waitForPackets(),e.decode(this.readBuf)}catch(e){this.nsi.disconnect();const n=a.getErr(a.ERR_CONNECTION_CLOSED);throw t.message=n.message+"\nError recovery failed: "+e.message+"\nOriginal error: "+t.message,t}}async _processMessage(t){let e,n=!1;try{this.callTimeout>0&&(e=setTimeout((()=>{n=!0,this.breakMessage()}),this.callTimeout)),await this._encodeMessage(t),t.messageType!==r.TNS_MSG_TYPE_ONEWAY_FN&&await this._decodeMessage(t)}catch(e){throw this.connInProgress||e.code===a.ERR_CONNECTION_CLOSED_CODE||await this._recoverFromError(e,t),e}finally{clearTimeout(e)}if(t.flushOutBinds&&await this.flushOutBindMessage(t),this.txnInProgress=Boolean(t.callStatus&r.TNS_EOCS_FLAGS_TXN_IN_PROGRESS),t.callStatus&r.TNS_EOCS_FLAGS_SESS_RELEASE&&t.connection.statementCache.clearCursors(),t.errorOccurred){if(n&&a.throwErr(a.ERR_CALL_TIMEOUT_EXCEEDED,this.callTimeout),t.retry)return t.errorOccurred=!1,await this._processMessage(t);let e=new Error(t.errorInfo.message);throw e.offset=t.errorInfo.pos,e.errorNum=t.errorInfo.num,e=a.transformErr(e),e.code===a.ERR_CONNECTION_CLOSED_CODE&&this.nsi.disconnect(),e}}async flushOutBindMessage(t){this.writeBuf.startRequest(r.TNS_PACKET_TYPE_DATA),this.writeBuf.writeUInt8(r.TNS_MSG_TYPE_FLUSH_OUT_BINDS),this.writeBuf.endRequest(),await this._decodeMessage(t)}breakMessage(){this._breakInProgress=!0,this.nsi.sendBreak()}async resetMessage(){await this.nsi.reset()}}},5914:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(6982);class o extends Error{}function a(t,e,n,r){for(let s=0;s<n;s++)t[r+n-s-1]=i.TNS_BASE64_ALPHABET_ARRAY[63&e],e>>=6;return r+n}t.exports={encodeRowID:function(t){let e=0;if(0!==t.rba||0!==t.partitionID||0!==t.blockNum||0!=t.slotNum){const n=r.allocUnsafe(i.TNS_MAX_ROWID_LENGTH);return e=a(n,t.rba,6,e),e=a(n,t.partitionID,3,e),e=a(n,t.blockNum,6,e),a(n,t.slotNum,3,e),n.toString("utf8")}},getDeobfuscatedValue:function(t,e){const n=r.from(t);for(let r=0;r<t.length;r++)n[r]=t[r]^e[r];const i=n.toString();return n.fill(0),i},OutOfPacketsError:o,setObfuscatedValue:function(t){const e=r.from(t),n=s.randomBytes(e.length);for(let t=0;t<e.length;t++)e[t]=n[t]^e[t];return{obfuscatedValue:n,value:e}}}},8625:(t,e,n)=>{"use strict";const r=n(9700),i=n(1375),s=n(2752);t.exports=class extends r{async _fetchMoreRows(t){const e=new(this.statement.requiresFullExecute?i:s)(this.connection,this.statement,t,this);await this.connection._protocol._processMessage(e),this.statement.requiresFullExecute=!1}_resultSetNew(t,e,n){this.connection=t,this.statement=e,this._nestedCursorIndices=[],this.options=n,this.prefetchRowsProcessed=!1,this.statement.bufferRowIndex=0}close(){this.connection._returnStatement(this.statement)}_processRows(t){const e=[],n=this.statement.bufferRowIndex;for(let r=n;r<n+t;r++){const t=[];for(let e=0;e<this.statement.numQueryVars;e++)t.push(this.statement.queryVars[e].values[r]);e.push(t)}return this.statement.bufferRowIndex+=t,this.statement.bufferRowIndex===this.statement.bufferRowCount&&(this.statement.bufferRowCount=0,this.statement.bufferRowIndex=0),e}async getRows(t,e){if(e.fetchArraySize=t||this.options.fetchArraySize,e.prefetchRows=this.options.prefetchRows,this.statement.bufferRowCount-this.statement.bufferRowIndex>=e.fetchArraySize)return this._processRows(e.fetchArraySize);{e.fetchArraySize=e.fetchArraySize-(this.statement.bufferRowCount-this.statement.bufferRowIndex);const n=this.statement.bufferRowCount;if(this.statement.moreRowsToFetch&&e.fetchArraySize>0&&await this._fetchMoreRows(e),e.fetchArraySize=t||this.options.fetchArraySize,n===this.statement.bufferRowCount){const t=this.statement.bufferRowCount-this.statement.bufferRowIndex;return this.statement.bufferRowCount=0,t>0?this._processRows(t):[]}}const n=this.statement.bufferRowCount-this.statement.bufferRowIndex;return this._processRows(n)}}},337:(t,e,n)=>{"use strict";const{NavAddress:r,NavAddressList:i,NavDescription:s,NavDescriptionList:o}=n(5104),{createNVPair:a}=n(6450),u=n(8041);class _{constructor(){this.cOpts=new Array}addConnectOption(t){this.cOpts.push(t)}getConnectOptions(){return this.cOpts}}class c{constructor(){this.reset(),this.retryCount=0,this.currentDescription=null,this.descriptionList=new Array,this.sBuf=new Array}reset(){this.nextOptToTry=0,this.lastRetryCounter=0,this.lastRetryConnectDescription=0,this.reorderDescriptionList=0}hasMoreOptions(){let t=0;for(let e=0;e<this.descriptionList.length;++e)t+=this.descriptionList[e].getConnectOptions().length;return this.nextOptToTry<t}newConnectionDescription(){return this.currentDescription=new _,this.currentDescription}getcurrentDescription(){return this.currentDescription}closeDescription(){this.descriptionList.push(this.currentDescription),this.currentDescription=null}async execute(t){null!=t&&0==this.retryCount&&t.retryCount>0&&(this.retryCount=t.retryCount),this.reorderDescriptionList||(this.descriptionList=h.reorderDescriptionList(this.descriptionList),this.reorderDescriptionList=!0);for(let e=this.lastRetryConnectDescription;e<this.descriptionList.length;e++){const n=this.descriptionList[e];let r=new Array;r=n.getConnectOptions();let i=n.delayInMillis;null!=t&&(0==i||null==i)&&t.retryDelay>0&&(i=1e3*t.retryDelay);for(let t=this.lastRetryCounter;t<=this.retryCount;++t){for(0==this.nextOptToTry&&(r=h.reorderAddresses(r));this.nextOptToTry<r.length;){const n=r[this.nextOptToTry];return this.lastRetryCounter=t,this.lastRetryConnectDescription=e,this.nextOptToTry++,n}this.nextOptToTry=0,i>0&&t<this.retryCount&&await l(i)}this.lastRetryCounter=0}throw this.nextOptToTry=1e3,this.lastRetryCounter=1e3,new Error("All options tried")}}function l(t){return new Promise((e=>setTimeout(e,t)))}const h=new class{constructor(){this.DOWN_HOSTS_TIMEOUT=600,this.MIN_TIME_BETWEEN_REFRESH=60,this.downHostsCacheMap=new Map,this.lastRefreshTime=0}markDownHost(t){return this.downHostsCacheMap.set(t,Date.now())}refreshCache(){Date.now()-1e3*this.MIN_TIME_BETWEEN_REFRESH>this.lastRefreshTime&&(this.downHostsCacheMap.forEach(((t,e)=>{const n=t;null!=n&&Date.now()-1e3*this.DOWN_HOSTS_TIMEOUT>n&&this.downHostsCacheMap.delete(e)})),this.lastRefreshTime=Date.now())}reorderAddresses(t){this.refreshCache();let e=0,n=t.length-1;for(;e<n;){for(;e<=n&&!this.isDownHostsCached(t[e]);)e++;for(;n>=e&&this.isDownHostsCached(t[n]);)n--;e<n&&([t[e],t[n]]=[t[n],t[e]])}return t}isDownDescCached(t){const e=t.getConnectOptions();for(let t=0;t<e.length;t++)if(!this.isDownHostsCached(e[t]))return!1;return!0}reorderDescriptionList(t){this.refreshCache();let e=0,n=t.length-1;for(;e<n;){for(;e<=n&&!this.isDownDescCached(t[e]);)e++;for(;n>=e&&this.isDownDescCached(t[n]);)n--;e<n&&([t[e],t[n]]=[t[n],t[e]])}return t}isDownHostsCached(t){return this.downHostsCacheMap.has(t.host)}};t.exports={createNode:async function(t){let e;e="string"==typeof t?a(t):t;const n=e.name.toUpperCase();let _=null;switch(n){case"ADDRESS":_=new r;break;case"ADDRESS_LIST":_=new i;break;case"DESCRIPTION":_=new s;break;case"DESCRIPTION_LIST":_=new o;break;default:u.throwErr(u.ERR_INVALID_CONNECT_STRING_PARAMETERS,`unknown top element ${n}`)}_.initFromNVPair(e);const l=new c;return await _.navigate(l),l},SOLE_INST_DHCACHE:h}},8881:t=>{t.exports={NSPTCN:1,NSPTAC:2,NSPTAK:3,NSPTRF:4,NSPTRD:5,NSPTDA:6,NSPTNL:7,NSPTAB:9,NSPTRS:11,NSPTMK:12,NSPTAT:13,NSPTCNL:14,NSPTDD:15,NSPTHI:19,NSPHDLEN:0,NSPHDPSM:2,NSPHDTYP:4,NSPHDFLGS:5,NSPHDHSM:6,NSPSIZHD:8,NSPFSID:1,NSPFRDS:2,NSPFRDR:4,NSPFLSD:32,NO_HEADER_FLAGS:0,NSPFSRN:8,NSPCNVSN:8,NSPCNLOV:10,NSPCNOPT:12,NSPCNSDU:14,NSPCNTDU:16,NSPCNNTC:18,NSPCNTNA:20,NSPCNONE:22,NSPCNLEN:24,NSPCNOFF:26,NSPCNMXC:28,NSPCNFL0:32,NSPCNFL1:33,NSPCNTMO:50,NSPCNTCK:52,NSPCNADL:54,NSPCNAOF:56,NSPCNLSD:58,NSPCNLTD:62,NSPCNCFL:66,NSPCNCFL2:70,NSPCNDAT:74,NSPMXCDATA:230,NSINAWANTED:1,NSINAINTCHG:2,NSINADISABLEDFORCONNECTION:4,NSINANOSERVICES:8,NSINAREQUIRED:16,NSINAAUTHWANTED:32,NSISUPSECRENEG:128,NSGDONTCARE:1,NSGHDX:2,NSGFDX:4,NSGHDRCHKSUM:8,NSGPAKCHKSUM:16,NSGBROKEN:32,NSGUSEVIO:64,NSGOSAUTHOK:128,NSGSENDATTN:512,NSGRECVATTN:1024,NSGNOATTNPR:2048,NSGRAW:4096,TNS_VERSION_DESIRED:319,TNS_VERSION_MINIMUM:300,TNS_VERSION_MIN_DATA_FLAGS:318,TNS_VERSION_MIN_END_OF_RESPONSE:319,TNS_UUID_OFFSET:45,NSPACVSN:8,NSPACOPT:10,NSPACSDU:12,NSPACTDU:14,NSPACONE:16,NSPACLEN:18,NSPACOFF:20,NSPACFL0:22,NSPACFL1:23,NSPACTMO:24,NSPACTCK:26,NSPACADL:28,NSPACAOF:30,NSPACLSD:32,NSPACLTD:36,NSPACCFL:40,NSPACFL2:41,NSPACV310DAT:32,NSPACV315DAT:41,NSPRFURS:8,NSPRFSRS:9,NSPRFLEN:10,NSPRFDAT:12,NSPACCFON:128,NSPACCFAT:64,NSPACCFNT:2,NSPACOOB:1,NSGPCHKSCMD:16777216,TNS_ACCEPT_FLAG_HAS_END_OF_REQUEST:33554432,TNS_ACCEPT_FLAG_FAST_AUTH:268435456,NSPRDLEN:8,NSPRDDAT:10,NSPDAFLG:8,NSPDADAT:10,NSPDAFEOF:64,NSPMKTYP:8,NSPMKODT:9,NSPMKDAT:10,NSPMKTD0:0,NSPMKTD1:1,NSPMKTAT:2,NIQBMARK:1,NIQRMARK:2,NIQIMARK:3,NSPCTLCMD:8,NSPCTLDAT:10,NSPCTL_SERR:8,NSPCTL_CLRATTN:9,NSPDFSDULN:8192,NSPABSSDULN:2097152,NSPMXSDULN:65535,NSPMNSDULN:512,NSPDFTDULN:2097152,NSPMXTDULN:2097152,NSPMNTDULN:255,NSFIMM:64,DISABLE_OOB_STR:"DISABLE_OOB",EXPIRE_TIME:"EXPIRE_TIME",PEM_WALLET_FILE_NAME:"ewallet.pem",NT_MOREDATA:1,NS_MOREDATA:2,SVCNAME:3,SERVERTYPE:4,REMOTEADDR:5,HEALTHCHECK:6,CONNCLASS:7,PURITY:8,SID:9,NSNOBLOCK:1}},4549:(t,e,n)=>{"use strict";const r=n(8041),i=new RegExp("((?=(?<hostnames>(((\\[[A-z0-9:]+\\])|([A-z0-9][A-z0-9._-]+))[,]?)+)))\\k<hostnames>(:(?<port>\\d+)?)?","g"),s=new RegExp("^(((?<protocol>[A-z0-9]+):)?//)?(?<hostinfo>("+i.source+"(?=([,]|[;]|[/]|[:]|$))([,]|[;])?)+)(/(?<servicename>[A-z0-9][A-z0-9,-.]+)?)?(:(?<servermode>dedicated|shared|pooled))?(/(?<instance>[A-z0-9][A-z0-9]+))?$","ig"),o=["ENABLE","FAILOVER","LOAD_BALANCE","RECV_BUF_SIZE","SEND_BUF_SIZE","SDU","SOURCE_ROUTE","RETRY_COUNT","RETRY_DELAY","CONNECT_TIMEOUT","TRANSPORT_CONNECT_TIMEOUT","RECV_TIMEOUT"];t.exports=class{constructor(t){this.URL_PROPS_ALIAS=this.initializeUrlAlias(),this.url=t,this.resolvedUrl="",this.connectionProps=new Map,this.urlProps=new Map,this.lb=!1}getResolvedUrl(){return this.parse(),this.resolvedUrl}parse(){let t=this.parseExtendedSettings(this.url);0===this.connectionProps.size&&0===this.urlProps.size&&(t=this.url),this.resolvedUrl=this.resolveToLongURLFormat(t)}resolveToLongURLFormat(t){const e=t.replace(/\s/g,"");let n=0,i=null,o=null,a=null,u=null,_=null;for(const t of e.matchAll(s))n=1,i=t.groups.protocol,o=t.groups.hostinfo,a=t.groups.servicename,u=t.groups.servermode,_=t.groups.instance;n||r.throwErr(r.ERR_INVALID_EZCONNECT_SYNTAX,"input string not in easy connect format",e),null==i?t.includes("//")||(i="TCP"):"tcp"!=i.toLowerCase()&&"tcps"!=i.toLowerCase()&&r.throwErr(r.ERR_INVALID_EZCONNECT_SYNTAX,"Unsupported protocol in thin mode",i);const c=this.urlProps.get("HTTPS_PROXY"),l=this.urlProps.get("HTTPS_PROXY_PORT"),h=this.buildAddressList(o,i,c,l),T=this.urlProps.get("CONNECTION_ID_PREFIX"),p=[];return this.lb&&p.push("(LOAD_BALANCE=ON)"),p.push(this.buildDescriptionParams()),p.push(h),p.push(this.buildConnectData(a,u,_,T)),p.push(this.buildSecurityInfo(i)),`(DESCRIPTION=${p.join("")})`}buildConnectData(t,e,n,r){const i=this.urlProps.get("POOL_CONNECTION_CLASS"),s=this.urlProps.get("POOL_PURITY"),o=this.urlProps.get("SERVICE_TAG"),a=this.urlProps.get("POOL_BOUNDARY"),u=[];return t?u.push(`(SERVICE_NAME=${t})`):u.push("(SERVICE_NAME=)"),e&&u.push(`(SERVER=${e})`),n&&u.push(`(INSTANCE_NAME=${n})`),i&&u.push(`(POOL_CONNECTION_CLASS=${i})`),s&&u.push(`(POOL_PURITY=${s})`),o&&u.push(`(SERVICE_TAG=${o})`),r&&u.push(`(CONNECTION_ID_PREFIX=${r})`),a&&u.push(`(POOL_BOUNDARY=${a})`),`(CONNECT_DATA=${u.join("")})`}buildAddressList(t,e,n,r){const s=new Array;let o="";null!=n&&(o=null!=r?`(HTTPS_PROXY=${n})(HTTPS_PROXY_PORT=${r})`:`(HTTPS_PROXY=${n})`),null==e&&(e="TCP");let a=0;const u=t.split(";");for(const t of u){let n=0;const r=new Array;for(const s of t.matchAll(i)){const t=s.groups.hostnames.split(",");let i=s.groups.port;null==i&&(i="1521");for(const s of t)r.push(this.getAddrStr(s,i,e,o)),n++}a+=n;const _=[];u.length>1&&n>1&&_.push("(LOAD_BALANCE=ON)"),_.push(r.join("")),u.length>1?s.push(`(ADDRESS_LIST=${_.join("")})`):s.push(_.join(""))}return u.length<2&&a>1&&(this.lb=!0),s.join("")}getAddrStr(t,e,n,r){let i=t.trim();return i.startsWith("[")&&i.endsWith("]")&&(i=i.substring(1,i.length-1)),`(ADDRESS=(PROTOCOL=${n})(HOST=${i})(PORT=${e})${r})`}buildDescriptionParams(){if(0===this.urlProps.size)return"";const t=new Array;return this.urlProps.forEach((function(e,n){o.includes(n)&&t.push(`(${n}=${e})`)})),t.join("")}buildSecurityInfo(t){const e=new Array;if(null!=t&&"tcps"==t.toLowerCase()){const t=this.urlProps.get("SSL_SERVER_DN_MATCH"),n=this.urlProps.get("SSL_SERVER_CERT_DN"),r=this.urlProps.get("MY_WALLET_DIRECTORY");null!=t&&e.push(`(SSL_SERVER_DN_MATCH=${t})`),null!=n&&e.push(`(SSL_SERVER_CERT_DN=${n}})`),null!=r&&e.push(`(MY_WALLET_DIRECTORY=${r})`)}return 0===e.length?"":`(SECURITY=${e.join("")})`}parseExtendedSettings(t){const e=Array.from(t.trim()),n=this.findExtendedSettingPosition(e);return-1==n?t:(this.parseExtendedProperties(e,n+1),t.substring(0,n))}parseExtendedProperties(t,e){let n=null,i=null;const s=new Array(t.length);let o=0,a="";for(let u=e;u<t.length;u++)if(""!=t[u].trim())switch(t[u]){case'"':a=this.parseQuotedString(u,t,o,s),o=a[1],u=a[0];break;case"=":null!=n&&r.throwErr(r.ERR_INVALID_EZCONNECT_SYNTAX,"unable to parse, invalid syntax",this.url),n=s.join("").substring(0,o).trim(),o=0;break;case"&":null==n&&r.throwErr(r.ERR_INVALID_EZCONNECT_SYNTAX,"unable to parse, invalid syntax",this.url),i=s.join("").substring(0,o).trim(),this.addParam(n,i),n=null,i=null,o=0;break;default:s[o++]=t[u]}null!=n&&(i=s.join("").substring(0,o).trim(),this.addParam(n,i))}parseQuotedString(t,e,n,r){let i=t+1;for(;i<e.length;){const t=e[i];if('"'==t)return[i,n];r[n++]=t,i++}}addParam(t,e){const n=t.toLowerCase(),r=this.URL_PROPS_ALIAS.get(n);null!=r?this.urlProps.set(r,e):this.connectionProps.set(r,e)}findExtendedSettingPosition(t){let e=0;for(let n=0;n<t.length;n++)if("("==t[n])e++;else if(")"==t[n])e--;else if("?"==t[n]&&0==e)return n;return-1}initializeUrlAlias(){const t=new Map;return t.set("enable","ENABLE"),t.set("failover","FAILOVER"),t.set("load_balance","LOAD_BALANCE"),t.set("recv_buf_size","RECV_BUF_SIZE"),t.set("send_buf_size","SEND_BUF_SIZE"),t.set("sdu","SDU"),t.set("source_route","SOURCE_ROUTE"),t.set("retry_count","RETRY_COUNT"),t.set("retry_delay","RETRY_DELAY"),t.set("https_proxy","HTTPS_PROXY"),t.set("https_proxy_port","HTTPS_PROXY_PORT"),t.set("connect_timeout","CONNECT_TIMEOUT"),t.set("transport_connect_timeout","TRANSPORT_CONNECT_TIMEOUT"),t.set("recv_timeout","RECV_TIMEOUT"),t.set("ssl_server_cert_dn","SSL_SERVER_CERT_DN"),t.set("ssl_server_dn_match","SSL_SERVER_DN_MATCH"),t.set("wallet_location","MY_WALLET_DIRECTORY"),t.set("pool_connection_class","POOL_CONNECTION_CLASS"),t.set("pool_purity","POOL_PURITY"),t.set("service_tag","SERVICE_TAG"),t.set("connection_id_prefix","CONNECTION_ID_PREFIX"),t.set("pool_boundary","POOL_BOUNDARY"),t}}},5104:(t,e,n)=>{"use strict";const{findNVPairRecurse:r,createNVPair:i}=n(6450),s=n(8041),o=n(857),a=n(9278),u=n(2250).promises,_=n(2456).CLIENT_INFO;class c{isS(){return 0}initFromString(t){const e=i(t);this.initFromNVPair(e)}initFromNVPair(t){null!=t&&"ADDRESS"==t.name.toUpperCase()||s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);const e=r(t,"protocol"),n=r(t,"port"),i=r(t,"host"),o=r(t,"https_proxy"),a=r(t,"https_proxy_port");n&&(this.port=Number(n.atom)),i&&(this.host=i.atom),e&&(this.prot=e.atom),o&&(this.httpsProxy=o.atom),a&&(this.httpsProxyPort=Number(a.atom)),this.addr=t.toString()}toString(){return this.addr}}class l{constructor(){this.children=new Array,this.sourceRoute=!1,this.loadBalance=!1,this.failover=!0}isS(){return 1}initFromString(t){const e=i(t);this.initFromNVPair(e)}initFromNVPair(t){let e,n;this.children=[];const r=t.getListSize();0==r&&s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let i=0;i<r;i++)e=t.getListElement(i),"SOURCE_ROUTE"==e.name.toUpperCase()?this.sourceRoute="yes"==e.atom.toLowerCase()||"on"==e.atom.toLowerCase()||"true"==e.atom.toLowerCase():"LOAD_BALANCE"==e.name.toUpperCase()?this.loadBalance="yes"==e.atom.toLowerCase()||"on"==e.atom.toLowerCase()||"true"==e.atom.toLowerCase():"FAILOVER"==e.name.toUpperCase()?this.failover="yes"==e.atom.toLowerCase()||"on"==e.atom.toLowerCase()||"true"==e.atom.toLowerCase():"ADDRESS"==e.name.toUpperCase()?(n=new d,n.initFromNVPair(e),this.children.push(n)):"ADDRESS_LIST"==e.name.toUpperCase()?(n=new N,n.initFromNVPair(e),this.children.push(n)):s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);0==this.children.length&&s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX)}toString(){let t=new String("");if(this.children.size()<1)return t;t+="(ADDRESS_LIST=";for(let e=0;e<this.children.size();e++)t+=this.children[e].toString();return this.sourceRoute&&(t+="(SOURCE_ROUTE=yes)"+f.HC),this.loadBalance&&(t+="(LOAD_BALANCE=yes)"),this.failover||(t+="(FAILOVER=false)"),t+=")",t}}class h{constructor(){this.children=new Array,this.sourceRoute=!1,this.loadBalance=!1,this.failover=!0,this.delayInMillis=-1,this.params={}}isS(){return 2}initFromString(t){const e=i(t);this.initFromNVPair(e)}initFromNVPair(t){const e=t.getListSize();let n,r;0==e&&s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let i=0;i<e;i++)if(n=t.getListElement(i),"SOURCE_ROUTE"==n.name.toUpperCase())this.sourceRoute="yes"==n.atom.toLowerCase()||"on"==n.atom.toLowerCase()||"true"==n.atom.toLowerCase();else if("LOAD_BALANCE"==n.name.toUpperCase())this.loadBalance="yes"==n.atom.toLowerCase()||"on"==n.atom.toLowerCase()||"true"==n.atom.toLowerCase();else if("FAILOVER"==n.name.toUpperCase())this.failover="yes"==n.atom.toLowerCase()||"on"==n.atom.toLowerCase()||"true"==n.atom.toLowerCase();else if("ADDRESS_LIST"==n.name.toUpperCase())r=new N,r.initFromNVPair(n),this.children.push(r);else if("ADDRESS"==n.name.toUpperCase())r=new d,r.initFromNVPair(n),this.children.push(r);else if("CONNECT_DATA"==n.name.toUpperCase()){let t;const e=n.getListSize();for(let r=0;r<e;r++)if(t=n.getListElement(r),"CONNECTION_ID_PREFIX"==t.name.toUpperCase()){this.params.connectionIdPrefix=t.atom,n.removeListElement(r);break}this.connectData=n.valueToString()}else if("RETRY_DELAY"==n.name.toUpperCase())n.atom>0&&(this.delayInMillis=1e3*n.atom);else if("RETRY_COUNT"==n.name.toUpperCase())this.retryCount=n.atom;else if("CONNECTION_ID_PREFIX"==n.name.toUpperCase())this.conidPrefix=n.atom;else if("CONNECT_TIMEOUT"==n.name.toUpperCase())n.atom>0&&(this.params.connectTimeout=n.atom);else if("TRANSPORT_CONNECT_TIMEOUT"==n.name.toUpperCase())n.atom>0&&(this.params.transportConnectTimeout=n.atom);else if("ENABLE"==n.name.toUpperCase())this.params.enable=n.atom;else if("RECV_TIMEOUT"==n.name.toUpperCase())n.atom>0&&(this.params.recvTimeout=n.atom);else if("SDU"==n.name.toUpperCase())this.params.sdu=n.atom;else if("EXPIRE_TIME"==n.name.toUpperCase())n.atom>0&&(this.params.expireTime=n.atom);else if("SECURITY"==n.name.toUpperCase()){const t=n.getListSize();let e;for(let r=0;r<t;r++)e=n.getListElement(r),"SSL_SERVER_CERT_DN"==e.name.toUpperCase()?this.params.sslServerCertDN=e.valueToString():"SSL_SERVER_DN_MATCH"==e.name.toUpperCase()?this.params.sslServerDNMatch="yes"==e.atom.toLowerCase()||"on"==e.atom.toLowerCase()||"true"==e.atom.toLowerCase():"SSL_ALLOW_WEAK_DN_MATCH"==e.name.toUpperCase()?this.params.sslAllowWeakDNMatch="yes"==e.atom.toLowerCase()||"on"==e.atom.toLowerCase()||"true"==e.atom.toLowerCase():"WALLET_LOCATION"!=e.name.toUpperCase()&&"MY_WALLET_DIRECTORY"!=e.name.toUpperCase()||(this.params.walletLocation=e.atom)}}toString(){let t,e=new String("");t=new String("");for(let n=0;n<this.children.size();n++)t=this.children[n].toString(),""==!t&&(e+=t);return""==!e&&this.sourceRoute&&(e+="(SOURCE_ROUTE=yes)"),""==!e&&this.loadBalance&&(e+="(LOAD_BALANCE=yes)"),""!=!e||this.failover||(e+="(FAILOVER=false)"),e.equals("")||(e="(DESCRIPTION="+e+")"),e}}class T{constructor(){this.children=new Array,this.sourceRoute=!1,this.loadBalance=!0,this.failover=!0}isS(){return 1}initFromString(t){const e=i(t);this.initFromNVPair(e)}initFromNVPair(t){const e=t.getListSize();let n,r;0==e&&s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let i=0;i<e;i++)r=t.getListElement(i),"SOURCE_ROUTE"==r.name.toUpperCase()?this.sourceRoute="yes"==r.atom.toLowerCase()||"on"==r.atom.toLowerCase()||"true"==r.atom.toLowerCase:"LOAD_BALANCE"==r.name.toUpperCase()?this.loadBalance="yes"==r.atom.toLowerCase()||"on"==r.atom.toLowerCase()||"true"==r.atom.toLowerCase():"FAILOVER"==r.name.toUpperCase()?this.failover="yes"==r.atom.toLowerCase()||"on"==r.atom.toLowerCase()||"true"==r.atom.toLowerCase():"DESCRIPTION"==r.name.toUpperCase()?(n=new S,n.initFromNVPair(r),this.children.push(n)):s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);0==this.children.length&&s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX)}toString(){let t=new String("");if(this.children.size()<1)return t;let e=new String("");for(let n=0;n<this.children.size();n++)e=this.children[n].toString(),e.equals("")||(t+=e);return t.equals("")&&this.sourceRoute&&(t+="(SOURCE_ROUTE=yes)"),t.equals("")&&!this.loadBalance&&(t+="(LOAD_BALANCE=no)"),t.equals("")&&!this.failover&&(t+="(FAILOVER=false)"),t.equals("")||(t="(DESCRIPTION_LIST="+t+")"),t}}class p{constructor(){this.CNdata=new Array}}const f={DEBUG:!1,SR:"(SOURCE_ROUTE=yes)",HC:"(HOP_COUNT=0)",LB:"(LOAD_BALANCE=yes)",NFO:"(FAILOVER=false)",CD:"(CONNECT_DATA=",CONID:"(CONNECTION_ID="},E={all:!0};class d extends c{constructor(){super()}async navigate(t){let e,n=0,r=!1;if(!this.host){n=1,this.host=o.hostname();try{await u.lookup(this.host,E)}catch{this.host="localhost"}}if(null==t.getcurrentDescription()&&(t.newConnectionDescription(),r=!0),a.isIP(this.host)){const e=new p;e.hostname=this.host,e.port=this.port,e.protocol=this.prot,e.httpsProxy=this.httpsProxy,e.httpsProxyPort=this.httpsProxyPort,e.desc=t.getcurrentDescription(),e.CNdata.push(t.sBuf.join("")),e.CNdata.push(this.toString()),e.host=this.host,e.addr=this.addr,t.getcurrentDescription().addConnectOption(e)}else try{e=await u.lookup(this.host,E);for(const r of e){const e=new p;e.hostname=this.host,e.port=this.port,e.protocol=this.prot,e.httpsProxy=this.httpsProxy,e.httpsProxyPort=this.httpsProxyPort,e.desc=t.getcurrentDescription(),e.CNdata.push(t.sBuf.join("")),1==n?e.CNdata.push("(address=(protocol="+this.prot+")(host="+this.host+")(port="+this.port+"))"):e.CNdata.push(this.toString()),e.host=r.address,e.addr=this.addr,t.getcurrentDescription().addConnectOption(e)}}catch{}r&&t.closeDescription()}addToString(t){const e=this.toString();let n=new Array;n=t.getcurrentDescription().getConnectOptions();for(let t=0;t<n.length;t++)n[t].done||n[t].CNdata.push(e)}}class N extends l{constructor(){super(),this.activeChildren=new Array,this.sBuflength=0}async navigate(t){await this.navigate2(t,0)}async navigate2(t,e){if(e++,this.sBuflength=t.sBuf.length,t.sBuf.push("(ADDRESS_LIST="),this.sourceRoute){this.activeChildren=this.children,await this.activeChildren[0].navigate(t);for(let e=1;e<this.activeChildren.length;e++)this.activeChildren[e].addToString(t)}else{this.activeChildren=m.setActiveChildren(this.children,this.failover,this.loadBalance);for(let n=0;n<this.activeChildren.length;n++)1==this.getChildrenType(n)?await this.activeChildren[n].navigate2(t,e):await this.activeChildren[n].navigate(t)}this.closeNVPair(t),t.sBuf.length=this.sBuflength}addToString(t){const e=this.toString();let n=new Array;n=t.getcurrentDescription().getConnectOptions();for(let t=0;t<n.length;t++)n[t].done||n[t].CNdata.push(e)}getChildrenSize(){let t=0;for(let e=0;e<this.activeChildren.length;e++)if(1==this.getChildrenType(e)?t+=this.activeChildren[e].getChildrenSize():t++,this.sourceRoute)return t;return t}getChildrenType(t){return this.activeChildren[t].isS()}getChild(t){return this.children[t]}closeNVPair(t){let e=new Array;const n=this.getChildrenSize();if(null!=t.getcurrentDescription()){e=t.getcurrentDescription().getConnectOptions();let r=0,i=null,s=null;for(let t=e.length-1;t>=0&&!e[t].done&&(e[t].hostname==i&&e[t].port==s||r++,i=e[t].hostname,s=e[t].port,!(r>n));t--)this.sourceRoute&&(e[t].CNdata.push(f.SR),e[t].CNdata.push(f.HC),e[t].done=!0),e[t].CNdata.push(")")}}}class S extends h{constructor(){super(),this.activeChildren=new Array,this.descProcessed=0}async navigate(t){t.sBuf.length=0,t.sBuf.push("(DESCRIPTION=");const e=t.newConnectionDescription();if(null!=this.retryCount&&(t.retryCount=this.getIntValue(this.retryCount,t.retryCount),e.retryCount=t.retryCount),-1!=this.delayInMillis&&(e.delayInMillis=this.delayInMillis),e.params=this.params,"connectTimeout"in this.params&&t.sBuf.push("(CONNECT_TIMEOUT="+this.params.connectTimeout+")"),"transportConnectTimeout"in this.params&&t.sBuf.push("(TRANSPORT_CONNECT_TIMEOUT="+this.params.transportConnectTimeout+")"),"recvTimeout"in this.params&&t.sBuf.push("(RECV_TIMEOUT="+this.params.recvTimeout+")"),"sdu"in this.params&&t.sBuf.push("(SDU="+this.params.sdu+")"),"expireTime"in this.params&&t.sBuf.push("(EXPIRE_TIME="+this.params.expireTime+")"),"enable"in this.params&&t.sBuf.push("(ENABLE="+this.params.enable+")"),("sslServerCertDN"in this.params||"sslServerDNMatch"in this.params||"walletLocation"in this.params||"sslAllowWeakDNMatch"in this.params)&&(t.sBuf.push("(SECURITY="),"sslServerCertDN"in this.params&&t.sBuf.push("(SSL_SERVER_CERT_DN="+this.params.sslServerCertDN+")"),"sslServerDNMatch"in this.params&&t.sBuf.push("(SSL_SERVER_DN_MATCH="+this.params.sslServerDNMatch+")"),"sslAllowWeakDNMatch"in this.params&&t.sBuf.push("(SSL_ALLOW_WEAK_DN_MATCH="+this.params.sslAllowWeakDNMatch+")"),"walletLocation"in this.params&&t.sBuf.push("(WALLET_LOCATION="+this.params.walletLocation+")"),t.sBuf.push(")")),"httpsProxyPort"in this.params&&t.sBuf.push("(HTTPS_PROXY_PORT="+this.params.httpsProxyPort+")"),"httpsProxy"in this.params&&t.sBuf.push("(HTTPS_PROXY="+this.params.httpsProxy+")"),this.failover||t.sBuf.push(f.NFO),this.sourceRoute){this.activeChildren=this.children,await this.activeChildren[0].navigate(t);for(let e=1;e<this.activeChildren.length;e++)this.activeChildren[e].addToString(t);this.closeNVPair(t)}else{this.activeChildren=m.setActiveChildren(this.children,this.failover,this.loadBalance);for(let e=0;e<this.activeChildren.length;e++)await this.activeChildren[e].navigate(t);this.closeNVPair(t)}t.closeDescription()}closeNVPair(t){if(null==t.getcurrentDescription())return;let e=new Array;e=t.getcurrentDescription().getConnectOptions();for(let t=0;t<e.length;++t){this.sourceRoute&&e[t].CNdata.push(f.SR),null==this.connectData&&(this.connectData="(SERVICE_NAME=)");const n=`(CID=(PROGRAM=${"\"'"+_.program+"'\""})(HOST=${_.hostName})(USER=${_.userName}))`;e[t].CNdata.push(f.CD),e[t].CNdata.push(this.connectData),e[t].CNdata.push(n),e[t].CNdata.push(")"),null!=this.SID&&(e[t].sid=this.SID),null!=this.serviceName&&(e[t].service_name=this.serviceName),null!=this.instanceName&&(e[t].instance_name=this.instanceName),e[t].CNdata.push(")"),e[t].done=!0}}getIntValue(t,e){try{return parseInt(t)}catch(t){return e}}}class m extends T{constructor(t=new Array,e=0,n=0){super(),this.activeChildren=t,this.descProcessed=e,this.done=n}async navigate(t){for(t.sBuf.push("(DESCRIPTION_LIST="),this.activeChildren=m.setActiveChildren(this.children,this.failover,this.loadBalance);this.descProcessed<this.activeChildren.length;)await this.activeChildren[this.descProcessed].navigate(t),this.descProcessed++}static setActiveChildren(t,e,n){let r;const i=t.length;let s=new Array;const o=Math.floor(10*Math.random()),a=new Array(i).fill(!1);if(e)if(n)for(let e=0;e<i;e++){do{r=Math.abs(Math.floor(10*Math.random()))%i}while(a[r]);a[r]=!0,s.push(t[r])}else s=t;else n?(r=Math.abs(o)%i,s.push(t[r])):s.push(t[0]);return s}}t.exports={NavAddress:d,NavAddressList:N,NavDescription:S,NavDescriptionList:m}},7696:(t,e,n)=>{"use strict";const r=n(4374),i=n(129),s=n(228),o=n(8881),{createNode:a}=n(337),u=n(8041),{findNVPairRecurse:_,createNVPair:c,findValue:l}=n(6450),{Buffer:h}=n(2562),T=n(4549),{NLParamParser:p,tnsnamesFilePath:f}=n(7666),E=n(932),d=n(337).SOLE_INST_DHCACHE,N=new p;async function S(t,e){const n=t.trim();let r=n;if(-1==n.indexOf(")")||0!=n.indexOf("(")){if(-1!=n.indexOf(":")||-1!=n.indexOf("/"))return r=new T(n).getResolvedUrl(),r;{const t=f(e);if(r=(await N.initializeNlpa(t)).get(n.toUpperCase()),r||u.throwErr(u.ERR_TNS_ENTRY_NOT_FOUND,n,e?e+"/tnsnames.ora":E.env.TNS_ADMIN+"/tnsnames.ora"),1==r.rhsType){const t=r.atom;if(-1!=t.indexOf(":")||-1!=t.indexOf("/"))return new T(t).getResolvedUrl()}r=r.getListElement(0)}}return r}async function m(t,e){const n=await S(t,e);return a(n)}function A(t,e,n,r,i){let s;const o=new Promise(((t,o)=>{e>2147483647&&(e=2147483647),s=setTimeout((()=>o(u.getErr(u.ERR_CONNECTION_TIMEDOUT,r.host,r.port,n,e/1e3,i))),e)}));return Promise.race([t,o]).then((t=>(clearTimeout(s),t))).catch((t=>{throw clearTimeout(s),t}))}t.exports={NetworkSession:class{constructor(){this.connected=!1,this.isBreak=!1,this.isReset=!1,this.breakPosted=!1}async getAddress(t,e){const n=await t.execute(e),r=this.sAtts?this.sAtts.uuid:null;this.sAtts=new s(r),this.sAtts.setFrom(e),this.sAtts.setFrom(n.desc.params),await this.sAtts.prepare(n.protocol);const i=c(n.CNdata.join("")),o=_(i,"CONNECT_DATA"),a=`(CONNECTION_ID=${this.sAtts.connectionId})`,u=c(a);return o.addListElement(u),this.cData=h.from(i.toString(),"ascii"),this.cDataNVPair=i,this.sAtts.nt.cDataNVPair=i,n}async transportConnect(t){"TCP"==t.protocol.toUpperCase()&&t.httpsProxy&&u.throwErr(u.ERR_INVALID_CONNECT_STRING_PARAMETERS,"https proxy requires protocol as","tcps "),!t.protocol||"TCP"!=t.protocol.toUpperCase()&&"TCPS"!=t.protocol.toUpperCase()?u.throwErr(u.ERR_INVALID_CONNECT_STRING_PARAMETERS,t.protocol+" protocol not supported"):this.ntAdapter=new i(this.sAtts.nt),await this.ntAdapter.connect(t),this.ntAdapter.startRead(),this.sAtts.ntCha=this.ntAdapter.cha,this.sndDatapkt=new r.DataPacket(this.sAtts.largeSDU),this.rcvDatapkt=new r.DataPacket(this.sAtts.largeSDU)}_sendConnect(t){this._sendPacket(t.buf),t.overflow&&(this._send(t.connectData,0,t.connectDataLen),this.flush())}async connect2(t){if(this.sAtts.sdu?this.sAtts.sdu>o.NSPABSSDULN?this.sAtts.sdu=o.NSPABSSDULN:this.sAtts.sdu<o.NSPMNSDULN&&(this.sAtts.sdu=o.NSPMNSDULN):this.sAtts.sdu=o.NSPDFSDULN,this.sAtts.transportConnectTimeout){const e=this.transportConnect(t);await A(e,this.sAtts.transportConnectTimeout,"transportConnectTimeout",t,this.sAtts.connectionId)}else await this.transportConnect(t);let e=new r.ConnectPacket(this.cData,this.sAtts);for(this._sendConnect(e);;){const n=await this._recvPacket();if(n.type===o.NSPTAC)break;if(n.type===o.NSPTRF){this.refusePkt.overflow&&(await this._recvPacket(),this.refusePkt.dataBuf=this.rcvDatapkt.buf.subarray(this.rcvDatapkt.offset,this.rcvDatapkt.len).toString());const e=c(this.refusePkt.dataBuf);this.refusePkt=null;const n=l(e,["DESCRIPTION","ERR"]);"12514"==n?u.throwErr(u.ERR_INVALID_SERVICE_NAME,this.getOption(o.SVCNAME),t.host,t.port,this.sAtts.connectionId):"12505"==n?u.throwErr(u.ERR_INVALID_SID,this.getOption(o.SID),t.host,t.port,this.sAtts.connectionId):n?u.throwErr(u.ERR_CONNECTION_REFUSED,t.host,t.port,this.sAtts.connectionId,"ORA-"+n):u.throwErr(u.ERR_CONNECTION_REFUSED,t.host,t.port,this.sAtts.connectionId,"refused")}else if(n.type===o.NSPTRS)(n.flags&o.NSPFSRN)==o.NSPFSRN&&(await this.ntAdapter.renegTLS(),this.ntAdapter.startRead()),this._sendConnect(e);else if(n.type===o.NSPTRD){let n,i,s;this.redirectPkt.overflow&&(await this._recvPacket(),this.redirectPkt.dataBuf=this.rcvDatapkt.buf.subarray(this.rcvDatapkt.offset,this.rcvDatapkt.len)),this.redirectPkt.flags&o.NSPFRDS?(n=this.redirectPkt.dataBuf.indexOf("\0",0,"ascii"),i=this.redirectPkt.dataBuf.toString("ascii",0,n),s=this.redirectPkt.dataBuf.subarray(n+1,this.redirectPkt.dataLen)):(i=this.redirectPkt.dataBuf.toString("ascii"),s=this.cData);const a=await m(i),u=t.hostname;if((t=await a.execute()).desc&&this.sAtts.setFrom(t.desc.params),t.originHost=u,this.redirectPkt=null,this.ntAdapter.disconnect(o.NSFIMM),this.sAtts.transportConnectTimeout){const e=this.transportConnect(t);await A(e,this.sAtts.transportConnectTimeout,"transportConnectTimeout",t,this.sAtts.connectionId)}else await this.transportConnect(t);e=new r.ConnectPacket(s,this.sAtts,o.NSPFRDR),this.sndDatapkt=new r.DataPacket(this.sAtts.largeSDU),this._sendConnect(e)}}return this.connected=!0,this.cData=null,this.sndDatapkt=new r.DataPacket(this.sAtts.largeSDU),this.sndDatapkt.createPacket(o.NSPDADAT),this.sndDatapkt.offset=this.sndDatapkt.dataPtr,this.sndDatapkt.len=this.sndDatapkt.bufLen,this.markerPkt=new r.MarkerPacket(this.sAtts.largeSDU),this.controlPkt=new r.ControlPacket,this.ntAdapter.largeSDU=this.sAtts.largeSDU,this.sAtts.nt.wallet=null,this.sAtts.nt.walletPassword=null,!0}async connect1(t,e,n){let r,i;do{try{if(this.sAtts.connectTimeout){const e=this.connect2(t);r=await A(e,this.sAtts.connectTimeout,"connectTimeout",t,this.sAtts.connectionId)}else r=await this.connect2(t)}catch(s){s.message.startsWith("NJS-510")&&!this.ntAdapter.connected&&(d.markDownHost(t.host,Date.now()),this.ntAdapter.connected=!0),this.ntAdapter&&(this.ntAdapter.disconnect(o.NSFIMM),this.ntAdapter=null),r=!1,i=s;try{t=await this.getAddress(e,n)}catch(t){break}}}while(!r);if(!r)throw i}_processPacket(t){switch(t.type){case o.NSPTDA:this.rcvDatapkt.fromPacket(t);break;case o.NSPTMK:this.markerPkt.fromPacket(t,this);break;case o.NSPTCNL:this.controlPkt.fromPacket(t);break;case o.NSPTAC:r.AcceptPacket(t,this.sAtts),this.sAtts.version>=o.TNS_VERSION_MIN_END_OF_RESPONSE&&t.flags&o.TNS_ACCEPT_FLAG_HAS_END_OF_REQUEST&&(this.endOfRequestSupport=!0),t.flags&o.TNS_ACCEPT_FLAG_FAST_AUTH&&(this.supportsFastAuth=!0);break;case o.NSPTRF:this.refusePkt=new r.RefusePacket(t);break;case o.NSPTRS:break;case o.NSPTRD:this.redirectPkt=new r.RedirectPacket(t);break;default:u.throwErr(u.ERR_CONNECTION_INVALID_PACKET)}}async _recvPacket(){for(;;){const t=await this.ntAdapter.receive();if(!t)break;if(this._processPacket(t),t.type!==o.NSPTCNL)return t}}_sendPacket(t){this.ntAdapter.send(t)}sendBreak(){if(!this.isBreak){if(!this.connected)return this.isBreak=!0,void(this.breakPosted=!0);this.isBreak=!0,this.markerPkt.prepare(o.NSPMKTD1,o.NIQIMARK),this._sendPacket(this.markerPkt.buf)}}async reset(){for(this.breakPosted&&(this.markerPkt.prepare(o.NSPMKTD1,o.NIQBMARK),this._sendPacket(this.markerPkt.buf),this.breakPosted=!1),this.markerPkt.prepare(o.NSPMKTD1,o.NIQRMARK),this._sendPacket(this.markerPkt.buf);!this.isReset;)await this._recvPacket();this.sndDatapkt.dataPtr=this.sndDatapkt.dataLen=o.NSPDADAT,this.sndDatapkt.offset=this.sndDatapkt.dataPtr,this.sndDatapkt.len=this.sndDatapkt.bufLen,this.isBreak=this.isReset=!1}async recvPacket(){return await this._recvPacket()}syncRecvPacket(){for(;this.ntAdapter.packets.length>0;){const t=this.ntAdapter.syncReceive();if(!t)break;if(this._processPacket(t),t.type!==o.NSPTCNL)return t}}_send(t,e,n){if(this.isBreak)return;let r=0;for(this.sndDatapkt.dataLen=this.sndDatapkt.offset,(this.sndDatapkt.dataLen<this.sndDatapkt.bufLen||!this.sndDatapkt.bufLen)&&(r=this.sndDatapkt.fillBuf(t,e,n),n-=r,e+=r,this.sndDatapkt.offset=this.sndDatapkt.dataLen);n;){if(this._sendPacket(this.sndDatapkt.dataBuf),this.isBreak)return;this.sndDatapkt.dataLen=this.sndDatapkt.dataPtr,this.sndDatapkt.offset=this.sndDatapkt.dataPtr,r=this.sndDatapkt.fillBuf(t,e,n),n-=r,e+=r,this.sndDatapkt.offset=this.sndDatapkt.dataLen}}flush(){this.isBreak||(this.sndDatapkt.dataLen=this.sndDatapkt.offset,this.sndDatapkt.prepare2Send(),this._sendPacket(h.from(this.sndDatapkt.dataBuf)),this.sndDatapkt.dataLen=this.sndDatapkt.dataPtr,this.sndDatapkt.offset=this.sndDatapkt.dataPtr)}async connect(t){const e=t.connectString?t.connectString:t.connectionString;let n,r;t._connInfo?(n=t._connInfo[5],n.reset()):n=await m(e,t.configDir);try{r=await this.getAddress(n,t)}catch(t){"All options tried"==t.message?u.throwErr(u.ERR_INVALID_CONNECT_STRING_PARAMETERS,"Ensure the ADDRESS parameters have been entered correctly, the most likely incorrect parameter is the host name"):u.throwErr(u.ERR_INVALID_CONNECT_STRING_PARAMETERS,t.message)}await this.connect1(r,n,t)}forceDisconnect(t){this.connected&&(this.ntAdapter.stream.destroy(t),this.connected=!1)}disconnect(t){this.connected&&(t==o.NSFIMM||this.ntAdapter.err||(this.sndDatapkt.dataLen=this.sndDatapkt.offset,this.sndDatapkt.prepare2Send(o.NSPDAFEOF),this._sendPacket(this.sndDatapkt.dataBuf)),this.ntAdapter.disconnect(t),this.ntAdapter=null,this.connected=!1)}getOption(t){switch(t){case o.NS_MOREDATA:return this.ntAdapter.packets.length>0;case o.SVCNAME:return l(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"]);case o.SID:return l(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SID"]);case o.SERVERTYPE:return l(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVER"]);case o.REMOTEADDR:return this.ntAdapter?this.ntAdapter.getOption(t):null;case o.CONNCLASS:return l(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","POOL_CONNECTION_CLASS"]);case o.PURITY:return l(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","POOL_PURITY"]);case o.HEALTHCHECK:return this.connected&&this.ntAdapter.connected&&!this.ntAdapter.err;default:u.throwErr(u.ERR_INTERNAL,"getOption not supported for opcode "+t)}}recvInbandNotif(){let t=0;if(this.controlPkt.errno)return t=this.controlPkt.errno,t;if(this.getOption(o.HEALTHCHECK)){if(this.getOption(o.NS_MOREDATA)){const e=this.ntAdapter.syncReceive();return e.type==o.NSPTCNL?(this.controlPkt.fromPacket(e),t=this.controlPkt.errno,t):(this.ntAdapter.packets.unshift(e),0)}return 0}return u.ERR_CONNECTION_CLOSED}},resolveAddress:m,getConnectionInfo:async function(t){const e=await S(t.connectString,t.configDir),n=await a(e);let r;r="string"==typeof e?c(e):e;const i=l(r,["DESCRIPTION","CONNECT_DATA","SERVER"]),s=l(r,["DESCRIPTION","CONNECT_DATA","POOL_CONNECTION_CLASS"]),o=l(r,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"]),u=l(r,["DESCRIPTION","CONNECT_DATA","SID"]);return[i,s,o,l(r,["DESCRIPTION","CONNECT_DATA","POOL_PURITY"]),u,n]}}},129:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(9278),s=n(932),o=n(4756),a=n(8611),u=n(3557),_=n(8881),c=n(8041),{findValue:l}=n(6450);let h=1;t.exports=class{constructor(t){this.atts=t,this.cha=4878,this.connected=!1,this.err=!1,this.needsDrain=!1,this.numPacketsSinceLastWait=0,this.secure=!1,this.largeSDU=!1,this.streamNum=h++,this.packetNum=1,this.doDNMatch=!0}dnMatch(t,e){if(this.atts.sslServerDNMatch&&this.doDNMatch){const t=t=>t.split(",").map((t=>t.split("=").map((t=>t.trim())))).reduce(((t,e)=>(t[e[0]]=e[1],t)),{});if(this.atts.sslServerCertDN){const n=t(this.atts.sslServerCertDN);if(Object.keys(n).length!=Object.keys(e.subject).length)return c.getErr(c.ERR_TLS_DNMATCH_FAILURE);for(const t in n)if(n[t]!=e.subject[t])return c.getErr(c.ERR_TLS_DNMATCH_FAILURE)}else if(o.checkServerIdentity(this.hostName,e)&&(!this.originHost||o.checkServerIdentity(this.originHost,e))){if(!this.atts.sslAllowWeakDNMatch){const t=this.hostName+" "+(this.originHost?"or "+this.originHost:"");return c.getErr(c.ERR_TLS_HOSTMATCH_FAILURE,t)}if(l(this.atts.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"])!=e.subject.CN)return c.getErr(c.ERR_TLS_DNMATCH_FAILURE)}}}async tlsConnect(t,e){let n;this.stream.removeAllListeners();const r={host:this.host,socket:e,rejectUnauthorized:!0,secureContext:t,enableTrace:!1,checkServerIdentity:this.dnMatch.bind(this)};await new Promise((t=>{this.stream=o.connect(r,(()=>{this.stream.authorized||(n="server certificate unauthorized"),t()})).on("error",(e=>{n=e.message,t()}))})),n&&c.throwErr(c.ERR_TLS_AUTH_FAILURE,this.host,this.port,this.atts.connectionId,n),this.connStream=e}async ntConnect(t){let e,n,r;t.port||(t.port=1521);const s=t.httpsProxy||this.atts.httpsProxy;let o=t.httpsProxyPort||this.atts.httpsProxyPort;await new Promise((u=>{s?(o||(o=80),r=a.request({host:s,port:o,method:"CONNECT",path:t.host+":"+t.port}),r.once("connect",((t,e)=>{200==t.statusCode?(this.connected=!0,this.stream=e):n=t.statusCode,u()})),r.once("error",(t=>{n=t.message,u()})),r.end()):(this.stream=i.connect(t.port,t.host,(()=>{this.connected=!0,u()})),this.stream.once("error",(t=>{e=t.message,u()})))})),r&&r.removeAllListeners(),this.connected||(n?c.throwErr(c.ERR_PROXY_CONNECTION_FAILURE,s,o,this.atts.connectionId,n):c.throwErr(c.ERR_CONNECTION_INCOMPLETE,this.host,this.port,this.atts.connectionId,e))}async connect(t){this.originHost=t.originHost,this.host=t.host,this.hostName=t.hostname,this.port=t.port;try{if(await this.ntConnect(t),(this.atts.expireTime||this.atts.enableDCD)&&(this.atts.expireTime?this.stream.setKeepAlive(!0,this.atts.expireTime):this.stream.setKeepAlive(!0)),this.atts.tcpNoDelay&&this.stream.setNoDelay(!0),"TCPS"==t.protocol.toUpperCase()){let t;this.secure=!0,this.atts.sslAllowWeakDNMatch&&(this.doDNMatch=!1);try{t=o.createSecureContext({cert:this.atts.wallet,key:this.atts.wallet,passphrase:this.atts.walletPassword,ca:this.atts.wallet})}catch(t){c.throwErr(c.ERR_TLS_INIT_FAILURE)}await this.tlsConnect(t,this.stream)}}finally{this.stream&&this.setupEventHandlers()}}disconnect(t){this.connected&&!this.err&&(t==_.NSFIMM?this.stream.destroy():this.stream.end()),this.stream=null,this.connected=!1,this.drainWaiter=null,this.readWaiter=null}getPacketDump(t){const e=[];for(let n=0;n<t.length;n+=8){const r=n.toString().padStart(4,"0"),i=t.slice(n,n+8),s=[],o=[];for(const t of i)s.push(t.toString(16).toUpperCase().padStart(2,"0")),t>32&&t<127?o.push(String.fromCharCode(t)):o.push(".");for(;s.length<8;)s.push(" "),o.push(" ");const a=s.join(" "),u=o.join("");e.push(`${r} : ${a} |${u}|`)}return e.join("\n")}printPacket(t,e){const n=new Date,r=`${n.getFullYear()}-${n.getMonth().toString().padStart(2,"0")}-${n.getDay().toString().padStart(2,"0")} ${n.getHours().toString().padStart(2,"0")}:${n.getMinutes().toString().padStart(2,"0")}:${n.getSeconds().toString().padStart(2,"0")}.${n.getMilliseconds().toString().padStart(3,"0")}`,i=this.getPacketDump(e);console.log(`${r} ${t}:\n${i}\n`)}checkErr(){if(!this.connected||this.err){let t;t=this.savedErr?c.getErr(c.ERR_CONNECTION_LOSTCONTACT,this.host,this.port,this.atts.connectionId,this.savedErr.message):c.getErr(c.ERR_CONNECTION_EOF,this.host,this.port,this.atts.connectionId);const e=c.getErr(c.ERR_CONNECTION_CLOSED);throw e.message=e.message+"\n"+t.message,e}}send(t){this.checkErr(),s.env.NODE_ORACLEDB_DEBUG_PACKETS&&this.printPacket(`Sending packet ${this.packetNum} on stream ${this.streamNum}`,t),this.stream.write(t,(t=>{t&&(this.savedErr=t,this.err=!0,this._notifyWaiters())}))||(this.needsDrain=!0),this.numPacketsSinceLastWait++,this.packetNum++}shouldPauseWrite(){return this.needsDrain||this.numPacketsSinceLastWait>=100}async pauseWrite(){this.checkErr(),this.needsDrain?(await new Promise((t=>{this.drainWaiter=t})),this.checkErr()):await new Promise((t=>u.setImmediate(t))),this.numPacketsSinceLastWait=0}startRead(){let t;this.packets=[],this.stream.on("data",(e=>{for(t=t?r.concat([t,e]):e;t.length>=8;){let e;if(e=this.largeSDU?t.readUInt32BE():t.readUInt16BE(),e>t.length)break;const n={buf:t.subarray(0,e),type:t[4],flags:t[5],num:this.packetNum++};if(this.packets.push(n),this.readWaiter&&(this.readWaiter(),this.readWaiter=null),s.env.NODE_ORACLEDB_DEBUG_PACKETS&&this.printPacket(`Receiving packet ${n.num} on stream ${this.streamNum}`,n.buf),e===t.length){t=null;break}t=t.subarray(e)}}))}syncReceive(){return this.packets.shift()}async receive(){return 0===this.packets.length&&(this.checkErr(),await new Promise((t=>{this.readWaiter=t,this.numPacketsSinceLastWait=0})),this.checkErr()),this.packets.shift()}async renegTLS(){try{this.checkErr(),this.doDNMatch=!0;const t=o.createSecureContext({cert:this.atts.wallet,key:this.atts.wallet,passphrase:this.atts.walletPassword,ca:this.atts.wallet});await this.tlsConnect(t,this.connStream)}finally{this.setupEventHandlers()}}setupEventHandlers(){this.stream.removeAllListeners(),this.stream.on("error",(t=>{this.savedErr=t,this.err=!0,this._notifyWaiters()})),this.stream.on("end",(()=>{this.err=!0,this._notifyWaiters()})),this.stream.on("close",(()=>{this.connected=!1,this._notifyWaiters()})),this.stream.on("drain",(()=>{this.needsDrain=!1,this.drainWaiter&&(this.drainWaiter(),this.drainWaiter=null)}))}getOption(t){switch(this.checkErr(),t){case _.NT_MOREDATA:return this.packets.length>0;case _.REMOTEADDR:{const t=this.secure?this.connStream:this.stream;return t.remoteAddress+":"+t.remotePort}default:c.throwErr(c.ERR_INTERNAL,"getOption not supported for opcode "+t)}}_notifyWaiters(){this.drainWaiter&&(this.drainWaiter(),this.drainWaiter=null),this.readWaiter&&(this.readWaiter(),this.readWaiter=null)}}},6450:(t,e,n)=>{"use strict";const r=n(8041),i=4;class s{constructor(t){this.name=t,this.listType=3,this.rhsType=0}set setAtom(t){this._containsComment(t)&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),this.rhsType=1,this.list=null,this.atom=t}_containsComment(t){for(let e=0;e<t.length;e++)if("#"==t.charAt(e)){if(0!=e){if("\\"==t.charAt(e-1))continue;return!0}return!0}return!1}getListSize(){return null==this.list?0:this.list.length}getListElement(t){return null==this.list?null:this.list[t]}addListElement(t){null==this.list&&(this.rhsType=2,this.list=new Array,this.atom=null),this.list.push(t),t.parent=this}removeListElement(t){null!=this.list&&(this.list.splice(t,1),0==this.getListSize&&(this.list=null,this.rhsType=0))}_space(t){var e="";for(let n=0;n<t;n++)e+=" ";return e}valueToString(){let t="";if(1==this.rhsType)t+=this.atom;else if(2==this.rhsType)if(3==this.listType)for(let e=0;e<this.getListSize();e++)t+=this.getListElement(e).toString();else if(this.listType==i)for(let e=0;e<this.getListSize();e++)t+=this.getListElement(e).name,e!=this.getListSize()-1&&(t+=", ");return t}toString(){let t="("+this.name+"=";if(1==this.rhsType)t+=this.atom;else if(2==this.rhsType)if(3==this.listType)for(let e=0;e<this.getListSize();e++)t+=this.getListElement(e).toString();else if(this.listType==i){t+=" (";for(let e=0;e<this.getListSize();e++)t+=this.getListElement(e).name,e!=this.getListSize()-1&&(t+=", ");t+=")"}return t+=")",t}}const o=1,a=2,u=3,_=4,c=8;class l{constructor(){this.tkType=null,this.tkValue=null,this.numTokens=0,this.tkPos=0}_isWhiteSpace(t){return" "==t||"\t"==t||"\n"==t||"\r"==t}_trimWhiteSpace(t){const e=t.length;let n=0,r=e;for(;n<e&&this._isWhiteSpace(t.charAt(n));)n++;for(;n<r&&this._isWhiteSpace(t.charAt(r-1));)r--;return t.substring(n,r)}parseTokens(t){this.numTokens=0,this.tkPos=0,this.tkType=new Array,this.tkValue=new Array;const e=t.length;let n=!1,r=new Array;r=Array.from(t);let i=0;for(;i<e;){for(;i<e&&this._isWhiteSpace(r[i]);)i++;if(i<e)switch(r[i]){case"(":n=!1,this._addToken(o,"("),i++;break;case"=":n=!0,this._addToken(_,"="),i++;break;case")":n=!1,this._addToken(a,")"),i++;break;case",":n=!1,this._addToken(u,","),i++;break;default:{let s=i,o=-1,a=!1,u='"';for("'"!=r[i]&&'"'!=r[i]||(a=!0,u=r[i],i++,s=i);i<e;)if("\\"!=r[i]){if(a){if(r[i]==u){i++,o=i-1;break}}else if("("==r[i]||")"==r[i]||","==r[i]&&!n||"="==r[i]&&!n){o=i;break}i++}else i+=2;-1==o&&(o=i),this._addToken(c,t.substring(s,o).trim());break}}}return this._addToken(9,"%"),!0}getToken(){if(null==this.tkType&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),this.tkPos<this.numTokens)return Number(this.tkType[this.tkPos]);r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX)}popToken(){let t=0;return null==this.tkType&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),this.tkPos<this.numTokens?t=Number(this.tkType[this.tkPos++]):r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),t}getLiteral(){let t=null;return null==this.tkValue&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),this.tkPos<this.numTokens?t=String(this.tkValue[this.tkPos]):r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),t}popLiteral(){let t=null;return null==this.tkValue&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),this.tkPos<this.numTokens?t=String(this.tkValue[this.tkPos++]):r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),t}eatToken(){this.tkPos<this.numTokens&&this.tkPos++}toString(){if(null==this.tkType)return"*NO TOKENS*";let t="Tokens";for(let e=0;e<this.numTokens;e++)t=t+" : "+this.tkValue[e];return t}_addToken(t,e){this.tkType.push(Number(t)),this.tkValue.push(String(e)),this.numTokens++}}function h(t,e){let n=e.getToken();switch(n){case _:if(e.eatToken(),n=e.getToken(),n==c){const n=T(e);t.setAtom=n}else p(e,t);break;case u:case a:t.setAtom=t.name;break;default:r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX)}return n=e.getToken(),n==a?e.eatToken():n!=u&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),t}function T(t){return t.getToken()!=c&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),t.popLiteral()}function p(t,e){const n=t.getToken();if(n!=o&&n!=u)return;const a=function(t){const e=t.getToken();t.eatToken(),e!=o&&e!=u&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX);const n=T(t);return h(new s(n),t)}(t);e.addListElement(a),n!=u&&a.name!=a.atom||e.getListType!=i&&(e.setListType=i),p(t,e)}function f(t,e){if(!t)return null;if(1==t.getRHSType)return null;for(let n=0;n<t.getListSize();n++){const r=t.getListElement(n);if(e.toUpperCase()==r.name.toUpperCase())return r}return null}t.exports={findNVPairRecurse:function t(e,n){if(!e)return null;if(n.toUpperCase()==e.name.toUpperCase())return e;if(1==e.getRHSType)return null;for(let r=0;r<e.getListSize();r++){const i=t(e.getListElement(r),n);if(null!==i)return i}return null},createNVPair:function(t){const e=new l;return e.parseTokens(t),function(t){let e=t.getToken();t.eatToken(),e!=o&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX);let n=T(t);const i=new s(n);if((e=t.getToken())==u){for(;e==c||e==u;)n+=t.popLiteral(),e=t.getToken();return i.name=n,h(i,t)}return h(i,t)}(e)},findNVPair:f,findValue:function(t,e){if(!t)return null;if(e[0].toUpperCase()!=t.name.toUpperCase())return null;let n=t;const r=e.length;for(let t=1;t<r;t++)if(n=f(n,e[t]),!n)return null;return null==n.atom?null==n.list?null:n.list.toString():n.atom.toString()}}},4374:(t,e,n)=>{"use strict";const r=n(2562).Buffer,i=n(8881),s=n(8041);t.exports={ConnectPacket:function(t,e,n=0){let s;this.connectData=t,this.connectDataLen=t.length,this.overflow=!1,this.connectDataLen<=230?s=74+this.connectDataLen:(s=74,this.overflow=!0),this.buf=r.allocUnsafe(s).fill(0),this.buf.writeUInt16BE(s,i.NSPHDLEN),this.buf.writeUInt8(n,i.NSPHDFLGS),this.buf.writeUInt8(i.NSPTCN,i.NSPHDTYP),this.buf.writeUInt16BE(i.TNS_VERSION_DESIRED,i.NSPCNVSN),this.buf.writeUInt16BE(i.TNS_VERSION_MINIMUM,i.NSPCNLOV);const o=i.NSGDONTCARE;this.buf.writeUInt16BE(o,i.NSPCNOPT),e.sdu>i.NSPMXSDULN?this.buf.writeUInt16BE(i.NSPMXSDULN,i.NSPCNSDU):this.buf.writeUInt16BE(e.sdu,i.NSPCNSDU),e.tdu>i.NSPMXSDULN?this.buf.writeUInt16BE(i.NSPMXSDULN,i.NSPCNTDU):this.buf.writeUInt16BE(e.tdu,i.NSPCNTDU),this.buf.writeUInt16BE(e.ntCha,i.NSPCNNTC),this.buf.writeUInt16BE(1,i.NSPCNONE),this.buf.writeUInt16BE(this.connectDataLen,i.NSPCNLEN),this.buf.writeUInt16BE(i.NSPCNDAT,i.NSPCNOFF),this.buf.writeUInt8(i.NSISUPSECRENEG|i.NSINADISABLEDFORCONNECTION,i.NSPCNFL0),this.buf.writeUInt8(i.NSISUPSECRENEG|i.NSINADISABLEDFORCONNECTION,i.NSPCNFL1),this.buf.writeUInt16BE(0,i.NSPCNTMO),this.buf.writeUInt16BE(0,i.NSPCNTCK),this.buf.writeUInt16BE(0,i.NSPCNADL),this.buf.writeUInt16BE(0,i.NSPCNAOF),this.buf.writeUInt32BE(e.sdu,i.NSPCNLSD),this.buf.writeUInt32BE(e.tdu,i.NSPCNLTD),this.buf.writeUInt32BE(0,i.NSPCNCFL),this.buf.writeUInt32BE(0,i.NSPCNCFL2),!this.overflow&&this.connectDataLen&&this.buf.write(t.toString("ascii"),i.NSPCNDAT,this.connectDataLen,"ascii")},DataPacket:function(t){this.dataPtr=0,this.dataLen=0,this.offset=0,this.len=0,this.bufLen=0,this.createPacket=function(t){this.dataPtr=i.NSPDADAT,this.dataLen=i.NSPDADAT,this.buf=r.allocUnsafe(t).fill(0),this.buf.writeUInt8(0,i.NSPHDFLGS),this.buf.writeUInt8(i.NSPTDA,i.NSPHDTYP),this.bufLen=t},this.fillBuf=function(t,e,n,r=0){let s;return this.buf||this.createPacket(n+i.NSPDADAT),s=n>this.bufLen-this.dataLen?this.bufLen-this.dataLen:n,s&&t.copy(this.buf,this.dataLen,e,e+s),this.dataLen+=s,this.prepare2Send(r),s},this.prepare2Send=function(e=0){t?this.buf.writeUInt32BE(this.dataLen,i.NSPHDLEN):this.buf.writeUInt16BE(this.dataLen,i.NSPHDLEN),this.buf.writeUInt16BE(e,i.NSPDAFLG),this.dataBuf=this.buf.subarray(0,this.dataLen)},this.fromPacket=function(t){this.buf=t.buf,this.dataLen=t.buf.length,this.dataPtr=i.NSPDADAT,this.offset=this.dataPtr,this.len=this.dataLen,t.dataOffset=this.dataPtr}},AcceptPacket:function(t,e){this.buf=t.buf,this.len=t.buf.length,e.version=t.buf.readUInt16BE(i.NSPACVSN),e.options=t.buf.readUInt16BE(i.NSPACOPT),e.sdu=t.buf.readUInt16BE(i.NSPACSDU),e.tdu=t.buf.readUInt16BE(i.NSPACTDU),e.version>=315&&(e.sdu=t.buf.readUInt32BE(i.NSPACLSD),e.tdu=t.buf.readUInt32BE(i.NSPACLTD),e.largeSDU=!0),this.flag0=t.buf.readUInt8(i.NSPACFL0),this.flag1=t.buf.readUInt8(i.NSPACFL1),e.version>=i.TNS_VERSION_MIN_DATA_FLAGS&&(t.flags=t.buf.readUInt32BE(i.NSPACFL2))},RefusePacket:function(t){this.buf=t.buf,this.len=t.buf.length,this.userReason=t.buf.readUInt8(i.NSPRFURS),this.systemReason=t.buf.readUInt8(i.NSPRFURS),this.dataLen=t.buf.readUInt16BE(i.NSPRFLEN),this.dataOff=i.NSPRFDAT,this.len>this.dataOff?(this.dataBuf=this.buf.toString("ascii",this.dataOff,this.len),this.overflow=!1):this.overflow=!0},RedirectPacket:function(t){this.buf=t.buf,this.len=t.buf.length,this.flags=t.flags,this.dataLen=t.buf.readUInt16BE(i.NSPRDLEN),this.dataOff=i.NSPRDDAT,this.len>this.dataOff?(this.dataBuf=this.buf.subarray(this.dataOff,this.len),this.overflow=!1):this.overflow=!0},MarkerPacket:function(t){this.len=i.NSPMKDAT+1,this.buf=r.allocUnsafe(i.NSPMKDAT+1).fill(0),t?this.buf.writeUInt32BE(this.len,i.NSPHDLEN):this.buf.writeUInt16BE(this.len,i.NSPHDLEN),this.buf.writeUInt8(0,i.NSPHDFLGS),this.buf.writeUInt8(i.NSPTMK,i.NSPHDTYP),this.prepare=function(t,e){this.buf.writeUInt8(t,i.NSPMKTYP),this.buf.writeUInt8(e,i.NSPMKDAT)},this.fromPacket=function(t,e){switch(this.type=t.buf.readUInt8(i.NSPMKTYP),this.type){case i.NSPMKTD0:e.isBreak=!0;break;case i.NSPMKTD1:this.data=t.buf.readUInt8(i.NSPMKDAT),e.isBreak=!0,this.data==i.NIQRMARK&&(e.isReset=!0,e.isBreak=!0);break;default:s.throwErr(s.ERR_INVALID_PACKET)}}},ControlPacket:function(){this.clear=function(){this.errno=0,this.notif=null,this.notifLen=0,this.cmd=0},this.fromPacket=function(t){let e,n,o;this.cmd=t.buf.readUInt16BE(i.NSPCTLCMD),this.cmd===i.NSPCTL_SERR?(e=t.buf.readUInt32BE(i.NSPCTLDAT),n=t.buf.readUInt32BE(i.NSPCTLDAT+4),o=t.buf.readUInt32BE(i.NSPCTLDAT+8),12572==n?this.errno=n:12573==n?(this.errno=n,this.notifLen=o,this.notif=r.allocUnsafe(o+1).fill(0),this.buf.copy(this.notif,0,i.NSPCTLDAT+12,i.NSPCTLDAT+12+o)):(this.errno=n,22==e?s.throwErr(s.ERR_CONNECTION_INBAND,"ORA-"+n):s.throwErr(s.ERR_CONNECTION_INBAND,"TNS-"+n))):s.throwErr(s.ERR_INVALID_PACKET)}}}},7666:(t,e,n)=>{"use strict";const{createNVPair:r,findValue:i}=n(6450),s=n(9896),o=n(932),a=n(3785),u=n(8041);let _=0;t.exports={NLParamParser:class{async initializeNlpa(t){const e=s.statSync(t);if(!(e.mtime-_))return this.ht;const n=a.createInterface({input:s.createReadStream(t),output:o.stdout,terminal:!1});return this.ht=new Map,await(async()=>{let t="";for await(let e of n)if(0!=e.length&&"#"!=e[0])if(" "==e[0]||"\t"==e[0]||")"==e[0]||"("==e[0]){if(e=e.replace(/\s+/g,""),e=this.checkNLPforComments(e),0==e.length)continue;t+=e}else 0==t.length?(e=this.checkNLPforComments(e),t+=e):0!=t.length&&(this.addNLPListElement(t),t="",e=this.checkNLPforComments(e),t+=e);return 0!=t.length&&(this.addNLPListElement(t),t=""),_=e.mtime,this.ht})()}checkNLPforComments(t){const e=new Array(t.length);for(let n=0;n<t.length;n++){const r=t[n];if("#"==r){if(0!=n)break;return""}e.push(r)}return e.join("")}addNLPListElement(t){const e=t.split(/\r?\n/).filter((t=>t));for(let t=0;t<e.length;t++){"("!=e[t].charAt(0)&&(e[t]="("+e[t]+")");const n=r(e[t]),i=n.name.toUpperCase();n.name=i;const s=i.split(",");for(let t=0;t<s.length;t++)this.ht.set(s[t],n)}}toString(){let t="";return this.ht.forEach((e=>{t=t+e.toString()+"\n"})),t}findValueOf(t){const e=t.split("/");return i(this.ht.get(e[0].toUpperCase()),e)}},tnsnamesFilePath:function(t){let e=null;const n=o.env.TNS_ADMIN;return t?(e=t+"/tnsnames.ora",s.existsSync(e)?e:void u.throwErr(u.ERR_TNS_NAMES_FILE_MISSING,t)):(n?(e=n,e+="/tnsnames.ora",s.existsSync(e)||u.throwErr(u.ERR_TNS_NAMES_FILE_MISSING,n)):u.throwErr(u.ERR_NO_CONFIG_DIR),e)}}},228:(t,e,n)=>{"use strict";const r=n(6982),i=n(6928),s=n(8881),o=n(9896);t.exports=class{constructor(t){this.largeSDU=!1,this.tdu=s.NSPDFTDULN,this.nt={},this.nt.tcpNoDelay=!0,this.uuid=t,this.nt.sslServerDNMatch=!0,this.nt.sslAllowWeakDNMatch=!1}setFrom(t){t&&(t.sdu>0&&(this.sdu=parseInt(t.sdu)),"string"==typeof t.walletLocation&&(this.nt.walletFile=i.join(t.walletLocation,s.PEM_WALLET_FILE_NAME)),"string"==typeof t.walletPassword&&(this.nt.walletPassword=t.walletPassword),t.expireTime>0&&(this.nt.expireTime=1e3*t.expireTime*60),t.connectTimeout>0&&(this.connectTimeout=1e3*t.connectTimeout),t.transportConnectTimeout>0&&(this.transportConnectTimeout=1e3*t.transportConnectTimeout),t.recvTimeout>0&&(this.recvTimeout=1e3*t.recvTimeout),t.sendTimeout>0&&(this.sendTimeout=1e3*t.sendTimeout),"string"==typeof t.connectionIdPrefix&&(this.connectionIdPrefix=t.connectionIdPrefix),"boolean"==typeof t.tcpNoDelay&&(this.nt.tcpNoDelay=t.tcpNoDelay),"boolean"==typeof t.sslServerDNMatch&&(this.nt.sslServerDNMatch=t.sslServerDNMatch),"boolean"==typeof t.sslAllowWeakDNMatch&&(this.nt.sslAllowWeakDNMatch=t.sslAllowWeakDNMatch),"string"==typeof t.sslServerCertDN&&(this.nt.sslServerCertDN=t.sslServerCertDN),"string"==typeof t.enable&&"BROKEN"==t.enable.toUpperCase()&&(this.nt.enabledDCD=!0),"string"==typeof t.httpsProxy&&(this.nt.httpsProxy=t.httpsProxy),t.httpsProxyPort>=0&&(this.nt.httpsProxyPort=parseInt(t.httpsProxyPort)))}readWalletFile(){return new Promise(((t,e)=>{o.readFile(this.nt.walletFile,((n,r)=>{n?e(n):t(r)}))}))}async prepare(t){this.uuid||(this.uuid=await async function(){return await new Promise(((t,e)=>{r.randomBytes(16,((n,r)=>{n?e(n):t(r)}))}))}(),this.uuid=this.uuid.toString("base64")),this.connectionIdPrefix?this.connectionId=this.connectionIdPrefix+this.uuid:this.connectionId=this.uuid,this.nt.connectionId=this.connectionId,t&&"TCPS"==t.toUpperCase()&&this.nt.walletFile&&(this.nt.wallet=await this.readWalletFile()),this.connectTimeout||this.transportConnectTimeout||(this.transportConnectTimeout=6e4)}}},3483:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(2269),s=n(8041),o=n(3762);class a{constructor(t,e=!1){this.bindName=t,this.isReturnBind=e,this.maxSize=0,this.numElements=0,this.maxArraySize=0,this.type=null,this.isArray=!1,this.dir=i.BIND_IN,this.bindVar=null}}t.exports.BindInfo=a;class u{constructor(){this.returningKeywordFound=!1,this.pos=0,this.maxPos=0,this.sqlData=""}_parseBindName(t){let e,n,r=!1,i=!1,s=!1,o=0,a=this.pos+1;for(;a<=this.maxPos;){if(n=this.sqlData[a],i){if(s&&!/\p{N}/u.test(n)){this.pos=a-1;break}if(r&&'"'===n){this.pos=a;break}if(!(s||r||/[\p{L}\p{N}]/u.test(n)||["$","_","#"].includes(n))){this.pos=a-1;break}}else{if(/\p{space}/u.test(n)){a+=1;continue}if('"'===n)r=!0;else if(/\p{N}/u.test(n))s=!0;else if(!/\p{Alpha}/u.test(n))break;i=!0,o=a}a+=1}i&&(e=r?t.sql.substring(o+1,a):s?t.sql.substring(o,a):t.sql.substring(o,a).toUpperCase(),t._addBind(e))}_parseMultiLineComment(){let t,e=!1,n=!1,r=this.pos+1;for(;r<=this.maxPos;){if(t=this.sqlData[r],e){if("*"===t)n=!0;else if(n){if("/"===t){this.pos=r;break}n=!1}}else{if("*"!==t)break;e=!0}r+=1}}_parseQstring(){let t,e,n=!1,r=!1;for(this.pos+=1;this.pos<=this.maxPos;){if(e=this.sqlData[this.pos],r)if(n||e!==t){if(n){if("'"===e)break;e!==t&&(n=!1)}}else n=!0;else t="["===e?"]":"{"===e?"}":"("===e?")":"<"===e?">":e,r=!0;this.pos+=1}}_parseQuotedString(t){let e;for(this.pos+=1;this.pos<=this.maxPos&&(e=this.sqlData[this.pos],e!==t);)this.pos+=1}_parseSingleLineComment(){let t,e=!1,n=this.pos+1;for(;n<=this.maxPos;){if(t=this.sqlData[n],e){if("\n"===t)break}else{if("-"!==t)return;e=!0}n+=1}this.pos=n}parse(t){let e,n,r,i,s=!1,o=!1,a="",u="",_=0,c=!1;for(this.pos=0,this.maxPos=t.sql.length-1,this.sqlData=t.sql;this.pos<=this.maxPos;){if(e=this.sqlData[this.pos],r=/\p{L}/u.test(e),r&&!c)_=this.pos,u=e;else if(!r&&c)if(n=this.pos-_,s)!t.isDml||this.returningKeywordFound||9!==n&&6!==n||!["r","R"].includes(u)?this.returningKeywordFound&&4===n&&["i","I"].includes(u)&&(i=t.sql.substring(_,this.pos).toUpperCase(),"INTO"===i&&(t.isReturning=!0)):(i=t.sql.substring(_,this.pos).toUpperCase(),["RETURNING","RETURN"].includes(i)&&(this.returningKeywordFound=!0));else if(i=t.sql.substring(_,this.pos).toUpperCase(),t._determineStatementType(i),s=!0,t.isDdl)break;"'"===e?(o=!0,["q","Q"].includes(a)?this._parseQstring():this._parseQuotedString(e)):/\p{space}/u.test(e)||("-"===e?this._parseSingleLineComment():"/"===e?this._parseMultiLineComment():'"'===e?this._parseQuotedString(e):":"!==e||o||this._parseBindName(t),o=!1),this.pos+=1,c=r,a=e}s||t._determineStatementType(t.sql.toUpperCase())}}class _{constructor(){this.sql="",this.sqlBytes=[],this.sqlLength=0,this.cursorId=0,this.requiresDefine=!1,this.isQuery=!1,this.isPlSql=!1,this.isDml=!1,this.isDdl=!1,this.isReturning=!1,this.bindInfoList=[],this.queryVars=[],this.bindInfoDict=new Map,this.requiresFullExecute=!1,this.noPrefetch=!1,this.returnToCache=!1,this.numColumns=0,this.lastRowIndex,this.lastRowid,this.moreRowsToFetch=!0,this.inUse=!1,this.bufferRowIndex=0,this.bufferRowCount=0,this.pendingClear=!1,this.statementType=i.STMT_TYPE_UNKNOWN}_copy(){const t=new _;t.sql=this.sql,t.sqlBytes=this.sqlBytes,t.sqlLength=this.sqlLength,t.isQuery=this.isQuery,t.isPlSql=this.isPlSql,t.isDml=this.isDml,t.isDdl=this.isDdl,t.isReturning=this.isReturning,t.bindInfoList=[];for(const e of this.bindInfoList){const n=new a(e.bindName,e.isReturnBind);t.bindInfoList.push(n)}const e=t.bindInfoDict=new Map;for(const n of t.bindInfoList)e.has(n.bindName)?e.get(n.bindName).push(n):e.set(n.bindName,[n]);return t.returnToCache=!1,t}_determineStatementType(t){switch(t){case"DECLARE":this.isPlSql=!0,this.statementType=i.STMT_TYPE_DECLARE;break;case"CALL":this.isPlSql=!0,this.statementType=i.STMT_TYPE_CALL;break;case"BEGIN":this.isPlSql=!0,this.statementType=i.STMT_TYPE_BEGIN;break;case"SELECT":this.isQuery=!0,this.statementType=i.STMT_TYPE_SELECT;break;case"WITH":this.isQuery=!0;break;case"INSERT":this.isDml=!0,this.statementType=i.STMT_TYPE_INSERT;break;case"UPDATE":this.isDml=!0,this.statementType=i.STMT_TYPE_UPDATE;break;case"DELETE":this.isDml=!0,this.statementType=i.STMT_TYPE_DELETE;break;case"MERGE":this.isDml=!0,this.statementType=i.STMT_TYPE_MERGE;break;case"ALTER":this.isDdl=!0,this.statementType=i.STMT_TYPE_ALTER;break;case"CREATE":this.isDdl=!0,this.statementType=i.STMT_TYPE_CREATE;break;case"DROP":this.isDdl=!0,this.statementType=i.STMT_TYPE_DROP;break;case"ANALYZE":case"AUDIT":case"COMMENT":case"GRANT":case"REVOKE":case"TRUNCATE":this.isDdl=!0;break;case"COMMIT":this.statementType=i.STMT_TYPE_COMMIT;break;case"ROLLBACK":this.statementType=i.STMT_TYPE_ROLLBACK;break;default:this.statementType=i.STMT_TYPE_UNKNOWN}}_prepare(t){this.sql=t,this.sqlBytes=r.from(this.sql,"utf8"),this.sqlLength=this.sqlBytes.length,(new u).parse(this)}_addBind(t){if(!this.isPlSql||!this.bindInfoDict.has(t)){const e=new a(t,this.isReturning);this.bindInfoList.push(e),this.bindInfoDict.has(e.bindName)?(this.isReturning&&(this.bindInfoDict.get(e.bindName)[0].isReturnBind||s.throwErr(s.ERR_DML_RETURNING_DUP_BINDS,t)),this.bindInfoDict.get(e.bindName).push(e)):this.bindInfoDict.set(e.bindName,[e])}}_setVariable(t,e){e.type._oraTypeNum===o.TNS_DATA_TYPE_CURSOR&&(this.requiresFullExecute=!0),(e.maxSize!==t.maxSize||e.dir!==t.dir||e.isArray!==t.isArray||e.values.length>t.numElements||e.type!=t.type||e.maxArraySize!=t.maxArraySize)&&(t.isArray=e.isArray,t.numElements=e.values.length,t.maxSize=e.maxSize,t.type=e.type,t.dir=e.dir,t.maxArraySize=e.maxArraySize,this.requiresFullExecute=!0),t.bindVar=e}_clearAllState(){this.cursorId=0,this.requiresDefine=!1,this.noPrefetch=!1,this.requiresFullExecute=!1,this.queryVars=[],this.numQueryVars=0,this.bufferRowCount=0,this.bufferRowIndex=0}_clearState(){this.cursorId=0,this.requiresDefine=!1,this.noPrefetch=!1,this.requiresFullExecute=!1}}t.exports.Statement=_},8073:(t,e,n)=>{const r=n(8041),{Statement:i}=n(3483);t.exports=class{constructor(t){this._cachedStatements=new Map,this._maxSize=t,this._cursorsToClose=new Set,this._openCursors=new Set}_addCursorToClose(t){if(this._cursorsToClose.has(t.cursorId)){const e=`attempt to close cursor ${t.cursorId} twice`;r.throwErr(r.ERR_INTERNAL,e)}0!=t.cursorId&&this._cursorsToClose.add(t.cursorId),this._openCursors.delete(t)}_adjustCache(){for(;this._cachedStatements.size>this._maxSize;){const t=this._cachedStatements.keys().next().value,e=this._cachedStatements.get(t);this._cachedStatements.delete(t),e.inUse?e.returnToCache=!1:0!==e.cursorId&&this._addCursorToClose(e)}}clearCursors(){const t=new Set;for(const e of this._openCursors)(e.inUse||e.returnToCache)&&(e.pendingClear=!0,t.add(e)),e._clearState();this._openCursors=t,this._cursorsToClose.clear()}clearPendingStatus(){for(const t of this._openCursors)t.pendingClear&&!t.inUse&&(t._clearAllState(),t.pendingClear=!1)}getStatement(t,e=!1,n=!1){let r=null;return t&&(r=this._cachedStatements.get(t)),r?n||r.inUse?(e||(this._addCursorToClose(r),this._cachedStatements.delete(t)),r=r._copy(),this._openCursors.add(r)):e?(this._cachedStatements.delete(t),this._cachedStatements.set(t,r)):(this._cachedStatements.delete(t),r.returnToCache=!1):(r=new i,t&&r._prepare(t),e&&!r.isDdl&&this._maxSize>0&&(r.returnToCache=!0,this._cachedStatements.set(t,r),this._adjustCache()),this._openCursors.add(r)),this._openCursors.add(r),r.inUse=!0,r}clearCursor(t){this._addCursorToClose(t),t.cursorId=0}returnStatement(t){t.bindInfoList&&t.bindInfoList.forEach((t=>{t.bindVar=null})),t.queryVars&&t.queryVars.forEach((t=>{t.values.fill(null)})),t.returnToCache?t.inUse=!1:this._addCursorToClose(t),this.clearPendingStatus()}writeCursorsToClose(t){t.writeUB4(this._cursorsToClose.size);for(const e of this._cursorsToClose.keys())t.writeUB4(e);this._cursorsToClose.clear()}}},2456:(t,e,n)=>{"use strict";const r=n(2269),i=n(8041),s=n(857),o=new function(){this.program=process.argv0,this.terminal="unknown",this.pid=process.pid.toString();try{this.userName=s.userInfo().username}catch{this.userName="unknown"}this.hostName=s.hostname()};function a(t,e){const n=void 0===t[0].name,r=n?[]:{};for(let i=0;i<t.length;i++)n?r.push(t[i].values[e]):r[t[i].name]=t[i].values[e];return r}t.exports={getMetadataMany:function(t){const e=[];for(const n of t)e.push(n.fetchInfo);return e},CLIENT_INFO:o,getOutBinds:function(t,e,n){const i=t.bindInfoList.map((t=>t.bindVar)).filter((t=>t.dir!==r.BIND_IN));if(i.length>0){if(n){const t=new Array(e);for(let n=0;n<e;n++)t[n]=a(i,n);return t}return a(i,0)}},checkProxyUserValidity:function(t){let e="",n="",r=!1,i=!1,s=0;const o={status:-1,proxyUser:"",schemaUser:""},a=t.length;let u,_,c=0;for(;c<a;){if('"'===t.charAt(c)&&(r=!r,s=c),"["===t.charAt(c)&&!r){if(i=!0,0!=s){for(u=s+1;u<c;u++)if(" "!==t.charAt(u))return o;for(u=0;u<=s;u++)n+=t.charAt(u)}else for(u=0;u<c&&" "!==t.charAt(u);u++)n+=t.charAt(u);break}c++}if(0===n.length)return o;o.proxyUser=n,c+=1,r=!1;const l=c;for(s=0;c<a;){if('"'===t.charAt(c)&&(r=!r,s=c),"["===t.charAt(c)&&!r&&i)return o;if("]"===t.charAt(c)&&!r){if(s!=l&&0!=s){for(u=l;u<=s;u++)e+=t.charAt(u);for(u=s+1;u<c;u++)if(" "!=t.charAt(u))return o}else{for(u=l;u<c&&" "==t.charAt(u);u++);if(u==c)return o;for(_=u;_<c;_++)e+=t[_]}for(u=c+1;u<a;u++)if(" "!=t[u])return o}c++}return 0===e.length||(o.schemaUser=e,o.status=0),o},checkCredentials:function(t){void 0===t.token&&(!0===t.externalAuth&&i.throwErr(i.ERR_NOT_IMPLEMENTED,"External Authentication"),void 0===t.password&&i.throwErr(i.ERR_MISSING_CREDENTIALS))},normalizePrivateKey:function(t){return"-----BEGIN PRIVATE KEY-----\n"+t+"\n-----END PRIVATE KEY-----"}}},7207:(t,e,n)=>{"use strict";const r=n(7647),{Buffer:i}=n(2562),s=n(2733),o=n(9891),a=n(2269),u=n(8041),_=n(9023),c=n(6893),l=n(6770);function h(t,e){if(void 0===t.type&&arguments.length>2)t.type=arguments[2];else{let n=!1;for(let e=2;e<arguments.length;e++)if(t.type===arguments[e]){n=!0;break}n||(t.attrName?u.throwErr(u.ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR,t.attrName,t.fqn):t.fqn?u.throwErr(u.ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM,t.fqn):t.isArray&&t.name?u.throwErr(u.ERR_INCOMPATIBLE_TYPE_ARRAY_BIND,e.pos,t.name):t.isArray?u.throwErr(u.ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND,e.pos,t.pos):u.throwErr(u.ERR_BIND_VALUE_AND_TYPE_MISMATCH))}}function T(t){if(null==t||"number"==typeof t||"string"==typeof t||"boolean"==typeof t||i.isBuffer(t)||_.types.isDate(t)||l.isVectorValue(t))return t;if(Array.isArray(t)){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=T(t[n]);return e}if(t instanceof r)return{fields:[],values:[]};if(t instanceof c.JsonId)return t;const e={};e.fields=Object.getOwnPropertyNames(t),e.values=new Array(e.fields.length);for(let n=0;n<e.fields.length;n++)e.values[n]=T(t[e.fields[n]]);return e}t.exports={transformJsonValue:T,transformValueIn:function t(e,n,l){if(null!=n){if(e.type===c.DB_TYPE_OBJECT){let t=n;return n instanceof r||(t=new e.typeClass(n)),t._impl}if(e.type===c.DB_TYPE_JSON)return T(n);if("string"==typeof n){if(h(e,l,c.DB_TYPE_VARCHAR,c.DB_TYPE_NVARCHAR,c.DB_TYPE_CHAR,c.DB_TYPE_NCHAR,c.DB_TYPE_CLOB,c.DB_TYPE_NCLOB),e.type!==c.DB_TYPE_CLOB&&e.type!==c.DB_TYPE_NCLOB){const t=i.byteLength(n);(void 0===e.maxSize||t>e.maxSize)&&(e.checkSize&&u.throwErr(u.ERR_MAX_SIZE_TOO_SMALL,e.maxSize,t,l.pos),e.maxSize=t)}return n}if("number"==typeof n||"bigint"==typeof n)return h(e,l,c.DB_TYPE_NUMBER,c.DB_TYPE_BINARY_INTEGER,c.DB_TYPE_BINARY_FLOAT,c.DB_TYPE_BINARY_DOUBLE),Number.isNaN(n)&&e.type===c.DB_TYPE_NUMBER&&u.throwErr(u.ERR_NAN_VALUE),n;if("boolean"==typeof n)return h(e,l,c.DB_TYPE_BOOLEAN),n;if(_.types.isDate(n))return h(e,l,c.DB_TYPE_TIMESTAMP,c.DB_TYPE_TIMESTAMP_TZ,c.DB_TYPE_TIMESTAMP_LTZ,c.DB_TYPE_DATE),n;if(i.isBuffer(n))return h(e,l,c.DB_TYPE_RAW,c.DB_TYPE_BLOB),e.type===c.DB_TYPE_RAW&&(void 0===e.maxSize||n.length>e.maxSize)&&(e.checkSize&&u.throwErr(u.ERR_MAX_SIZE_TOO_SMALL,e.maxSize,n.length,l.pos),e.maxSize=n.length),n;if(n instanceof o)return h(e,l,c.DB_TYPE_CURSOR),n._impl;if(n instanceof s)return h(e,l,n.type),n._impl;if(n instanceof r)return h(e,l,c.DB_TYPE_OBJECT),n._impl;if(n instanceof Float32Array||n instanceof Float64Array||n instanceof Int8Array)return h(e,l,c.DB_TYPE_VECTOR),n;if(e.type===c.DB_TYPE_VECTOR&&Array.isArray(n))return new Float64Array(n);if(l.allowArray&&Array.isArray(n)){e.isArray=!0,e.dir===a.BIND_IN?e.maxArraySize=n.length||1:void 0===e.maxArraySize?u.throwErr(u.ERR_REQUIRED_MAX_ARRAY_SIZE):n.length>e.maxArraySize&&u.throwErr(u.ERR_INVALID_ARRAY_SIZE),l.allowArray=!1;const r=new Array(n.length);for(let i=0;i<n.length;i++)l.pos=i,r[i]=t(e,n[i],l);return r}void 0===e.type&&u.throwErr(u.ERR_INVALID_BIND_DATA_TYPE,2),h(e,l)}}}},6893:(t,e,n)=>{"use strict";const r=n(2269),i=n(8041),s=n(9023),o=new Map,a=new Map,u=new Map;class _{constructor(t,e,n,r){this.num=t,this.name=e,this.columnTypeName=n,this._bufferSizeFactor=r.bufferSizeFactor||0,this._oraTypeNum=r.oraTypeNum||0,this._csfrm=r.csfrm||0,o.set(t,this);const i=256*(r.csfrm||0)+r.oraTypeNum;a.set(i,this),u.set(n,this)}[Symbol.toPrimitive](t){return"number"===t?this.num:this.toString()}[s.inspect.custom](){return this.toString()}toString(){return`[DbType ${this.name}]`}}const c=new _(2020,"DB_TYPE_BFILE","BFILE",{oraTypeNum:114,bufferSizeFactor:112}),l=new _(2008,"DB_TYPE_BINARY_DOUBLE","BINARY_DOUBLE",{oraTypeNum:101,bufferSizeFactor:8}),h=new _(2007,"DB_TYPE_BINARY_FLOAT","BINARY_FLOAT",{oraTypeNum:100,bufferSizeFactor:4}),T=new _(2009,"DB_TYPE_BINARY_INTEGER","BINARY_INTEGER",{oraTypeNum:3,bufferSizeFactor:22}),p=new _(2019,"DB_TYPE_BLOB","BLOB",{oraTypeNum:113,bufferSizeFactor:112}),f=new _(2022,"DB_TYPE_BOOLEAN","BOOLEAN",{oraTypeNum:252,bufferSizeFactor:4}),E=new _(2003,"DB_TYPE_CHAR","CHAR",{oraTypeNum:96,csfrm:r.CSFRM_IMPLICIT,bufferSizeFactor:4}),d=new _(2017,"DB_TYPE_CLOB","CLOB",{oraTypeNum:112,csfrm:r.CSFRM_IMPLICIT,bufferSizeFactor:112}),N=new _(2021,"DB_TYPE_CURSOR","CURSOR",{oraTypeNum:102,bufferSizeFactor:4}),S=new _(2011,"DB_TYPE_DATE","DATE",{oraTypeNum:12,bufferSizeFactor:7}),m=new _(2015,"DB_TYPE_INTERVAL_DS","INTERVAL DAY TO SECOND",{oraTypeNum:183,bufferSizeFactor:11}),A=new _(2016,"DB_TYPE_INTERVAL_YM","INTERVAL YEAR TO MONTH",{oraTypeNum:182}),P=new _(2027,"DB_TYPE_JSON","JSON",{oraTypeNum:119}),g=new _(2024,"DB_TYPE_LONG","LONG",{oraTypeNum:8,csfrm:r.CSFRM_IMPLICIT,bufferSizeFactor:2**31-1}),y=new _(2031,"DB_TYPE_LONG_NVARCHAR","LONG",{oraTypeNum:8,csfrm:r.CSFRM_NCHAR,bufferSizeFactor:2**31-1}),R=new _(2025,"DB_TYPE_LONG_RAW","LONG RAW",{oraTypeNum:24,bufferSizeFactor:2**31-1}),I=new _(2004,"DB_TYPE_NCHAR","NCHAR",{oraTypeNum:96,csfrm:r.CSFRM_NCHAR,bufferSizeFactor:4}),D=new _(2018,"DB_TYPE_NCLOB","NCLOB",{oraTypeNum:112,csfrm:r.CSFRM_NCHAR,bufferSizeFactor:112}),O=new _(2010,"DB_TYPE_NUMBER","NUMBER",{oraTypeNum:2,bufferSizeFactor:22}),C=new _(2002,"DB_TYPE_NVARCHAR","NVARCHAR2",{oraTypeNum:1,csfrm:r.CSFRM_NCHAR,bufferSizeFactor:4}),b=new _(2023,"DB_TYPE_OBJECT","OBJECT",{oraTypeNum:109}),v=new _(2006,"DB_TYPE_RAW","RAW",{oraTypeNum:23,bufferSizeFactor:1}),w=new _(2005,"DB_TYPE_ROWID","ROWID",{oraTypeNum:11,bufferSizeFactor:18}),L=new _(2012,"DB_TYPE_TIMESTAMP","TIMESTAMP",{oraTypeNum:180,bufferSizeFactor:11}),B=new _(2014,"DB_TYPE_TIMESTAMP_LTZ","TIMESTAMP WITH LOCAL TIME ZONE",{oraTypeNum:231,bufferSizeFactor:11}),Y=new _(2013,"DB_TYPE_TIMESTAMP_TZ","TIMESTAMP WITH TIME ZONE",{oraTypeNum:181,bufferSizeFactor:13}),U=new _(2030,"DB_TYPE_UROWID","UROWID",{oraTypeNum:208}),M=new _(2001,"DB_TYPE_VARCHAR","VARCHAR2",{oraTypeNum:1,csfrm:r.CSFRM_IMPLICIT,bufferSizeFactor:4}),x=new _(2032,"DB_TYPE_XMLTYPE","XMLTYPE",{oraTypeNum:109,csfrm:r.CSFRM_IMPLICIT,bufferSizeFactor:2147483647}),V=new _(2033,"DB_TYPE_VECTOR","VECTOR",{oraTypeNum:127}),F=new Map([[l,new Map([[M,M]])],[h,new Map([[M,M]])],[p,new Map([[v,R],[R,R]])],[E,new Map([[M,M]])],[d,new Map([[M,g],[g,g]])],[S,new Map([[M,M],[B,B]])],[P,new Map([[M,M]])],[g,new Map([[M,g]])],[R,new Map([[v,R]])],[I,new Map([[E,I],[M,C],[C,C]])],[D,new Map([[M,y],[C,y],[g,y],[y,y]])],[O,new Map([[M,M]])],[C,new Map([[E,I],[I,I],[M,C]])],[v,new Map([[M,M]])],[w,new Map([[M,w]])],[L,new Map([[M,M],[B,B]])],[B,new Map([[M,M],[Y,Y]])],[Y,new Map([[M,M],[B,B]])],[U,new Map([[M,w]])],[V,new Map([[M,g],[g,g],[d,d]])]]),k=new Map([[c,c],[l,l],[h,h],[T,T],[p,p],[f,f],[E,E],[d,d],[N,N],[S,S],[m,m],[A,A],[P,P],[g,g],[y,y],[R,R],[I,I],[D,D],[O,O],[C,C],[b,b],[v,v],[w,w],[L,L],[B,Y],[Y,Y],[U,U],[M,M],[x,x],[V,V]]);u.set("DOUBLE PRECISION",O),u.set("FLOAT",O),u.set("INTEGER",O),u.set("PL/SQL BOOLEAN",f),u.set("PL/SQL BINARY INTEGER",T),u.set("PL/SQL PLS INTEGER",T),u.set("REAL",O),u.set("SMALLINT",O),u.set("TIMESTAMP WITH LOCAL TZ",B),u.set("TIMESTAMP WITH TZ",Y);class j extends Uint8Array{toJSON(){return Buffer.from(this.buffer).toString("hex")}}t.exports={DbType:_,DB_TYPE_BFILE:c,DB_TYPE_BINARY_DOUBLE:l,DB_TYPE_BINARY_FLOAT:h,DB_TYPE_BINARY_INTEGER:T,DB_TYPE_BLOB:p,DB_TYPE_BOOLEAN:f,DB_TYPE_CHAR:E,DB_TYPE_CLOB:d,DB_TYPE_CURSOR:N,DB_TYPE_DATE:S,DB_TYPE_INTERVAL_DS:m,DB_TYPE_INTERVAL_YM:A,DB_TYPE_JSON:P,DB_TYPE_LONG:g,DB_TYPE_LONG_NVARCHAR:y,DB_TYPE_LONG_RAW:R,DB_TYPE_NCHAR:I,DB_TYPE_NCLOB:D,DB_TYPE_NUMBER:O,DB_TYPE_NVARCHAR:C,DB_TYPE_OBJECT:b,DB_TYPE_RAW:v,DB_TYPE_ROWID:w,DB_TYPE_TIMESTAMP:L,DB_TYPE_TIMESTAMP_LTZ:B,DB_TYPE_TIMESTAMP_TZ:Y,DB_TYPE_UROWID:U,DB_TYPE_VARCHAR:M,DB_TYPE_VECTOR:V,DB_TYPE_CONVERSION_MAP:F,DB_TYPE_FETCH_TYPE_MAP:k,DB_TYPE_XMLTYPE:x,getTypeByColumnTypeName:function(t){const e=u.get(t);return e||i.throwErr(i.ERR_UNKNOWN_COLUMN_TYPE_NAME,t),e},getTypeByNum:function(t){const e=o.get(t);return e||i.throwErr(i.ERR_INVALID_TYPE_NUM,t),e},getTypeByOraTypeNum:function(t,e){const n=256*(e||0)+t,r=a.get(n);return r||i.throwErr(i.ERR_INVALID_ORACLE_TYPE_NUM,t,e),r},JsonId:j}},6770:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(8041),s=n(932),o=n(9023),a=n(6893),u=n(2269);let _;try{_=n(15)}catch(t){i.throwErr(i.ERR_MISSING_FILE,"package.json")}const c=_.version,l="oracledb-"+c+"-"+s.platform+"-"+s.arch+".node";function h(t){const e=function(){if("function"!=typeof arguments[arguments.length-1])return t.apply(this,arguments).catch((function t(e){throw i.transformErr(e,t)}));const e=Array.prototype.slice.call(arguments,0,arguments.length-1),n=arguments[arguments.length-1];t.apply(this,e).then((function(t){n(null,t)}),(function t(e){n(i.transformErr(e,t))}))};return t.name&&Object.defineProperty(e,"name",{value:t.name}),e}function T(t){return async function(){let e;this._impl&&(e=this._impl._getConnImpl(),await e._acquireLock());try{return await t.apply(this,arguments)}finally{e&&e._releaseLock()}}}function p(t,e){return async function(){this._isActive&&i.throwErr(e),this._isActive=!0;try{return await t.apply(this,arguments)}finally{this._isActive=!1}}}function f(t){return null!==t&&"object"==typeof t}function E(t){return null!=t&&t._sodaDocumentMarker}function d(t){i.assert("string"==typeof t,i.ERR_TOKEN_BASED_AUTH),void 0===t.split(".")[1]&&i.throwErr(i.ERR_TOKEN_BASED_AUTH);const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=r.from(e,"base64").toString("ascii");let s=JSON.parse(n).exp;return i.assert(null!=s,i.ERR_TOKEN_BASED_AUTH),s*=1e3,(new Date).getTime()>s}t.exports={BINARY_FILE:l,BUILD_FILE:"oracledb.node",PACKAGE_JSON_VERSION:c,RELEASE_DIR:"build/Release",STAGING_DIR:"package/Staging",addTypeProperties:function(t,e){const n=e+"Name",r=t[e+"Class"];let i=t[e];"number"==typeof i&&(i=t[e]=a.getTypeByNum(i)),r?t[n]=r.prototype.fqn:i&&(t[n]=i.columnTypeName)},callbackify:h,denormalizePrivateKey:function(t){return(t=(t=t.replace(/\n/g,"")).replace("-----BEGIN PRIVATE KEY-----","")).replace("-----END PRIVATE KEY-----","")},getInstallURL:function(){return"Node-oracledb installation instructions: https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html"},getInstallHelp:function(){let t,e,n="Node-oracledb installation instructions: https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html\n";return"linux"===s.platform?("x64"===s.arch?(e="https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html\n",t="64-bit"):"x32"===s.arch?(e="https://www.oracle.com/database/technologies/instant-client/linux-x86-32-downloads.html\n",t="32-bit"):(e="https://www.oracle.com/database/technologies/instant-client.html\n",t=s.arch),n+="You must have Linux "+t+" Oracle Client libraries configured with ldconfig, or in LD_LIBRARY_PATH.\n",n+="If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from \n",n+=e):"darwin"===s.platform?("x64"===s.arch?(e="https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html\n",t="64-bit"):(e="https://www.oracle.com/database/technologies/instant-client.html\n",t=s.arch),n+="You must have macOS "+t+" Oracle Instant Client Basic or Basic Light package libraries in\n",n+='/usr/local/lib or set by calling oracledb.initOracleClient({libDir: "/my/instant_client_directory"}).\n',n+="Oracle Instant Client can be downloaded from "+e):"win32"===s.platform?("x64"===s.arch?(e="https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html\n",t="64-bit"):"x32"===s.arch?(e="https://www.oracle.com/database/technologies/instant-client/microsoft-windows-32-downloads.html\n",t="32-bit"):(e="https://www.oracle.com/database/technologies/instant-client.html\n",t=s.arch),n+="You must have Windows "+t+" Oracle Client libraries in your PATH environment variable.\n",n+="If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from\n",n+=e,n+="A Microsoft Visual Studio Redistributable suitable for your Oracle client library version must be available.\n"):(e="https://www.oracle.com/database/technologies/instant-client.html\n",n+="You must have "+s.arch+" Oracle Client libraries in your operating system library search path.\n",n+="If you do not have Oracle Database on this computer, then install an Instant Client Basic or Basic Light package from: \n",n+=e),n},isArrayOfStrings:function(t){if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if("string"!=typeof t[e])return!1;return!0},isObject:f,isObjectOrArray:function(t){return null!==t&&"object"==typeof t||Array.isArray(t)},isPrivilege:function(t){return t&u.SYSPRELIM&&(t^=u.SYSPRELIM),t===u.SYSASM||t===u.SYSBACKUP||t===u.SYSDBA||t===u.SYSDG||t===u.SYSKM||t===u.SYSOPER||t===u.SYSRAC},isShardingKey:function(t){if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++){const n=t[e];if("string"!=typeof n&&"number"!=typeof n&&!r.isBuffer(n)&&!o.types.isDate(n))return!1}return!0},isSodaDocument:E,isTokenExpired:d,isTokenValid:function(t){switch(typeof t){case"string":return""===t&&i.throwErr(i.ERR_TOKEN_BASED_AUTH),!d(t);case"object":return void 0!==t.token&&""!==t.token&&void 0!==t.privateKey&&""!==t.privateKey||i.throwErr(i.ERR_TOKEN_BASED_AUTH),!d(t.token);default:i.throwErr(i.ERR_TOKEN_BASED_AUTH)}},isVectorValue:function(t){return t instanceof Float32Array||t instanceof Float64Array||t instanceof Int8Array},isXid:function(t){return f(t)&&Number.isInteger(t.formatId)&&(r.isBuffer(t.globalTransactionId)||"string"==typeof t.globalTransactionId)&&(r.isBuffer(t.branchQualifier)||"string"==typeof t.branchQualifier)},makeDate:function(t,e,n,r,i,s,o,a,u){return t?new Date(e,n-1,r,i,s,o,a):new Date(Date.UTC(e,n-1,r,i,s,o,a)-6e4*u)},preventConcurrent:p,serialize:T,verifySodaDoc:function(t){return E(t)?t._impl:(i.assertParamValue(f(t),1),r.from(JSON.stringify(t)))},wrapFns:function(t){let e,n=1;"number"==typeof arguments[1]&&(n=2,e=arguments[1]);for(let r=n;r<arguments.length;r++){const n=arguments[r],i=t[n];t[n]=h(e?p(T(i),e):T(i))}}}},8196:t=>{t.exports={VERSION_MAJOR:6,VERSION_MINOR:5,VERSION_PATCH:1,VERSION_SUFFIX:""}},7342:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=7342,t.exports=e},9140:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createLogger=e.logLevelNumbers=e.logLevelNames=void 0;class n{constructor(t){this.config={targets:(null==t?void 0:t.targets)||[{type:"console",level:"info"}],base:(null==t?void 0:t.base)||{},getConfig:null==t?void 0:t.getConfig}}trace(t,n){this.log(this.packRecord(e.logLevelNumbers.trace,t,n))}debug(t,n){this.log(this.packRecord(e.logLevelNumbers.debug,t,n))}info(t,n){this.log(this.packRecord(e.logLevelNumbers.info,t,n))}warn(t,n){this.log(this.packRecord(e.logLevelNumbers.warn,t,n))}error(t,n){this.log(this.packRecord(e.logLevelNumbers.error,t,n))}fatal(t,n){this.log(this.packRecord(e.logLevelNumbers.fatal,t,n))}packRecord(t,e,n){const r=this.config.getConfig?this.config.getConfig():this.config;return n?Object.assign(Object.assign(Object.assign({},r.base),e),{level:t,msg:n,time:(new Date).getTime()}):Object.assign(Object.assign({},r.base),{level:t,msg:e,time:(new Date).getTime()})}log(t){const n=this.config.getConfig?this.config.getConfig():this.config;for(const r of n.targets)if(!(t.level<e.logLevelNames[r.level]))switch(r.type){case"console":console.log(JSON.stringify(t));break;case"stream":r.stream.write(JSON.stringify(t)+"\n")}}child(t){return new n(Object.assign(Object.assign({},this.config),{base:Object.assign(Object.assign({},this.config.base),t)}))}}function r(t){return new n(t)}e.logLevelNames={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"},e.logLevelNumbers={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},e.createLogger=r,e.default=r},1778:(t,e,n)=>{"use strict";var r=n(5894),i=n(4356),s=n(7553)(),o=n(3906),a=n(4002),u=r("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||u(e)!==e)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,_=!0;if("length"in t&&o){var c=o(t,"length");c&&!c.configurable&&(r=!1),c&&!c.writable&&(_=!1)}return(r||_||!n)&&(s?i(t,"length",e,!0,!0):i(t,"length",e)),t}},6090:t=>{for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);t.exports=function(t,n){var r=n||0,i=e;return[i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]]].join("")}},1070:(t,e,n)=>{var r=n(6982);t.exports=function(){return r.randomBytes(16)}},482:(t,e,n)=>{var r,i,s=n(1070),o=n(6090),a=0,u=0;t.exports=function(t,e,n){var _=e&&n||0,c=e||[],l=(t=t||{}).node||r,h=void 0!==t.clockseq?t.clockseq:i;if(null==l||null==h){var T=s();null==l&&(l=r=[1|T[0],T[1],T[2],T[3],T[4],T[5]]),null==h&&(h=i=16383&(T[6]<<8|T[7]))}var p=void 0!==t.msecs?t.msecs:(new Date).getTime(),f=void 0!==t.nsecs?t.nsecs:u+1,E=p-a+(f-u)/1e4;if(E<0&&void 0===t.clockseq&&(h=h+1&16383),(E<0||p>a)&&void 0===t.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=p,u=f,i=h;var d=(1e4*(268435455&(p+=122192928e5))+f)%4294967296;c[_++]=d>>>24&255,c[_++]=d>>>16&255,c[_++]=d>>>8&255,c[_++]=255&d;var N=p/4294967296*1e4&268435455;c[_++]=N>>>8&255,c[_++]=255&N,c[_++]=N>>>24&15|16,c[_++]=N>>>16&255,c[_++]=h>>>8|128,c[_++]=255&h;for(var S=0;S<6;++S)c[_+S]=l[S];return e||o(c)}},6836:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpSqlCommand=e.dumpSqlInsert=e.dumpSqlDelete=e.dumpSqlUpdate=e.dumpSqlSelect=void 0;const r=n(1227),i=n(9784),s=n(3040);function o(t,e){t.put("^select "),e.distinct&&t.put("^distinct "),e.topRecords&&(t.dialect.rangeSelect&&!t.dialect.offsetFetchRangeSyntax||t.put("^top %s ",e.topRecords)),e.selectAll&&t.put("* "),e.columns&&(e.selectAll&&t.put("&n,"),t.put("&>&n"),t.putCollection(",&n",e.columns,(e=>{(0,r.dumpSqlExpression)(t,e),e.alias&&t.put(" ^as %i",e.alias)})),t.put("&n&<")),t.put("^from "),(0,i.dumpSqlFromDefinition)(t,e.from),e.where&&(t.put("&n^where "),(0,s.dumpSqlCondition)(t,e.where),t.put("&n")),e.groupBy&&(t.put("&n^group ^by "),t.putCollection(", ",e.groupBy,(e=>(0,r.dumpSqlExpression)(t,e))),t.put("&n")),e.having&&(t.put("&n^having "),(0,s.dumpSqlCondition)(t,e.having),t.put("&n")),e.orderBy&&(t.put("&n^order ^by "),t.putCollection(", ",e.orderBy,(e=>{(0,r.dumpSqlExpression)(t,e),t.put(" %k",e.direction)})),t.put("&n")),e.range&&(t.dialect.offsetFetchRangeSyntax?t.put("^offset %s ^rows ^fetch ^next %s ^rows ^only",e.range.offset,e.range.limit):t.put("^limit %s ^offset %s ",e.range.limit,e.range.offset)),e.topRecords&&t.dialect.rangeSelect&&!t.dialect.offsetFetchRangeSyntax&&t.put("^limit %s ",e.topRecords)}function a(t,e){t.put("^update "),(0,i.dumpSqlSourceRef)(t,e.from),t.put("&n^set "),t.put("&>"),t.putCollection(", ",e.fields,(e=>{t.put("%i=",e.targetColumn),(0,r.dumpSqlExpression)(t,e)})),t.put("&<"),e.where&&(t.put("&n^where "),(0,s.dumpSqlCondition)(t,e.where),t.put("&n"))}function u(t,e){t.put("^delete ^from "),(0,i.dumpSqlSourceRef)(t,e.from),e.where&&(t.put("&n^where "),(0,s.dumpSqlCondition)(t,e.where),t.put("&n"))}function _(t,e){t.put("^insert ^into %f (%,i) ^values (",e.targetTable,e.fields.map((t=>t.targetColumn))),t.putCollection(",",e.fields,(e=>(0,r.dumpSqlExpression)(t,e))),t.put(")")}e.dumpSqlSelect=o,e.dumpSqlUpdate=a,e.dumpSqlDelete=u,e.dumpSqlInsert=_,e.dumpSqlCommand=function(t,e){switch(e.commandType){case"select":o(t,e);break;case"update":a(t,e);break;case"delete":u(t,e);break;case"insert":_(t,e);break;case"allowIdentityInsert":t.allowIdentityInsert(e.targetTable,e.allow)}}},3040:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpSqlCondition=void 0;const r=n(1227),i=n(6836);e.dumpSqlCondition=function t(e,n){switch(n.conditionType){case"binary":(0,r.dumpSqlExpression)(e,n.left),e.put(" %s ",n.operator),(0,r.dumpSqlExpression)(e,n.right);break;case"isNull":(0,r.dumpSqlExpression)(e,n.expr),e.put(" ^is ^null");break;case"isNotNull":(0,r.dumpSqlExpression)(e,n.expr),e.put(" ^is ^not ^null");break;case"isEmpty":e.put("^trim("),(0,r.dumpSqlExpression)(e,n.expr),e.put(") = ''");break;case"isNotEmpty":e.put("^trim("),(0,r.dumpSqlExpression)(e,n.expr),e.put(") <> ''");break;case"and":case"or":e.putCollection(` ^${n.conditionType} `,n.conditions,(n=>{e.putRaw("("),t(e,n),e.putRaw(")")}));break;case"like":(0,r.dumpSqlExpression)(e,n.left),e.put(e.dialect.ilike?" ^ilike ":" ^like "),(0,r.dumpSqlExpression)(e,n.right);break;case"notLike":(0,r.dumpSqlExpression)(e,n.left),e.put(" ^not ^like "),(0,r.dumpSqlExpression)(e,n.right);break;case"not":e.put("^not ("),t(e,n.condition),e.put(")");break;case"exists":e.put("^exists ("),(0,i.dumpSqlSelect)(e,n.subQuery),e.put(")");break;case"notExists":e.put("^not ^exists ("),(0,i.dumpSqlSelect)(e,n.subQuery),e.put(")");break;case"between":(0,r.dumpSqlExpression)(e,n.expr),e.put(" ^between "),(0,r.dumpSqlExpression)(e,n.left),e.put(" ^and "),(0,r.dumpSqlExpression)(e,n.right);break;case"in":(0,r.dumpSqlExpression)(e,n.expr),e.put(" ^in (%,v)",n.values);break;case"rawTemplate":let s=!1;for(const t of n.templateSql.split("$$"))s&&(0,r.dumpSqlExpression)(e,n.expr),e.putRaw(t),s=!0}}},1227:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpSqlExpression=void 0;const r=n(9784);e.dumpSqlExpression=function t(e,n){switch(n.exprType){case"column":n.source&&(0,r.dumpSqlSourceRef)(e,n.source)&&e.put("."),e.put("%i",n.columnName);break;case"placeholder":e.putRaw("{PLACEHOLDER}");break;case"value":e.put("%v",n.value);break;case"raw":e.put("%s",n.sql);break;case"call":e.put("%s(",n.func),n.argsPrefix&&e.put("%s ",n.argsPrefix),e.putCollection(",",n.args,(n=>t(e,n))),e.put(")");break;case"methodCall":t(e,n.thisObject),e.put(".%s(",n.method),e.putCollection(",",n.args,(n=>t(e,n))),e.put(")");break;case"transform":e.transform(n.transform,(()=>t(e,n.expr)));break;case"rowNumber":e.put(" ^row_number() ^over (^order ^by "),e.putCollection(", ",n.orderBy,(n=>{t(e,n),e.put(" %k",n.direction)})),e.put(")")}}},9784:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpSqlFromDefinition=e.dumpSqlRelation=e.dumpSqlSourceRef=e.dumpSqlSourceDef=void 0;const r=n(6836),i=n(3040);function s(t,e){let n=0;if(null!=e.name&&n++,null!=e.subQuery&&n++,null!=e.subQueryString&&n++,1!=n)throw new Error("sqltree.Source should have exactly one source");null!=e.name&&t.put("%f",e.name),e.subQuery&&(t.put("("),(0,r.dumpSqlSelect)(t,e.subQuery),t.put(")")),e.subQueryString&&(t.put("("),t.putRaw(e.subQueryString),t.put(")")),e.alias&&t.put(" %i",e.alias)}function o(t,e){t.put("&n %k ",e.joinType),s(t,e),e.conditions&&e.conditions.length>0&&(t.put(" ^on "),t.putCollection(" ^and ",e.conditions,(e=>(0,i.dumpSqlCondition)(t,e))))}e.dumpSqlSourceDef=s,e.dumpSqlSourceRef=function(t,e){return e.alias?(t.put("%i",e.alias),!0):!!e.name&&(t.put("%f",e.name),!0)},e.dumpSqlRelation=o,e.dumpSqlFromDefinition=function(t,e){s(t,e),t.put(" "),e.relations&&e.relations.forEach((e=>o(t,e)))}},311:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.evaluateCondition=void 0;const i=r(n(3402)),s=r(n(4099)),o=n(610);function a(t){return null==t||""==t.toString().trim()}function u(t,e){if(!t)return!1;if(!e)return!1;const n=new RegExp(`^${(0,s.default)(e).replace(/%/g,".*")}$`,"i");return!!t.toString().match(n)}e.evaluateCondition=function t(e,n){switch(e.conditionType){case"binary":const r=(0,o.evaluateExpression)(e.left,n),s=(0,o.evaluateExpression)(e.right,n);switch(e.operator){case"=":return r==s;case"!=":case"<>":return r!=s;case"<=":return r<=s;case">=":return r>=s;case"<":return r<s;case">":return r>s}break;case"isNull":return null==(0,o.evaluateExpression)(e.expr,n);case"isNotNull":return null!=(0,o.evaluateExpression)(e.expr,n);case"isEmpty":return a((0,o.evaluateExpression)(e.expr,n));case"isNotEmpty":return!a((0,o.evaluateExpression)(e.expr,n));case"and":return e.conditions.every((e=>t(e,n)));case"or":return e.conditions.some((e=>t(e,n)));case"like":return u((0,o.evaluateExpression)(e.left,n),(0,o.evaluateExpression)(e.right,n));case"notLike":return!u((0,o.evaluateExpression)(e.left,n),(0,o.evaluateExpression)(e.right,n));case"not":return!t(e.condition,n);case"anyColumnPass":return Object.keys(n).some((r=>t((0,i.default)(e.placeholderCondition,(t=>{if("placeholder"==t.exprType)return{exprType:"column",columnName:r}})),n)))}}},610:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.evaluateExpression=void 0;const i=r(n(613));e.evaluateExpression=function(t,e){switch(t.exprType){case"column":return(0,i.default)(e,t.columnName);case"placeholder":return e.__placeholder;case"value":return t.value;case"raw":return t.sql;case"call":case"methodCall":case"transform":return null}}},1759:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(7574),e),i(n(6836),e),i(n(7427),e),i(n(9784),e),i(n(3040),e),i(n(311),e),i(n(610),e)},7574:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7427:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeConditions=e.scriptToSql=e.treeToSql=void 0;const r=n(6836);e.treeToSql=function(t,e,n){const r=t.createDumper();return n(r,e),r.s},e.scriptToSql=function(t,e){const n=t.createDumper();for(const t of e)(0,r.dumpSqlCommand)(n,t),n.endCommand();return n.s},e.mergeConditions=function(t,e){return t?e?"and"==t.conditionType&&"and"==e.conditionType?{conditionType:"and",conditions:[...t.conditions,...e.conditions]}:"and"==t.conditionType?{conditionType:"and",conditions:[...t.conditions,e]}:"and"==e.conditionType?{conditionType:"and",conditions:[t,...e.conditions]}:{conditionType:"and",conditions:[t,e]}:t:e}},8098:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DatabaseAnalyser=void 0;const s=i(n(220)),o=i(n(2535)),a=i(n(8644)),u=i(n(7120)),_=(0,n(8852).getLogger)("dbAnalyser"),c=["tables","collections","views","matviews","functions","procedures","triggers"],l=t=>e=>(0,a.default)(e,t);class h{constructor(t,e,n){this.pool=t,this.driver=e,this.singleObjectId=null,this.dialect=(null==e?void 0:e.dialectByVersion)&&(null==e?void 0:e.dialectByVersion(n))||(null==e?void 0:e.dialect),this.logger=_}_runAnalysis(){return r(this,void 0,void 0,(function*(){return h.createEmptyStructure()}))}_getFastSnapshot(){return r(this,void 0,void 0,(function*(){return null}))}_computeSingleObjectId(){return r(this,void 0,void 0,(function*(){}))}addEngineField(t){var e;if(null===(e=this.driver)||void 0===e?void 0:e.engine){for(const e of c)if(t[e])for(const n of t[e])n.engine=this.driver.engine;return t.engine=this.driver.engine,t}}fullAnalysis(){return r(this,void 0,void 0,(function*(){return this.addEngineField(yield this._runAnalysis())}))}singleObjectAnalysis(t,e){var n,i;return r(this,void 0,void 0,(function*(){this.singleObjectFilter=Object.assign(Object.assign({},t),{typeField:e}),yield this._computeSingleObjectId();const r=this.addEngineField(yield this._runAnalysis());return 1==(null===(n=r[e])||void 0===n?void 0:n.length)?r[e][0]:null===(i=r[e])||void 0===i?void 0:i.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName))}))}incrementalAnalysis(t){return r(this,void 0,void 0,(function*(){this.structure=t;const e=yield this.getModifications();if(null==e)return this.structure=null,this.addEngineField(yield this._runAnalysis());const n=e.filter((t=>"setTableRowCounts"!=t.action)),r=e.find((t=>"setTableRowCounts"==t.action));let i=null;if(r){const e=(s=t,o=r.rowCounts,Object.assign(Object.assign({},s),{tables:(s.tables||[]).map((t=>{var e,n;return Object.assign(Object.assign({},t),{tableRowCount:null!==(n=null===(e=o.find((e=>e.objectId==t.objectId)))||void 0===e?void 0:e.tableRowCount)&&void 0!==n?n:t.tableRowCount})}))}));(function(t,e){for(const n of t.tables||[]){const t=(e.tables||[]).find((t=>t.objectId==n.objectId));if((null==n?void 0:n.tableRowCount)!==(null==t?void 0:t.tableRowCount))return!0}return!1})(t,e)&&(i=e)}var s,o;return 0==n.length?i?this.addEngineField(i):null:(this.modifications=n,i&&(this.structure=i),_.info({modifications:this.modifications},"DB modifications detected:"),this.addEngineField(this.mergeAnalyseResult(yield this._runAnalysis())))}))}mergeAnalyseResult(t){if(null==this.structure)return Object.assign(Object.assign({},h.createEmptyStructure()),t);const e={};for(const n of c){const r=this.modifications.filter((t=>"remove"==t.action&&t.objectTypeField==n)).map((t=>t.objectId)),i=t[n]||[],o=[...r,...i.map((t=>t.objectId))];e[n]=(0,s.default)([...(this.structure[n]||[]).filter((t=>!o.includes(t.objectId))),...i],(t=>t.pureName));for(const t of e[n]){const e=(this.structure[n]||[]).find((e=>e.objectId==t.objectId));if(e)for(const n in e)t[n]||(t[n]=e[n])}}return e}getRequestedObjectPureNames(t,e){if(this.singleObjectFilter){const{typeField:e,pureName:n}=this.singleObjectFilter;if(e==t)return[n]}return this.modifications?this.modifications.filter((e=>e.objectTypeField==t)).filter((t=>t.newName)).map((t=>t.newName.pureName)):e}createQuery(t,e,n={}){return this.createQueryCore(this.processQueryReplacements(t,n),e)}processQueryReplacements(t,e){for(const n in e)t=t.replaceAll(n,e[n]);return t}createQueryCore(t,e){if(this.singleObjectFilter){const{typeField:n}=this.singleObjectFilter;return this.singleObjectId&&e&&e.includes(n)?t.replace(/=OBJECT_ID_CONDITION/g,` = '${this.singleObjectId}'`):null}if(!this.modifications||!e||0==this.modifications.length)return t.replace(/=OBJECT_ID_CONDITION/g," is not null");if(this.modifications.some((t=>e.includes(t.objectTypeField)&&"all"==t.action)))return t.replace(/=OBJECT_ID_CONDITION/g," is not null");const n=this.modifications.filter((t=>e.includes(t.objectTypeField)&&("add"==t.action||"change"==t.action))).map((t=>t.objectId));return 0==n.length?null:t.replace(/=OBJECT_ID_CONDITION/g,` in (${n.map((t=>`'${t}'`)).join(",")})`)}getDeletedObjectsForField(t,e){const n=t[e];return n&&this.structure[e]?this.structure[e].filter((t=>!n.find((e=>t.objectId==e.objectId)))).map((t=>({oldName:(0,a.default)(t,["schemaName","pureName"]),objectId:t.objectId,action:"remove",objectTypeField:e}))):[]}getDeletedObjects(t){return[...this.getDeletedObjectsForField(t,"tables"),...this.getDeletedObjectsForField(t,"collections"),...this.getDeletedObjectsForField(t,"views"),...this.getDeletedObjectsForField(t,"matviews"),...this.getDeletedObjectsForField(t,"procedures"),...this.getDeletedObjectsForField(t,"functions"),...this.getDeletedObjectsForField(t,"triggers")]}feedback(t){this.pool.feedback&&this.pool.feedback(t),t&&t.analysingMessage&&_.debug(t.analysingMessage)}getModifications(){return r(this,void 0,void 0,(function*(){const t=yield this._getFastSnapshot();if(!t)return null;const e=[];for(const n in t){const r=t[n];if(null!==r){if(void 0!==r)for(const t of r){const{objectId:r,schemaName:i,pureName:s,contentHash:o}=t,u=this.structure[n].find((t=>t.objectId==r));if(u&&o&&u.contentHash==o)continue;const _=u?{newName:{schemaName:i,pureName:s},oldName:(0,a.default)(u,["schemaName","pureName"]),action:"change",objectTypeField:n,objectId:r}:{newName:{schemaName:i,pureName:s},action:"add",objectTypeField:n,objectId:r};e.push(_)}}else e.push({objectTypeField:n,action:"all"})}const n=(t.tables||[]).filter((t=>null!=t.tableRowCount)).map((t=>({objectId:t.objectId,tableRowCount:t.tableRowCount})));return n.length>0&&e.push({action:"setTableRowCounts",rowCounts:n}),[...(0,u.default)(e),...this.getDeletedObjects(t)]}))}analyserQuery(t,e,n={}){return r(this,void 0,void 0,(function*(){const r=this.createQuery(t,e,n);if(!r)return{rows:[]};try{const e=yield this.driver.query(this.pool,r);return this.logger.debug({rows:e.rows.length,template:t},"Loaded analyser query"),e}catch(t){return _.error({err:t},"Error running analyser query"),{rows:[]}}}))}static createEmptyStructure(){return{tables:[],collections:[],views:[],matviews:[],functions:[],procedures:[],triggers:[],schemas:[]}}static byTableFilter(t){return e=>e.pureName==t.pureName&&e.schemaName==e.schemaName}static extractPrimaryKeys(t,e){const n=e.filter(h.byTableFilter(t));if(0!=n.length)return Object.assign(Object.assign({},(0,a.default)(n[0],["constraintName","schemaName","pureName"])),{constraintType:"primaryKey",columns:n.map(l("columnName"))})}static extractForeignKeys(t,e){const n=(0,o.default)(e.filter(h.byTableFilter(t)),"constraintName");return Object.keys(n).map((t=>Object.assign(Object.assign({constraintName:t,constraintType:"foreignKey"},(0,a.default)(n[t][0],["constraintName","schemaName","pureName","refSchemaName","refTableName","updateAction","deleteAction"])),{columns:n[t].map(l(["columnName","refColumnName"]))})))}}e.DatabaseAnalyser=h},8926:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.jsonScriptToJavascript=e.ScriptWriterJson=e.ScriptWriter=void 0;const i=r(n(5116)),s=n(1421);class o{constructor(t="0"){this.s="",this.packageNames=[],this.varCount=0,this.varCount=parseInt(t)||0}allocVariable(t="var"){return this.varCount+=1,`${t}${this.varCount}`}_put(t=""){this.s+=t,this.s+="\n"}endLine(){this._put()}assignCore(t,e,n){this._put(`const ${t} = await ${e}(${JSON.stringify(n)});`)}assign(t,e,n){this.assignCore(t,(0,s.extractShellApiFunctionName)(e),n),this.packageNames.push(...(0,s.extractShellApiPlugins)(e,n))}assignValue(t,e){this._put(`const ${t} = ${JSON.stringify(e)};`)}requirePackage(t){this.packageNames.push(t)}copyStream(t,e,n=null){n?this._put(`await dbgateApi.copyStream(${t}, ${e}, {columns: ${n}});`):this._put(`await dbgateApi.copyStream(${t}, ${e});`)}dumpDatabase(t){this._put(`await dbgateApi.dumpDatabase(${JSON.stringify(t)});`)}importDatabase(t){this._put(`await dbgateApi.importDatabase(${JSON.stringify(t)});`)}dataDuplicator(t){this._put(`await dbgateApi.dataDuplicator(${JSON.stringify(t)});`)}comment(t){this._put(`// ${t}`)}getScript(t=null){const e=this.packageNames;let n=(0,i.default)(e).map((t=>`// @require ${t}\n`)).join("");return t&&(n+=`// @schedule ${t}`),n&&(n+="\n"),n+this.s}}e.ScriptWriter=o,e.ScriptWriterJson=class{constructor(t="0"){this.s="",this.packageNames=[],this.varCount=0,this.commands=[],this.varCount=parseInt(t)||0}allocVariable(t="var"){return this.varCount+=1,`${t}${this.varCount}`}endLine(){this.commands.push({type:"endline"})}assign(t,e,n){this.commands.push({type:"assign",variableName:t,functionName:(0,s.extractShellApiFunctionName)(e),props:n}),this.packageNames.push(...(0,s.extractShellApiPlugins)(e,n))}assignValue(t,e){this.commands.push({type:"assignValue",variableName:t,jsonValue:e})}copyStream(t,e,n=null){this.commands.push({type:"copyStream",sourceVar:t,targetVar:e,colmapVar:n})}comment(t){this.commands.push({type:"comment",text:t})}dumpDatabase(t){this.commands.push({type:"dumpDatabase",options:t})}importDatabase(t){this.commands.push({type:"importDatabase",options:t})}dataDuplicator(t){this.commands.push({type:"dataDuplicator",options:t})}getScript(t=null){return{type:"json",schedule:t,commands:this.commands,packageNames:this.packageNames}}},e.jsonScriptToJavascript=function(t){const{schedule:e,commands:n,packageNames:r}=t,i=new o;for(const t of r){if(!/^dbgate-plugin-.*$/.test(t))throw new Error("Unallowed package name:"+t);i.packageNames.push(t)}for(const t of n)switch(t.type){case"assign":i.assignCore(t.variableName,t.functionName,t.props);break;case"assignValue":i.assignValue(t.variableName,t.jsonValue);break;case"copyStream":i.copyStream(t.sourceVar,t.targetVar,t.colmapVar);break;case"endLine":i.endLine();break;case"comment":i.comment(t.text);break;case"dumpDatabase":i.dumpDatabase(t.options);break;case"importDatabase":i.importDatabase(t.options);break;case"dataDuplicator":i.dataDuplicator(t.options)}return i.getScript(e)}},7117:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SqlDumper=void 0;const i=r(n(5076)),s=r(n(7072)),o=r(n(2164)),a=r(n(6241)),u=r(n(9464)),_=r(n(6446)),c=r(n(482));class l{static convertKeywordCase(t){var e,n;return"lowerCase"==this.keywordsCase?null===(e=null==t?void 0:t.toString())||void 0===e?void 0:e.toLowerCase():null===(n=null==t?void 0:t.toString())||void 0===n?void 0:n.toUpperCase()}constructor(t){this.s="",this.indentLevel=0,this.driver=t,this.dialect=t.dialect}endCommand(){this.putRaw(";\n")}putRaw(t){this.s+=t}escapeString(t){const e=this.dialect.stringEscapeChar;let n="";for(let r=0;r<t.length;r++){const i=t[r];i!=e&&"'"!=i||(n+=e),n+=i}return n}putStringValue(t){this.putRaw("'"),this.putRaw(this.escapeString(t)),this.putRaw("'")}putByteArrayValue(t){this.put("^null")}putValue(t){null===t?this.put("^null"):!0===t?this.putRaw("1"):!1===t?this.putRaw("0"):(0,s.default)(t)?this.putStringValue(t):(0,o.default)(t)?this.putRaw(t.toString()):(0,a.default)(t)?this.putStringValue(new Date(t).toISOString()):"Buffer"==(null==t?void 0:t.type)&&(0,u.default)(null==t?void 0:t.data)?this.putByteArrayValue(null==t?void 0:t.data):(0,_.default)(t)||(0,u.default)(t)?this.putStringValue(JSON.stringify(t)):this.put("^null")}putCmd(t,...e){this.put(t,...e),this.endCommand()}putFormattedValue(t,e){switch(t){case"s":null!=e&&this.putRaw(e.toString());break;case"i":this.putRaw(this.dialect.quoteIdentifier(e));break;case"k":e&&this.putRaw(l.convertKeywordCase(e));break;case"f":{const{schemaName:t,pureName:n}=e;t&&(this.putRaw(this.dialect.quoteIdentifier(t)),this.putRaw(".")),this.putRaw(this.dialect.quoteIdentifier(n))}break;case"v":this.putValue(e);break;case"c":e(this)}}putFormattedList(t,e){e&&this.putCollection(", ",e,(e=>this.putFormattedValue(t,e)))}put(t,...e){let n=0,r=0;const i=t.length;for(;n<i;){let s=t[n];switch(n++,s){case"^":for(;n<i&&t[n].match(/[a-z0-9_]/i);)this.putRaw(l.convertKeywordCase(t[n])),n++;break;case"%":switch(s=t[n],n++,s){case"%":this.putRaw("%");break;case",":s=t[n],n++,this.putFormattedList(s,e[r]);break;default:this.putFormattedValue(s,e[r])}r++;break;case"&":switch(s=t[n],n++,s){case"&":this.putRaw("&");break;case">":this.indentLevel++;break;case"<":this.indentLevel--;break;case"n":this.putRaw("\n"),this.putRaw(" ".repeat(2*this.indentLevel))}break;default:this.putRaw(s)}}}autoIncrement(){this.put(" ^auto_increment")}createDatabase(t){this.putCmd("^create ^database %i",t)}dropDatabase(t){this.putCmd("^drop ^database %i",t)}specialColumnOptions(t){}selectScopeIdentity(t){}columnType(t){const e=t||this.dialect.fallbackDataType,n=e.match(/([^(]+)(\(.+[^)]\))/);(null==n?void 0:n.length)?(n.shift(),this.putRaw(l.convertKeywordCase(n.shift())),this.putRaw(n)):this.putRaw(l.convertKeywordCase(e))}columnDefinition(t,{includeDefault:e=!0,includeNullable:n=!0,includeCollate:r=!0}={}){var i;if(t.computedExpression)return this.put("^as %s",t.computedExpression),void(t.isPersisted&&this.put(" ^persisted"));this.columnType(t.dataType),t.autoIncrement&&this.autoIncrement(),this.putRaw(" "),this.specialColumnOptions(t),n&&this.put(t.notNull?"^not ^null":"^null"),e&&(null===(i=t.defaultValue)||void 0===i?void 0:i.trim())&&this.columnDefault(t)}columnDefault(t){null!=t.defaultConstraint?this.put(" ^constraint %i ^default %s ",t.defaultConstraint,t.defaultValue):this.put(" ^default %s ",t.defaultValue)}putCollection(t,e,n){if(!e)return;let r=!0;for(const i of e)r||this.put(t),r=!1,n(i)}createTable(t){this.put("^create ^table %f ( &>&n",t),this.putCollection(",&n",t.columns,(t=>{this.put("%i ",t.columnName),this.columnDefinition(t)})),this.createTablePrimaryKeyCore(t),(t.foreignKeys||[]).forEach((t=>{this.put(",&n"),this.createForeignKeyFore(t)})),(t.uniques||[]).forEach((t=>{this.put(",&n"),this.createUniqueCore(t)})),(t.checks||[]).forEach((t=>{this.put(",&n"),this.createCheckCore(t)})),this.put("&<&n)"),this.endCommand(),(t.indexes||[]).forEach((t=>{this.createIndex(t)}))}createTablePrimaryKeyCore(t){t.primaryKey&&(this.put(",&n"),t.primaryKey.constraintName&&this.put("^constraint %i",t.primaryKey.constraintName),this.put(" ^primary ^key (%,i)",t.primaryKey.columns.map((t=>t.columnName))))}createForeignKeyFore(t){null!=t.constraintName&&this.put("^constraint %i ",t.constraintName),this.put("^foreign ^key (%,i) ^references %f (%,i)",t.columns.map((t=>t.columnName)),{schemaName:t.refSchemaName,pureName:t.refTableName},t.columns.map((t=>t.refColumnName))),t.deleteAction&&this.put(" ^on ^delete %k",t.deleteAction),t.updateAction&&this.put(" ^on ^update %k",t.updateAction)}transform(t,e){e()}allowIdentityInsert(t,e){}enableConstraints(t,e){}comment(t){if(t)for(const e of t.split("\n"))this.put(" -- %s",e.trimRight())}createView(t){this.putRaw(t.createSql),this.endCommand()}dropView(t,{testIfExists:e=!1}){this.putCmd("^drop ^view %f",t)}alterView(t){this.putRaw(t.createSql.replace(/create\s+view/i,"ALTER VIEW")),this.endCommand()}changeViewSchema(t,e){}renameView(t,e){}createMatview(t){this.putRaw(t.createSql),this.endCommand()}dropMatview(t,{testIfExists:e=!1}){this.putCmd("^drop ^materialized ^view %f",t)}alterMatview(t){this.putRaw(t.createSql.replace(/create\s+view/i,"ALTER VIEW")),this.endCommand()}changeMatviewSchema(t,e){}renameMatview(t,e){}createProcedure(t){this.putRaw(t.createSql),this.endCommand()}dropProcedure(t,{testIfExists:e=!1}){this.putCmd("^drop ^procedure %f",t)}alterProcedure(t){this.putRaw(t.createSql.replace(/create\s+procedure/i,"ALTER PROCEDURE")),this.endCommand()}changeProcedureSchema(t,e){}renameProcedure(t,e){}createFunction(t){this.putRaw(t.createSql),this.endCommand()}dropFunction(t,{testIfExists:e=!1}){this.putCmd("^drop ^function %f",t)}alterFunction(t){this.putRaw(t.createSql.replace(/create\s+function/i,"ALTER FUNCTION")),this.endCommand()}changeFunctionSchema(t,e){}renameFunction(t,e){}createTrigger(t){this.putRaw(t.createSql),this.endCommand()}dropTrigger(t,{testIfExists:e=!1}){this.putCmd("^drop ^trigger %f",t)}alterTrigger(t){this.putRaw(t.createSql.replace(/create\s+trigger/i,"ALTER TRIGGER")),this.endCommand()}changeTriggerSchema(t,e){}renameTrigger(t,e){}dropConstraintCore(t){this.putCmd("^alter ^table %f ^drop ^constraint %i",t,t.constraintName)}dropConstraint(t){switch(t.constraintType){case"primaryKey":this.dropPrimaryKey(t);break;case"foreignKey":this.dropForeignKey(t);break;case"unique":this.dropUnique(t);break;case"check":this.dropCheck(t);break;case"index":this.dropIndex(t)}}createConstraint(t){switch(t.constraintType){case"primaryKey":this.createPrimaryKey(t);break;case"foreignKey":this.createForeignKey(t);break;case"unique":this.createUnique(t);break;case"check":this.createCheck(t);break;case"index":this.createIndex(t)}}changeConstraint(t,e){}dropForeignKey(t){this.dialect.explicitDropConstraint?this.putCmd("^alter ^table %f ^drop ^foreign ^key %i",t,t.constraintName):this.dropConstraintCore(t)}createForeignKey(t){this.put("^alter ^table %f ^add ",t),this.createForeignKeyFore(t),this.endCommand()}dropPrimaryKey(t){this.dialect.explicitDropConstraint?this.putCmd("^alter ^table %f ^drop ^primary ^key",t):this.dropConstraintCore(t)}createPrimaryKey(t){this.putCmd("^alter ^table %f ^add ^constraint %i ^primary ^key (%,i)",t,t.constraintName,t.columns.map((t=>t.columnName)))}dropIndex(t){this.put("^drop ^index %i",t.constraintName),this.dialect.dropIndexContainsTableSpec&&this.put(" ^on %f",t),this.endCommand()}createIndex(t){this.put("^create"),t.isUnique&&this.put(" ^unique"),this.put(" ^index %i &n^on %f (&>&n",t.constraintName,t),this.putCollection(",&n",t.columns,(t=>{this.put("%i %k",t.columnName,1==t.isDescending?"DESC":"ASC")})),this.put("&<&n)"),this.endCommand()}dropUnique(t){this.dropConstraintCore(t)}createUniqueCore(t){this.put("^constraint %i ^unique (%,i)",t.constraintName,t.columns.map((t=>t.columnName)))}createUnique(t){this.put("^alter ^table %f ^add ",t),this.createUniqueCore(t),this.endCommand()}dropCheck(t){this.dropConstraintCore(t)}createCheckCore(t){this.put("^constraint %i ^check (%s)",t.constraintName,t.definition)}createCheck(t){this.put("^alter ^table %f ^add ",t),this.createCheckCore(t),this.endCommand()}renameConstraint(t,e){}createColumn(t,e){this.put("^alter ^table %f ^add %i ",t,t.columnName),this.columnDefinition(t),this.inlineConstraints(e),this.endCommand()}inlineConstraints(t){if(null!=t)for(const e of t)"primaryKey"==e.constraintType&&(null==e.constraintName||this.dialect.anonymousPrimaryKey||this.put(" ^constraint %i",e.constraintName),this.put(" ^primary ^key "))}dropColumn(t){this.putCmd("^alter ^table %f ^drop ^column %i",t,t.columnName)}renameColumn(t,e){}changeColumn(t,e,n){}dropTable(t,{testIfExists:e=!1}={}){this.putCmd("^drop ^table %f",t)}changeTableSchema(t,e){}renameTable(t,e){}beginTransaction(){this.putCmd("^begin ^transaction")}commitTransaction(){this.putCmd("^commit")}rollbackTransaction(){this.putCmd("^rollback")}alterProlog(){}alterEpilog(){}selectTableIntoNewTable(t,e){this.putCmd("^select * ^into %f ^from %f",e,t)}truncateTable(t){this.putCmd("^truncate ^table %f",t)}dropConstraints(t,e=!1){e&&this.dialect.dropForeignKey&&t.dependencies.forEach((t=>this.dropConstraint(t))),this.dialect.dropIndex&&t.indexes.forEach((t=>this.dropIndex(t))),this.dialect.dropForeignKey&&t.foreignKeys.forEach((t=>this.dropForeignKey(t))),this.dialect.dropPrimaryKey&&t.primaryKey&&this.dropPrimaryKey(t.primaryKey)}recreateTable(t,e){if(!t.pairingId||!e.pairingId||t.pairingId!=e.pairingId)throw new Error("Recreate is not possible: oldTable.paringId != newTable.paringId");const n=`temp_${(0,c.default)()}`,r=t.columns.map((t=>({oldcol:t,newcol:e.columns.find((e=>e.pairingId==t.pairingId))}))).filter((t=>t.newcol));this.dropConstraints(t,!0),this.renameTable(t,n),this.createTable(e);const i=e.columns.find((t=>t.autoIncrement));i&&this.allowIdentityInsert(e,!0),this.putCmd("^insert ^into %f (%,i) select %,s ^from %f",e,r.map((t=>t.newcol.columnName)),r.map((t=>t.oldcol.columnName)),Object.assign(Object.assign({},t),{pureName:n})),i&&this.allowIdentityInsert(e,!1),this.dialect.dropForeignKey&&e.dependencies.forEach((t=>this.createConstraint(t))),this.dropTable(Object.assign(Object.assign({},t),{pureName:n}))}createSqlObject(t){this.putCmd(t.createSql)}getSqlObjectSqlName(t){switch(t){case"procedures":return"PROCEDURE";case"views":return"VIEW";case"functions":return"FUNCTION";case"triggers":return"TRIGGER";case"matviews":return"MATERIALIZED VIEW"}}dropSqlObject(t){this.putCmd("^drop %s %f",this.getSqlObjectSqlName(t.objectTypeField),t)}fillPreloadedRows(t,e,n,r,s){let o=!1;for(const a of n){const n=null==e?void 0:e.find((t=>r.every((e=>t[e]==a[e])))),u=i.default.keys(a);if(n){const e=[];for(const t of u)a[t]==n[t]||(null==s?void 0:s.includes(t))||e.push(t);e.length>0&&(o&&this.put(";\n"),o=!0,this.put("^update %f ^set ",t),this.putCollection(", ",e,(t=>this.put("%i=%v",t,a[t]))),this.put(" ^where "),this.putCollection(" ^and ",r,(t=>this.put("%i=%v",t,a[t]))))}else o&&this.put(";\n"),o=!0,this.put("^insert ^into %f (%,i) ^values (%,v)",t,u,u.map((t=>a[t])))}o&&this.endCommand()}}e.SqlDumper=l,l.keywordsCase="upperCase"},9587:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SqlGenerator=void 0;const s=i(n(9607)),o=i(n(4557)),a=n(8852),u=n(7058),_=(0,a.getLogger)("sqlGenerator");e.SqlGenerator=class{constructor(t,e,n,r,i,s){this.options=e,this.objects=n,this.dmp=r,this.driver=i,this.pool=s,this.isTruncated=!1,this.isUnhandledException=!1,this.handleException=t=>{_.error({error:t},"Unhandled error"),this.isUnhandledException=!0},this.dbinfo=(0,u.extendDatabaseInfo)(t),this.tables=this.extract("tables"),this.views=this.extract("views"),this.matviews=this.extract("matviews"),this.procedures=this.extract("procedures"),this.functions=this.extract("functions"),this.triggers=this.extract("triggers")}dump(){return r(this,void 0,void 0,(function*(){try{if(process.on("uncaughtException",this.handleException),this.dropObjects(this.procedures,"Procedure"),this.checkDumper())return;if(this.dropObjects(this.functions,"Function"),this.checkDumper())return;if(this.dropObjects(this.views,"View"),this.checkDumper())return;if(this.dropObjects(this.matviews,"Matview"),this.checkDumper())return;if(this.dropObjects(this.triggers,"Trigger"),this.checkDumper())return;if(this.dropTables(),this.checkDumper())return;if(this.createTables(),this.checkDumper())return;if(this.truncateTables(),this.checkDumper())return;if(yield this.insertData(),this.checkDumper())return;if(this.createForeignKeys(),this.checkDumper())return;if(this.createObjects(this.procedures,"Procedure"),this.checkDumper())return;if(this.createObjects(this.functions,"Function"),this.checkDumper())return;if(this.createObjects(this.views,"View"),this.checkDumper())return;if(this.createObjects(this.matviews,"Matview"),this.checkDumper())return;if(this.createObjects(this.triggers,"Trigger"),this.checkDumper())return}finally{process.off("uncaughtException",this.handleException)}}))}createForeignKeys(){const t=[];this.options.createForeignKeys&&t.push(...(0,s.default)(this.tables.map((t=>t.foreignKeys||[])))),this.options.createReferences&&t.push(...(0,s.default)(this.tables.map((t=>t.dependencies||[]))));for(const e of(0,o.default)(t,"constraintName"))if(this.dmp.createForeignKey(e),this.checkDumper())return}truncateTables(){if(this.options.truncate)for(const t of this.tables)if(this.dmp.truncateTable(t),this.checkDumper())return}createTables(){if(this.options.createTables)for(const t of this.tables)if(this.dmp.createTable(Object.assign(Object.assign({},t),{foreignKeys:[],dependencies:[],indexes:[]})),this.checkDumper())return;if(this.options.createIndexes)for(const t of(0,s.default)(this.tables.map((t=>t.indexes||[]))))this.dmp.createIndex(t)}insertData(){return r(this,void 0,void 0,(function*(){if(this.options.insert){this.enableConstraints(!1);for(const t of this.tables)if(yield this.insertTableData(t),this.checkDumper())return;this.enableConstraints(!0)}}))}checkDumper(){return this.dmp.s.length>4e6&&(this.isTruncated||(this.dmp.putRaw("\n"),this.dmp.comment(" *************** SQL is truncated ******************"),this.dmp.putRaw("\n")),this.isTruncated=!0,!0)}dropObjects(t,e){if(this.options[`drop${e}s`])for(const n of t)if(this.dmp[`drop${e}`](n,{testIfExists:this.options[`checkIf${e}Exists`]}),this.checkDumper())return}createObjects(t,e){if(this.options[`create${e}s`])for(const n of t)if(this.dmp[`create${e}`](n),this.checkDumper())return}dropTables(){if(this.options.dropReferences)for(const t of(0,s.default)(this.tables.map((t=>t.dependencies||[]))))this.dmp.dropForeignKey(t);if(this.options.dropTables)for(const t of this.tables)this.dmp.dropTable(t,{testIfExists:this.options.checkIfTableExists})}insertTableData(t){return r(this,void 0,void 0,(function*(){const e=this.driver.createDumper();e.put("^select * ^from %f",t);const n=t.columns.find((t=>t.autoIncrement));n&&!this.options.skipAutoincrementColumn&&this.dmp.allowIdentityInsert(t,!0);const r=yield this.driver.readQuery(this.pool,e.s,t);yield this.processReadable(t,r),n&&!this.options.skipAutoincrementColumn&&this.dmp.allowIdentityInsert(t,!1)}))}processReadable(t,e){const n=(this.options.skipAutoincrementColumn?t.columns.filter((t=>!t.autoIncrement)):t.columns).map((t=>t.columnName));let r=!1,i=!1;return new Promise((s=>{e.on("data",(o=>{if(r)return;if(!i)return void(i=!0);if(this.checkDumper())return r=!0,s(void 0),void e.destroy();const a=this.options.omitNulls?n.filter((t=>null!=o[t])):n;this.dmp.put("^insert ^into %f (%,i) ^values (%,v);&n",t,a,a.map((t=>o[t])))})),e.on("end",(()=>{s(void 0)}))}))}extract(t){return this.dbinfo[t].filter((e=>this.objects.find((n=>e.pureName==n.pureName&&e.schemaName==n.schemaName&&n.objectTypeField==t))))}enableConstraints(t){if(this.options.disableConstraints)if(this.driver.dialect.enableConstraintsPerTable)for(const e of this.tables)this.dmp.enableConstraints(e,t);else this.dmp.enableConstraints(null,t)}}},1619:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.runAlterOperation=e.AlterPlan=void 0;const i=r(n(5076)),s=n(8654),o=n(7356),a=n(8098);function u(t,e){switch(t.operationType){case"createTable":e.createTable(t.newObject);break;case"changeColumn":e.changeColumn(t.oldObject,t.newObject);break;case"createColumn":e.createColumn(t.newObject,[]);break;case"dropColumn":e.dropColumn(t.oldObject);break;case"dropTable":e.dropTable(t.oldObject);break;case"changeConstraint":e.changeConstraint(t.oldObject,t.newObject);break;case"createConstraint":e.createConstraint(t.newObject);break;case"dropConstraint":e.dropConstraint(t.oldObject);break;case"renameColumn":e.renameColumn(t.object,t.newName);break;case"renameTable":e.renameTable(t.object,t.newName);break;case"renameConstraint":e.renameConstraint(t.object,t.newName);break;case"createSqlObject":e.createSqlObject(t.newObject);break;case"dropSqlObject":e.dropSqlObject(t.oldObject);break;case"fillPreloadedRows":e.fillPreloadedRows(t.table,t.oldRows,t.newRows,t.key,t.insertOnly);break;case"recreateTable":{const n=(0,s.generateTablePairingId)(t.table),r=i.default.cloneDeep(n),_=a.DatabaseAnalyser.createEmptyStructure();_.tables.push(r),t.operations.forEach((t=>u(t,new o.DatabaseInfoAlterProcessor(_)))),e.recreateTable(n,r)}}}e.AlterPlan=class{constructor(t,e,n,r){this.wholeOldDb=t,this.wholeNewDb=e,this.dialect=n,this.opts=r,this.recreates={tables:0,constraints:0,sqlObjects:0},this.operations=[]}createTable(t){this.operations.push({operationType:"createTable",newObject:t})}dropTable(t){this.operations.push({operationType:"dropTable",oldObject:t})}createSqlObject(t){this.operations.push({operationType:"createSqlObject",newObject:t})}dropSqlObject(t){this.operations.push({operationType:"dropSqlObject",oldObject:t})}createColumn(t){this.operations.push({operationType:"createColumn",newObject:t})}changeColumn(t,e){this.operations.push({operationType:"changeColumn",oldObject:t,newObject:e})}dropColumn(t){this.operations.push({operationType:"dropColumn",oldObject:t})}createConstraint(t){this.operations.push({operationType:"createConstraint",newObject:t})}changeConstraint(t,e){this.operations.push({operationType:"changeConstraint",oldObject:t,newObject:e})}dropConstraint(t){this.operations.push({operationType:"dropConstraint",oldObject:t})}renameTable(t,e){this.operations.push({operationType:"renameTable",object:t,newName:e})}renameColumn(t,e){this.operations.push({operationType:"renameColumn",object:t,newName:e})}renameConstraint(t,e){this.operations.push({operationType:"renameConstraint",object:t,newName:e})}recreateTable(t,e){this.operations.push({operationType:"recreateTable",table:t,operations:e}),this.recreates.tables+=1}fillPreloadedRows(t,e,n,r,i){this.operations.push({operationType:"fillPreloadedRows",table:t,oldRows:e,newRows:n,key:r,insertOnly:i})}run(t){for(const e of this.operations)u(e,t)}_getDependendColumnConstraints(t,e){const n=this.wholeOldDb.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));return n?[...(null==e?void 0:e.includes("dependencies"))?n.dependencies.filter((e=>e.columns.find((e=>e.refColumnName==t.columnName)))):[],...i.default.compact([(null==e?void 0:e.includes("primaryKey"))?n.primaryKey:null,...(null==e?void 0:e.includes("foreignKeys"))?n.foreignKeys:[],...(null==e?void 0:e.includes("indexes"))?n.indexes:[],...(null==e?void 0:e.includes("uniques"))?n.uniques:[]]).filter((e=>e.columns.find((e=>e.columnName==t.columnName))))]:[]}_addLogicalDependencies(){const t=this.operations.map((t=>{if("dropColumn"==t.operationType){const e=this._getDependendColumnConstraints(t.oldObject,this.dialect.dropColumnDependencies);return e.length>0&&this.opts.noDropConstraint?[]:[...e.map((t=>({operationType:"dropConstraint",oldObject:t}))),t]}if("changeColumn"==t.operationType){const e=this._getDependendColumnConstraints(t.oldObject,this.dialect.changeColumnDependencies);if(e.length>0&&this.opts.noDropConstraint)return[];const n=[...e.map((t=>({operationType:"dropConstraint",oldObject:t}))),t,...i.default.reverse([...e]).map((t=>({operationType:"createConstraint",newObject:t})))];return e.length>0&&(this.recreates.constraints+=1),n}return"dropTable"==t.operationType?[...this.dialect.dropReferencesWhenDropTable?(t.oldObject.dependencies||[]).map((t=>({operationType:"dropConstraint",oldObject:t}))):[],t]:"changeConstraint"==t.operationType?this.opts.noDropConstraint?[]:(this.recreates.constraints+=1,[{operationType:"dropConstraint",oldObject:t.oldObject},{operationType:"createConstraint",newObject:t.newObject}]):[t]}));return i.default.flatten(t)}_transformToImplementedOps(){const t=this.operations.map((t=>this._testTableRecreate(t,"createColumn",this.dialect.createColumn,"newObject")||this._testTableRecreate(t,"dropColumn",this.dialect.dropColumn,"oldObject")||this._testTableRecreate(t,"createConstraint",(t=>this._canCreateConstraint(t)),"newObject")||this._testTableRecreate(t,"dropConstraint",(t=>this._canDropConstraint(t)),"oldObject")||this._testTableRecreate(t,"changeColumn",this.dialect.changeColumn,"newObject")||[t]));return i.default.flatten(t)}_canCreateConstraint(t){return"primaryKey"==t.constraintType?this.dialect.createPrimaryKey:"foreignKey"==t.constraintType?this.dialect.createForeignKey:"index"==t.constraintType?this.dialect.createIndex:"unique"==t.constraintType?this.dialect.createUnique:"check"==t.constraintType?this.dialect.createCheck:null}_canDropConstraint(t){return"primaryKey"==t.constraintType?this.dialect.dropPrimaryKey:"foreignKey"==t.constraintType?this.dialect.dropForeignKey:"index"==t.constraintType?this.dialect.dropIndex:"unique"==t.constraintType?this.dialect.dropUnique:"check"==t.constraintType?this.dialect.dropCheck:null}_testTableRecreate(t,e,n,r){if(t.operationType==e){if(i.default.isFunction(n)){if(n(t[r]))return null}else if(n)return null;if(this.opts.noDropTable)return[];const e=this.wholeNewDb.tables.find((e=>e.pureName==t[r].pureName&&e.schemaName==t[r].schemaName));return this.recreates.tables+=1,[{operationType:"recreateTable",table:e,operations:[t]}]}return null}_groupTableRecreations(){const t=[],e={};for(const n of this.operations)if("recreateTable"==n.operationType&&n.table){const r=e[`${n.table.schemaName}||${n.table.pureName}`];if(r)r.operations.push(...n.operations);else{const r=Object.assign(Object.assign({},n),{operations:[...n.operations]});t.push(r),e[`${n.table.schemaName}||${n.table.pureName}`]=r}}else{const r=n.oldObject;if(r){const t=e[`${r.schemaName}||${r.pureName}`];if(t){t.operations.push(n);continue}}t.push(n)}return t}_moveForeignKeysToLast(){if(!this.dialect.createForeignKey)return this.operations;const t=[];return[...this.operations.map((e=>"createTable"==e.operationType?(t.push(...e.newObject.foreignKeys||[]),Object.assign(Object.assign({},e),{newObject:Object.assign(Object.assign({},e.newObject),{foreignKeys:[]})})):e)),...t.map((t=>({operationType:"createConstraint",newObject:t})))]}_filterAllowedOperations(){return this.operations.filter((t=>!(this.opts.noDropColumn&&"dropColumn"==t.operationType||this.opts.noDropTable&&"dropTable"==t.operationType||this.opts.noDropTable&&"recreateTable"==t.operationType||this.opts.noDropConstraint&&"dropConstraint"==t.operationType||this.opts.noDropSqlObject&&"dropSqlObject"==t.operationType)))}transformPlan(){this.operations=this._addLogicalDependencies(),this.operations=this._transformToImplementedOps(),this.operations=this._groupTableRecreations(),this.operations=this._moveForeignKeysToLast(),this.operations=this._filterAllowedOperations()}},e.runAlterOperation=u},1592:(t,e)=>{"use strict";function n(t){return t&&/int/i.test(t)}function r(t){return t&&/numeric|decimal/i.test(t)}function i(t){return t&&/float|single|double/i.test(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isTypeDateTime=e.isTypeLogical=e.isTypeString=e.isTypeNumber=e.isTypeFloat=e.isTypeNumeric=e.isTypeInteger=void 0,e.isTypeInteger=n,e.isTypeNumeric=r,e.isTypeFloat=i,e.isTypeNumber=function(t){return n(t)||i(t)||r(t)},e.isTypeString=function(t){return t&&/char|binary/i.test(t)},e.isTypeLogical=function(t){return t&&/bit|boolean/i.test(t)},e.isTypeDateTime=function(t){return t&&/date|time|timestamp/i.test(t)}},7441:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getCreateObjectScript=e.computeTableDiffColumns=e.computeDbDiffRows=e.DbDiffCompareDefs=e.computeDiffRowsCore=void 0;const i=n(8654),s=r(n(5076));function o(t,e,n){const r=[];for(const i of t){const t=e.find((t=>t.pairingId==i.pairingId));if(t){const e=n(i,t);r.push({source:i,target:t,state:e?"equal":"changed",__isChanged:!e})}else r.push({source:i,state:"added",__isAdded:!0})}for(const n of e)t.find((t=>t.pairingId==n.pairingId))||r.push({target:n,state:"removed",__isDeleted:!0});return r}e.computeDiffRowsCore=o,e.DbDiffCompareDefs={tables:{test:i.testEqualTables,name:"Table",plural:"Tables",icon:"img table"},views:{test:i.testEqualSqlObjects,name:"View",plural:"Views",icon:"img view"},matviews:{test:i.testEqualSqlObjects,name:"Materialized view",plural:"Materialized views",icon:"img view"},procedures:{test:i.testEqualSqlObjects,name:"Procedure",plural:"Procedures",icon:"img procedure"},functions:{test:i.testEqualSqlObjects,name:"Function",plural:"Functions",icon:"img function"}},e.computeDbDiffRows=function(t,n,r,i){if(!t||!n||!i)return[];const a=[];for(const u of["tables","views","procedures","matviews","functions"]){const _=e.DbDiffCompareDefs[u];a.push(...s.default.sortBy(o(t[u],n[u],((e,s)=>_.test(e,s,r,t,n,i))).map((t=>{var e,n,r,i,s,o,a,c;return Object.assign(Object.assign({},t),{sourceSchemaName:null===(e=null==t?void 0:t.source)||void 0===e?void 0:e.schemaName,sourcePureName:null===(n=null==t?void 0:t.source)||void 0===n?void 0:n.pureName,targetSchemaName:null===(r=null==t?void 0:t.target)||void 0===r?void 0:r.schemaName,targetPureName:null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.pureName,typeName:_.name,typeIcon:_.icon,identifier:`${(null===(s=null==t?void 0:t.source)||void 0===s?void 0:s.schemaName)||(null===(o=null==t?void 0:t.target)||void 0===o?void 0:o.schemaName)}.${(null===(a=null==t?void 0:t.source)||void 0===a?void 0:a.pureName)||(null===(c=null==t?void 0:t.target)||void 0===c?void 0:c.pureName)}`,objectTypeField:u})})),"identifier"))}return a},e.computeTableDiffColumns=function(t,e,n,r){return r?o((null==t?void 0:t.columns)||[],(null==e?void 0:e.columns)||[],((t,e)=>(0,i.testEqualColumns)(t,e,!0,!0,n))).map((t=>{var e,n,r,i,s,o;return Object.assign(Object.assign({},t),{sourceColumnName:null===(e=null==t?void 0:t.source)||void 0===e?void 0:e.columnName,targetColumnName:null===(n=null==t?void 0:t.target)||void 0===n?void 0:n.columnName,sourceDataType:null===(r=null==t?void 0:t.source)||void 0===r?void 0:r.dataType,targetDataType:null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.dataType,sourceNotNull:null===(s=null==t?void 0:t.source)||void 0===s?void 0:s.notNull,targetNotNull:null===(o=null==t?void 0:t.target)||void 0===o?void 0:o.notNull})})):[]},e.getCreateObjectScript=function(t,e){if(!t||!e)return"";if("tables"==t.objectTypeField){const n=e.createDumper();return n.createTable(t),n.s}return t.createSql||""}},6637:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncWriteStream=void 0,(0,n(8852).getLogger)("asyncWriteStream"),e.createAsyncWriteStream=function(t,e){const n=new t.Writable({objectMode:!0});return n._write=(t,n,i)=>r(this,void 0,void 0,(function*(){try{yield e.processItem(t),i(null)}catch(t){i(t)}})),n}},1862:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createBulkInsertStreamBase=void 0;const s=i(n(4200)),o=n(8852),a=n(7265),u=(0,o.getLogger)("bulkStreamBase");e.createBulkInsertStreamBase=function(t,e,n,i,o){const _=i.schemaName?`${t.dialect.quoteIdentifier(i.schemaName)}.${t.dialect.quoteIdentifier(i.pureName)}`:t.dialect.quoteIdentifier(i.pureName),c=new e.Writable({objectMode:!0});return c.buffer=[],c.structure=null,c.columnNames=null,c.requireFixedStructure=t.databaseEngineTypes.includes("sql"),c.addRow=t=>r(this,void 0,void 0,(function*(){c.structure?c.buffer.push(t):(c.structure=t,yield c.checkStructure())})),c.checkStructure=()=>r(this,void 0,void 0,(function*(){let e=yield t.analyseSingleTable(n,i);if(e&&o.dropIfExists&&(u.info(`Dropping table ${_}`),yield t.script(n,`DROP TABLE ${_}`)),o.createIfNotExists&&(!e||o.dropIfExists)){const r=t.createDumper();r.createTable((0,a.prepareTableForImport)(Object.assign(Object.assign({},c.structure),i))),u.info({sql:r.s},`Creating table ${_}`),yield t.script(n,r.s),e=yield t.analyseSingleTable(n,i)}o.truncate&&(yield t.script(n,`TRUNCATE TABLE ${_}`)),c.columnNames=(0,s.default)(e.columns.map((t=>t.columnName)),c.structure.columns.map((t=>t.columnName)))})),c.send=()=>r(this,void 0,void 0,(function*(){const e=c.buffer;if(c.buffer=[],t.dialect.allowMultipleValuesInsert){const r=t.createDumper();r.putRaw(`INSERT INTO ${_} (`),r.putCollection(",",c.columnNames,(e=>r.putRaw(t.dialect.quoteIdentifier(e)))),r.putRaw(")\n VALUES\n");let i=!1;for(const t of e)i&&r.putRaw(",\n"),r.putRaw("("),r.putCollection(",",c.columnNames,(e=>r.putValue(t[e]))),r.putRaw(")"),i=!0;r.putRaw(";"),yield t.query(n,r.s,{discardResult:!0})}else for(const r of e){const e=t.createDumper();e.putRaw(`INSERT INTO ${_} (`),e.putCollection(",",c.columnNames,(n=>e.putRaw(t.dialect.quoteIdentifier(n)))),e.putRaw(")\n VALUES\n"),e.putRaw("("),e.putCollection(",",c.columnNames,(t=>e.putValue(r[t]))),e.putRaw(")"),yield t.query(n,e.s,{discardResult:!0})}if(o.commitAfterInsert){const e=t.createDumper();e.commitTransaction(),yield t.query(n,e.s,{discardResult:!0})}})),c.sendIfFull=()=>r(this,void 0,void 0,(function*(){c.buffer.length>100&&(yield c.send())})),c._write=(t,e,n)=>r(this,void 0,void 0,(function*(){yield c.addRow(t),yield c.sendIfFull(),n()})),c._final=t=>r(this,void 0,void 0,(function*(){yield c.send(),t()})),c}},7356:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DatabaseInfoAlterProcessor=void 0;const i=r(n(5076));e.DatabaseInfoAlterProcessor=class{constructor(t){this.db=t}createTable(t){this.db.tables.push(t)}dropTable(t){i.default.remove(this.db.tables,(e=>e.pureName==t.pureName&&e.schemaName==t.schemaName))}createSqlObject(t){this.db[t.objectTypeField].push(t)}dropSqlObject(t){i.default.remove(this.db[t.objectTypeField],(e=>e.pureName==t.pureName&&e.schemaName==t.schemaName))}createColumn(t){const e=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));if(!e)throw new Error(`createColumn error, cannot find table: ${t.schemaName}.${t.pureName}`);e.columns.push(t)}changeColumn(t,e){const n=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));if(!n)throw new Error(`changeColumn error, cannot find table: ${t.schemaName}.${t.pureName}`);n.columns=n.columns.map((n=>n.columnName==t.columnName?e:n))}dropColumn(t){const e=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));if(!e)throw new Error(`dropColumn error, cannot find table: ${t.schemaName}.${t.pureName}`);i.default.remove(e.columns,(e=>e.columnName==t.columnName))}createConstraint(t){const e=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));switch(t.constraintType){case"primaryKey":e.primaryKey=t;break;case"foreignKey":e.foreignKeys.push(t);break;case"index":e.indexes.push(t);break;case"unique":e.uniques.push(t);break;case"check":e.checks.push(t)}}changeConstraint(t,e){this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName))}dropConstraint(t){const e=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));switch(t.constraintType){case"primaryKey":e.primaryKey=null;break;case"foreignKey":e.foreignKeys=e.foreignKeys.filter((e=>e.constraintName!=t.constraintName));break;case"index":e.indexes=e.indexes.filter((e=>e.constraintName!=t.constraintName));break;case"unique":e.uniques=e.uniques.filter((e=>e.constraintName!=t.constraintName));break;case"check":e.checks=e.checks.filter((e=>e.constraintName!=t.constraintName))}}renameTable(t,e){this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName)).pureName=e}renameColumn(t,e){this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName)).columns.find((e=>e.columnName==t.columnName)).columnName=e}renameConstraint(t,e){}recreateTable(t,e){throw new Error("recreateTable not implemented for DatabaseInfoAlterProcessor")}fillPreloadedRows(t,e,n,r,i){const s=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));s.preloadedRows=n,s.preloadedRowsKey=r,s.preloadedRowsInsertOnly=i}}},8654:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.modelCompareDbDiffOptions=e.matchPairedObjects=e.getAlterDatabaseScript=e.getAlterTableScript=e.createAlterDatabasePlan=e.createAlterTablePlan=e.testEqualSqlObjects=e.testEqualTables=e.testEqualTypes=e.testEqualColumns=e.generateDbPairingId=e.removeTablePairingId=e.generateTablePairingId=void 0;const i=r(n(482)),s=n(1619),o=r(n(4558)),a=r(n(1972)),u=r(n(1454)),_=r(n(4169)),c=r(n(8644));function l(t){var e,n,r,s,o;return t?t.pairingId?t:Object.assign(Object.assign({},t),{columns:null===(e=t.columns)||void 0===e?void 0:e.map((t=>Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}))),foreignKeys:null===(n=t.foreignKeys)||void 0===n?void 0:n.map((t=>Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}))),checks:null===(r=t.checks)||void 0===r?void 0:r.map((t=>Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}))),indexes:null===(s=t.indexes)||void 0===s?void 0:s.map((t=>Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}))),uniques:null===(o=t.uniques)||void 0===o?void 0:o.map((t=>Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}))),pairingId:t.pairingId||(0,i.default)()}):t}function h(t){return t.objectTypeField?Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}):t}function T(t,e,n){return n.ignoreCase?(t||"").toLowerCase()==(e||"").toLowerCase():t==e}function p(t,e,n){return null==t||null==e?t==e:function(t,e,n){return"ignore"==n.schemaMode&&(t=null),"ignoreImplicit"==n.schemaMode&&t==n.leftImplicitSchema&&(t=null),"ignore"==n.schemaMode&&(e=null),"ignoreImplicit"==n.schemaMode&&e==n.rightImplicitSchema&&(e=null),T(t,e,n)}(t.schemaName,e.schemaName,n)&&T(t.pureName,e.pureName,n)}function f(t,e,n,r,i={}){if(n&&!T(t.columnName,e.columnName,i))return!1;if(t.computedExpression!=e.computedExpression)return console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different computed expression: ${t.computedExpression}, ${e.computedExpression}`),!1;if(null!=t.computedExpression)return!0;if(r){if(null==t.defaultValue){if(t.defaultValue!=e.defaultValue)return console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different default value: ${t.defaultValue}, ${e.defaultValue}`),!1}else if(t.defaultValue!=e.defaultValue)return console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different default value: ${t.defaultValue}, ${e.defaultValue}`),!1;if(t.defaultConstraint!=e.defaultConstraint)return console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different default constraint: ${t.defaultConstraint}, ${e.defaultConstraint}`),!1}return(t.notNull||!1)!=(e.notNull||!1)?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different nullability: ${t.notNull}, ${e.notNull}`),!1):(t.autoIncrement||!1)!=(e.autoIncrement||!1)?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different autoincrement: ${t.autoIncrement}, ${e.autoIncrement}`),!1):(t.isSparse||!1)!=(e.isSparse||!1)?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different is_sparse: ${t.isSparse}, ${e.isSparse}`),!1):(t.isUnsigned||!1)!=(e.isUnsigned||!1)?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different unsigned: ${t.isUnsigned}, ${e.isUnsigned}`),!1):(t.isZerofill||!1)!=(e.isZerofill||!1)?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different zerofill: ${t.isZerofill}, ${e.isZerofill}`),!1):(t.columnComment||"")!=(e.columnComment||"")?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different comment: ${t.columnComment}, ${e.columnComment}`),!1):!!E(t,e,i)}function E(t,e,n={}){return!!n.ignoreDataTypes||(t.dataType||"").toLowerCase()==(e.dataType||"").toLowerCase()||(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different data type: ${t.dataType}, ${e.dataType}`),!1)}function d(t){const e=[];return t.primaryKey&&e.push(t.primaryKey),t.foreignKeys&&e.push(...t.foreignKeys),t.indexes&&e.push(...t.indexes),t.uniques&&e.push(...t.uniques),t.checks&&e.push(...t.checks),e}function N(t,e,n=null){const r=[];for(const i of t){const t=e.find((t=>t.pairingId==i.pairingId||n&&n(i,t)));t?r.push([i,t]):r.push([i,null])}for(const t of e)r.find((e=>e[1]==t))||r.push([null,t]);return r}function S(t,e,n){var r,i,s;const o=n.preloadedRowsKey||(null===(i=null===(r=n.primaryKey)||void 0===r?void 0:r.columns)||void 0===i?void 0:i.map((t=>t.columnName)));(null===(s=n.preloadedRows)||void 0===s?void 0:s.length)>0&&(null==o?void 0:o.length)>0&&t.fillPreloadedRows(n,null==e?void 0:e.preloadedRows,n.preloadedRows,o,n.preloadedRowsInsertOnly)}function m(t,e,n,r){const i=N(e.columns,n.columns),s=N(d(e),d(n),((t,e)=>"primaryKey"==t.constraintType&&"primaryKey"==e.constraintType));r.noDropConstraint||s.filter((t=>null==t[1])).forEach((e=>t.dropConstraint(e[0]))),r.noDropColumn||i.filter((t=>null==t[1])).forEach((e=>t.dropColumn(e[0]))),p(e,n,r)||r.noRenameTable||t.renameTable(e,n.pureName),i.filter((t=>null==t[0])).forEach((e=>t.createColumn(e[1]))),i.filter((t=>t[0]&&t[1])).forEach((e=>{f(e[0],e[1],!0,!0,r)||(f(e[0],e[1],!1,!0,r)&&!r.noRenameColumn?t.renameColumn(e[0],e[1].columnName):t.changeColumn(e[0],e[1]))})),s.filter((t=>t[0]&&t[1])).forEach((e=>{(function(t,e,n={}){const r=[];return n.ignoreForeignKeyActions&&(r.push("updateAction"),r.push("deleteAction")),n.ignoreConstraintNames&&r.push("constraintName"),"ignore"==n.schemaMode&&(r.push("schemaName"),r.push("refSchemaName")),(0,o.default)((0,a.default)(t,r))==(0,o.default)((0,a.default)(e,r))})(e[0],e[1],r)||t.changeConstraint(e[0],e[1])})),s.filter((t=>null==t[0])).forEach((e=>t.createConstraint(e[1]))),S(t,e,n)}function A(t,e,n){return t.createSql==e.createSql}function P(t,e,n,r,i,o){const a=new s.AlterPlan(r,i,o.dialect,n);return null==t?(a.createTable(e),S(a,null,e)):null==e?a.dropTable(t):m(a,t,e,n),a.transformPlan(),a}function g(t,e,n,r,i,o){const a=new s.AlterPlan(r,i,o.dialect,n);for(const r of["tables","views","procedures","matviews","functions"]){for(const i of t[r]||[]){const t=(e[r]||[]).find((t=>t.pairingId==i.pairingId));"tables"==r?null==t?n.noDropTable||a.dropTable(i):m(a,i,t,n):null==t?n.noDropSqlObject||a.dropSqlObject(i):A(i.createSql,t.createSql)||(a.recreates.sqlObjects+=1,n.noDropSqlObject||a.dropSqlObject(i),a.createSqlObject(t))}for(const n of e[r]||[]){const e=(t[r]||[]).find((t=>t.pairingId==n.pairingId));"tables"==r?null==e&&(a.createTable(n),S(a,null,n)):null==e&&a.createSqlObject(n)}}return a.transformPlan(),a}e.generateTablePairingId=l,e.removeTablePairingId=function(t){var e,n,r,i,s;return t?Object.assign(Object.assign({},t),{columns:null===(e=t.columns)||void 0===e?void 0:e.map((t=>Object.assign(Object.assign({},t),{pairingId:void 0}))),foreignKeys:null===(n=t.foreignKeys)||void 0===n?void 0:n.map((t=>Object.assign(Object.assign({},t),{pairingId:void 0}))),checks:null===(r=t.checks)||void 0===r?void 0:r.map((t=>Object.assign(Object.assign({},t),{pairingId:void 0}))),indexes:null===(i=t.indexes)||void 0===i?void 0:i.map((t=>Object.assign(Object.assign({},t),{pairingId:void 0}))),uniques:null===(s=t.uniques)||void 0===s?void 0:s.map((t=>Object.assign(Object.assign({},t),{pairingId:void 0}))),pairingId:void 0}):t},e.generateDbPairingId=function(t){var e,n,r,i,s,o;return t?Object.assign(Object.assign({},t),{tables:null===(e=t.tables)||void 0===e?void 0:e.map(l),views:null===(n=t.views)||void 0===n?void 0:n.map(h),procedures:null===(r=t.procedures)||void 0===r?void 0:r.map(h),functions:null===(i=t.functions)||void 0===i?void 0:i.map(h),triggers:null===(s=t.triggers)||void 0===s?void 0:s.map(h),matviews:null===(o=t.matviews)||void 0===o?void 0:o.map(h)}):t},e.testEqualColumns=f,e.testEqualTypes=E,e.testEqualTables=function(t,e,n,r,i,o){const a=new s.AlterPlan(r,i,o.dialect,n);return m(a,t,e,n),0==a.operations.length},e.testEqualSqlObjects=A,e.createAlterTablePlan=P,e.createAlterDatabasePlan=g,e.getAlterTableScript=function(t,e,n,r,i,s){if(!t&&!e||!s)return{sql:"",recreates:[]};const o=P(t,e,n,r,i,s),a=s.createDumper({useHardSeparator:!0});return o.run(a),{sql:a.s,recreates:o.recreates}},e.getAlterDatabaseScript=function(t,e,n,r,i,s){const o=g(t,e,n,r,i,s),a=s.createDumper({useHardSeparator:!0});return o.run(a),{sql:a.s,recreates:o.recreates,isEmpty:0==o.operations.length}},e.matchPairedObjects=function(t,e,n){if(!t||!e)return null;const r=(0,u.default)(e);for(const e of["tables","views","procedures","matviews","functions"])for(const i of r[e]||[]){const r=t[e].find((t=>p(t,i,n)));if(r&&(i.pairingId=r.pairingId,"tables"==e)){for(const t of i.columns){const e=r.columns.find((e=>T(e.columnName,t.columnName,n)));e&&(t.pairingId=e.pairingId)}for(const t of i.foreignKeys){const e=r.foreignKeys.find((e=>T(e.refTableName,t.refTableName,n)&&(0,_.default)(e.columns.map((t=>(0,c.default)(t,["columnName","refColumnName"]))),t.columns.map((t=>(0,c.default)(t,["columnName","refColumnName"]))))));e&&(t.pairingId=e.pairingId)}for(const t of i.uniques){const e=r.uniques.find((e=>(0,_.default)(e.columns.map((t=>(0,c.default)(t,["columnName"]))),t.columns.map((t=>(0,c.default)(t,["columnName"]))))));e&&(t.pairingId=e.pairingId)}for(const t of i.indexes){const e=r.indexes.find((e=>T(e.constraintName,t.constraintName,n)));e&&(t.pairingId=e.pairingId)}}}return r},e.modelCompareDbDiffOptions={ignoreCase:!0,schemaMode:"ignore",ignoreConstraintNames:!0,ignoreForeignKeyActions:!0,ignoreDataTypes:!0}},8925:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.driverBase=e.runQueryOnDriver=e.runCommandOnDriver=void 0;const s=i(n(7120)),o=n(7117),a=n(3716),u=n(1759);function _(t,e,n){return r(this,void 0,void 0,(function*(){const r=e.createDumper();n(r),yield e.query(t,r.s,{discardResult:!0})}))}e.runCommandOnDriver=_,e.runQueryOnDriver=function(t,e,n){return r(this,void 0,void 0,(function*(){const r=e.createDumper();return n(r),yield e.query(t,r.s)}))},e.driverBase={analyserClass:null,dumperClass:o.SqlDumper,dialect:{limitSelect:!0,rangeSelect:!0,offsetFetchRangeSyntax:!0,stringEscapeChar:"'",fallbackDataType:"nvarchar(max)",quoteIdentifier:t=>t,columnProperties:{isSparse:!1,isPersisted:!1},defaultSchemaName:null},databaseEngineTypes:["sql"],supportedCreateDatabase:!0,analyseFull(t,e){return r(this,void 0,void 0,(function*(){return new this.analyserClass(t,this,e).fullAnalysis()}))},analyseSingleObject(t,e,n="tables"){return r(this,void 0,void 0,(function*(){return new this.analyserClass(t,this).singleObjectAnalysis(e,n)}))},analyseSingleTable(t,e){return this.analyseSingleObject(t,e,"tables")},analyseIncremental(t,e,n){return r(this,void 0,void 0,(function*(){return new this.analyserClass(t,this,n).incrementalAnalysis(e)}))},createDumper(t=null){return new this.dumperClass(this,t)},script(t,e,n){return r(this,void 0,void 0,(function*(){(null==n?void 0:n.useTransaction)&&_(t,this,(t=>t.beginTransaction()));for(const r of(0,a.splitQuery)(e,this.getQuerySplitterOptions("script")))try{yield this.query(t,r,{discardResult:!0})}catch(e){throw(null==n?void 0:n.useTransaction)&&_(t,this,(t=>t.rollbackTransaction())),e}(null==n?void 0:n.useTransaction)&&_(t,this,(t=>t.commitTransaction()))}))},getNewObjectTemplates(){return this.databaseEngineTypes.includes("sql")?[{label:"New view",sql:"CREATE VIEW myview\nAS\nSELECT * FROM table1"}]:[]},loadFieldValues(t,e,n,i){return r(this,void 0,void 0,(function*(){const r=this.createDumper(),o={commandType:"select",distinct:!0,topRecords:100,from:{name:e},columns:[{exprType:"column",columnName:n,alias:"value"}],orderBy:[{exprType:"column",columnName:n}]};if(i){const t=(0,s.default)(i.split(" ").map((t=>t.trim())));t.length>0&&(o.where={conditionType:"and",conditions:t.map((t=>({conditionType:"like",left:{exprType:"column",columnName:n},right:{exprType:"value",value:`%${t}%`}})))})}return(0,u.dumpSqlSelect)(r,o),(yield this.query(t,r.s)).rows}))},readJsonQuery(t,e,n){const r=this.createDumper();return(0,u.dumpSqlSelect)(r,e),this.readQuery(t,r.s,n)},showConnectionField:(t,e)=>!1,showConnectionTab:t=>!0}},4411:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.filterName=void 0;const i=r(n(7120)),s=r(n(7072)),o=r(n(4093));function a(t,e){if(!e)return!1;if(!t)return!0;if(0==t.replace(/[A-Z]/g,"").length){const n=(0,o.default)(e).replace(/[^A-Z]/g,""),r=".*"+t.split("").join(".*")+".*";return new RegExp(r).test(n)}return e.toUpperCase().includes(t.toUpperCase())}e.filterName=function(t,...e){if(!t)return!0;const n=t.split(" ").map((t=>t.trim())),r=(0,i.default)(e),o=r.filter((t=>(0,s.default)(t))),u=r.filter((t=>t.childName)).map((t=>t.childName));for(const t of n)if(t.startsWith("#")){if(!u.find((e=>a(t.substring(1),e))))return!1}else if(!o.find((e=>a(t,e))))return!1;return!0}},8852:function(t,e,n){"use strict";var r,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getLogger=e.setLoggerName=e.setLogConfig=void 0;const s=i(n(9140));let o,a=null;const u={base:{pid:null===(r=null===global||void 0===global?void 0:global.process)||void 0===r?void 0:r.pid},targets:[{type:"console",level:"info"}]};e.setLogConfig=function(t){o=t},e.setLoggerName=function(t){a=t},e.getLogger=function(t){return(0,s.default)({getConfig:()=>{const e=o||u;if(t){const n={caller:t};return a&&(n.name=a),Object.assign(Object.assign({},e),{base:Object.assign(Object.assign({},e.base),n)})}return e}})}},7096:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(1592),e),i(n(3690),e),i(n(7265),e),i(n(1421),e),i(n(1862),e),i(n(6637),e),i(n(8098),e),i(n(8925),e),i(n(7117),e),i(n(3637),e),i(n(9587),e),i(n(7058),e),i(n(2898),e),i(n(4411),e),i(n(8654),e),i(n(369),e),i(n(518),e),i(n(3968),e),i(n(7441),e),i(n(5350),e),i(n(8926),e),i(n(8852),e)},3690:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.fillConstraintNames=e.makeUniqueColumnNames=e.findForeignKeyForColumn=e.findObjectLike=e.equalFullName=e.equalStringLike=e.quoteFullName=e.fullNameToLabel=e.fullNameToString=e.fullNameFromString=void 0;const i=r(n(1454)),s=r(n(7072));function o(t,e){return(t||"").toLowerCase().trim()==(e||"").toLowerCase().trim()}function a(t,e,n){return`${t}_${e.pureName}_${n.map((t=>t.columnName.replace(" ","_"))).join("_")}`}e.fullNameFromString=function(t){const e=t.match(/\[([^\]]+)\]\.\[([^\]]+)\]/);return e?{schemaName:e[1],pureName:e[2]}:{schemaName:null,pureName:t}},e.fullNameToString=function({schemaName:t,pureName:e}){return t?`[${t}].[${e}]`:e},e.fullNameToLabel=function({schemaName:t,pureName:e}){return t?`${t}.${e}`:e},e.quoteFullName=function(t,{schemaName:e,pureName:n}){return e?`${t.quoteIdentifier(e)}.${t.quoteIdentifier(n)}`:`${t.quoteIdentifier(n)}`},e.equalStringLike=o,e.equalFullName=function(t,e){return t&&e?t.pureName==e.pureName&&t.schemaName==e.schemaName:t==e},e.findObjectLike=function({pureName:t,schemaName:e},n,r){var i,s;return n?e?null===(i=n[r])||void 0===i?void 0:i.find((n=>o(n.pureName,t)&&o(n.schemaName,e))):null===(s=n[r])||void 0===s?void 0:s.find((e=>o(e.pureName,t))):null},e.findForeignKeyForColumn=function(t,e){return(0,s.default)(e)?(t.foreignKeys||[]).find((t=>t.columns.find((t=>t.columnName==e)))):(t.foreignKeys||[]).find((t=>t.columns.find((t=>t.columnName==e.columnName))))},e.makeUniqueColumnNames=function(t){const e=new Set;for(let n=0;n<t.length;n++){if(e.has(t[n].columnName)){let r=2;for(;e.has(`${t[n].columnName}${r}`);)r++;t[n].columnName=`${t[n].columnName}${r}`}e.add(t[n].columnName)}},e.fillConstraintNames=function(t,e){if(!t)return t;const n=(0,i.default)(t);!n.primaryKey||n.primaryKey.constraintName||e.anonymousPrimaryKey||(n.primaryKey.constraintName=`PK_${n.pureName}`);for(const t of n.foreignKeys||[])t.constraintName||(t.constraintName=a("FK",n,t.columns));for(const t of n.indexes||[])t.constraintName||(t.constraintName=a("IX",n,t.columns));for(const t of n.uniques||[])t.constraintName||(t.constraintName=a("UQ",n,t.columns));return n}},1421:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.findEngineDriver=e.extractShellApiFunctionName=e.extractPackageName=e.extractShellApiPlugins=void 0;const i=r(n(3039)),s=r(n(7072)),o=r(n(6446));e.extractShellApiPlugins=function(t,e){const n=[],r=t.match(/^([^@]+)@([^@]+)/);if(r&&n.push(r[2]),e&&e.connection&&e.connection.engine){const t=e.connection.engine.match(/^([^@]+)@([^@]+)/);t&&n.push(t[2])}return n},e.extractPackageName=function(t){if(!t)return null;const e=t.match(/^([^@]+)@([^@]+)/);return e?e[2]:null},e.extractShellApiFunctionName=function(t){const e=t.match(/^([^@]+)@([^@]+)/);return e?`${(0,i.default)(e[2])}.shellApi.${e[1]}`:`dbgateApi.${t}`},e.findEngineDriver=function(t,e){if((0,s.default)(t))return e.drivers.find((e=>e.engine==t));if((0,o.default)(t)){const{engine:n}=t;if(n)return e.drivers.find((t=>t.engine==n))}return null}},5350:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.enrichWithPreloadedRows=void 0;const s=i(n(5076));e.enrichWithPreloadedRows=function(t,e,n,i){var o,a,u;return r(this,void 0,void 0,(function*(){const r={};for(const s of e.tables){const e=t.tables.find((t=>t.pairingId==s.pairingId));if(0==((null===(o=null==e?void 0:e.preloadedRows)||void 0===o?void 0:o.length)||0))continue;const _=e.preloadedRowsKey||(null===(u=null===(a=e.primaryKey)||void 0===a?void 0:a.columns)||void 0===u?void 0:u.map((t=>t.columnName)));if(0==((null==_?void 0:_.length)||0))continue;const c=i.createDumper();1==_.length?c.putCmd("^select * ^from %f ^where %i ^in (%,v)",s,_[0],e.preloadedRows.map((t=>t[_[0]]))):(c.put("^select * ^from %f ^where",s),c.putCollection(" ^or ",e.preloadedRows,(t=>{c.put("("),c.putCollection(" ^and ",_,(e=>c.put("%i=%v",e,t[e]))),c.put(")")})),c.endCommand());const l=yield i.query(n,c.s);r[s.pairingId]=Object.assign(Object.assign({},s),{preloadedRows:l.rows,preloadedRowsKey:_})}return s.default.isEmpty(r)?e:Object.assign(Object.assign({},e),{tables:e.tables.map((t=>r[t.pairingId]||t))})}))}},369:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.editorDeleteConstraint=e.editorModifyConstraint=e.editorAddConstraint=e.editorDeleteColumn=e.editorModifyColumn=e.editorAddColumn=e.processJsonDataUpdateCommands=e.fillEditorColumnInfo=void 0;const i=r(n(482)),s=r(n(1972)),o=r(n(5076)),a=n(3968);function u(t,e){var n,r;return Object.assign({isPrimaryKey:!!(null===(r=null===(n=null==e?void 0:e.primaryKey)||void 0===n?void 0:n.columns)||void 0===r?void 0:r.find((e=>e.columnName==t.columnName))),dataType:o.default.isEmpty(t)?"int":void 0},t)}function _(t,e,n){if(!(null==e?void 0:e.isPrimaryKey)&&(null==n?void 0:n.isPrimaryKey)){let e=null==t?void 0:t.primaryKey;return e||(e={constraintType:"primaryKey",pureName:t.pureName,schemaName:t.schemaName,columns:[]}),Object.assign(Object.assign({},t),{primaryKey:Object.assign(Object.assign({},e),{columns:[...e.columns,{columnName:n.columnName}]})})}if((null==e?void 0:e.isPrimaryKey)&&!(null==n?void 0:n.isPrimaryKey)){let n=null==t?void 0:t.primaryKey;if(n)return n=Object.assign(Object.assign({},n),{columns:t.primaryKey.columns.filter((t=>t.columnName!=e.columnName))}),0==n.columns.length?Object.assign(Object.assign({},t),{primaryKey:null}):Object.assign(Object.assign({},t),{primaryKey:n})}return t}function c(t,e){t.__addDataCommands=[...t.__addDataCommands||[],e()]}e.fillEditorColumnInfo=u,e.processJsonDataUpdateCommands=function(t,e=[]){for(const n of e)switch(n.type){case"deleteField":delete(t=Object.assign({},t))[n.oldField];break;case"renameField":(t=Object.assign({},t))[n.newField]=t[n.oldField],delete t[n.oldField];break;case"setField":(t=Object.assign({},t))[n.newField]=n.value;break;case"setFieldIfNull":null==(t=Object.assign({},t))[n.newField]&&(t[n.newField]=n.value)}return t},e.editorAddColumn=function(t,e,n){let r=Object.assign(Object.assign({},t),{columns:[...(null==t?void 0:t.columns)||[],Object.assign(Object.assign({},e),{pairingId:(0,i.default)()})]});return r=_(r,null,e),n&&e.defaultValue&&c(r,(()=>({type:"setField",newField:e.columnName,value:(0,a.parseSqlDefaultValue)(e.defaultValue)}))),r},e.editorModifyColumn=function(t,e,n){var r;const i=null===(r=null==t?void 0:t.columns)||void 0===r?void 0:r.find((t=>t.pairingId==e.pairingId));let o=Object.assign(Object.assign({},t),{columns:t.columns.map((t=>t.pairingId==e.pairingId?(0,s.default)(e,["isPrimaryKey"]):t))});return o=_(o,u(i,t),e),n&&i.columnName!=e.columnName&&c(o,(()=>({type:"renameField",oldField:i.columnName,newField:e.columnName}))),n&&!i.defaultValue&&e.defaultValue&&c(o,(()=>({type:"setFieldIfNull",newField:e.columnName,value:(0,a.parseSqlDefaultValue)(e.defaultValue)}))),o},e.editorDeleteColumn=function(t,e,n){let r=Object.assign(Object.assign({},t),{columns:t.columns.filter((t=>t.pairingId!=e.pairingId))});return r=_(r,e,null),n&&c(r,(()=>({type:"deleteField",oldField:e.columnName}))),r},e.editorAddConstraint=function(t,e){const n=Object.assign({},t);return"primaryKey"==e.constraintType&&(n.primaryKey=Object.assign({pairingId:(0,i.default)()},e)),"foreignKey"==e.constraintType&&(n.foreignKeys=[...n.foreignKeys||[],Object.assign({pairingId:(0,i.default)()},e)]),"index"==e.constraintType&&(n.indexes=[...n.indexes||[],Object.assign({pairingId:(0,i.default)()},e)]),"unique"==e.constraintType&&(n.uniques=[...n.uniques||[],Object.assign({pairingId:(0,i.default)()},e)]),n},e.editorModifyConstraint=function(t,e){const n=Object.assign({},t);return"primaryKey"==e.constraintType&&(n.primaryKey=Object.assign(Object.assign({},n.primaryKey),e)),"foreignKey"==e.constraintType&&(n.foreignKeys=t.foreignKeys.map((t=>t.pairingId==e.pairingId?Object.assign(Object.assign({},t),e):t))),"index"==e.constraintType&&(n.indexes=t.indexes.map((t=>t.pairingId==e.pairingId?Object.assign(Object.assign({},t),e):t))),"unique"==e.constraintType&&(n.uniques=t.uniques.map((t=>t.pairingId==e.pairingId?Object.assign(Object.assign({},t),e):t))),n},e.editorDeleteConstraint=function(t,e){const n=Object.assign({},t);return"primaryKey"==e.constraintType&&(n.primaryKey=null),"foreignKey"==e.constraintType&&(n.foreignKeys=t.foreignKeys.filter((t=>t.pairingId!=e.pairingId))),"index"==e.constraintType&&(n.indexes=t.indexes.filter((t=>t.pairingId!=e.pairingId))),"unique"==e.constraintType&&(n.uniques=t.uniques.filter((t=>t.pairingId!=e.pairingId))),n}},2898:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.extractBoolSettingsValue=e.extractIntSettingsValue=void 0;const i=r(n(2168)),s=r(n(2164));e.extractIntSettingsValue=function(t,e,n,r=null,o=null){const a=parseInt(t[e]);return(0,i.default)(a)?n:(0,s.default)(a)?null!=r&&a<r?r:null!=o&&a>o?o:a:n},e.extractBoolSettingsValue=function(t,e,n){const r=t[e];return null==r?n:!!r}},3968:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseSqlDefaultValue=e.getAsImageSrc=e.arrayBufferToBase64=e.isWktGeometry=e.getIconForRedisType=e.isJsonLikeLongString=e.safeJsonParse=e.stringifyCellValue=e.parseCellValue=e.hexStringToArray=e.arrayToHexString=void 0;const i=r(n(7072)),s=r(n(9464)),o=r(n(6446));function a(t){return t.reduce(((t,e)=>t+("0"+e.toString(16)).slice(-2)),"").toUpperCase()}function u(t){for(var e=t.toString(),n=[],r=0;r<e.length;r+=2)n.push(parseInt(e.substr(r,2),16));return n}function _(t){var e="";return[].slice.call(new Uint8Array(t)).forEach((t=>e+=String.fromCharCode(t))),btoa(e)}e.arrayToHexString=a,e.hexStringToArray=u,e.parseCellValue=function(t){if(!(0,i.default)(t))return t;if("(NULL)"==t)return null;if(t.match(/^0x([0-9a-fA-F][0-9a-fA-F])+$/))return{type:"Buffer",data:u(t.substring(2))};const e=t.match(/^ObjectId\("([0-9a-f]{24})"\)$/);return e?{$oid:e[1]}:t},e.stringifyCellValue=function(t){return null===t?"(NULL)":void 0===t?"(NoField)":"Buffer"==(null==t?void 0:t.type)&&(0,s.default)(t.data)?"0x"+a(t.data):(null==t?void 0:t.$oid)?`ObjectId("${null==t?void 0:t.$oid}")`:(0,o.default)(t)||(0,s.default)(t)?JSON.stringify(t):t},e.safeJsonParse=function(t,e,n=!1){if((0,s.default)(t)||(0,o.default)(t))return t;try{return JSON.parse(t)}catch(r){return n&&console.error(`Error parsing JSON value "${t}"`,r),e}},e.isJsonLikeLongString=function(t){return(0,i.default)(t)&&t.length>100&&t.match(/^\s*\{.*\}\s*$|^\s*\[.*\]\s*$/)},e.getIconForRedisType=function(t){switch(t){case"dir":return"img folder";case"string":return"img type-string";case"hash":return"img type-hash";case"set":return"img type-set";case"list":return"img type-list";case"zset":return"img type-zset";case"stream":return"img type-stream";case"binary":return"img type-binary";case"ReJSON-RL":return"img type-rejson";default:return null}},e.isWktGeometry=function(t){return!!(0,i.default)(t)&&!!t.match(/^POINT\s*\(|^LINESTRING\s*\(|^POLYGON\s*\(|^MULTIPOINT\s*\(|^MULTILINESTRING\s*\(|^MULTIPOLYGON\s*\(|^GEOMCOLLECTION\s*\(|^GEOMETRYCOLLECTION\s*\(/)},e.arrayBufferToBase64=_,e.getAsImageSrc=function(t){return"Buffer"==(null==t?void 0:t.type)&&(0,s.default)(null==t?void 0:t.data)?`data:image/png;base64, ${_(null==t?void 0:t.data)}`:(0,i.default)(t)&&(t.startsWith("http://")||t.startsWith("https://"))?t:null},e.parseSqlDefaultValue=function(t){if(t&&(0,i.default)(t))return t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):isNaN(t)||isNaN(parseFloat(t))?void 0:parseFloat(t)}},7058:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.isCollectionInfo=e.isViewInfo=e.isTableInfo=e.isTableColumnUnique=e.extendDatabaseInfoFromApps=e.extendDatabaseInfo=e.extendTableInfo=e.addTableDependencies=void 0;const i=r(n(9607));function s(t){if(!t.tables)return t;const e=(0,i.default)(t.tables.map((t=>t.foreignKeys||[])));return Object.assign(Object.assign({},t),{tables:t.tables.map((t=>Object.assign(Object.assign({},t),{dependencies:e.filter((e=>e.refSchemaName==t.schemaName&&e.refTableName==t.pureName))})))})}function o(t){return Object.assign(Object.assign({},t),{objectTypeField:"tables",columns:(t.columns||[]).map((e=>Object.assign({pureName:t.pureName,schemaName:t.schemaName},e))),primaryKey:t.primaryKey?Object.assign(Object.assign({},t.primaryKey),{pureName:t.pureName,schemaName:t.schemaName,constraintType:"primaryKey"}):void 0,foreignKeys:(t.foreignKeys||[]).map((e=>Object.assign(Object.assign({},e),{pureName:t.pureName,schemaName:t.schemaName,constraintType:"foreignKey"}))),indexes:(t.indexes||[]).map((e=>Object.assign(Object.assign({},e),{pureName:t.pureName,schemaName:t.schemaName,constraintType:"index"}))),checks:(t.checks||[]).map((e=>Object.assign(Object.assign({},e),{pureName:t.pureName,schemaName:t.schemaName,constraintType:"check"}))),uniques:(t.uniques||[]).map((e=>Object.assign(Object.assign({},e),{pureName:t.pureName,schemaName:t.schemaName,constraintType:"unique"})))})}e.addTableDependencies=s,e.extendTableInfo=o,e.extendDatabaseInfo=function(t){return function(t){return Object.assign(Object.assign({},t),{tables:(t.tables||[]).map(o),collections:(t.collections||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"collections"}))),views:(t.views||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"views"}))),matviews:(t.matviews||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"matviews"}))),procedures:(t.procedures||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"procedures"}))),functions:(t.functions||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"functions"}))),triggers:(t.triggers||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"triggers"})))})}(s(t))},e.extendDatabaseInfoFromApps=function(t,e){return t&&e?s(Object.assign(Object.assign({},t),{tables:t.tables.map((t=>Object.assign(Object.assign({},t),{foreignKeys:[...t.foreignKeys||[],...(0,i.default)(e.map((t=>t.virtualReferences||[]))).filter((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName)).map((t=>Object.assign(Object.assign({},t),{constraintType:"foreignKey",isVirtual:!0})))]})))})):t},e.isTableColumnUnique=function(t,e){return!(!t.primaryKey||1!=t.primaryKey.columns.length||t.primaryKey.columns[0].columnName!=e)||!![...t.uniques||[],...(t.indexes||[]).filter((t=>t.isUnique))].find((t=>1==t.columns.length&&t.columns[0].columnName==e))},e.isTableInfo=function(t){return"tables"==t.objectTypeField},e.isViewInfo=function(t){return"views"==t.objectTypeField},e.isCollectionInfo=function(t){return"collections"==t.objectTypeField}},7265:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.transformRowUsingColumnMap=e.prepareTableForImport=void 0;const i=r(n(1454)),s=r(n(4584)),o=r(n(613));e.prepareTableForImport=function(t){const e=(0,i.default)(t);return e.foreignKeys=[],e.indexes=[],e.uniques=[],e.checks=[],e.primaryKey&&(e.primaryKey.constraintName=null),e},e.transformRowUsingColumnMap=function(t,e){return(0,s.default)(e.map((e=>[e.dst,(0,o.default)(t,e.src)])))}},3637:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.testPermission=e.compilePermissions=void 0;const i=r(n(4099)),s=r(n(7072)),o=r(n(7120)),a=r(n(9607));function u(t){return 0==t.length?null:new RegExp(t.map((t=>"^"+(0,i.default)(t).replace(/\\\*/g,".*")+"$")).join("|"))}e.compilePermissions=function(t){if(!t)return null;t=(0,s.default)(t)?t.split(/,|;|\||\s/):(0,a.default)(t.map((t=>t.split(/,|;|\||\s/)))),t=(0,o.default)(t.map((t=>t.trim())));let e=null,n=[];const r={levels:[]};for(const i of t){const t=i.startsWith("~")?"deny":"allow",s=i.startsWith("~")?i.substring(1):i;null!=e&&t!=e&&(r.levels.push({re:u(n),type:e}),n=[]),n.push(s),e=t}return n.length>0&&r.levels.push({re:u(n),type:e}),r},e.testPermission=function(t,e){let n=!0;if(!e)return!0;for(const r of e.levels)t.match(r.re)&&("allow"==r.type&&(n=!0),"deny"==r.type&&(n=!1));return n}},518:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.databaseInfoFromYamlModel=e.tableInfoFromYaml=e.tableInfoToYaml=void 0;const i=r(n(1454)),s=r(n(7120)),o=n(8098);function a(t,e){const n={pureName:t.name,columns:t.columns.map((e=>function(t,e){return{pureName:e.name,columnName:t.name,dataType:t.length?`${t.type}(${t.length})`:t.type,autoIncrement:t.autoIncrement,notNull:t.notNull||e.primaryKey&&e.primaryKey.includes(t.name),defaultValue:t.default}}(e,t))),foreignKeys:(0,s.default)(t.columns.filter((t=>t.references)).map((n=>function(t,e,n){const r=n.find((e=>e.name==t.references));return r&&r.primaryKey?{constraintType:"foreignKey",pureName:e.name,refTableName:t.references,columns:[{columnName:t.name,refColumnName:r.primaryKey[0]}]}:null}(n,t,e))))};return t.primaryKey&&(n.primaryKey={pureName:t.name,constraintType:"primaryKey",columns:t.primaryKey.map((t=>({columnName:t})))}),n.preloadedRows=t.data,n.preloadedRowsKey=t.insertKey,n.preloadedRowsInsertOnly=t.insertOnly,n}e.tableInfoToYaml=function(t){const e=(0,i.default)(t),n={name:e.pureName,columns:e.columns.map((t=>function(t,e){const n={name:t.columnName,type:t.dataType,default:t.defaultValue};t.autoIncrement&&(n.autoIncrement=!0),t.notNull&&(n.notNull=!0);const r=e.foreignKeys&&e.foreignKeys.find((e=>1==e.columns.length&&e.columns[0].columnName==t.columnName));return!r||r.deleteAction&&"NO ACTION"!=r.deleteAction||r.updateAction&&"NO ACTION"!=r.updateAction||(n.references=r.refTableName,r._dumped=!0),n}(t,e)))};return e.primaryKey&&!e.primaryKey._dumped&&(n.primaryKey=e.primaryKey.columns.map((t=>t.columnName))),n},e.tableInfoFromYaml=a,e.databaseInfoFromYamlModel=function(t){const e=o.DatabaseAnalyser.createEmptyStructure(),n=[];for(const r of t)(r.name.endsWith(".table.yaml")||r.name.endsWith(".sql"))&&(r.name.endsWith(".table.yaml")&&n.push(r.json),r.name.endsWith(".view.sql")&&e.views.push({pureName:r.name.slice(0,-9),createSql:r.text,columns:[]}),r.name.endsWith(".matview.sql")&&e.matviews.push({pureName:r.name.slice(0,-12),createSql:r.text,columns:[]}),r.name.endsWith(".proc.sql")&&e.procedures.push({pureName:r.name.slice(0,-9),createSql:r.text}),r.name.endsWith(".func.sql")&&e.functions.push({pureName:r.name.slice(0,-9),createSql:r.text}),r.name.endsWith(".trigger.sql")&&e.triggers.push({pureName:r.name.slice(0,-12),createSql:r.text}));return e.tables=n.map((t=>a(t,n))),e}},4688:(t,e,n)=>{n(3671);const r=n(5076),i=n(5926),{DatabaseAnalyser:s}=n(7096),{isTypeString:o,isTypeNumeric:a}=n(7096);function u({is_nullable:t,column_name:e,data_type:n,char_max_length:r,numeric_precision:i,numeric_ccale:s,default_value:u},_=void 0){const c="character varying"==(l=n)?"varchar":"timestamp without time zone"==l?"timestamp":l;var l;let h=c;r&&o(c)&&(h=`${c}(${r})`),i&&s&&a(c)&&(h=`${c}(${i},${s})`);const T=!(!u||!u.endsWith(".nextval"));return{columnName:e,dataType:h,notNull:"N"==t,defaultValue:T?void 0:u,autoIncrement:T}}t.exports=class extends s{constructor(t,e,n){super(t,e,n)}createQuery(t,e,n={}){return super.createQuery(i[t],e,n)}async _computeSingleObjectId(){const{typeField:t,pureName:e}=this.singleObjectFilter;this.singleObjectId=`${t}:${e}`}async _runAnalysis(){this.feedback({analysingMessage:"Loading tables"});const t=await this.analyserQuery("tableList",["tables"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading columns"});const e=await this.analyserQuery("columns",["tables","views"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading primary keys"});const n=await this.analyserQuery("primaryKeys",["tables"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading foreign keys"});const i=await this.analyserQuery("foreignKeys",["tables"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading views"});const o=await this.analyserQuery("views",["views"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading materialized views"});const a=this.driver.dialect.materializedViews?await this.analyserQuery("matviews",["matviews"],{$owner:this.pool._schema_name}):null;this.feedback({analysingMessage:"Loading routines"});const _=await this.analyserQuery("routines",["procedures","functions"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading indexes"});const c=await this.analyserQuery("indexes",["tables"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading unique names"});const l=await this.analyserQuery("uniqueNames",["tables"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Finalizing DB structure"});const h=i.rows.map((t=>({pureName:t.pure_name,constraintSchema:t.constraint_schema,constraintName:t.constraint_name,columnName:t.column_name,refColumnName:t.ref_column_name,updateAction:t.update_action,deleteAction:t.delete_action,refTableName:t.ref_table_name}))),T=n.rows.map((t=>({pureName:t.pure_name,constraintSchema:t.constraint_schema,constraintName:t.constraint_name,columnName:t.column_name}))),p=t=>`${t.schema_name}||${t.pure_name}`,f=r.groupBy(e.rows,p),E={tables:t.rows.map((t=>{const e={pureName:t.pure_name,objectId:`tables:${t.pure_name}`,contentHash:t.hash_code_columns?`${t.hash_code_columns}-${t.hash_code_constraints}`:null};return{...e,columns:(f[p(t)]||[]).map((t=>u(t,e))),primaryKey:s.extractPrimaryKeys(e,T),foreignKeys:s.extractForeignKeys(e,h),indexes:r.uniqBy(c.rows.filter((t=>t.tableName==e.pureName&&!l.rows.find((e=>e.constraintName==t.constraintName)))),"constraintName").map((t=>({...r.pick(t,["constraintName","indexType"]),isUnique:"UNIQUE"===t.Unique,columns:c.rows.filter((e=>e.tableName==t.tableName&&e.constraintName==t.constraintName)).map((t=>({...r.pick(t,["columnName"]),isDescending:"DESC"==t.descending})))}))),uniques:r.uniqBy(c.rows.filter((t=>t.tableName==e.pureName&&l.rows.find((e=>e.constraintName==t.constraintName)))),"constraintName").map((t=>({...r.pick(t,["constraintName"]),columns:c.rows.filter((e=>e.tableName==t.tableName&&e.constraintName==t.constraintName)).map((t=>({...r.pick(t,["columnName"])})))})))}})),views:o.rows.map((t=>({objectId:`views:${t.pure_name}`,pureName:t.pure_name,contentHash:t.hash_code,createSql:`CREATE VIEW "${t.pure_name}"\nAS\n${t.create_sql}`,columns:(f[p(t)]||[]).map((t=>u(t)))}))),matviews:a?a.rows.map((t=>({objectId:`matviews:${t.pure_name}`,pureName:t.pure_name,contentHash:t.hash_code,createSql:`CREATE MATERIALIZED VIEW "${t.pure_name}"\nAS\n${t.definition}`,columns:(f[p(view)]||[]).map((t=>u(t)))}))):void 0,procedures:_.rows.filter((t=>"PROCEDURE"==t.object_type)).map((t=>({objectId:`procedures:${t.pure_name}`,pureName:t.pure_name,createSql:`CREATE PROCEDURE "${t.pure_name}"() LANGUAGE ${t.language}\nAS\n$$\n${t.definition}\n$$`,contentHash:t.hash_code}))),functions:_.rows.filter((t=>"FUNCTION"==t.object_type)).map((t=>({objectId:`functions:${t.pure_name}`,createSql:`CREATE FUNCTION "${t.pure_name}"() RETURNS ${t.data_type} LANGUAGE ${t.language}\nAS\n$$\n${t.definition}\n$$`,pureName:t.pure_name,contentHash:t.hash_code})))};return this.feedback({analysingMessage:null}),E}}},4866:(t,e,n)=>{const{createBulkInsertStreamBase:r}=n(7096),i=n(5076);t.exports=function(t,e,n,s,o){const a=s.schemaName?`${t.dialect.quoteIdentifier(s.schemaName)}.${t.dialect.quoteIdentifier(s.pureName)}`:t.dialect.quoteIdentifier(s.pureName),u=r(t,e,n,s,{...o,commitAfterInsert:!0});return u.send=async()=>{const e=t.createDumper();e.putRaw(`INSERT INTO ${a} (`),e.putCollection(",",u.columnNames,(n=>e.putRaw(t.dialect.quoteIdentifier(n)))),e.putRaw(")\n VALUES (\n"),e.put("%,s",u.columnNames.map(((t,e)=>`:C${e}`))),e.putRaw(")");const r=u.buffer.map((t=>i.mapKeys(t,((t,e)=>`c${u.columnNames.indexOf(e)}`))));await n.executeMany(e.s,r,{autoCommit:!0}),u.buffer=[]},u}},5378:(t,e,n)=>{const r=n(5076),i=n(2203),s=n(4293),o=n(4688),a=n(2988),{createBulkInsertStreamBase:u,makeUniqueColumnNames:_}=n(7096),c=n(4866);function l(t){if(!t)return[];const e=t.map((t=>({columnName:t.name})));return _(e),e}function h(t,e){return r.zipObject(e.map((t=>t.columnName)),t)}const T=s.map((t=>({...t,analyserClass:o,connect:async({engine:t,server:e,port:n,user:r,password:i,database:s,databaseUrl:o,useDatabaseUrl:u,serviceName:_,ssl:c,isReadOnly:l,authType:h,socketPath:T})=>(client=await a.getConnection({user:r,password:i,connectString:u?o:n?`${e}:${n}/${_}`:e}),s&&await client.execute(`ALTER SESSION SET CURRENT_SCHEMA = ${s}`),client._schema_name=s,client),close:async t=>t.end(),async query(t,e){if("COMMIT;"==e.trim()&&(e="COMMIT"),null==e)return{rows:[],columns:[]};try{const n=await t.execute(e),r=l(n.metaData);return{rows:(n.rows||[]).map((t=>h(t,r))),columns:r}}catch(t){console.log("Error query",t,e)}},stream(t,e,n){if(e.trim().toLowerCase().startsWith("select")){const i=t.queryStream(e);let s=!1;i.on("metadata",(t=>{s||(columns=l(t),columns&&columns.length>0&&n.recordset(columns),s=!0)})),i.on("data",(t=>{s||(columns=l(t),columns&&columns.length>0&&n.recordset(columns),s=!0),n.row(h(t,columns))})),i.on("end",(()=>{const{command:t,rowCount:e}=i._result||{};"SELECT"!=t&&r.isNumber(e)&&n.info({message:`${e} rows affected`,time:new Date,severity:"info"}),s||(columns=l(i._result),columns&&columns.length>0&&n.recordset(columns),s=!0),n.done()})),i.on("error",(t=>{console.log("ERROR",t);const{message:e,lineNumber:r,procName:i}=t;n.info({message:e,line:r,procedure:i,time:new Date,severity:"error"}),n.done()})),i.on("close",(function(){}))}else t.execute(e,((t,r)=>{if(t)console.log("Error query",t,e),n.info({message:t.message,time:new Date,severity:"error"});else{const{rowsAffected:t,metaData:e,rows:i}=r||{};if(i&&e){const t=l(e);n.recordset(t);for(const e of i)n.row(h(e,t))}else t&&n.info({message:`${t} rows affected`,time:new Date,severity:"info"})}n.done()}))},async getVersionCore(t){try{const{rows:e}=await this.query(t,"SELECT product || ' ' || version_full as \"version\" FROM product_component_version WHERE product LIKE 'Oracle%Database%'");return e[0].version.replace(" "," ")}catch(e){const{rows:n}=await this.query(t,'SELECT banner as "version" FROM v$version');return n[0].version}},async getVersion(t){try{const e=await this.getVersionCore(t),n=e.match(/(\d+[a-z])\s+(\w+).*(\d+)\.(\d+)/);let r=null,i=null,s=null;return n&&(r=`Oracle ${n[1]} ${n[2]}`,n[3]&&(i=parseInt(n[3])),n[4]&&(s=parseInt(n[4]))),{version:e,versionText:r,versionMajor:i,versionMinor:s}}catch(t){return{version:"???",versionText:"Oracle ???",versionMajor:null,versionMinor:null}}},async readQuery(t,e,n){const r=await t.queryStream(e);let s=!1,o=null;const a=new i.PassThrough({objectMode:!0,highWaterMark:100});return r.on("metadata",(t=>{s||(o=l(t),o&&o.length>0&&a.write({__isStreamHeader:!0,...n||{columns:o}}),s=!0),a.write(h(t,o))})),r.on("data",(t=>{a.write(h(t,o))})),r.on("end",(()=>{a.end()})),r.on("error",(t=>{console.error(t),a.end()})),a},async writeTable(t,e,n){return c(this,i,t,e,n)},async listDatabases(t){const{rows:e}=await this.query(t,'SELECT username as "name" from all_users order by username');return e},getAuthTypes:()=>[{title:"Host and port",name:"hostPort"},{title:"Socket",name:"socket"}]})));t.exports=T},5237:(t,e,n)=>{const r=n(5378);t.exports={packageName:"dbgate-plugin-oracle",drivers:r}},6925:t=>{t.exports='\nselect\n -- owner as "schema_name",\n table_name as "pure_name",\n column_name as "column_name",\n nullable as "is_nullable",\n data_type as "data_type",\n data_length as "char_max_length",\n data_precision as "numeric_precision",\n data_scale as "numeric_scale",\n data_default as "default_value"\n FROM all_tab_columns av\n where OWNER=\'$owner\' AND \'tables:\' || TABLE_NAME =OBJECT_ID_CONDITION\norder by column_id\n'},4958:t=>{t.exports='\nselect fk.constraint_name as "constraint_name",\n -- fk.owner as "constraint_schema",\n fk.table_name as "pure_name",\n -- fk.owner as "schema_name",\n fk.delete_rule as "update_action",\n fk.delete_rule as "delete_action",\n ref.table_name as "ref_table_name",\n -- ref.owner as "ref_schema_name",\n basecol.column_name as "column_name",\n refcol.column_name as "ref_column_name"\nfrom all_cons_columns refcol, all_cons_columns basecol, all_constraints ref, all_constraints fk\nwhere fk.OWNER = \'$owner\' AND fk.constraint_type = \'R\'\nand ref.owner = fk.r_owner\nand ref.constraint_name = fk.r_constraint_name\nand basecol.owner = fk.owner\nand basecol.constraint_name = fk.constraint_name\nand basecol.table_name = fk.table_name\nand refcol.owner = ref.owner\nand refcol.constraint_name = ref.constraint_name\nand refcol.table_name = ref.table_name\nAND \'tables:\' || fk.table_name =OBJECT_ID_CONDITION\norder by basecol.position\n'},5926:(t,e,n)=>{const r=n(6925),i=n(382),s=n(2916),o=n(4958),a=n(6864),u=n(7124),_=n(5701),c=n(4474),l=n(9171);t.exports={columns:r,tableList:i,primaryKeys:s,foreignKeys:o,views:a,routines:_,matviews:u,indexes:c,uniqueNames:l}},4474:t=>{t.exports='\nselect i.table_name as "tableName",\n -- i.table_owner as "schemaName",\n i.index_name as "constraintName",\n i.index_type as "indexType",\n i.uniqueness as "Unique",\n ic.column_name as "columnName",\n ic.descend as "descending"\nfrom all_ind_columns ic, all_indexes i\nwhere INDEX_OWNER = \'$owner\' AND ic.index_owner = i.owner\nand ic.index_name = i.index_name\nand \'tables:\' || i.table_name =OBJECT_ID_CONDITION\norder by i.table_owner,\n i.table_name,\n i.index_name,\n ic.column_position\n'},7124:t=>{t.exports="\nSELECT -- owner as schema_name,\n mview_name pure_name,\n container_name,\n '' || trim(\n extractvalue(\n dbms_xmlgen.getxmltype('SELECT query\n FROM all_mviews\n WHERE mview_name=''' ||\n MVIEW_NAME || ''' AND\n owner = ''' ||\n owner || ''''\n ),\n '//text()'\n )) definition\nFROM all_mviews\nwhere OWNER = '$owner' AND 'matviews:' || mview_name=OBJECT_ID_CONDITION\norder by owner, mview_name\n"},2916:t=>{t.exports='\nselect\n -- pk.owner as "constraint_schema",\n pk.constraint_name as "constraint_name",\n -- pk.owner as "schema_name",\n pk.table_name as "pure_name",\n basecol.column_name as "column_name"\nfrom all_cons_columns basecol,\n all_constraints pk\nwhere constraint_type = \'P\'\nand basecol.owner = pk.owner\nand basecol.constraint_name = pk.constraint_name\nand basecol.table_name = pk.table_name\nand \'tables:\' || basecol.table_name =OBJECT_ID_CONDITION\nand pk.owner = \'$owner\'\norder by basecol.position\n'},5701:t=>{t.exports="\nselect\n routine_name as \"pure_name\",\n -- routine_schema as \"schema_name\",\n routine_definition as \"definition\",\n standard_hash(routine_definition, 'MD5') as \"hash_code\",\n routine_type as \"object_type\",\n 'fixme_data_type' as \"data_type\",\n 'fixme_external_language' as \"language\"\nfrom (select\n sys_context('userenv', 'DB_NAME') routine_catalog,\n sys_context('userenv', 'DB_NAME') specific_catalog,\n ap.owner specific_schema,\n ap.owner routine_schema,\n decode( ap.procedure_name, null, ap.object_name || ap.procedure_name, ap.procedure_name ) specific_name,\n decode( ap.procedure_name, null, ap.object_name || ap.procedure_name, ap.procedure_name ) routine_name,\n ao.object_type routine_type,\n decode(impltypeowner, null, to_char(null), SYS_CONTEXT('userenv', 'DB_NAME')) type_udt_catalog,\n --to_clob(get_proc_text(ap.owner, ap.object_name, ao.object_type, 32767)) routine_body,\n 'fixme_routine_body.' || ap.owner || '.' || decode( ap.procedure_name, null, ap.object_name || ap.procedure_name, ap.procedure_name ) routine_body,\n --to_clob(get_proc_text(ap.owner, ap.object_name, ao.object_type, 4000)) routine_definition,\n 'fixme_routine_definition.' || ap.owner || '.' || decode( ap.procedure_name, null, ap.object_name || ap.procedure_name, ap.procedure_name ) routine_definition,\n sys_context('userenv', 'DB_NAME') character_set_catalog,\n 'SYS' character_set_schema,\n sys_context('userenv', 'DB_NAME') collation_catalog,\n 'SYS' collation_schema,\n deterministic is_deterministic,\n pipelined is_pipelined ,\n aggregate is_aggregate,\n authid is_definer\n from\n all_procedures ap,\n all_objects ao\n where\n ap.owner = '$owner' and\n ap.owner = ao.owner and\n ap.object_name = ao.object_name and\n ao.object_type in ('PACKAGE', 'PROCEDURE', 'FUNCTION')\n and ao.object_name =OBJECT_ID_CONDITION\n ) routines\n"},382:t=>{t.exports="\nselect\n -- owner \"schema_name\",\n table_name \"pure_name\"\n from\n all_tables\n where OWNER='$owner' AND 'tables:' || TABLE_NAME =OBJECT_ID_CONDITION\n"},9171:t=>{t.exports="\nselect constraint_name as \"constraintName\"\nfrom all_constraints\nwhere owner='$owner' and constraint_type = 'U'\n and 'tables:' || table_name =OBJECT_ID_CONDITION\n"},6864:t=>{t.exports='\nselect avv.*,\n ora_hash("create_sql") as "hash_code"\nfrom (select\n view_name as "pure_name",\n -- owner as "schema_name",\n SUBSTR(text_vc, 1, 3900) AS "create_sql"\n from all_views av\n where owner = \'$owner\' and text_vc is not null\n ) avv\n where \'views:\' || "pure_name" =OBJECT_ID_CONDITION\n'},6197:t=>{const{SqlDumper:e,arrayToHexString:n,testEqualTypes:r}=global.DBGATE_TOOLS;t.exports=class extends e{createDatabase(t){this.putCmd(`CREATE USER c##${t}\n IDENTIFIED BY ${t}\n DEFAULT TABLESPACE users\n TEMPORARY TABLESPACE temp\n QUOTA 10M ON users;`,t)}beginTransaction(){}columnDefinition(t,e){if(t.autoIncrement)return super.columnType(t.dataType),void this.put(" ^generated ^by ^default ^on ^null ^as ^identity");super.columnDefinition(t,e)}}},4293:(t,e,n)=>{const{driverBase:r}=global.DBGATE_TOOLS,i=n(6197),{oracleSplitterOptions:s}=n(5994),o=["GEOGRAPHY"],a={rangeSelect:!0,limitSelect:!1,offsetFetchRangeSyntax:!0,ilike:!0,stringEscapeChar:"'",fallbackDataType:"varchar",anonymousPrimaryKey:!0,enableConstraintsPerTable:!0,dropColumnDependencies:["dependencies"],quoteIdentifier:t=>'"'+t+'"',createColumn:!0,dropColumn:!0,changeColumn:!0,createIndex:!0,dropIndex:!0,createForeignKey:!0,dropForeignKey:!0,createPrimaryKey:!0,dropPrimaryKey:!0,createUnique:!0,dropUnique:!0,createCheck:!0,dropCheck:!0,dropReferencesWhenDropTable:!0,predefinedDataTypes:["VARCHAR2","NUMBER","DATE","CLOB","BLOB","INTEGER","BFILE","BINARY_DOUBLE","BINARY_FLOAT","CHAR","FLOAT","INTERVAL DAY","INTERVAL YEAR","LONG","LONG RAW","NCHAR","NCLOB","NVARCHAR2","RAW","ROWID","TIMESTAMP","UROWID"],createColumnViewExpression(t,e,n,r){if(e&&o.includes(e.toUpperCase()))return{exprType:"call",func:"ST_AsText",alias:r||t,args:[{exprType:"column",columnName:t,source:n}]}}},u={...{...r,dumperClass:i,dialect:a,getQuerySplitterOptions:()=>s,readOnlySessions:!0,databaseUrlPlaceholder:"e.g. localhost:1521/orcl",showConnectionField:(t,e)=>"useDatabaseUrl"==t||(e.useDatabaseUrl?["databaseUrl","user","password"].includes(t):["user","password","server","port","serviceName"].includes(t)),getNewObjectTemplates:()=>[{label:"New view",sql:"CREATE VIEW myview\nAS\nSELECT * FROM table1"},{label:"New materialized view",sql:"CREATE MATERIALIZED VIEW myview\nAS\nSELECT * FROM table1"},{label:"New procedure",sql:"CREATE PROCEDURE myproc (arg1 INT)\nLANGUAGE SQL\nAS $$\n SELECT * FROM table1;\n$$"},{label:"New function (plpgsql)",sql:"CREATE FUNCTION myfunc (arg1 INT)\nRETURNS INT\nAS $$\nBEGIN\n RETURN 1;\nEND\n$$ LANGUAGE plpgsql;"}]},engine:"oracle@dbgate-plugin-oracle",title:"OracleDB",defaultPort:1521,dialect:{...a,materializedViews:!0},dialectByVersion:t=>t?{...a,materializedViews:t&&null!=t.versionMajor&&null!=t.versionMinor&&(t.versionMajor>9||9==t.versionMajor||t.versionMinor>=3)}:a,showConnectionTab:t=>"sshTunnel"==t};t.exports=[u]},2562:t=>{"use strict";t.exports=require("buffer")},6982:t=>{"use strict";t.exports=require("crypto")},2250:t=>{"use strict";t.exports=require("dns")},4434:t=>{"use strict";t.exports=require("events")},9896:t=>{"use strict";t.exports=require("fs")},8611:t=>{"use strict";t.exports=require("http")},9278:t=>{"use strict";t.exports=require("net")},857:t=>{"use strict";t.exports=require("os")},6928:t=>{"use strict";t.exports=require("path")},932:t=>{"use strict";t.exports=require("process")},3785:t=>{"use strict";t.exports=require("readline")},2203:t=>{"use strict";t.exports=require("stream")},3557:t=>{"use strict";t.exports=require("timers")},4756:t=>{"use strict";t.exports=require("tls")},9023:t=>{"use strict";t.exports=require("util")},15:t=>{"use strict";t.exports=JSON.parse('{"name":"oracledb","version":"6.5.1","description":"A Node.js module for Oracle Database access from JavaScript and TypeScript","license":"(Apache-2.0 OR UPL-1.0)","homepage":"http://oracle.github.io/node-oracledb/","keywords":["Oracle","Database","official","DB","SQL","JSON","PL/SQL","SODA","OCI","API","client","library","driver","add-on","extension","binding","interface","adapter","module"],"repository":{"type":"git","url":"git://github.com/oracle/node-oracledb.git"},"scripts":{"install":"node package/install.js","prune":"node package/prunebinaries.js"},"engines":{"node":">=14.6"},"maintainers":[{"name":"Oracle Corp."}],"bugs":{"url":"https://github.com/oracle/node-oracledb/issues"},"main":"./index.js"}')}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r=n(5237);module.exports=r})();
|
|
2
|
+
(()=>{var t={4792:(t,e,n)=>{"use strict";var r=n(5894),i=n(4020),s=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&s(t,".prototype.")>-1?i(n):n}},4020:(t,e,n)=>{"use strict";var r=n(2460),i=n(5894),s=n(1778),o=n(4002),a=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),_=i("%Reflect.apply%",!0)||r.call(u,a),c=n(7526),l=i("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new o("a function is required");var e=_(r,u,arguments);return s(e,1+l(0,t.length-(arguments.length-1)),!0)};var h=function(){return _(r,a,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},3716:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.splitQuery=void 0;var s=n(6814);Object.defineProperty(e,"splitQuery",{enumerable:!0,get:function(){return s.splitQuery}}),i(n(5994),e)},5994:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.oracleSplitterOptions=e.redisSplitterOptions=e.noSplitSplitterOptions=e.mongoSplitterOptions=e.sqliteSplitterOptions=e.postgreSplitterOptions=e.mssqlSplitterOptions=e.mysqlSplitterOptions=e.defaultSplitterOptions=void 0,e.defaultSplitterOptions={stringsBegins:["'"],stringsEnds:{"'":"'"},stringEscapes:{"'":"'"},allowSemicolon:!0,allowCustomDelimiter:!1,allowCustomSqlTerminator:!1,allowGoDelimiter:!1,allowSlashDelimiter:!1,allowDollarDollarString:!1,noSplit:!1,doubleDashComments:!0,multilineComments:!0,javaScriptComments:!1,returnRichInfo:!1,splitByLines:!1,preventSingleLineSplit:!1,adaptiveGoSplit:!1,ignoreComments:!1},e.mysqlSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{allowCustomDelimiter:!0,stringsBegins:["'","`"],stringsEnds:{"'":"'","`":"`"},stringEscapes:{"'":"\\","`":"`"}}),e.mssqlSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{allowSemicolon:!1,allowGoDelimiter:!0,stringsBegins:["'","["],stringsEnds:{"'":"'","[":"]"},stringEscapes:{"'":"'"}}),e.postgreSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{allowDollarDollarString:!0,stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"'",'"':'"'}}),e.sqliteSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"'",'"':'"'}}),e.mongoSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"\\",'"':"\\"}}),e.noSplitSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{noSplit:!0}),e.redisSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{splitByLines:!0}),e.oracleSplitterOptions=Object.assign(Object.assign({},e.defaultSplitterOptions),{allowCustomSqlTerminator:!0,allowSlashDelimiter:!0,stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"'",'"':'"'}})},6814:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitQuery=e.finishSplitStream=e.getInitialDelimiter=e.splitQueryLine=void 0;const r=n(5994),i=";";function s(t,e,n){let{source:r,position:i,line:s,column:o,streamPosition:a}=t;for(;e>0;)"\n"==r[i]?(s+=1,o=0):o+=1,i+=1,a+=1,e-=1;t.position=i,t.streamPosition=a,t.line=s,t.column=o,t.wasDataInCommand||(n?(t.trimCommandStartPosition=a,t.trimCommandStartLine=s,t.trimCommandStartColumn=o):t.wasDataInCommand=!0),n||(t.noWhitePosition=a,t.noWhiteLine=s,t.noWhiteColumn=o)}function o(t,e,n,r){return r?n==r?t[e]==n&&t[e+1]!=n:t[e]==n&&t[e-1]!=r:t[e]==n}const a={type:"whitespace",length:1},u={type:"eoln",length:1},_={type:"data",length:1};function c(t){let e=t.position;const n=t.source,r=n[e];if(t.options.stringsBegins.includes(r)){e++;const i=t.options.stringsEnds[r],s=t.options.stringEscapes[r];for(;e<t.end&&!o(n,e,i,s);)i==s&&n[e]==i&&n[e+1]==i?e+=2:e++;return{type:"string",length:e-t.position+1}}if(t.currentDelimiter&&n.slice(e).startsWith(t.currentDelimiter))return{type:"delimiter",length:t.currentDelimiter.length};if(" "==r||"\t"==r||"\r"==r)return a;if("\n"==r)return u;if(t.options.doubleDashComments&&"-"==r&&"-"==n[e+1]){for(;e<t.end&&"\n"!=n[e];)e++;return{type:"comment",length:e-t.position}}if(t.options.multilineComments&&"/"==r&&"*"==n[e+1]){for(e+=2;e<t.end&&("*"!=n[e]||"/"!=n[e+1]);)e++;return{type:"comment",length:e-t.position+2}}if(t.options.allowCustomDelimiter&&!t.wasDataOnLine){const t=n.slice(e).match(/^DELIMITER[ \t]+([^\n]+)/i);if(t)return{type:"set_delimiter",value:t[1].trim(),length:t[0].length}}if(t.options.allowCustomSqlTerminator){const t=n.slice(e).match(/^SET[ \t]+SQLT(ERMINATOR)?[ \t]+(ON|OFF|".")/i);if(t){if("OFF"==t[2].toUpperCase())return{type:"set_sqlterminator",value:null,length:t[0].length};if("ON"==t[2].toUpperCase())return{type:"set_sqlterminator",value:i,length:t[0].length};if(t[2].startsWith('"'))return{type:"set_sqlterminator",value:t[2].slice(1,-1),length:t[0].length}}}if((t.options.allowGoDelimiter||t.options.adaptiveGoSplit)&&!t.wasDataOnLine){const t=n.slice(e).match(/^GO[\t\r ]*(\n|$)/i);if(t)return{type:"go_delimiter",length:t[0].endsWith("\n")?t[0].length-1:t[0].length}}if(t.options.allowSlashDelimiter&&!t.wasDataOnLine){const t=n.slice(e).match(/^\/[\t\r ]*(\n|$)/i);if(t)return{type:"slash_delimiter",length:t[0].endsWith("\n")?t[0].length-1:t[0].length}}if(t.options.adaptiveGoSplit){const t=n.slice(e).match(/^(CREATE|ALTER)\s*(PROCEDURE|FUNCTION|TRIGGER)/i);if(t)return{type:"create_routine",length:t[0].length}}const s=function(t){if(!t.options.allowDollarDollarString)return null;let e=t.position;const n=t.source,r=/^(\$[a-zA-Z0-9_]*\$)/.exec(n.slice(e));if(!r)return null;const i=r[1];for(e+=i.length;e<t.end;){if(n.slice(e).startsWith(i))return{type:"string",length:e+i.length-t.position};e++}return null}(t);return s||_}function l(t,e){var n;const r={options:t.options,source:t.source,position:t.position,currentDelimiter:t.currentDelimiter,end:t.end,wasDataOnLine:t.wasDataOnLine};for(r.position+=e.length;r.position<r.end;){const t=c(r);if(t)switch(t.type){case"whitespace":r.position+=t.length;continue;case"eoln":return!1;case"comment":if(null===(n=t.value)||void 0===n?void 0:n.includes("\n"))return!0;r.position+=t.length;continue;default:return!0}else r.position+=1}}function h(t){t.commandPart+=t.source.slice(t.currentCommandStart,t.position),T(t)}function T(t){const e=t.commandPart.substring(t.trimCommandStartPosition-t.commandStartPosition,t.noWhitePosition-t.commandStartPosition);e.trim()&&(t.options.returnRichInfo?t.pushOutput({text:e,start:{position:t.commandStartPosition,line:t.commandStartLine,column:t.commandStartColumn},end:{position:t.streamPosition,line:t.line,column:t.column},trimStart:{position:t.trimCommandStartPosition,line:t.trimCommandStartLine,column:t.trimCommandStartColumn},trimEnd:{position:t.noWhitePosition,line:t.noWhiteLine,column:t.noWhiteColumn}}):t.pushOutput(e))}function p(t){t.commandStartPosition=t.streamPosition,t.commandStartLine=t.line,t.commandStartColumn=t.column,t.trimCommandStartPosition=t.streamPosition,t.trimCommandStartLine=t.line,t.trimCommandStartColumn=t.column,t.wasDataInCommand=!1}function f(t){if(t.options.splitByLines)!function(t){for(;t.position<t.end;)"\n"==t.source[t.position]?(h(t),t.commandPart="",s(t,1,!0),t.currentCommandStart=t.position,p(t)):s(t,1,/\s/.test(t.source[t.position]));t.end>t.currentCommandStart&&(t.commandPart+=t.source.slice(t.currentCommandStart,t.position))}(t);else{for(;t.position<t.end;){const e=c(t);if(e)switch(e.type){case"string":case"data":s(t,e.length,!1),t.wasDataOnLine=!0;break;case"comment":s(t,e.length,!!t.options.ignoreComments),t.wasDataOnLine=!0;break;case"eoln":s(t,e.length,!0),t.wasDataOnLine=!1;break;case"whitespace":s(t,e.length,!0);break;case"set_delimiter":case"set_sqlterminator":h(t),t.commandPart="",t.currentDelimiter=e.value,s(t,e.length,!1),t.currentCommandStart=t.position,p(t);break;case"go_delimiter":h(t),t.commandPart="",s(t,e.length,!1),t.currentCommandStart=t.position,p(t),t.options.adaptiveGoSplit&&(t.currentDelimiter=i);break;case"slash_delimiter":h(t),t.commandPart="",s(t,e.length,!1),t.currentCommandStart=t.position,p(t);break;case"create_routine":s(t,e.length,!1),t.options.adaptiveGoSplit&&(t.currentDelimiter=null);break;case"delimiter":if(t.options.preventSingleLineSplit&&l(t,e)){s(t,e.length,!1),t.wasDataOnLine=!0;break}h(t),t.commandPart="",s(t,e.length,!1),t.currentCommandStart=t.position,p(t)}else s(t,1,!1)}t.end>t.currentCommandStart&&(t.commandPart+=t.source.slice(t.currentCommandStart,t.position))}}function E(t){return(null==t?void 0:t.adaptiveGoSplit)?i:!1===(null==t?void 0:t.allowSemicolon)?null:i}function d(t){T(t)}e.splitQueryLine=f,e.getInitialDelimiter=E,e.finishSplitStream=d,e.splitQuery=function(t,e=null){var n;const i=Object.assign(Object.assign({},r.defaultSplitterOptions),e);if(i.noSplit){if(i.returnRichInfo){const e=t.split("\n");return[{text:t,start:{position:0,line:0,column:0},end:{position:t.length,line:e.length,column:(null===(n=e[e.length-1])||void 0===n?void 0:n.length)||0}}]}return[t]}const s=[],o={source:t,end:t.length,currentDelimiter:E(e),position:0,column:0,line:0,currentCommandStart:0,commandStartLine:0,commandStartColumn:0,commandStartPosition:0,streamPosition:0,noWhiteLine:0,noWhiteColumn:0,noWhitePosition:0,trimCommandStartPosition:0,trimCommandStartLine:0,trimCommandStartColumn:0,wasDataInCommand:!1,pushOutput:t=>s.push(t),wasDataOnLine:!1,options:i,commandPart:""};return f(o),d(o),s}},4356:(t,e,n)=>{"use strict";var r=n(7526),i=n(2873),s=n(4002),o=n(3906);t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,_=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],l=!!o&&o(t,e);if(r)r(t,e,{configurable:null===_&&l?l.configurable:!_,enumerable:null===a&&l?l.enumerable:!a,value:n,writable:null===u&&l?l.writable:!u});else{if(!c&&(a||u||_))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},7526:(t,e,n)=>{"use strict";var r=n(5894)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(t){r=!1}t.exports=r},8096:t=>{"use strict";t.exports=EvalError},5671:t=>{"use strict";t.exports=Error},7049:t=>{"use strict";t.exports=RangeError},1977:t=>{"use strict";t.exports=ReferenceError},2873:t=>{"use strict";t.exports=SyntaxError},4002:t=>{"use strict";t.exports=TypeError},1621:t=>{"use strict";t.exports=URIError},1552:t=>{"use strict";var e=Object.prototype.toString,n=Math.max,r=function(t,e){for(var n=[],r=0;r<t.length;r+=1)n[r]=t[r];for(var i=0;i<e.length;i+=1)n[i+t.length]=e[i];return n};t.exports=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var s,o=function(t,e){for(var n=[],r=1,i=0;r<t.length;r+=1,i+=1)n[i]=t[r];return n}(arguments),a=n(0,i.length-o.length),u=[],_=0;_<a;_++)u[_]="$"+_;if(s=Function("binder","return function ("+function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=",");return n}(u)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var e=i.apply(this,r(o,arguments));return Object(e)===e?e:this}return i.apply(t,r(o,arguments))})),i.prototype){var c=function(){};c.prototype=i.prototype,s.prototype=new c,c.prototype=null}return s}},2460:(t,e,n)=>{"use strict";var r=n(1552);t.exports=Function.prototype.bind||r},5894:(t,e,n)=>{"use strict";var r,i=n(5671),s=n(8096),o=n(7049),a=n(1977),u=n(2873),_=n(4002),c=n(1621),l=Function,h=function(t){try{return l('"use strict"; return ('+t+").constructor;")()}catch(t){}},T=Object.getOwnPropertyDescriptor;if(T)try{T({},"")}catch(t){T=null}var p=function(){throw new _},f=T?function(){try{return p}catch(t){try{return T(arguments,"callee").get}catch(t){return p}}}():p,E=n(2040)(),d=n(8675)(),N=Object.getPrototypeOf||(d?function(t){return t.__proto__}:null),S={},m="undefined"!=typeof Uint8Array&&N?N(Uint8Array):r,A={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":E&&N?N([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":S,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&N?N(N([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E&&N?N((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":o,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E&&N?N((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&N?N(""[Symbol.iterator]()):r,"%Symbol%":E?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":f,"%TypedArray%":m,"%TypeError%":_,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(N)try{null.error}catch(t){var P=N(N(t));A["%Error.prototype%"]=P}var g=function t(e){var n;if("%AsyncFunction%"===e)n=h("async function () {}");else if("%GeneratorFunction%"===e)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=h("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&N&&(n=N(i.prototype))}return A[e]=n,n},y={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=n(2460),I=n(2204),D=R.call(Function.call,Array.prototype.concat),O=R.call(Function.apply,Array.prototype.splice),C=R.call(Function.call,String.prototype.replace),b=R.call(Function.call,String.prototype.slice),v=R.call(Function.call,RegExp.prototype.exec),w=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L=/\\(\\)?/g,B=function(t,e){var n,r=t;if(I(y,r)&&(r="%"+(n=y[r])[0]+"%"),I(A,r)){var i=A[r];if(i===S&&(i=g(r)),void 0===i&&!e)throw new _("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new u("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new _("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new _('"allowMissing" argument must be a boolean');if(null===v(/^%?[^%]*%?$/,t))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=b(t,0,1),n=b(t,-1);if("%"===e&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new u("invalid intrinsic syntax, expected opening `%`");var r=[];return C(t,w,(function(t,e,n,i){r[r.length]=n?C(i,L,"$1"):e||t})),r}(t),r=n.length>0?n[0]:"",i=B("%"+r+"%",e),s=i.name,o=i.value,a=!1,c=i.alias;c&&(r=c[0],O(n,D([0,1],c)));for(var l=1,h=!0;l<n.length;l+=1){var p=n[l],f=b(p,0,1),E=b(p,-1);if(('"'===f||"'"===f||"`"===f||'"'===E||"'"===E||"`"===E)&&f!==E)throw new u("property names with quotes must have matching quotes");if("constructor"!==p&&h||(a=!0),I(A,s="%"+(r+="."+p)+"%"))o=A[s];else if(null!=o){if(!(p in o)){if(!e)throw new _("base intrinsic for "+t+" exists, but the property is not available.");return}if(T&&l+1>=n.length){var d=T(o,p);o=(h=!!d)&&"get"in d&&!("originalValue"in d.get)?d.get:o[p]}else h=I(o,p),o=o[p];h&&!a&&(A[s]=o)}}return o}},3906:(t,e,n)=>{"use strict";var r=n(5894)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(t){r=null}t.exports=r},7553:(t,e,n)=>{"use strict";var r=n(7526),i=function(){return!!r};i.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},8675:t=>{"use strict";var e={__proto__:null,foo:{}},n=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof n)}},2040:(t,e,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(3674);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},3674:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},2204:(t,e,n)=>{"use strict";var r=Function.prototype.call,i=Object.prototype.hasOwnProperty,s=n(2460);t.exports=s.call(r,i)},4558:(t,e,n)=>{"use strict";var r=("undefined"!=typeof JSON?JSON:n(2496)).stringify,i=n(7155),s=n(698),o=n(4020),a=n(4792),u=a("Array.prototype.join"),_=a("Array.prototype.push"),c=function(t,e){for(var n="",r=0;r<t;r+=1)n+=e;return n},l=function(t,e,n){return n};t.exports=function(t){var e=arguments.length>1?arguments[1]:void 0,n=e&&e.space||"";"number"==typeof n&&(n=c(n," "));var a=!!e&&"boolean"==typeof e.cycles&&e.cycles,h=e&&e.replacer?o(e.replacer):l,T="function"==typeof e?e:e&&e.cmp,p=T&&function(t){var e=T.length>2&&function(e){return t[e]};return function(n,r){return T({key:n,value:t[n]},{key:r,value:t[r]},e?{__proto__:null,get:e}:void 0)}},f=[];return function t(e,o,l,T){var E=n?"\n"+c(T,n):"",d=n?": ":":";if(l&&l.toJSON&&"function"==typeof l.toJSON&&(l=l.toJSON()),void 0!==(l=h(e,o,l))){if("object"!=typeof l||null===l)return r(l);if(i(l)){for(var N=[],S=0;S<l.length;S++){var m=t(l,S,l[S],T+1)||r(null);_(N,E+n+m)}return"["+u(N,",")+E+"]"}if(-1!==f.indexOf(l)){if(a)return r("__cycle__");throw new TypeError("Converting circular structure to JSON")}_(f,l);var A=s(l).sort(p&&p(l));for(N=[],S=0;S<A.length;S++){var P=t(l,o=A[S],l[o],T+1);if(P){var g=r(o)+d+P;_(N,E+n+g)}}return f.splice(f.indexOf(l),1),"{"+u(N,",")+E+"}"}}({"":t},"",t,0)}},7155:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},2496:(t,e,n)=>{"use strict";e.parse=n(7663),e.stringify=n(3937)},7663:t=>{"use strict";var e,n,r,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function s(t){throw{name:"SyntaxError",message:t,at:e,text:r}}function o(t){return t&&t!==n&&s("Expected '"+t+"' instead of '"+n+"'"),n=r.charAt(e),e+=1,n}function a(){var t,e="";for("-"===n&&(e="-",o("-"));n>="0"&&n<="9";)e+=n,o();if("."===n)for(e+=".";o()&&n>="0"&&n<="9";)e+=n;if("e"===n||"E"===n)for(e+=n,o(),"-"!==n&&"+"!==n||(e+=n,o());n>="0"&&n<="9";)e+=n,o();return t=Number(e),isFinite(t)||s("Bad number"),t}function u(){var t,e,r,a="";if('"'===n)for(;o();){if('"'===n)return o(),a;if("\\"===n)if(o(),"u"===n){for(r=0,e=0;e<4&&(t=parseInt(o(),16),isFinite(t));e+=1)r=16*r+t;a+=String.fromCharCode(r)}else{if("string"!=typeof i[n])break;a+=i[n]}else a+=n}s("Bad string")}function _(){for(;n&&n<=" ";)o()}function c(){switch(_(),n){case"{":return function(){var t,e={};if("{"===n){if(o("{"),_(),"}"===n)return o("}"),e;for(;n;){if(t=u(),_(),o(":"),Object.prototype.hasOwnProperty.call(e,t)&&s('Duplicate key "'+t+'"'),e[t]=c(),_(),"}"===n)return o("}"),e;o(","),_()}}s("Bad object")}();case"[":return function(){var t=[];if("["===n){if(o("["),_(),"]"===n)return o("]"),t;for(;n;){if(t.push(c()),_(),"]"===n)return o("]"),t;o(","),_()}}s("Bad array")}();case'"':return u();case"-":return a();default:return n>="0"&&n<="9"?a():function(){switch(n){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null;default:s("Unexpected '"+n+"'")}}()}}t.exports=function(t,i){var o;return r=t,e=0,n=" ",o=c(),_(),n&&s("Syntax error"),"function"==typeof i?function t(e,n){var r,s,o=e[n];if(o&&"object"==typeof o)for(r in c)Object.prototype.hasOwnProperty.call(o,r)&&(void 0===(s=t(o,r))?delete o[r]:o[r]=s);return i.call(e,n,o)}({"":o},""):o}},3937:t=>{"use strict";var e,n,r,i=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(t){return i.lastIndex=0,i.test(t)?'"'+t.replace(i,(function(t){var e=s[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function a(t,i){var s,u,_,c,l,h=e,T=i[t];switch(T&&"object"==typeof T&&"function"==typeof T.toJSON&&(T=T.toJSON(t)),"function"==typeof r&&(T=r.call(i,t,T)),typeof T){case"string":return o(T);case"number":return isFinite(T)?String(T):"null";case"boolean":case"null":return String(T);case"object":if(!T)return"null";if(e+=n,l=[],"[object Array]"===Object.prototype.toString.apply(T)){for(c=T.length,s=0;s<c;s+=1)l[s]=a(s,T)||"null";return _=0===l.length?"[]":e?"[\n"+e+l.join(",\n"+e)+"\n"+h+"]":"["+l.join(",")+"]",e=h,_}if(r&&"object"==typeof r)for(c=r.length,s=0;s<c;s+=1)"string"==typeof(u=r[s])&&(_=a(u,T))&&l.push(o(u)+(e?": ":":")+_);else for(u in T)Object.prototype.hasOwnProperty.call(T,u)&&(_=a(u,T))&&l.push(o(u)+(e?": ":":")+_);return _=0===l.length?"{}":e?"{\n"+e+l.join(",\n"+e)+"\n"+h+"}":"{"+l.join(",")+"}",e=h,_}}t.exports=function(t,i,s){var o;if(e="",n="","number"==typeof s)for(o=0;o<s;o+=1)n+=" ";else"string"==typeof s&&(n=s);if(r=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return a("",{"":t})}},7737:(t,e,n)=>{var r=n(3789)(n(5036),"DataView");t.exports=r},5072:(t,e,n)=>{var r=n(9763),i=n(3879),s=n(8150),o=n(7106),a=n(938);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,t.exports=u},5332:(t,e,n)=>{var r=n(3023),i=n(4747),s=n(9978),o=n(6734),a=n(4710);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,t.exports=u},16:(t,e,n)=>{var r=n(3789)(n(5036),"Map");t.exports=r},1708:(t,e,n)=>{var r=n(615),i=n(9859),s=n(5170),o=n(8470),a=n(7646);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,t.exports=u},1767:(t,e,n)=>{var r=n(3789)(n(5036),"Promise");t.exports=r},7802:(t,e,n)=>{var r=n(3789)(n(5036),"Set");t.exports=r},6874:(t,e,n)=>{var r=n(1708),i=n(9871),s=n(1772);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=s,t.exports=o},9310:(t,e,n)=>{var r=n(5332),i=n(9333),s=n(1893),o=n(9676),a=n(6536),u=n(3336);function _(t){var e=this.__data__=new r(t);this.size=e.size}_.prototype.clear=i,_.prototype.delete=s,_.prototype.get=o,_.prototype.has=a,_.prototype.set=u,t.exports=_},7432:(t,e,n)=>{var r=n(5036).Symbol;t.exports=r},181:(t,e,n)=>{var r=n(5036).Uint8Array;t.exports=r},20:(t,e,n)=>{var r=n(3789)(n(5036),"WeakMap");t.exports=r},9822:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},4170:t=>{t.exports=function(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}},2130:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},5773:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}},3574:(t,e,n)=>{var r=n(2712);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},9106:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},6272:(t,e,n)=>{var r=n(8355),i=n(7933),s=n(9464),o=n(5752),a=n(1574),u=n(264),_=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=s(t),c=!n&&i(t),l=!n&&!c&&o(t),h=!n&&!c&&!l&&u(t),T=n||c||l||h,p=T?r(t.length,String):[],f=p.length;for(var E in t)!e&&!_.call(t,E)||T&&("length"==E||l&&("offset"==E||"parent"==E)||h&&("buffer"==E||"byteLength"==E||"byteOffset"==E)||a(E,f))||p.push(E);return p}},6233:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},1595:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},2609:t=>{t.exports=function(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}},119:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},1819:t=>{t.exports=function(t){return t.split("")}},6564:t=>{var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=function(t){return t.match(e)||[]}},6312:(t,e,n)=>{var r=n(6571),i=n(9679),s=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];s.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},5096:(t,e,n)=>{var r=n(9679);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},3644:(t,e,n)=>{var r=n(9040);t.exports=function(t,e,n,i){return r(t,(function(t,r,s){e(i,t,n(t),s)})),i}},2516:(t,e,n)=>{var r=n(5634),i=n(9125);t.exports=function(t,e){return t&&r(e,i(e),t)}},5771:(t,e,n)=>{var r=n(5634),i=n(7798);t.exports=function(t,e){return t&&r(e,i(e),t)}},6571:(t,e,n)=>{var r=n(6514);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},9192:(t,e,n)=>{var r=n(9310),i=n(2130),s=n(6312),o=n(2516),a=n(5771),u=n(1733),_=n(5240),c=n(6752),l=n(4239),h=n(1679),T=n(6628),p=n(1344),f=n(7928),E=n(4290),d=n(6082),N=n(9464),S=n(5752),m=n(6043),A=n(6130),P=n(6885),g=n(9125),y=n(7798),R="[object Arguments]",I="[object Function]",D="[object Object]",O={};O[R]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[D]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[I]=O["[object WeakMap]"]=!1,t.exports=function t(e,n,C,b,v,w){var L,B=1&n,Y=2&n,U=4&n;if(C&&(L=v?C(e,b,v,w):C(e)),void 0!==L)return L;if(!A(e))return e;var M=N(e);if(M){if(L=f(e),!B)return _(e,L)}else{var x=p(e),V=x==I||"[object GeneratorFunction]"==x;if(S(e))return u(e,B);if(x==D||x==R||V&&!v){if(L=Y||V?{}:d(e),!B)return Y?l(e,a(L,e)):c(e,o(L,e))}else{if(!O[x])return v?e:{};L=E(e,x,B)}}w||(w=new r);var F=w.get(e);if(F)return F;w.set(e,L),P(e)?e.forEach((function(r){L.add(t(r,n,C,r,e,w))})):m(e)&&e.forEach((function(r,i){L.set(i,t(r,n,C,i,e,w))}));var k=M?void 0:(U?Y?T:h:Y?y:g)(e);return i(k||e,(function(r,i){k&&(r=e[i=r]),s(L,i,t(r,n,C,i,e,w))})),L}},6309:(t,e,n)=>{var r=n(6130),i=Object.create,s=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=s},9040:(t,e,n)=>{var r=n(5828),i=n(251)(r);t.exports=i},8052:t=>{t.exports=function(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}},5951:(t,e,n)=>{var r=n(1595),i=n(8352);t.exports=function t(e,n,s,o,a){var u=-1,_=e.length;for(s||(s=i),a||(a=[]);++u<_;){var c=e[u];n>0&&s(c)?n>1?t(c,n-1,s,o,a):r(a,c):o||(a[a.length]=c)}return a}},4350:(t,e,n)=>{var r=n(2294)();t.exports=r},5828:(t,e,n)=>{var r=n(4350),i=n(9125);t.exports=function(t,e){return t&&r(t,e,i)}},3117:(t,e,n)=>{var r=n(8328),i=n(1966);t.exports=function(t,e){for(var n=0,s=(e=r(e,t)).length;null!=t&&n<s;)t=t[i(e[n++])];return n&&n==s?t:void 0}},4090:(t,e,n)=>{var r=n(1595),i=n(9464);t.exports=function(t,e,n){var s=e(t);return i(t)?s:r(s,n(t))}},6077:(t,e,n)=>{var r=n(7432),i=n(4444),s=n(3371),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):s(t)}},2282:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},2712:(t,e,n)=>{var r=n(8052),i=n(1264),s=n(7635);t.exports=function(t,e,n){return e==e?s(t,e,n):r(t,i,n)}},2800:(t,e,n)=>{var r=n(6874),i=n(3574),s=n(9106),o=n(6233),a=n(7746),u=n(4854),_=Math.min;t.exports=function(t,e,n){for(var c=n?s:i,l=t[0].length,h=t.length,T=h,p=Array(h),f=1/0,E=[];T--;){var d=t[T];T&&e&&(d=o(d,a(e))),f=_(d.length,f),p[T]=!n&&(e||l>=120&&d.length>=120)?new r(T&&d):void 0}d=t[0];var N=-1,S=p[0];t:for(;++N<l&&E.length<f;){var m=d[N],A=e?e(m):m;if(m=n||0!==m?m:0,!(S?u(S,A):c(E,A,n))){for(T=h;--T;){var P=p[T];if(!(P?u(P,A):c(t[T],A,n)))continue t}S&&S.push(A),E.push(m)}}return E}},5301:(t,e,n)=>{var r=n(6077),i=n(4189);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},2201:(t,e,n)=>{var r=n(6077),i=n(4189);t.exports=function(t){return i(t)&&"[object Date]"==r(t)}},6161:(t,e,n)=>{var r=n(4715),i=n(4189);t.exports=function t(e,n,s,o,a){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,s,o,t,a))}},4715:(t,e,n)=>{var r=n(9310),i=n(8832),s=n(391),o=n(2132),a=n(1344),u=n(9464),_=n(5752),c=n(264),l="[object Arguments]",h="[object Array]",T="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,f,E,d){var N=u(t),S=u(e),m=N?h:a(t),A=S?h:a(e),P=(m=m==l?T:m)==T,g=(A=A==l?T:A)==T,y=m==A;if(y&&_(t)){if(!_(e))return!1;N=!0,P=!1}if(y&&!P)return d||(d=new r),N||c(t)?i(t,e,n,f,E,d):s(t,e,m,n,f,E,d);if(!(1&n)){var R=P&&p.call(t,"__wrapped__"),I=g&&p.call(e,"__wrapped__");if(R||I){var D=R?t.value():t,O=I?e.value():e;return d||(d=new r),E(D,O,n,f,d)}}return!!y&&(d||(d=new r),o(t,e,n,f,E,d))}},1939:(t,e,n)=>{var r=n(1344),i=n(4189);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},2272:(t,e,n)=>{var r=n(9310),i=n(6161);t.exports=function(t,e,n,s){var o=n.length,a=o,u=!s;if(null==t)return!a;for(t=Object(t);o--;){var _=n[o];if(u&&_[2]?_[1]!==t[_[0]]:!(_[0]in t))return!1}for(;++o<a;){var c=(_=n[o])[0],l=t[c],h=_[1];if(u&&_[2]){if(void 0===l&&!(c in t))return!1}else{var T=new r;if(s)var p=s(l,h,c,t,e,T);if(!(void 0===p?i(h,l,3,s,T):p))return!1}}return!0}},1264:t=>{t.exports=function(t){return t!=t}},9950:(t,e,n)=>{var r=n(6553),i=n(3909),s=n(6130),o=n(2760),a=/^\[object .+?Constructor\]$/,u=Function.prototype,_=Object.prototype,c=u.toString,l=_.hasOwnProperty,h=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||i(t))&&(r(t)?h:a).test(o(t))}},8685:(t,e,n)=>{var r=n(1344),i=n(4189);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},8912:(t,e,n)=>{var r=n(6077),i=n(5841),s=n(4189),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return s(t)&&i(t.length)&&!!o[r(t)]}},535:(t,e,n)=>{var r=n(3052),i=n(2273),s=n(515),o=n(9464),a=n(416);t.exports=function(t){return"function"==typeof t?t:null==t?s:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):a(t)}},4829:(t,e,n)=>{var r=n(2632),i=n(9963),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))s.call(t,n)&&"constructor"!=n&&e.push(n);return e}},9262:(t,e,n)=>{var r=n(6130),i=n(2632),s=n(312),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return s(t);var e=i(t),n=[];for(var a in t)("constructor"!=a||!e&&o.call(t,a))&&n.push(a);return n}},5703:(t,e,n)=>{var r=n(9040),i=n(623);t.exports=function(t,e){var n=-1,s=i(t)?Array(t.length):[];return r(t,(function(t,r,i){s[++n]=e(t,r,i)})),s}},3052:(t,e,n)=>{var r=n(2272),i=n(3145),s=n(9738);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?s(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},2273:(t,e,n)=>{var r=n(6161),i=n(613),s=n(8146),o=n(3297),a=n(1685),u=n(9738),_=n(1966);t.exports=function(t,e){return o(t)&&a(e)?u(_(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?s(n,t):r(e,o,3)}}},5004:(t,e,n)=>{var r=n(6233),i=n(3117),s=n(535),o=n(5703),a=n(4244),u=n(7746),_=n(8609),c=n(515),l=n(9464);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return l(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[c];var h=-1;e=r(e,u(s));var T=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++h,value:t}}));return a(T,(function(t,e){return _(t,e,n)}))}},3612:(t,e,n)=>{var r=n(6333),i=n(8146);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},6333:(t,e,n)=>{var r=n(3117),i=n(6601),s=n(8328);t.exports=function(t,e,n){for(var o=-1,a=e.length,u={};++o<a;){var _=e[o],c=r(t,_);n(c,_)&&i(u,s(_,t),c)}return u}},4024:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},4822:(t,e,n)=>{var r=n(3117);t.exports=function(t){return function(e){return r(e,t)}}},721:t=>{t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},8339:(t,e,n)=>{var r=n(515),i=n(4088),s=n(6218);t.exports=function(t,e){return s(i(t,e,r),t+"")}},6601:(t,e,n)=>{var r=n(6312),i=n(8328),s=n(1574),o=n(6130),a=n(1966);t.exports=function(t,e,n,u){if(!o(t))return t;for(var _=-1,c=(e=i(e,t)).length,l=c-1,h=t;null!=h&&++_<c;){var T=a(e[_]),p=n;if("__proto__"===T||"constructor"===T||"prototype"===T)return t;if(_!=l){var f=h[T];void 0===(p=u?u(f,T,h):void 0)&&(p=o(f)?f:s(e[_+1])?[]:{})}r(h,T,p),h=h[T]}return t}},5193:(t,e,n)=>{var r=n(4961),i=n(6514),s=n(515),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:s;t.exports=o},6699:t=>{t.exports=function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}},4244:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},8355:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},8761:(t,e,n)=>{var r=n(7432),i=n(6233),s=n(9464),o=n(5733),a=r?r.prototype:void 0,u=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(s(e))return i(e,t)+"";if(o(e))return u?u.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},7746:t=>{t.exports=function(t){return function(e){return t(e)}}},4900:(t,e,n)=>{var r=n(6874),i=n(3574),s=n(9106),o=n(4854),a=n(754),u=n(4886);t.exports=function(t,e,n){var _=-1,c=i,l=t.length,h=!0,T=[],p=T;if(n)h=!1,c=s;else if(l>=200){var f=e?null:a(t);if(f)return u(f);h=!1,c=o,p=new r}else p=e?[]:T;t:for(;++_<l;){var E=t[_],d=e?e(E):E;if(E=n||0!==E?E:0,h&&d==d){for(var N=p.length;N--;)if(p[N]===d)continue t;e&&p.push(d),T.push(E)}else c(p,d,n)||(p!==T&&p.push(d),T.push(E))}return T}},3704:(t,e,n)=>{var r=n(8328),i=n(1853),s=n(320),o=n(1966);t.exports=function(t,e){return e=r(e,t),null==(t=s(t,e))||delete t[o(i(e))]}},4854:t=>{t.exports=function(t,e){return t.has(e)}},3282:(t,e,n)=>{var r=n(8796);t.exports=function(t){return r(t)?t:[]}},8328:(t,e,n)=>{var r=n(9464),i=n(3297),s=n(5643),o=n(8753);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:s(o(t))}},1769:(t,e,n)=>{var r=n(6699);t.exports=function(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:r(t,e,n)}},990:(t,e,n)=>{var r=n(181);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},1733:(t,e,n)=>{t=n.nmd(t);var r=n(5036),i=e&&!e.nodeType&&e,s=i&&t&&!t.nodeType&&t,o=s&&s.exports===i?r.Buffer:void 0,a=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=a?a(n):new t.constructor(n);return t.copy(r),r}},9842:(t,e,n)=>{var r=n(990);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},7054:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},6923:(t,e,n)=>{var r=n(7432),i=r?r.prototype:void 0,s=i?i.valueOf:void 0;t.exports=function(t){return s?Object(s.call(t)):{}}},1058:(t,e,n)=>{var r=n(990);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},5619:(t,e,n)=>{var r=n(5733);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,s=t==t,o=r(t),a=void 0!==e,u=null===e,_=e==e,c=r(e);if(!u&&!c&&!o&&t>e||o&&a&&_&&!u&&!c||i&&a&&_||!n&&_||!s)return 1;if(!i&&!o&&!c&&t<e||c&&n&&s&&!i&&!o||u&&n&&s||!a&&s||!_)return-1}return 0}},8609:(t,e,n)=>{var r=n(5619);t.exports=function(t,e,n){for(var i=-1,s=t.criteria,o=e.criteria,a=s.length,u=n.length;++i<a;){var _=r(s[i],o[i]);if(_)return i>=u?_:_*("desc"==n[i]?-1:1)}return t.index-e.index}},5240:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},5634:(t,e,n)=>{var r=n(6312),i=n(6571);t.exports=function(t,e,n,s){var o=!n;n||(n={});for(var a=-1,u=e.length;++a<u;){var _=e[a],c=s?s(n[_],t[_],_,n,t):void 0;void 0===c&&(c=t[_]),o?i(n,_,c):r(n,_,c)}return n}},6752:(t,e,n)=>{var r=n(5634),i=n(1809);t.exports=function(t,e){return r(t,i(t),e)}},4239:(t,e,n)=>{var r=n(5634),i=n(9242);t.exports=function(t,e){return r(t,i(t),e)}},4780:(t,e,n)=>{var r=n(5036)["__core-js_shared__"];t.exports=r},9693:(t,e,n)=>{var r=n(4170),i=n(3644),s=n(535),o=n(9464);t.exports=function(t,e){return function(n,a){var u=o(n)?r:i,_=e?e():{};return u(n,t,s(a,2),_)}}},251:(t,e,n)=>{var r=n(623);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var s=n.length,o=e?s:-1,a=Object(n);(e?o--:++o<s)&&!1!==i(a[o],o,a););return n}}},2294:t=>{t.exports=function(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var u=o[t?a:++i];if(!1===n(s[u],u,s))break}return e}}},2032:(t,e,n)=>{var r=n(1769),i=n(5675),s=n(935),o=n(8753);t.exports=function(t){return function(e){e=o(e);var n=i(e)?s(e):void 0,a=n?n[0]:e.charAt(0),u=n?r(n,1).join(""):e.slice(1);return a[t]()+u}}},2222:(t,e,n)=>{var r=n(2609),i=n(767),s=n(6376),o=RegExp("['’]","g");t.exports=function(t){return function(e){return r(s(i(e).replace(o,"")),t,"")}}},754:(t,e,n)=>{var r=n(7802),i=n(3125),s=n(4886),o=r&&1/s(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},5589:(t,e,n)=>{var r=n(6446);t.exports=function(t){return r(t)?void 0:t}},9210:(t,e,n)=>{var r=n(721)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});t.exports=r},6514:(t,e,n)=>{var r=n(3789),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},8832:(t,e,n)=>{var r=n(6874),i=n(119),s=n(4854);t.exports=function(t,e,n,o,a,u){var _=1&n,c=t.length,l=e.length;if(c!=l&&!(_&&l>c))return!1;var h=u.get(t),T=u.get(e);if(h&&T)return h==e&&T==t;var p=-1,f=!0,E=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++p<c;){var d=t[p],N=e[p];if(o)var S=_?o(N,d,p,e,t,u):o(d,N,p,t,e,u);if(void 0!==S){if(S)continue;f=!1;break}if(E){if(!i(e,(function(t,e){if(!s(E,e)&&(d===t||a(d,t,n,o,u)))return E.push(e)}))){f=!1;break}}else if(d!==N&&!a(d,N,n,o,u)){f=!1;break}}return u.delete(t),u.delete(e),f}},391:(t,e,n)=>{var r=n(7432),i=n(181),s=n(9679),o=n(8832),a=n(5860),u=n(4886),_=r?r.prototype:void 0,c=_?_.valueOf:void 0;t.exports=function(t,e,n,r,_,l,h){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var T=a;case"[object Set]":var p=1&r;if(T||(T=u),t.size!=e.size&&!p)return!1;var f=h.get(t);if(f)return f==e;r|=2,h.set(t,e);var E=o(T(t),T(e),r,_,l,h);return h.delete(t),E;case"[object Symbol]":if(c)return c.call(t)==c.call(e)}return!1}},2132:(t,e,n)=>{var r=n(1679),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,s,o,a){var u=1&n,_=r(t),c=_.length;if(c!=r(e).length&&!u)return!1;for(var l=c;l--;){var h=_[l];if(!(u?h in e:i.call(e,h)))return!1}var T=a.get(t),p=a.get(e);if(T&&p)return T==e&&p==t;var f=!0;a.set(t,e),a.set(e,t);for(var E=u;++l<c;){var d=t[h=_[l]],N=e[h];if(s)var S=u?s(N,d,h,e,t,a):s(d,N,h,t,e,a);if(!(void 0===S?d===N||o(d,N,n,s,a):S)){f=!1;break}E||(E="constructor"==h)}if(f&&!E){var m=t.constructor,A=e.constructor;m==A||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof A&&A instanceof A||(f=!1)}return a.delete(t),a.delete(e),f}},565:(t,e,n)=>{var r=n(9607),i=n(4088),s=n(6218);t.exports=function(t){return s(i(t,void 0,r),t+"")}},8565:t=>{var e="object"==typeof global&&global&&global.Object===Object&&global;t.exports=e},1679:(t,e,n)=>{var r=n(4090),i=n(1809),s=n(9125);t.exports=function(t){return r(t,s,i)}},6628:(t,e,n)=>{var r=n(4090),i=n(9242),s=n(7798);t.exports=function(t){return r(t,s,i)}},5930:(t,e,n)=>{var r=n(29);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},3145:(t,e,n)=>{var r=n(1685),i=n(9125);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var s=e[n],o=t[s];e[n]=[s,o,r(o)]}return e}},3789:(t,e,n)=>{var r=n(9950),i=n(8869);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},4754:(t,e,n)=>{var r=n(2344)(Object.getPrototypeOf,Object);t.exports=r},4444:(t,e,n)=>{var r=n(7432),i=Object.prototype,s=i.hasOwnProperty,o=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=s.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[a]=n:delete t[a]),i}},1809:(t,e,n)=>{var r=n(5773),i=n(3864),s=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return s.call(t,e)})))}:i;t.exports=a},9242:(t,e,n)=>{var r=n(1595),i=n(4754),s=n(1809),o=n(3864),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,s(t)),t=i(t);return e}:o;t.exports=a},1344:(t,e,n)=>{var r=n(7737),i=n(16),s=n(1767),o=n(7802),a=n(20),u=n(6077),_=n(2760),c="[object Map]",l="[object Promise]",h="[object Set]",T="[object WeakMap]",p="[object DataView]",f=_(r),E=_(i),d=_(s),N=_(o),S=_(a),m=u;(r&&m(new r(new ArrayBuffer(1)))!=p||i&&m(new i)!=c||s&&m(s.resolve())!=l||o&&m(new o)!=h||a&&m(new a)!=T)&&(m=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?_(n):"";if(r)switch(r){case f:return p;case E:return c;case d:return l;case N:return h;case S:return T}return e}),t.exports=m},8869:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},3773:(t,e,n)=>{var r=n(8328),i=n(7933),s=n(9464),o=n(1574),a=n(5841),u=n(1966);t.exports=function(t,e,n){for(var _=-1,c=(e=r(e,t)).length,l=!1;++_<c;){var h=u(e[_]);if(!(l=null!=t&&n(t,h)))break;t=t[h]}return l||++_!=c?l:!!(c=null==t?0:t.length)&&a(c)&&o(h,c)&&(s(t)||i(t))}},5675:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},8683:t=>{var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function(t){return e.test(t)}},9763:(t,e,n)=>{var r=n(267);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},3879:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},8150:(t,e,n)=>{var r=n(267),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},7106:(t,e,n)=>{var r=n(267),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},938:(t,e,n)=>{var r=n(267);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},7928:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},4290:(t,e,n)=>{var r=n(990),i=n(9842),s=n(7054),o=n(6923),a=n(1058);t.exports=function(t,e,n){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(t,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return s(t);case"[object Symbol]":return o(t)}}},6082:(t,e,n)=>{var r=n(6309),i=n(4754),s=n(2632);t.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:r(i(t))}},8352:(t,e,n)=>{var r=n(7432),i=n(7933),s=n(9464),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return s(t)||i(t)||!!(o&&t&&t[o])}},1574:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},4661:(t,e,n)=>{var r=n(9679),i=n(623),s=n(1574),o=n(6130);t.exports=function(t,e,n){if(!o(n))return!1;var a=typeof e;return!!("number"==a?i(n)&&s(e,n.length):"string"==a&&e in n)&&r(n[e],t)}},3297:(t,e,n)=>{var r=n(9464),i=n(5733),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||o.test(t)||!s.test(t)||null!=e&&t in Object(e)}},29:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},3909:(t,e,n)=>{var r,i=n(4780),s=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!s&&s in t}},2632:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},1685:(t,e,n)=>{var r=n(6130);t.exports=function(t){return t==t&&!r(t)}},3023:t=>{t.exports=function(){this.__data__=[],this.size=0}},4747:(t,e,n)=>{var r=n(5096),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},9978:(t,e,n)=>{var r=n(5096);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},6734:(t,e,n)=>{var r=n(5096);t.exports=function(t){return r(this.__data__,t)>-1}},4710:(t,e,n)=>{var r=n(5096);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},615:(t,e,n)=>{var r=n(5072),i=n(5332),s=n(16);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||i),string:new r}}},9859:(t,e,n)=>{var r=n(5930);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},5170:(t,e,n)=>{var r=n(5930);t.exports=function(t){return r(this,t).get(t)}},8470:(t,e,n)=>{var r=n(5930);t.exports=function(t){return r(this,t).has(t)}},7646:(t,e,n)=>{var r=n(5930);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},5860:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},9738:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},5647:(t,e,n)=>{var r=n(7105);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},267:(t,e,n)=>{var r=n(3789)(Object,"create");t.exports=r},9963:(t,e,n)=>{var r=n(2344)(Object.keys,Object);t.exports=r},312:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},1172:(t,e,n)=>{t=n.nmd(t);var r=n(8565),i=e&&!e.nodeType&&e,s=i&&t&&!t.nodeType&&t,o=s&&s.exports===i&&r.process,a=function(){try{return s&&s.require&&s.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a},3371:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},2344:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},4088:(t,e,n)=>{var r=n(9822),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var s=arguments,o=-1,a=i(s.length-e,0),u=Array(a);++o<a;)u[o]=s[e+o];o=-1;for(var _=Array(e+1);++o<e;)_[o]=s[o];return _[e]=n(u),r(t,this,_)}}},320:(t,e,n)=>{var r=n(3117),i=n(6699);t.exports=function(t,e){return e.length<2?t:r(t,i(e,0,-1))}},5036:(t,e,n)=>{var r=n(8565),i="object"==typeof self&&self&&self.Object===Object&&self,s=r||i||Function("return this")();t.exports=s},9871:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},1772:t=>{t.exports=function(t){return this.__data__.has(t)}},4886:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},6218:(t,e,n)=>{var r=n(5193),i=n(5366)(r);t.exports=i},5366:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),s=16-(i-r);if(r=i,s>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},9333:(t,e,n)=>{var r=n(5332);t.exports=function(){this.__data__=new r,this.size=0}},1893:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},9676:t=>{t.exports=function(t){return this.__data__.get(t)}},6536:t=>{t.exports=function(t){return this.__data__.has(t)}},3336:(t,e,n)=>{var r=n(5332),i=n(16),s=n(1708);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new s(o)}return n.set(t,e),this.size=n.size,this}},7635:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},935:(t,e,n)=>{var r=n(1819),i=n(5675),s=n(5823);t.exports=function(t){return i(t)?s(t):r(t)}},5643:(t,e,n)=>{var r=n(5647),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(s,"$1"):n||t)})),e}));t.exports=o},1966:(t,e,n)=>{var r=n(5733);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},2760:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},5823:t=>{var e="\\ud800-\\udfff",n="["+e+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",s="[^"+e+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")?",_="[\\ufe0e\\ufe0f]?",c=_+u+"(?:\\u200d(?:"+[s,o,a].join("|")+")"+_+u+")*",l="(?:"+[s+r+"?",r,o,a,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){return t.match(h)||[]}},4160:t=>{var e="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",s="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+s+"]",a="\\d+",u="["+n+"]",_="["+r+"]",c="[^"+e+s+a+n+r+i+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",T="["+i+"]",p="(?:"+_+"|"+c+")",f="(?:"+T+"|"+c+")",E="(?:['’](?:d|ll|m|re|s|t|ve))?",d="(?:['’](?:D|LL|M|RE|S|T|VE))?",N="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",S="[\\ufe0e\\ufe0f]?",m=S+N+"(?:\\u200d(?:"+["[^"+e+"]",l,h].join("|")+")"+S+N+")*",A="(?:"+[u,l,h].join("|")+")"+m,P=RegExp([T+"?"+_+"+"+E+"(?="+[o,T,"$"].join("|")+")",f+"+"+d+"(?="+[o,T+p,"$"].join("|")+")",T+"?"+p+"+"+E,T+"+"+d,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",a,A].join("|"),"g");t.exports=function(t){return t.match(P)||[]}},3039:(t,e,n)=>{var r=n(3215),i=n(2222)((function(t,e,n){return e=e.toLowerCase(),t+(n?r(e):e)}));t.exports=i},3215:(t,e,n)=>{var r=n(8753),i=n(4367);t.exports=function(t){return i(r(t).toLowerCase())}},1454:(t,e,n)=>{var r=n(9192);t.exports=function(t){return r(t,5)}},3402:(t,e,n)=>{var r=n(9192);t.exports=function(t,e){return r(t,5,e="function"==typeof e?e:void 0)}},7120:t=>{t.exports=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}},4961:t=>{t.exports=function(t){return function(){return t}}},767:(t,e,n)=>{var r=n(9210),i=n(8753),s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.exports=function(t){return(t=i(t))&&t.replace(s,r).replace(o,"")}},9679:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},4099:(t,e,n)=>{var r=n(8753),i=/[\\^$.*+?()[\]{}|]/g,s=RegExp(i.source);t.exports=function(t){return(t=r(t))&&s.test(t)?t.replace(i,"\\$&"):t}},9607:(t,e,n)=>{var r=n(5951);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},3671:(t,e,n)=>{var r=n(134).runInContext();t.exports=n(2385)(r,r)},2385:(t,e,n)=>{var r=n(4287),i=n(197),s=Array.prototype.push;function o(t,e){return 2==e?function(e,n){return t(e,n)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,n=Array(e);e--;)n[e]=t[e];return n}function u(t,e){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=e.apply(void 0,r);return t.apply(void 0,r),i}}}t.exports=function t(e,n,_,c){var l="function"==typeof n,h=n===Object(n);if(h&&(c=_,_=n,n=void 0),null==_)throw new TypeError;c||(c={});var T={cap:!("cap"in c)||c.cap,curry:!("curry"in c)||c.curry,fixed:!("fixed"in c)||c.fixed,immutable:!("immutable"in c)||c.immutable,rearg:!("rearg"in c)||c.rearg},p=l?_:i,f="curry"in c&&c.curry,E="fixed"in c&&c.fixed,d="rearg"in c&&c.rearg,N=l?_.runInContext():void 0,S=l?_:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},m=S.ary,A=S.assign,P=S.clone,g=S.curry,y=S.forEach,R=S.isArray,I=S.isError,D=S.isFunction,O=S.isWeakMap,C=S.keys,b=S.rearg,v=S.toInteger,w=S.toPath,L=C(r.aryMethod),B={castArray:function(t){return function(){var e=arguments[0];return R(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[1],n=t(arguments[0],e),r=n.length;return T.cap&&"number"==typeof e?(e=e>2?e-2:1,r&&r<=e?n:o(n,e)):n}},mixin:function(t){return function(e){var n=this;if(!D(n))return t(n,Object(e));var r=[];return y(C(e),(function(t){D(e[t])&&r.push([t,n.prototype[t]])})),t(n,Object(e)),y(r,(function(t){var e=t[1];D(e)?n.prototype[t[0]]=e:delete n.prototype[t[0]]})),n}},nthArg:function(t){return function(e){var n=e<0?1:v(e)+1;return g(t(e),n)}},rearg:function(t){return function(e,n){var r=n?n.length:0;return g(t(e,n),r)}},runInContext:function(n){return function(r){return t(e,n(r),c)}}};function Y(t,e,n){if(T.fixed&&(E||!r.skipFixed[t])){var i=r.methodSpread[t],o=i&&i.start;return void 0===o?m(e,n):function(t,e){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var o=i[e],a=i.slice(0,e);return o&&s.apply(a,o),e!=r&&s.apply(a,i.slice(e+1)),t.apply(this,a)}}(e,o)}return e}function U(t,e,n){return T.rearg&&n>1&&(d||!r.skipRearg[t])?b(e,r.methodRearg[t]||r.aryRearg[n]):e}function M(t,e){for(var n=-1,r=(e=w(e)).length,i=r-1,s=P(Object(t)),o=s;null!=o&&++n<r;){var a=e[n],u=o[a];null==u||D(u)||I(u)||O(u)||(o[a]=P(n==i?u:Object(u))),o=o[a]}return s}function x(e,n){var i=r.aliasToReal[e]||e,s=r.remap[i]||i,o=c;return function(e){var r=l?N:S,a=l?N[s]:n,u=A(A({},o),e);return t(r,i,a,u)}}function V(t,e){return function(){var n=arguments.length;if(!n)return t();for(var r=Array(n);n--;)r[n]=arguments[n];var i=T.rearg?0:n-1;return r[i]=e(r[i]),t.apply(void 0,r)}}function F(t,e,n){var i,s=r.aliasToReal[t]||t,_=e,c=B[s];return c?_=c(e):T.immutable&&(r.mutate.array[s]?_=u(e,a):r.mutate.object[s]?_=u(e,function(t){return function(e){return t({},e)}}(e)):r.mutate.set[s]&&(_=u(e,M))),y(L,(function(t){return y(r.aryMethod[t],(function(e){if(s==e){var n=r.methodSpread[s],a=n&&n.afterRearg;return i=a?Y(s,U(s,_,t),t):U(s,Y(s,_,t),t),i=function(t,e,n){return f||T.curry&&n>1?g(e,n):e}(0,i=function(t,e){if(T.cap){var n=r.iterateeRearg[t];if(n)return function(t,e){return V(t,(function(t){var n=e.length;return function(t,e){return 2==e?function(e,n){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}(b(o(t,n),e),n)}))}(e,n);var i=!l&&r.iterateeAry[t];if(i)return function(t,e){return V(t,(function(t){return"function"==typeof t?o(t,e):t}))}(e,i)}return e}(s,i),t),!1}})),!i})),i||(i=_),i==e&&(i=f?g(i,1):function(){return e.apply(this,arguments)}),i.convert=x(s,e),i.placeholder=e.placeholder=n,i}if(!h)return F(n,_,p);var k=_,j=[];return y(L,(function(t){y(r.aryMethod[t],(function(t){var e=k[r.remap[t]||t];e&&j.push([t,F(t,e,k)])}))})),y(C(k),(function(t){var e=k[t];if("function"==typeof e){for(var n=j.length;n--;)if(j[n][0]==t)return;e.convert=x(t,e),j.push([t,e])}})),y(j,(function(t){k[t[0]]=t[1]})),k.convert=function(t){return k.runInContext.convert(t)(void 0)},k.placeholder=k,y(C(k),(function(t){y(r.realToAlias[t]||[],(function(e){k[e]=k[t]}))})),k}},4287:(t,e)=>{e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,n=e.aliasToReal,r={};for(var i in n){var s=n[i];t.call(r,s)?r[s].push(i):r[s]=[i]}return r}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},197:t=>{t.exports={}},4584:t=>{t.exports=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}},613:(t,e,n)=>{var r=n(3117);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},2535:(t,e,n)=>{var r=n(6571),i=n(9693),s=Object.prototype.hasOwnProperty,o=i((function(t,e,n){s.call(t,n)?t[n].push(e):r(t,n,[e])}));t.exports=o},8146:(t,e,n)=>{var r=n(2282),i=n(3773);t.exports=function(t,e){return null!=t&&i(t,e,r)}},515:t=>{t.exports=function(t){return t}},4200:(t,e,n)=>{var r=n(6233),i=n(2800),s=n(8339),o=n(3282),a=s((function(t){var e=r(t,o);return e.length&&e[0]===t[0]?i(e):[]}));t.exports=a},7933:(t,e,n)=>{var r=n(5301),i=n(4189),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},9464:t=>{var e=Array.isArray;t.exports=e},623:(t,e,n)=>{var r=n(6553),i=n(5841);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},8796:(t,e,n)=>{var r=n(623),i=n(4189);t.exports=function(t){return i(t)&&r(t)}},5752:(t,e,n)=>{t=n.nmd(t);var r=n(5036),i=n(8042),s=e&&!e.nodeType&&e,o=s&&t&&!t.nodeType&&t,a=o&&o.exports===s?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u},6241:(t,e,n)=>{var r=n(2201),i=n(7746),s=n(1172),o=s&&s.isDate,a=o?i(o):r;t.exports=a},4169:(t,e,n)=>{var r=n(6161);t.exports=function(t,e){return r(t,e)}},6553:(t,e,n)=>{var r=n(6077),i=n(6130);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5841:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},6043:(t,e,n)=>{var r=n(1939),i=n(7746),s=n(1172),o=s&&s.isMap,a=o?i(o):r;t.exports=a},2168:(t,e,n)=>{var r=n(2164);t.exports=function(t){return r(t)&&t!=+t}},2164:(t,e,n)=>{var r=n(6077),i=n(4189);t.exports=function(t){return"number"==typeof t||i(t)&&"[object Number]"==r(t)}},6130:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},4189:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},6446:(t,e,n)=>{var r=n(6077),i=n(4754),s=n(4189),o=Function.prototype,a=Object.prototype,u=o.toString,_=a.hasOwnProperty,c=u.call(Object);t.exports=function(t){if(!s(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=_.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}},6885:(t,e,n)=>{var r=n(8685),i=n(7746),s=n(1172),o=s&&s.isSet,a=o?i(o):r;t.exports=a},7072:(t,e,n)=>{var r=n(6077),i=n(9464),s=n(4189);t.exports=function(t){return"string"==typeof t||!i(t)&&s(t)&&"[object String]"==r(t)}},5733:(t,e,n)=>{var r=n(6077),i=n(4189);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},264:(t,e,n)=>{var r=n(8912),i=n(7746),s=n(1172),o=s&&s.isTypedArray,a=o?i(o):r;t.exports=a},9125:(t,e,n)=>{var r=n(6272),i=n(4829),s=n(623);t.exports=function(t){return s(t)?r(t):i(t)}},7798:(t,e,n)=>{var r=n(6272),i=n(9262),s=n(623);t.exports=function(t){return s(t)?r(t,!0):i(t)}},1853:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},5076:function(t,e,n){var r;t=n.nmd(t),function(){var i,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,_=128,c=1/0,l=9007199254740991,h=NaN,T=4294967295,p=[["ary",_],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],f="[object Arguments]",E="[object Array]",d="[object Boolean]",N="[object Date]",S="[object Error]",m="[object Function]",A="[object GeneratorFunction]",P="[object Map]",g="[object Number]",y="[object Object]",R="[object Promise]",I="[object RegExp]",D="[object Set]",O="[object String]",C="[object Symbol]",b="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",L="[object Float32Array]",B="[object Float64Array]",Y="[object Int8Array]",U="[object Int16Array]",M="[object Int32Array]",x="[object Uint8Array]",V="[object Uint8ClampedArray]",F="[object Uint16Array]",k="[object Uint32Array]",j=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,W=RegExp(K.source),z=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,it=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ot=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_t=/[()=,{}\[\]\/\s]/,ct=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,Tt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,ft=/^\[object .+?Constructor\]$/,Et=/^0o[0-7]+$/i,dt=/^(?:0|[1-9]\d*)$/,Nt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,St=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,At="\\ud800-\\udfff",Pt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",gt="\\u2700-\\u27bf",yt="a-z\\xdf-\\xf6\\xf8-\\xff",Rt="A-Z\\xc0-\\xd6\\xd8-\\xde",It="\\ufe0e\\ufe0f",Dt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ot="["+At+"]",Ct="["+Dt+"]",bt="["+Pt+"]",vt="\\d+",wt="["+gt+"]",Lt="["+yt+"]",Bt="[^"+At+Dt+vt+gt+yt+Rt+"]",Yt="\\ud83c[\\udffb-\\udfff]",Ut="[^"+At+"]",Mt="(?:\\ud83c[\\udde6-\\uddff]){2}",xt="[\\ud800-\\udbff][\\udc00-\\udfff]",Vt="["+Rt+"]",Ft="\\u200d",kt="(?:"+Lt+"|"+Bt+")",jt="(?:"+Vt+"|"+Bt+")",Gt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Kt="(?:"+bt+"|"+Yt+")?",Ht="["+It+"]?",Wt=Ht+Kt+"(?:"+Ft+"(?:"+[Ut,Mt,xt].join("|")+")"+Ht+Kt+")*",zt="(?:"+[wt,Mt,xt].join("|")+")"+Wt,Qt="(?:"+[Ut+bt+"?",bt,Mt,xt,Ot].join("|")+")",Xt=RegExp("['’]","g"),$t=RegExp(bt,"g"),Jt=RegExp(Yt+"(?="+Yt+")|"+Qt+Wt,"g"),Zt=RegExp([Vt+"?"+Lt+"+"+Gt+"(?="+[Ct,Vt,"$"].join("|")+")",jt+"+"+qt+"(?="+[Ct,Vt+kt,"$"].join("|")+")",Vt+"?"+kt+"+"+Gt,Vt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,zt].join("|"),"g"),te=RegExp("["+Ft+At+Pt+It+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,ie={};ie[L]=ie[B]=ie[Y]=ie[U]=ie[M]=ie[x]=ie[V]=ie[F]=ie[k]=!0,ie[f]=ie[E]=ie[v]=ie[d]=ie[w]=ie[N]=ie[S]=ie[m]=ie[P]=ie[g]=ie[y]=ie[I]=ie[D]=ie[O]=ie[b]=!1;var se={};se[f]=se[E]=se[v]=se[w]=se[d]=se[N]=se[L]=se[B]=se[Y]=se[U]=se[M]=se[P]=se[g]=se[y]=se[I]=se[D]=se[O]=se[C]=se[x]=se[V]=se[F]=se[k]=!0,se[S]=se[m]=se[b]=!1;var oe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,_e="object"==typeof global&&global&&global.Object===Object&&global,ce="object"==typeof self&&self&&self.Object===Object&&self,le=_e||ce||Function("return this")(),he=e&&!e.nodeType&&e,Te=he&&t&&!t.nodeType&&t,pe=Te&&Te.exports===he,fe=pe&&_e.process,Ee=function(){try{return Te&&Te.require&&Te.require("util").types||fe&&fe.binding&&fe.binding("util")}catch(t){}}(),de=Ee&&Ee.isArrayBuffer,Ne=Ee&&Ee.isDate,Se=Ee&&Ee.isMap,me=Ee&&Ee.isRegExp,Ae=Ee&&Ee.isSet,Pe=Ee&&Ee.isTypedArray;function ge(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ye(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}function Re(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function De(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Oe(t,e){for(var n=-1,r=null==t?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Ce(t,e){return!(null==t||!t.length)&&Ve(t,e,0)>-1}function be(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function ve(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function we(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Le(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function Be(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Ye(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Ue=Ge("length");function Me(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function xe(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}function Ve(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):xe(t,ke,n)}function Fe(t,e,n,r){for(var i=n-1,s=t.length;++i<s;)if(r(t[i],e))return i;return-1}function ke(t){return t!=t}function je(t,e){var n=null==t?0:t.length;return n?He(t,e)/n:h}function Ge(t){return function(e){return null==e?i:e[t]}}function qe(t){return function(e){return null==t?i:t[e]}}function Ke(t,e,n,r,i){return i(t,(function(t,i,s){n=r?(r=!1,t):e(n,t,i,s)})),n}function He(t,e){for(var n,r=-1,s=t.length;++r<s;){var o=e(t[r]);o!==i&&(n=n===i?o:n+o)}return n}function We(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function ze(t){return t?t.slice(0,hn(t)+1).replace(rt,""):t}function Qe(t){return function(e){return t(e)}}function Xe(t,e){return ve(e,(function(e){return t[e]}))}function $e(t,e){return t.has(e)}function Je(t,e){for(var n=-1,r=t.length;++n<r&&Ve(e,t[n],0)>-1;);return n}function Ze(t,e){for(var n=t.length;n--&&Ve(e,t[n],0)>-1;);return n}var tn=qe({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),en=qe({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(t){return"\\"+oe[t]}function rn(t){return te.test(t)}function sn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function on(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n];o!==e&&o!==a||(t[n]=a,s[i++]=n)}return s}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function _n(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function cn(t){return rn(t)?function(t){for(var e=Jt.lastIndex=0;Jt.test(t);)++e;return e}(t):Ue(t)}function ln(t){return rn(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function hn(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var Tn=qe({"&":"&","<":"<",">":">",""":'"',"'":"'"}),pn=function t(e){var n,r=(e=null==e?le:pn.defaults(le.Object(),e,pn.pick(le,ne))).Array,it=e.Date,At=e.Error,Pt=e.Function,gt=e.Math,yt=e.Object,Rt=e.RegExp,It=e.String,Dt=e.TypeError,Ot=r.prototype,Ct=Pt.prototype,bt=yt.prototype,vt=e["__core-js_shared__"],wt=Ct.toString,Lt=bt.hasOwnProperty,Bt=0,Yt=(n=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ut=bt.toString,Mt=wt.call(yt),xt=le._,Vt=Rt("^"+wt.call(Lt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ft=pe?e.Buffer:i,kt=e.Symbol,jt=e.Uint8Array,Gt=Ft?Ft.allocUnsafe:i,qt=on(yt.getPrototypeOf,yt),Kt=yt.create,Ht=bt.propertyIsEnumerable,Wt=Ot.splice,zt=kt?kt.isConcatSpreadable:i,Qt=kt?kt.iterator:i,Jt=kt?kt.toStringTag:i,te=function(){try{var t=us(yt,"defineProperty");return t({},"",{}),t}catch(t){}}(),oe=e.clearTimeout!==le.clearTimeout&&e.clearTimeout,_e=it&&it.now!==le.Date.now&&it.now,ce=e.setTimeout!==le.setTimeout&&e.setTimeout,he=gt.ceil,Te=gt.floor,fe=yt.getOwnPropertySymbols,Ee=Ft?Ft.isBuffer:i,Ue=e.isFinite,qe=Ot.join,fn=on(yt.keys,yt),En=gt.max,dn=gt.min,Nn=it.now,Sn=e.parseInt,mn=gt.random,An=Ot.reverse,Pn=us(e,"DataView"),gn=us(e,"Map"),yn=us(e,"Promise"),Rn=us(e,"Set"),In=us(e,"WeakMap"),Dn=us(yt,"create"),On=In&&new In,Cn={},bn=Us(Pn),vn=Us(gn),wn=Us(yn),Ln=Us(Rn),Bn=Us(In),Yn=kt?kt.prototype:i,Un=Yn?Yn.valueOf:i,Mn=Yn?Yn.toString:i;function xn(t){if(ta(t)&&!Go(t)&&!(t instanceof jn)){if(t instanceof kn)return t;if(Lt.call(t,"__wrapped__"))return Ms(t)}return new kn(t)}var Vn=function(){function t(){}return function(e){if(!Zo(e))return{};if(Kt)return Kt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Fn(){}function kn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function jn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=T,this.__views__=[]}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Kn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Kn;++e<n;)this.add(t[e])}function Wn(t){var e=this.__data__=new qn(t);this.size=e.size}function zn(t,e){var n=Go(t),r=!n&&jo(t),i=!n&&!r&&Wo(t),s=!n&&!r&&!i&&ua(t),o=n||r||i||s,a=o?We(t.length,It):[],u=a.length;for(var _ in t)!e&&!Lt.call(t,_)||o&&("length"==_||i&&("offset"==_||"parent"==_)||s&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||fs(_,u))||a.push(_);return a}function Qn(t){var e=t.length;return e?t[Kr(0,e-1)]:i}function Xn(t,e){return vs(Ii(t),sr(e,0,t.length))}function $n(t){return vs(Ii(t))}function Jn(t,e,n){(n!==i&&!Vo(t[e],n)||n===i&&!(e in t))&&rr(t,e,n)}function Zn(t,e,n){var r=t[e];Lt.call(t,e)&&Vo(r,n)&&(n!==i||e in t)||rr(t,e,n)}function tr(t,e){for(var n=t.length;n--;)if(Vo(t[n][0],e))return n;return-1}function er(t,e,n,r){return cr(t,(function(t,i,s){e(r,t,n(t),s)})),r}function nr(t,e){return t&&Di(e,ba(e),t)}function rr(t,e,n){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ir(t,e){for(var n=-1,s=e.length,o=r(s),a=null==t;++n<s;)o[n]=a?i:Ra(t,e[n]);return o}function sr(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function or(t,e,n,r,s,o){var a,u=1&e,_=2&e,c=4&e;if(n&&(a=s?n(t,r,s,o):n(t)),a!==i)return a;if(!Zo(t))return t;var l=Go(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Lt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Ii(t,a)}else{var h=ls(t),T=h==m||h==A;if(Wo(t))return mi(t,u);if(h==y||h==f||T&&!s){if(a=_||T?{}:Ts(t),!u)return _?function(t,e){return Di(t,cs(t),e)}(t,function(t,e){return t&&Di(e,va(e),t)}(a,t)):function(t,e){return Di(t,_s(t),e)}(t,nr(a,t))}else{if(!se[h])return s?t:{};a=function(t,e,n){var r,i=t.constructor;switch(e){case v:return Ai(t);case d:case N:return new i(+t);case w:return function(t,e){var n=e?Ai(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case L:case B:case Y:case U:case M:case x:case V:case F:case k:return Pi(t,n);case P:return new i;case g:case O:return new i(t);case I:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case D:return new i;case C:return r=t,Un?yt(Un.call(r)):{}}}(t,h,u)}}o||(o=new Wn);var p=o.get(t);if(p)return p;o.set(t,a),sa(t)?t.forEach((function(r){a.add(or(r,e,n,r,t,o))})):ea(t)&&t.forEach((function(r,i){a.set(i,or(r,e,n,i,t,o))}));var E=l?i:(c?_?es:ts:_?va:ba)(t);return Re(E||t,(function(r,i){E&&(r=t[i=r]),Zn(a,i,or(r,e,n,i,t,o))})),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=yt(t);r--;){var s=n[r],o=e[s],a=t[s];if(a===i&&!(s in t)||!o(a))return!1}return!0}function ur(t,e,n){if("function"!=typeof t)throw new Dt(s);return Ds((function(){t.apply(i,n)}),e)}function _r(t,e,n,r){var i=-1,s=Ce,o=!0,a=t.length,u=[],_=e.length;if(!a)return u;n&&(e=ve(e,Qe(n))),r?(s=be,o=!1):e.length>=200&&(s=$e,o=!1,e=new Hn(e));t:for(;++i<a;){var c=t[i],l=null==n?c:n(c);if(c=r||0!==c?c:0,o&&l==l){for(var h=_;h--;)if(e[h]===l)continue t;u.push(c)}else s(e,l,r)||u.push(c)}return u}xn.templateSettings={escape:Q,evaluate:X,interpolate:$,variable:"",imports:{_:xn}},xn.prototype=Fn.prototype,xn.prototype.constructor=xn,kn.prototype=Vn(Fn.prototype),kn.prototype.constructor=kn,jn.prototype=Vn(Fn.prototype),jn.prototype.constructor=jn,Gn.prototype.clear=function(){this.__data__=Dn?Dn(null):{},this.size=0},Gn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gn.prototype.get=function(t){var e=this.__data__;if(Dn){var n=e[t];return n===o?i:n}return Lt.call(e,t)?e[t]:i},Gn.prototype.has=function(t){var e=this.__data__;return Dn?e[t]!==i:Lt.call(e,t)},Gn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Dn&&e===i?o:e,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(t){var e=this.__data__,n=tr(e,t);return!(n<0||(n==e.length-1?e.pop():Wt.call(e,n,1),--this.size,0))},qn.prototype.get=function(t){var e=this.__data__,n=tr(e,t);return n<0?i:e[n][1]},qn.prototype.has=function(t){return tr(this.__data__,t)>-1},qn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(gn||qn),string:new Gn}},Kn.prototype.delete=function(t){var e=os(this,t).delete(t);return this.size-=e?1:0,e},Kn.prototype.get=function(t){return os(this,t).get(t)},Kn.prototype.has=function(t){return os(this,t).has(t)},Kn.prototype.set=function(t,e){var n=os(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(t){return this.__data__.set(t,o),this},Hn.prototype.has=function(t){return this.__data__.has(t)},Wn.prototype.clear=function(){this.__data__=new qn,this.size=0},Wn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Wn.prototype.get=function(t){return this.__data__.get(t)},Wn.prototype.has=function(t){return this.__data__.has(t)},Wn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!gn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(t,e),this.size=n.size,this};var cr=bi(Nr),lr=bi(Sr,!0);function hr(t,e){var n=!0;return cr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function Tr(t,e,n){for(var r=-1,s=t.length;++r<s;){var o=t[r],a=e(o);if(null!=a&&(u===i?a==a&&!aa(a):n(a,u)))var u=a,_=o}return _}function pr(t,e){var n=[];return cr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function fr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=ps),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?fr(a,e-1,n,r,i):we(i,a):r||(i[i.length]=a)}return i}var Er=vi(),dr=vi(!0);function Nr(t,e){return t&&Er(t,e,ba)}function Sr(t,e){return t&&dr(t,e,ba)}function mr(t,e){return Oe(e,(function(e){return Xo(t[e])}))}function Ar(t,e){for(var n=0,r=(e=Ei(e,t)).length;null!=t&&n<r;)t=t[Ys(e[n++])];return n&&n==r?t:i}function Pr(t,e,n){var r=e(t);return Go(t)?r:we(r,n(t))}function gr(t){return null==t?t===i?"[object Undefined]":"[object Null]":Jt&&Jt in yt(t)?function(t){var e=Lt.call(t,Jt),n=t[Jt];try{t[Jt]=i;var r=!0}catch(t){}var s=Ut.call(t);return r&&(e?t[Jt]=n:delete t[Jt]),s}(t):function(t){return Ut.call(t)}(t)}function yr(t,e){return t>e}function Rr(t,e){return null!=t&&Lt.call(t,e)}function Ir(t,e){return null!=t&&e in yt(t)}function Dr(t,e,n){for(var s=n?be:Ce,o=t[0].length,a=t.length,u=a,_=r(a),c=1/0,l=[];u--;){var h=t[u];u&&e&&(h=ve(h,Qe(e))),c=dn(h.length,c),_[u]=!n&&(e||o>=120&&h.length>=120)?new Hn(u&&h):i}h=t[0];var T=-1,p=_[0];t:for(;++T<o&&l.length<c;){var f=h[T],E=e?e(f):f;if(f=n||0!==f?f:0,!(p?$e(p,E):s(l,E,n))){for(u=a;--u;){var d=_[u];if(!(d?$e(d,E):s(t[u],E,n)))continue t}p&&p.push(E),l.push(f)}}return l}function Or(t,e,n){var r=null==(t=ys(t,e=Ei(e,t)))?t:t[Ys(zs(e))];return null==r?i:ge(r,t,n)}function Cr(t){return ta(t)&&gr(t)==f}function br(t,e,n,r,s){return t===e||(null==t||null==e||!ta(t)&&!ta(e)?t!=t&&e!=e:function(t,e,n,r,s,o){var a=Go(t),u=Go(e),_=a?E:ls(t),c=u?E:ls(e),l=(_=_==f?y:_)==y,h=(c=c==f?y:c)==y,T=_==c;if(T&&Wo(t)){if(!Wo(e))return!1;a=!0,l=!1}if(T&&!l)return o||(o=new Wn),a||ua(t)?Ji(t,e,n,r,s,o):function(t,e,n,r,i,s,o){switch(n){case w:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case v:return!(t.byteLength!=e.byteLength||!s(new jt(t),new jt(e)));case d:case N:case g:return Vo(+t,+e);case S:return t.name==e.name&&t.message==e.message;case I:case O:return t==e+"";case P:var a=sn;case D:var u=1&r;if(a||(a=un),t.size!=e.size&&!u)return!1;var _=o.get(t);if(_)return _==e;r|=2,o.set(t,e);var c=Ji(a(t),a(e),r,i,s,o);return o.delete(t),c;case C:if(Un)return Un.call(t)==Un.call(e)}return!1}(t,e,_,n,r,s,o);if(!(1&n)){var p=l&&Lt.call(t,"__wrapped__"),m=h&&Lt.call(e,"__wrapped__");if(p||m){var A=p?t.value():t,R=m?e.value():e;return o||(o=new Wn),s(A,R,n,r,o)}}return!!T&&(o||(o=new Wn),function(t,e,n,r,s,o){var a=1&n,u=ts(t),_=u.length;if(_!=ts(e).length&&!a)return!1;for(var c=_;c--;){var l=u[c];if(!(a?l in e:Lt.call(e,l)))return!1}var h=o.get(t),T=o.get(e);if(h&&T)return h==e&&T==t;var p=!0;o.set(t,e),o.set(e,t);for(var f=a;++c<_;){var E=t[l=u[c]],d=e[l];if(r)var N=a?r(d,E,l,e,t,o):r(E,d,l,t,e,o);if(!(N===i?E===d||s(E,d,n,r,o):N)){p=!1;break}f||(f="constructor"==l)}if(p&&!f){var S=t.constructor,m=e.constructor;S==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof S&&S instanceof S&&"function"==typeof m&&m instanceof m||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,s,o))}(t,e,n,r,br,s))}function vr(t,e,n,r){var s=n.length,o=s,a=!r;if(null==t)return!o;for(t=yt(t);s--;){var u=n[s];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++s<o;){var _=(u=n[s])[0],c=t[_],l=u[1];if(a&&u[2]){if(c===i&&!(_ in t))return!1}else{var h=new Wn;if(r)var T=r(c,l,_,t,e,h);if(!(T===i?br(l,c,3,r,h):T))return!1}}return!0}function wr(t){return!(!Zo(t)||(e=t,Yt&&Yt in e))&&(Xo(t)?Vt:ft).test(Us(t));var e}function Lr(t){return"function"==typeof t?t:null==t?nu:"object"==typeof t?Go(t)?xr(t[0],t[1]):Mr(t):lu(t)}function Br(t){if(!ms(t))return fn(t);var e=[];for(var n in yt(t))Lt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Yr(t,e){return t<e}function Ur(t,e){var n=-1,i=Ko(t)?r(t.length):[];return cr(t,(function(t,r,s){i[++n]=e(t,r,s)})),i}function Mr(t){var e=as(t);return 1==e.length&&e[0][2]?Ps(e[0][0],e[0][1]):function(n){return n===t||vr(n,t,e)}}function xr(t,e){return ds(t)&&As(e)?Ps(Ys(t),e):function(n){var r=Ra(n,t);return r===i&&r===e?Ia(n,t):br(e,r,3)}}function Vr(t,e,n,r,s){t!==e&&Er(e,(function(o,a){if(s||(s=new Wn),Zo(o))!function(t,e,n,r,s,o,a){var u=Rs(t,n),_=Rs(e,n),c=a.get(_);if(c)Jn(t,n,c);else{var l=o?o(u,_,n+"",t,e,a):i,h=l===i;if(h){var T=Go(_),p=!T&&Wo(_),f=!T&&!p&&ua(_);l=_,T||p||f?Go(u)?l=u:Ho(u)?l=Ii(u):p?(h=!1,l=mi(_,!0)):f?(h=!1,l=Pi(_,!0)):l=[]:ra(_)||jo(_)?(l=u,jo(u)?l=Ea(u):Zo(u)&&!Xo(u)||(l=Ts(_))):h=!1}h&&(a.set(_,l),s(l,_,r,o,a),a.delete(_)),Jn(t,n,l)}}(t,e,a,n,Vr,r,s);else{var u=r?r(Rs(t,a),o,a+"",t,e,s):i;u===i&&(u=o),Jn(t,a,u)}}),va)}function Fr(t,e){var n=t.length;if(n)return fs(e+=e<0?n:0,n)?t[e]:i}function kr(t,e,n){e=e.length?ve(e,(function(t){return Go(t)?function(e){return Ar(e,1===t.length?t[0]:t)}:t})):[nu];var r=-1;e=ve(e,Qe(ss()));var i=Ur(t,(function(t,n,i){var s=ve(e,(function(e){return e(t)}));return{criteria:s,index:++r,value:t}}));return function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,s=e.criteria,o=i.length,a=n.length;++r<o;){var u=gi(i[r],s[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function jr(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=Ar(t,o);n(a,o)&&Xr(s,Ei(o,t),a)}return s}function Gr(t,e,n,r){var i=r?Fe:Ve,s=-1,o=e.length,a=t;for(t===e&&(e=Ii(e)),n&&(a=ve(t,Qe(n)));++s<o;)for(var u=0,_=e[s],c=n?n(_):_;(u=i(a,c,u,r))>-1;)a!==t&&Wt.call(a,u,1),Wt.call(t,u,1);return t}function qr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==s){var s=i;fs(i)?Wt.call(t,i,1):ui(t,i)}}return t}function Kr(t,e){return t+Te(mn()*(e-t+1))}function Hr(t,e){var n="";if(!t||e<1||e>l)return n;do{e%2&&(n+=t),(e=Te(e/2))&&(t+=t)}while(e);return n}function Wr(t,e){return Os(gs(t,e,nu),t+"")}function zr(t){return Qn(Va(t))}function Qr(t,e){var n=Va(t);return vs(n,sr(e,0,n.length))}function Xr(t,e,n,r){if(!Zo(t))return t;for(var s=-1,o=(e=Ei(e,t)).length,a=o-1,u=t;null!=u&&++s<o;){var _=Ys(e[s]),c=n;if("__proto__"===_||"constructor"===_||"prototype"===_)return t;if(s!=a){var l=u[_];(c=r?r(l,_,u):i)===i&&(c=Zo(l)?l:fs(e[s+1])?[]:{})}Zn(u,_,c),u=u[_]}return t}var $r=On?function(t,e){return On.set(t,e),t}:nu,Jr=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Za(e),writable:!0})}:nu;function Zr(t){return vs(Va(t))}function ti(t,e,n){var i=-1,s=t.length;e<0&&(e=-e>s?0:s+e),(n=n>s?s:n)<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;for(var o=r(s);++i<s;)o[i]=t[i+e];return o}function ei(t,e){var n;return cr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ni(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=t[s];null!==o&&!aa(o)&&(n?o<=e:o<e)?r=s+1:i=s}return i}return ri(t,e,nu,n)}function ri(t,e,n,r){var s=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=n(e))!=e,u=null===e,_=aa(e),c=e===i;s<o;){var l=Te((s+o)/2),h=n(t[l]),T=h!==i,p=null===h,f=h==h,E=aa(h);if(a)var d=r||f;else d=c?f&&(r||T):u?f&&T&&(r||!p):_?f&&T&&!p&&(r||!E):!p&&!E&&(r?h<=e:h<e);d?s=l+1:o=l}return dn(o,4294967294)}function ii(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n],a=e?e(o):o;if(!n||!Vo(a,u)){var u=a;s[i++]=0===o?0:o}}return s}function si(t){return"number"==typeof t?t:aa(t)?h:+t}function oi(t){if("string"==typeof t)return t;if(Go(t))return ve(t,oi)+"";if(aa(t))return Mn?Mn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ai(t,e,n){var r=-1,i=Ce,s=t.length,o=!0,a=[],u=a;if(n)o=!1,i=be;else if(s>=200){var _=e?null:Hi(t);if(_)return un(_);o=!1,i=$e,u=new Hn}else u=e?[]:a;t:for(;++r<s;){var c=t[r],l=e?e(c):c;if(c=n||0!==c?c:0,o&&l==l){for(var h=u.length;h--;)if(u[h]===l)continue t;e&&u.push(l),a.push(c)}else i(u,l,n)||(u!==a&&u.push(l),a.push(c))}return a}function ui(t,e){return null==(t=ys(t,e=Ei(e,t)))||delete t[Ys(zs(e))]}function _i(t,e,n,r){return Xr(t,e,n(Ar(t,e)),r)}function ci(t,e,n,r){for(var i=t.length,s=r?i:-1;(r?s--:++s<i)&&e(t[s],s,t););return n?ti(t,r?0:s,r?s+1:i):ti(t,r?s+1:0,r?i:s)}function li(t,e){var n=t;return n instanceof jn&&(n=n.value()),Le(e,(function(t,e){return e.func.apply(e.thisArg,we([t],e.args))}),n)}function hi(t,e,n){var i=t.length;if(i<2)return i?ai(t[0]):[];for(var s=-1,o=r(i);++s<i;)for(var a=t[s],u=-1;++u<i;)u!=s&&(o[s]=_r(o[s]||a,t[u],e,n));return ai(fr(o,1),e,n)}function Ti(t,e,n){for(var r=-1,s=t.length,o=e.length,a={};++r<s;){var u=r<o?e[r]:i;n(a,t[r],u)}return a}function pi(t){return Ho(t)?t:[]}function fi(t){return"function"==typeof t?t:nu}function Ei(t,e){return Go(t)?t:ds(t,e)?[t]:Bs(da(t))}var di=Wr;function Ni(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:ti(t,e,n)}var Si=oe||function(t){return le.clearTimeout(t)};function mi(t,e){if(e)return t.slice();var n=t.length,r=Gt?Gt(n):new t.constructor(n);return t.copy(r),r}function Ai(t){var e=new t.constructor(t.byteLength);return new jt(e).set(new jt(t)),e}function Pi(t,e){var n=e?Ai(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function gi(t,e){if(t!==e){var n=t!==i,r=null===t,s=t==t,o=aa(t),a=e!==i,u=null===e,_=e==e,c=aa(e);if(!u&&!c&&!o&&t>e||o&&a&&_&&!u&&!c||r&&a&&_||!n&&_||!s)return 1;if(!r&&!o&&!c&&t<e||c&&n&&s&&!r&&!o||u&&n&&s||!a&&s||!_)return-1}return 0}function yi(t,e,n,i){for(var s=-1,o=t.length,a=n.length,u=-1,_=e.length,c=En(o-a,0),l=r(_+c),h=!i;++u<_;)l[u]=e[u];for(;++s<a;)(h||s<o)&&(l[n[s]]=t[s]);for(;c--;)l[u++]=t[s++];return l}function Ri(t,e,n,i){for(var s=-1,o=t.length,a=-1,u=n.length,_=-1,c=e.length,l=En(o-u,0),h=r(l+c),T=!i;++s<l;)h[s]=t[s];for(var p=s;++_<c;)h[p+_]=e[_];for(;++a<u;)(T||s<o)&&(h[p+n[a]]=t[s++]);return h}function Ii(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Di(t,e,n,r){var s=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var u=e[o],_=r?r(n[u],t[u],u,n,t):i;_===i&&(_=t[u]),s?rr(n,u,_):Zn(n,u,_)}return n}function Oi(t,e){return function(n,r){var i=Go(n)?ye:er,s=e?e():{};return i(n,t,ss(r,2),s)}}function Ci(t){return Wr((function(e,n){var r=-1,s=n.length,o=s>1?n[s-1]:i,a=s>2?n[2]:i;for(o=t.length>3&&"function"==typeof o?(s--,o):i,a&&Es(n[0],n[1],a)&&(o=s<3?i:o,s=1),e=yt(e);++r<s;){var u=n[r];u&&t(e,u,r,o)}return e}))}function bi(t,e){return function(n,r){if(null==n)return n;if(!Ko(n))return t(n,r);for(var i=n.length,s=e?i:-1,o=yt(n);(e?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function vi(t){return function(e,n,r){for(var i=-1,s=yt(e),o=r(e),a=o.length;a--;){var u=o[t?a:++i];if(!1===n(s[u],u,s))break}return e}}function wi(t){return function(e){var n=rn(e=da(e))?ln(e):i,r=n?n[0]:e.charAt(0),s=n?Ni(n,1).join(""):e.slice(1);return r[t]()+s}}function Li(t){return function(e){return Le(Xa(ja(e).replace(Xt,"")),t,"")}}function Bi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return Zo(r)?r:n}}function Yi(t){return function(e,n,r){var s=yt(e);if(!Ko(e)){var o=ss(n,3);e=ba(e),n=function(t){return o(s[t],t,s)}}var a=t(e,n,r);return a>-1?s[o?e[a]:a]:i}}function Ui(t){return Zi((function(e){var n=e.length,r=n,o=kn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new Dt(s);if(o&&!u&&"wrapper"==rs(a))var u=new kn([],!0)}for(r=u?r:n;++r<n;){var _=rs(a=e[r]),c="wrapper"==_?ns(a):i;u=c&&Ns(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[rs(c[0])].apply(u,c[3]):1==a.length&&Ns(a)?u[_]():u.thru(a)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Go(r))return u.plant(r).value();for(var i=0,s=n?e[i].apply(this,t):r;++i<n;)s=e[i].call(this,s);return s}}))}function Mi(t,e,n,s,o,a,u,c,l,h){var T=e&_,p=1&e,f=2&e,E=24&e,d=512&e,N=f?i:Bi(t);return function _(){for(var S=arguments.length,m=r(S),A=S;A--;)m[A]=arguments[A];if(E)var P=is(_),g=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(m,P);if(s&&(m=yi(m,s,o,E)),a&&(m=Ri(m,a,u,E)),S-=g,E&&S<h){var y=an(m,P);return qi(t,e,Mi,_.placeholder,n,m,y,c,l,h-S)}var R=p?n:this,I=f?R[t]:t;return S=m.length,c?m=function(t,e){for(var n=t.length,r=dn(e.length,n),s=Ii(t);r--;){var o=e[r];t[r]=fs(o,n)?s[o]:i}return t}(m,c):d&&S>1&&m.reverse(),T&&l<S&&(m.length=l),this&&this!==le&&this instanceof _&&(I=N||Bi(I)),I.apply(R,m)}}function xi(t,e){return function(n,r){return function(t,e,n,r){return Nr(t,(function(t,i,s){e(r,n(t),i,s)})),r}(n,t,e(r),{})}}function Vi(t,e){return function(n,r){var s;if(n===i&&r===i)return e;if(n!==i&&(s=n),r!==i){if(s===i)return r;"string"==typeof n||"string"==typeof r?(n=oi(n),r=oi(r)):(n=si(n),r=si(r)),s=t(n,r)}return s}}function Fi(t){return Zi((function(e){return e=ve(e,Qe(ss())),Wr((function(n){var r=this;return t(e,(function(t){return ge(t,r,n)}))}))}))}function ki(t,e){var n=(e=e===i?" ":oi(e)).length;if(n<2)return n?Hr(e,t):e;var r=Hr(e,he(t/cn(e)));return rn(e)?Ni(ln(r),0,t).join(""):r.slice(0,t)}function ji(t){return function(e,n,s){return s&&"number"!=typeof s&&Es(e,n,s)&&(n=s=i),e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n,i){for(var s=-1,o=En(he((e-t)/(n||1)),0),a=r(o);o--;)a[i?o:++s]=t,t+=n;return a}(e,n,s=s===i?e<n?1:-1:ha(s),t)}}function Gi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=fa(e),n=fa(n)),t(e,n)}}function qi(t,e,n,r,s,o,a,_,c,l){var h=8&e;e|=h?u:64,4&(e&=~(h?64:u))||(e&=-4);var T=[t,e,s,h?o:i,h?a:i,h?i:o,h?i:a,_,c,l],p=n.apply(i,T);return Ns(t)&&Is(p,T),p.placeholder=r,Cs(p,t,e)}function Ki(t){var e=gt[t];return function(t,n){if(t=fa(t),(n=null==n?0:dn(Ta(n),292))&&Ue(t)){var r=(da(t)+"e").split("e");return+((r=(da(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Hi=Rn&&1/un(new Rn([,-0]))[1]==c?function(t){return new Rn(t)}:au;function Wi(t){return function(e){var n=ls(e);return n==P?sn(e):n==D?_n(e):function(t,e){return ve(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function zi(t,e,n,o,c,l,h,T){var p=2&e;if(!p&&"function"!=typeof t)throw new Dt(s);var f=o?o.length:0;if(f||(e&=-97,o=c=i),h=h===i?h:En(Ta(h),0),T=T===i?T:Ta(T),f-=c?c.length:0,64&e){var E=o,d=c;o=c=i}var N=p?i:ns(t),S=[t,e,n,o,c,E,d,l,h,T];if(N&&function(t,e){var n=t[1],r=e[1],i=n|r,s=i<131,o=r==_&&8==n||r==_&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!s&&!o)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?yi(c,u,e[4]):u,t[4]=c?an(t[3],a):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Ri(c,u,e[6]):u,t[6]=c?an(t[5],a):e[6]),(u=e[7])&&(t[7]=u),r&_&&(t[8]=null==t[8]?e[8]:dn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,N),t=S[0],e=S[1],n=S[2],o=S[3],c=S[4],!(T=S[9]=S[9]===i?p?0:t.length:En(S[9]-f,0))&&24&e&&(e&=-25),e&&1!=e)m=8==e||16==e?function(t,e,n){var s=Bi(t);return function o(){for(var a=arguments.length,u=r(a),_=a,c=is(o);_--;)u[_]=arguments[_];var l=a<3&&u[0]!==c&&u[a-1]!==c?[]:an(u,c);return(a-=l.length)<n?qi(t,e,Mi,o.placeholder,i,u,l,i,i,n-a):ge(this&&this!==le&&this instanceof o?s:t,this,u)}}(t,e,T):e!=u&&33!=e||c.length?Mi.apply(i,S):function(t,e,n,i){var s=1&e,o=Bi(t);return function e(){for(var a=-1,u=arguments.length,_=-1,c=i.length,l=r(c+u),h=this&&this!==le&&this instanceof e?o:t;++_<c;)l[_]=i[_];for(;u--;)l[_++]=arguments[++a];return ge(h,s?n:this,l)}}(t,e,n,o);else var m=function(t,e,n){var r=1&e,i=Bi(t);return function e(){return(this&&this!==le&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Cs((N?$r:Is)(m,S),t,e)}function Qi(t,e,n,r){return t===i||Vo(t,bt[n])&&!Lt.call(r,n)?e:t}function Xi(t,e,n,r,s,o){return Zo(t)&&Zo(e)&&(o.set(e,t),Vr(t,e,i,Xi,o),o.delete(e)),t}function $i(t){return ra(t)?i:t}function Ji(t,e,n,r,s,o){var a=1&n,u=t.length,_=e.length;if(u!=_&&!(a&&_>u))return!1;var c=o.get(t),l=o.get(e);if(c&&l)return c==e&&l==t;var h=-1,T=!0,p=2&n?new Hn:i;for(o.set(t,e),o.set(e,t);++h<u;){var f=t[h],E=e[h];if(r)var d=a?r(E,f,h,e,t,o):r(f,E,h,t,e,o);if(d!==i){if(d)continue;T=!1;break}if(p){if(!Ye(e,(function(t,e){if(!$e(p,e)&&(f===t||s(f,t,n,r,o)))return p.push(e)}))){T=!1;break}}else if(f!==E&&!s(f,E,n,r,o)){T=!1;break}}return o.delete(t),o.delete(e),T}function Zi(t){return Os(gs(t,i,Gs),t+"")}function ts(t){return Pr(t,ba,_s)}function es(t){return Pr(t,va,cs)}var ns=On?function(t){return On.get(t)}:au;function rs(t){for(var e=t.name+"",n=Cn[e],r=Lt.call(Cn,e)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==t)return i.name}return e}function is(t){return(Lt.call(xn,"placeholder")?xn:t).placeholder}function ss(){var t=xn.iteratee||ru;return t=t===ru?Lr:t,arguments.length?t(arguments[0],arguments[1]):t}function os(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function as(t){for(var e=ba(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,As(i)]}return e}function us(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return wr(n)?n:i}var _s=fe?function(t){return null==t?[]:(t=yt(t),Oe(fe(t),(function(e){return Ht.call(t,e)})))}:pu,cs=fe?function(t){for(var e=[];t;)we(e,_s(t)),t=qt(t);return e}:pu,ls=gr;function hs(t,e,n){for(var r=-1,i=(e=Ei(e,t)).length,s=!1;++r<i;){var o=Ys(e[r]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++r!=i?s:!!(i=null==t?0:t.length)&&Jo(i)&&fs(o,i)&&(Go(t)||jo(t))}function Ts(t){return"function"!=typeof t.constructor||ms(t)?{}:Vn(qt(t))}function ps(t){return Go(t)||jo(t)||!!(zt&&t&&t[zt])}function fs(t,e){var n=typeof t;return!!(e=null==e?l:e)&&("number"==n||"symbol"!=n&&dt.test(t))&&t>-1&&t%1==0&&t<e}function Es(t,e,n){if(!Zo(n))return!1;var r=typeof e;return!!("number"==r?Ko(n)&&fs(e,n.length):"string"==r&&e in n)&&Vo(n[e],t)}function ds(t,e){if(Go(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!aa(t))||Z.test(t)||!J.test(t)||null!=e&&t in yt(e)}function Ns(t){var e=rs(t),n=xn[e];if("function"!=typeof n||!(e in jn.prototype))return!1;if(t===n)return!0;var r=ns(n);return!!r&&t===r[0]}(Pn&&ls(new Pn(new ArrayBuffer(1)))!=w||gn&&ls(new gn)!=P||yn&&ls(yn.resolve())!=R||Rn&&ls(new Rn)!=D||In&&ls(new In)!=b)&&(ls=function(t){var e=gr(t),n=e==y?t.constructor:i,r=n?Us(n):"";if(r)switch(r){case bn:return w;case vn:return P;case wn:return R;case Ln:return D;case Bn:return b}return e});var Ss=vt?Xo:fu;function ms(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||bt)}function As(t){return t==t&&!Zo(t)}function Ps(t,e){return function(n){return null!=n&&n[t]===e&&(e!==i||t in yt(n))}}function gs(t,e,n){return e=En(e===i?t.length-1:e,0),function(){for(var i=arguments,s=-1,o=En(i.length-e,0),a=r(o);++s<o;)a[s]=i[e+s];s=-1;for(var u=r(e+1);++s<e;)u[s]=i[s];return u[e]=n(a),ge(t,this,u)}}function ys(t,e){return e.length<2?t:Ar(t,ti(e,0,-1))}function Rs(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Is=bs($r),Ds=ce||function(t,e){return le.setTimeout(t,e)},Os=bs(Jr);function Cs(t,e,n){var r=e+"";return Os(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Re(p,(function(n){var r="_."+n[0];e&n[1]&&!Ce(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ot);return e?e[1].split(at):[]}(r),n)))}function bs(t){var e=0,n=0;return function(){var r=Nn(),s=16-(r-n);if(n=r,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function vs(t,e){var n=-1,r=t.length,s=r-1;for(e=e===i?r:e;++n<e;){var o=Kr(n,s),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var ws,Ls,Bs=(ws=Lo((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,i){e.push(r?i.replace(ct,"$1"):n||t)})),e}),(function(t){return 500===Ls.size&&Ls.clear(),t})),Ls=ws.cache,ws);function Ys(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Us(t){if(null!=t){try{return wt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ms(t){if(t instanceof jn)return t.clone();var e=new kn(t.__wrapped__,t.__chain__);return e.__actions__=Ii(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var xs=Wr((function(t,e){return Ho(t)?_r(t,fr(e,1,Ho,!0)):[]})),Vs=Wr((function(t,e){var n=zs(e);return Ho(n)&&(n=i),Ho(t)?_r(t,fr(e,1,Ho,!0),ss(n,2)):[]})),Fs=Wr((function(t,e){var n=zs(e);return Ho(n)&&(n=i),Ho(t)?_r(t,fr(e,1,Ho,!0),i,n):[]}));function ks(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Ta(n);return i<0&&(i=En(r+i,0)),xe(t,ss(e,3),i)}function js(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r-1;return n!==i&&(s=Ta(n),s=n<0?En(r+s,0):dn(s,r-1)),xe(t,ss(e,3),s,!0)}function Gs(t){return null!=t&&t.length?fr(t,1):[]}function qs(t){return t&&t.length?t[0]:i}var Ks=Wr((function(t){var e=ve(t,pi);return e.length&&e[0]===t[0]?Dr(e):[]})),Hs=Wr((function(t){var e=zs(t),n=ve(t,pi);return e===zs(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Dr(n,ss(e,2)):[]})),Ws=Wr((function(t){var e=zs(t),n=ve(t,pi);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Dr(n,i,e):[]}));function zs(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Qs=Wr(Xs);function Xs(t,e){return t&&t.length&&e&&e.length?Gr(t,e):t}var $s=Zi((function(t,e){var n=null==t?0:t.length,r=ir(t,e);return qr(t,ve(e,(function(t){return fs(t,n)?+t:t})).sort(gi)),r}));function Js(t){return null==t?t:An.call(t)}var Zs=Wr((function(t){return ai(fr(t,1,Ho,!0))})),to=Wr((function(t){var e=zs(t);return Ho(e)&&(e=i),ai(fr(t,1,Ho,!0),ss(e,2))})),eo=Wr((function(t){var e=zs(t);return e="function"==typeof e?e:i,ai(fr(t,1,Ho,!0),i,e)}));function no(t){if(!t||!t.length)return[];var e=0;return t=Oe(t,(function(t){if(Ho(t))return e=En(t.length,e),!0})),We(e,(function(e){return ve(t,Ge(e))}))}function ro(t,e){if(!t||!t.length)return[];var n=no(t);return null==e?n:ve(n,(function(t){return ge(e,i,t)}))}var io=Wr((function(t,e){return Ho(t)?_r(t,e):[]})),so=Wr((function(t){return hi(Oe(t,Ho))})),oo=Wr((function(t){var e=zs(t);return Ho(e)&&(e=i),hi(Oe(t,Ho),ss(e,2))})),ao=Wr((function(t){var e=zs(t);return e="function"==typeof e?e:i,hi(Oe(t,Ho),i,e)})),uo=Wr(no),_o=Wr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,ro(t,n)}));function co(t){var e=xn(t);return e.__chain__=!0,e}function lo(t,e){return e(t)}var ho=Zi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,s=function(e){return ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof jn&&fs(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:lo,args:[s],thisArg:i}),new kn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(s)})),To=Oi((function(t,e,n){Lt.call(t,n)?++t[n]:rr(t,n,1)})),po=Yi(ks),fo=Yi(js);function Eo(t,e){return(Go(t)?Re:cr)(t,ss(e,3))}function No(t,e){return(Go(t)?Ie:lr)(t,ss(e,3))}var So=Oi((function(t,e,n){Lt.call(t,n)?t[n].push(e):rr(t,n,[e])})),mo=Wr((function(t,e,n){var i=-1,s="function"==typeof e,o=Ko(t)?r(t.length):[];return cr(t,(function(t){o[++i]=s?ge(e,t,n):Or(t,e,n)})),o})),Ao=Oi((function(t,e,n){rr(t,n,e)}));function Po(t,e){return(Go(t)?ve:Ur)(t,ss(e,3))}var go=Oi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),yo=Wr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Es(t,e[0],e[1])?e=[]:n>2&&Es(e[0],e[1],e[2])&&(e=[e[0]]),kr(t,fr(e,1),[])})),Ro=_e||function(){return le.Date.now()};function Io(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,zi(t,_,i,i,i,i,e)}function Do(t,e){var n;if("function"!=typeof e)throw new Dt(s);return t=Ta(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Oo=Wr((function(t,e,n){var r=1;if(n.length){var i=an(n,is(Oo));r|=u}return zi(t,r,e,n,i)})),Co=Wr((function(t,e,n){var r=3;if(n.length){var i=an(n,is(Co));r|=u}return zi(e,r,t,n,i)}));function bo(t,e,n){var r,o,a,u,_,c,l=0,h=!1,T=!1,p=!0;if("function"!=typeof t)throw new Dt(s);function f(e){var n=r,s=o;return r=o=i,l=e,u=t.apply(s,n)}function E(t){var n=t-c;return c===i||n>=e||n<0||T&&t-l>=a}function d(){var t=Ro();if(E(t))return N(t);_=Ds(d,function(t){var n=e-(t-c);return T?dn(n,a-(t-l)):n}(t))}function N(t){return _=i,p&&r?f(t):(r=o=i,u)}function S(){var t=Ro(),n=E(t);if(r=arguments,o=this,c=t,n){if(_===i)return function(t){return l=t,_=Ds(d,e),h?f(t):u}(c);if(T)return Si(_),_=Ds(d,e),f(c)}return _===i&&(_=Ds(d,e)),u}return e=fa(e)||0,Zo(n)&&(h=!!n.leading,a=(T="maxWait"in n)?En(fa(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),S.cancel=function(){_!==i&&Si(_),l=0,r=c=o=_=i},S.flush=function(){return _===i?u:N(Ro())},S}var vo=Wr((function(t,e){return ur(t,1,e)})),wo=Wr((function(t,e,n){return ur(t,fa(e)||0,n)}));function Lo(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Dt(s);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Lo.Cache||Kn),n}function Bo(t){if("function"!=typeof t)throw new Dt(s);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Lo.Cache=Kn;var Yo=di((function(t,e){var n=(e=1==e.length&&Go(e[0])?ve(e[0],Qe(ss())):ve(fr(e,1),Qe(ss()))).length;return Wr((function(r){for(var i=-1,s=dn(r.length,n);++i<s;)r[i]=e[i].call(this,r[i]);return ge(t,this,r)}))})),Uo=Wr((function(t,e){var n=an(e,is(Uo));return zi(t,u,i,e,n)})),Mo=Wr((function(t,e){var n=an(e,is(Mo));return zi(t,64,i,e,n)})),xo=Zi((function(t,e){return zi(t,256,i,i,i,e)}));function Vo(t,e){return t===e||t!=t&&e!=e}var Fo=Gi(yr),ko=Gi((function(t,e){return t>=e})),jo=Cr(function(){return arguments}())?Cr:function(t){return ta(t)&&Lt.call(t,"callee")&&!Ht.call(t,"callee")},Go=r.isArray,qo=de?Qe(de):function(t){return ta(t)&&gr(t)==v};function Ko(t){return null!=t&&Jo(t.length)&&!Xo(t)}function Ho(t){return ta(t)&&Ko(t)}var Wo=Ee||fu,zo=Ne?Qe(Ne):function(t){return ta(t)&&gr(t)==N};function Qo(t){if(!ta(t))return!1;var e=gr(t);return e==S||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Xo(t){if(!Zo(t))return!1;var e=gr(t);return e==m||e==A||"[object AsyncFunction]"==e||"[object Proxy]"==e}function $o(t){return"number"==typeof t&&t==Ta(t)}function Jo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Zo(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=Se?Qe(Se):function(t){return ta(t)&&ls(t)==P};function na(t){return"number"==typeof t||ta(t)&&gr(t)==g}function ra(t){if(!ta(t)||gr(t)!=y)return!1;var e=qt(t);if(null===e)return!0;var n=Lt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&wt.call(n)==Mt}var ia=me?Qe(me):function(t){return ta(t)&&gr(t)==I},sa=Ae?Qe(Ae):function(t){return ta(t)&&ls(t)==D};function oa(t){return"string"==typeof t||!Go(t)&&ta(t)&&gr(t)==O}function aa(t){return"symbol"==typeof t||ta(t)&&gr(t)==C}var ua=Pe?Qe(Pe):function(t){return ta(t)&&Jo(t.length)&&!!ie[gr(t)]},_a=Gi(Yr),ca=Gi((function(t,e){return t<=e}));function la(t){if(!t)return[];if(Ko(t))return oa(t)?ln(t):Ii(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=ls(t);return(e==P?sn:e==D?un:Va)(t)}function ha(t){return t?(t=fa(t))===c||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function Ta(t){var e=ha(t),n=e%1;return e==e?n?e-n:e:0}function pa(t){return t?sr(Ta(t),0,T):0}function fa(t){if("number"==typeof t)return t;if(aa(t))return h;if(Zo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ze(t);var n=pt.test(t);return n||Et.test(t)?ue(t.slice(2),n?2:8):Tt.test(t)?h:+t}function Ea(t){return Di(t,va(t))}function da(t){return null==t?"":oi(t)}var Na=Ci((function(t,e){if(ms(e)||Ko(e))Di(e,ba(e),t);else for(var n in e)Lt.call(e,n)&&Zn(t,n,e[n])})),Sa=Ci((function(t,e){Di(e,va(e),t)})),ma=Ci((function(t,e,n,r){Di(e,va(e),t,r)})),Aa=Ci((function(t,e,n,r){Di(e,ba(e),t,r)})),Pa=Zi(ir),ga=Wr((function(t,e){t=yt(t);var n=-1,r=e.length,s=r>2?e[2]:i;for(s&&Es(e[0],e[1],s)&&(r=1);++n<r;)for(var o=e[n],a=va(o),u=-1,_=a.length;++u<_;){var c=a[u],l=t[c];(l===i||Vo(l,bt[c])&&!Lt.call(t,c))&&(t[c]=o[c])}return t})),ya=Wr((function(t){return t.push(i,Xi),ge(La,i,t)}));function Ra(t,e,n){var r=null==t?i:Ar(t,e);return r===i?n:r}function Ia(t,e){return null!=t&&hs(t,e,Ir)}var Da=xi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ut.call(e)),t[e]=n}),Za(nu)),Oa=xi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ut.call(e)),Lt.call(t,e)?t[e].push(n):t[e]=[n]}),ss),Ca=Wr(Or);function ba(t){return Ko(t)?zn(t):Br(t)}function va(t){return Ko(t)?zn(t,!0):function(t){if(!Zo(t))return function(t){var e=[];if(null!=t)for(var n in yt(t))e.push(n);return e}(t);var e=ms(t),n=[];for(var r in t)("constructor"!=r||!e&&Lt.call(t,r))&&n.push(r);return n}(t)}var wa=Ci((function(t,e,n){Vr(t,e,n)})),La=Ci((function(t,e,n,r){Vr(t,e,n,r)})),Ba=Zi((function(t,e){var n={};if(null==t)return n;var r=!1;e=ve(e,(function(e){return e=Ei(e,t),r||(r=e.length>1),e})),Di(t,es(t),n),r&&(n=or(n,7,$i));for(var i=e.length;i--;)ui(n,e[i]);return n})),Ya=Zi((function(t,e){return null==t?{}:function(t,e){return jr(t,e,(function(e,n){return Ia(t,n)}))}(t,e)}));function Ua(t,e){if(null==t)return{};var n=ve(es(t),(function(t){return[t]}));return e=ss(e),jr(t,n,(function(t,n){return e(t,n[0])}))}var Ma=Wi(ba),xa=Wi(va);function Va(t){return null==t?[]:Xe(t,ba(t))}var Fa=Li((function(t,e,n){return e=e.toLowerCase(),t+(n?ka(e):e)}));function ka(t){return Qa(da(t).toLowerCase())}function ja(t){return(t=da(t))&&t.replace(Nt,tn).replace($t,"")}var Ga=Li((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),qa=Li((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ka=wi("toLowerCase"),Ha=Li((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Wa=Li((function(t,e,n){return t+(n?" ":"")+Qa(e)})),za=Li((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Qa=wi("toUpperCase");function Xa(t,e,n){return t=da(t),(e=n?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var $a=Wr((function(t,e){try{return ge(t,i,e)}catch(t){return Qo(t)?t:new At(t)}})),Ja=Zi((function(t,e){return Re(e,(function(e){e=Ys(e),rr(t,e,Oo(t[e],t))})),t}));function Za(t){return function(){return t}}var tu=Ui(),eu=Ui(!0);function nu(t){return t}function ru(t){return Lr("function"==typeof t?t:or(t,1))}var iu=Wr((function(t,e){return function(n){return Or(n,t,e)}})),su=Wr((function(t,e){return function(n){return Or(t,n,e)}}));function ou(t,e,n){var r=ba(e),i=mr(e,r);null!=n||Zo(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=mr(e,ba(e)));var s=!(Zo(n)&&"chain"in n&&!n.chain),o=Xo(t);return Re(i,(function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,we([this.value()],arguments))})})),t}function au(){}var uu=Fi(ve),_u=Fi(De),cu=Fi(Ye);function lu(t){return ds(t)?Ge(Ys(t)):function(t){return function(e){return Ar(e,t)}}(t)}var hu=ji(),Tu=ji(!0);function pu(){return[]}function fu(){return!1}var Eu,du=Vi((function(t,e){return t+e}),0),Nu=Ki("ceil"),Su=Vi((function(t,e){return t/e}),1),mu=Ki("floor"),Au=Vi((function(t,e){return t*e}),1),Pu=Ki("round"),gu=Vi((function(t,e){return t-e}),0);return xn.after=function(t,e){if("function"!=typeof e)throw new Dt(s);return t=Ta(t),function(){if(--t<1)return e.apply(this,arguments)}},xn.ary=Io,xn.assign=Na,xn.assignIn=Sa,xn.assignInWith=ma,xn.assignWith=Aa,xn.at=Pa,xn.before=Do,xn.bind=Oo,xn.bindAll=Ja,xn.bindKey=Co,xn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Go(t)?t:[t]},xn.chain=co,xn.chunk=function(t,e,n){e=(n?Es(t,e,n):e===i)?1:En(Ta(e),0);var s=null==t?0:t.length;if(!s||e<1)return[];for(var o=0,a=0,u=r(he(s/e));o<s;)u[a++]=ti(t,o,o+=e);return u},xn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i},xn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return we(Go(n)?Ii(n):[n],fr(e,1))},xn.cond=function(t){var e=null==t?0:t.length,n=ss();return t=e?ve(t,(function(t){if("function"!=typeof t[1])throw new Dt(s);return[n(t[0]),t[1]]})):[],Wr((function(n){for(var r=-1;++r<e;){var i=t[r];if(ge(i[0],this,n))return ge(i[1],this,n)}}))},xn.conforms=function(t){return function(t){var e=ba(t);return function(n){return ar(n,t,e)}}(or(t,1))},xn.constant=Za,xn.countBy=To,xn.create=function(t,e){var n=Vn(t);return null==e?n:nr(n,e)},xn.curry=function t(e,n,r){var s=zi(e,8,i,i,i,i,i,n=r?i:n);return s.placeholder=t.placeholder,s},xn.curryRight=function t(e,n,r){var s=zi(e,16,i,i,i,i,i,n=r?i:n);return s.placeholder=t.placeholder,s},xn.debounce=bo,xn.defaults=ga,xn.defaultsDeep=ya,xn.defer=vo,xn.delay=wo,xn.difference=xs,xn.differenceBy=Vs,xn.differenceWith=Fs,xn.drop=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,(e=n||e===i?1:Ta(e))<0?0:e,r):[]},xn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,0,(e=r-(e=n||e===i?1:Ta(e)))<0?0:e):[]},xn.dropRightWhile=function(t,e){return t&&t.length?ci(t,ss(e,3),!0,!0):[]},xn.dropWhile=function(t,e){return t&&t.length?ci(t,ss(e,3),!0):[]},xn.fill=function(t,e,n,r){var s=null==t?0:t.length;return s?(n&&"number"!=typeof n&&Es(t,e,n)&&(n=0,r=s),function(t,e,n,r){var s=t.length;for((n=Ta(n))<0&&(n=-n>s?0:s+n),(r=r===i||r>s?s:Ta(r))<0&&(r+=s),r=n>r?0:pa(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},xn.filter=function(t,e){return(Go(t)?Oe:pr)(t,ss(e,3))},xn.flatMap=function(t,e){return fr(Po(t,e),1)},xn.flatMapDeep=function(t,e){return fr(Po(t,e),c)},xn.flatMapDepth=function(t,e,n){return n=n===i?1:Ta(n),fr(Po(t,e),n)},xn.flatten=Gs,xn.flattenDeep=function(t){return null!=t&&t.length?fr(t,c):[]},xn.flattenDepth=function(t,e){return null!=t&&t.length?fr(t,e=e===i?1:Ta(e)):[]},xn.flip=function(t){return zi(t,512)},xn.flow=tu,xn.flowRight=eu,xn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},xn.functions=function(t){return null==t?[]:mr(t,ba(t))},xn.functionsIn=function(t){return null==t?[]:mr(t,va(t))},xn.groupBy=So,xn.initial=function(t){return null!=t&&t.length?ti(t,0,-1):[]},xn.intersection=Ks,xn.intersectionBy=Hs,xn.intersectionWith=Ws,xn.invert=Da,xn.invertBy=Oa,xn.invokeMap=mo,xn.iteratee=ru,xn.keyBy=Ao,xn.keys=ba,xn.keysIn=va,xn.map=Po,xn.mapKeys=function(t,e){var n={};return e=ss(e,3),Nr(t,(function(t,r,i){rr(n,e(t,r,i),t)})),n},xn.mapValues=function(t,e){var n={};return e=ss(e,3),Nr(t,(function(t,r,i){rr(n,r,e(t,r,i))})),n},xn.matches=function(t){return Mr(or(t,1))},xn.matchesProperty=function(t,e){return xr(t,or(e,1))},xn.memoize=Lo,xn.merge=wa,xn.mergeWith=La,xn.method=iu,xn.methodOf=su,xn.mixin=ou,xn.negate=Bo,xn.nthArg=function(t){return t=Ta(t),Wr((function(e){return Fr(e,t)}))},xn.omit=Ba,xn.omitBy=function(t,e){return Ua(t,Bo(ss(e)))},xn.once=function(t){return Do(2,t)},xn.orderBy=function(t,e,n,r){return null==t?[]:(Go(e)||(e=null==e?[]:[e]),Go(n=r?i:n)||(n=null==n?[]:[n]),kr(t,e,n))},xn.over=uu,xn.overArgs=Yo,xn.overEvery=_u,xn.overSome=cu,xn.partial=Uo,xn.partialRight=Mo,xn.partition=go,xn.pick=Ya,xn.pickBy=Ua,xn.property=lu,xn.propertyOf=function(t){return function(e){return null==t?i:Ar(t,e)}},xn.pull=Qs,xn.pullAll=Xs,xn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,ss(n,2)):t},xn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,i,n):t},xn.pullAt=$s,xn.range=hu,xn.rangeRight=Tu,xn.rearg=xo,xn.reject=function(t,e){return(Go(t)?Oe:pr)(t,Bo(ss(e,3)))},xn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],s=t.length;for(e=ss(e,3);++r<s;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return qr(t,i),n},xn.rest=function(t,e){if("function"!=typeof t)throw new Dt(s);return Wr(t,e=e===i?e:Ta(e))},xn.reverse=Js,xn.sampleSize=function(t,e,n){return e=(n?Es(t,e,n):e===i)?1:Ta(e),(Go(t)?Xn:Qr)(t,e)},xn.set=function(t,e,n){return null==t?t:Xr(t,e,n)},xn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:Xr(t,e,n,r)},xn.shuffle=function(t){return(Go(t)?$n:Zr)(t)},xn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Es(t,e,n)?(e=0,n=r):(e=null==e?0:Ta(e),n=n===i?r:Ta(n)),ti(t,e,n)):[]},xn.sortBy=yo,xn.sortedUniq=function(t){return t&&t.length?ii(t):[]},xn.sortedUniqBy=function(t,e){return t&&t.length?ii(t,ss(e,2)):[]},xn.split=function(t,e,n){return n&&"number"!=typeof n&&Es(t,e,n)&&(e=n=i),(n=n===i?T:n>>>0)?(t=da(t))&&("string"==typeof e||null!=e&&!ia(e))&&!(e=oi(e))&&rn(t)?Ni(ln(t),0,n):t.split(e,n):[]},xn.spread=function(t,e){if("function"!=typeof t)throw new Dt(s);return e=null==e?0:En(Ta(e),0),Wr((function(n){var r=n[e],i=Ni(n,0,e);return r&&we(i,r),ge(t,this,i)}))},xn.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},xn.take=function(t,e,n){return t&&t.length?ti(t,0,(e=n||e===i?1:Ta(e))<0?0:e):[]},xn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,(e=r-(e=n||e===i?1:Ta(e)))<0?0:e,r):[]},xn.takeRightWhile=function(t,e){return t&&t.length?ci(t,ss(e,3),!1,!0):[]},xn.takeWhile=function(t,e){return t&&t.length?ci(t,ss(e,3)):[]},xn.tap=function(t,e){return e(t),t},xn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Dt(s);return Zo(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),bo(t,e,{leading:r,maxWait:e,trailing:i})},xn.thru=lo,xn.toArray=la,xn.toPairs=Ma,xn.toPairsIn=xa,xn.toPath=function(t){return Go(t)?ve(t,Ys):aa(t)?[t]:Ii(Bs(da(t)))},xn.toPlainObject=Ea,xn.transform=function(t,e,n){var r=Go(t),i=r||Wo(t)||ua(t);if(e=ss(e,4),null==n){var s=t&&t.constructor;n=i?r?new s:[]:Zo(t)&&Xo(s)?Vn(qt(t)):{}}return(i?Re:Nr)(t,(function(t,r,i){return e(n,t,r,i)})),n},xn.unary=function(t){return Io(t,1)},xn.union=Zs,xn.unionBy=to,xn.unionWith=eo,xn.uniq=function(t){return t&&t.length?ai(t):[]},xn.uniqBy=function(t,e){return t&&t.length?ai(t,ss(e,2)):[]},xn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ai(t,i,e):[]},xn.unset=function(t,e){return null==t||ui(t,e)},xn.unzip=no,xn.unzipWith=ro,xn.update=function(t,e,n){return null==t?t:_i(t,e,fi(n))},xn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:_i(t,e,fi(n),r)},xn.values=Va,xn.valuesIn=function(t){return null==t?[]:Xe(t,va(t))},xn.without=io,xn.words=Xa,xn.wrap=function(t,e){return Uo(fi(e),t)},xn.xor=so,xn.xorBy=oo,xn.xorWith=ao,xn.zip=uo,xn.zipObject=function(t,e){return Ti(t||[],e||[],Zn)},xn.zipObjectDeep=function(t,e){return Ti(t||[],e||[],Xr)},xn.zipWith=_o,xn.entries=Ma,xn.entriesIn=xa,xn.extend=Sa,xn.extendWith=ma,ou(xn,xn),xn.add=du,xn.attempt=$a,xn.camelCase=Fa,xn.capitalize=ka,xn.ceil=Nu,xn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=fa(n))==n?n:0),e!==i&&(e=(e=fa(e))==e?e:0),sr(fa(t),e,n)},xn.clone=function(t){return or(t,4)},xn.cloneDeep=function(t){return or(t,5)},xn.cloneDeepWith=function(t,e){return or(t,5,e="function"==typeof e?e:i)},xn.cloneWith=function(t,e){return or(t,4,e="function"==typeof e?e:i)},xn.conformsTo=function(t,e){return null==e||ar(t,e,ba(e))},xn.deburr=ja,xn.defaultTo=function(t,e){return null==t||t!=t?e:t},xn.divide=Su,xn.endsWith=function(t,e,n){t=da(t),e=oi(e);var r=t.length,s=n=n===i?r:sr(Ta(n),0,r);return(n-=e.length)>=0&&t.slice(n,s)==e},xn.eq=Vo,xn.escape=function(t){return(t=da(t))&&z.test(t)?t.replace(H,en):t},xn.escapeRegExp=function(t){return(t=da(t))&&nt.test(t)?t.replace(et,"\\$&"):t},xn.every=function(t,e,n){var r=Go(t)?De:hr;return n&&Es(t,e,n)&&(e=i),r(t,ss(e,3))},xn.find=po,xn.findIndex=ks,xn.findKey=function(t,e){return Me(t,ss(e,3),Nr)},xn.findLast=fo,xn.findLastIndex=js,xn.findLastKey=function(t,e){return Me(t,ss(e,3),Sr)},xn.floor=mu,xn.forEach=Eo,xn.forEachRight=No,xn.forIn=function(t,e){return null==t?t:Er(t,ss(e,3),va)},xn.forInRight=function(t,e){return null==t?t:dr(t,ss(e,3),va)},xn.forOwn=function(t,e){return t&&Nr(t,ss(e,3))},xn.forOwnRight=function(t,e){return t&&Sr(t,ss(e,3))},xn.get=Ra,xn.gt=Fo,xn.gte=ko,xn.has=function(t,e){return null!=t&&hs(t,e,Rr)},xn.hasIn=Ia,xn.head=qs,xn.identity=nu,xn.includes=function(t,e,n,r){t=Ko(t)?t:Va(t),n=n&&!r?Ta(n):0;var i=t.length;return n<0&&(n=En(i+n,0)),oa(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ve(t,e,n)>-1},xn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Ta(n);return i<0&&(i=En(r+i,0)),Ve(t,e,i)},xn.inRange=function(t,e,n){return e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n){return t>=dn(e,n)&&t<En(e,n)}(t=fa(t),e,n)},xn.invoke=Ca,xn.isArguments=jo,xn.isArray=Go,xn.isArrayBuffer=qo,xn.isArrayLike=Ko,xn.isArrayLikeObject=Ho,xn.isBoolean=function(t){return!0===t||!1===t||ta(t)&&gr(t)==d},xn.isBuffer=Wo,xn.isDate=zo,xn.isElement=function(t){return ta(t)&&1===t.nodeType&&!ra(t)},xn.isEmpty=function(t){if(null==t)return!0;if(Ko(t)&&(Go(t)||"string"==typeof t||"function"==typeof t.splice||Wo(t)||ua(t)||jo(t)))return!t.length;var e=ls(t);if(e==P||e==D)return!t.size;if(ms(t))return!Br(t).length;for(var n in t)if(Lt.call(t,n))return!1;return!0},xn.isEqual=function(t,e){return br(t,e)},xn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?br(t,e,i,n):!!r},xn.isError=Qo,xn.isFinite=function(t){return"number"==typeof t&&Ue(t)},xn.isFunction=Xo,xn.isInteger=$o,xn.isLength=Jo,xn.isMap=ea,xn.isMatch=function(t,e){return t===e||vr(t,e,as(e))},xn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,vr(t,e,as(e),n)},xn.isNaN=function(t){return na(t)&&t!=+t},xn.isNative=function(t){if(Ss(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return wr(t)},xn.isNil=function(t){return null==t},xn.isNull=function(t){return null===t},xn.isNumber=na,xn.isObject=Zo,xn.isObjectLike=ta,xn.isPlainObject=ra,xn.isRegExp=ia,xn.isSafeInteger=function(t){return $o(t)&&t>=-9007199254740991&&t<=l},xn.isSet=sa,xn.isString=oa,xn.isSymbol=aa,xn.isTypedArray=ua,xn.isUndefined=function(t){return t===i},xn.isWeakMap=function(t){return ta(t)&&ls(t)==b},xn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==gr(t)},xn.join=function(t,e){return null==t?"":qe.call(t,e)},xn.kebabCase=Ga,xn.last=zs,xn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r;return n!==i&&(s=(s=Ta(n))<0?En(r+s,0):dn(s,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,s):xe(t,ke,s,!0)},xn.lowerCase=qa,xn.lowerFirst=Ka,xn.lt=_a,xn.lte=ca,xn.max=function(t){return t&&t.length?Tr(t,nu,yr):i},xn.maxBy=function(t,e){return t&&t.length?Tr(t,ss(e,2),yr):i},xn.mean=function(t){return je(t,nu)},xn.meanBy=function(t,e){return je(t,ss(e,2))},xn.min=function(t){return t&&t.length?Tr(t,nu,Yr):i},xn.minBy=function(t,e){return t&&t.length?Tr(t,ss(e,2),Yr):i},xn.stubArray=pu,xn.stubFalse=fu,xn.stubObject=function(){return{}},xn.stubString=function(){return""},xn.stubTrue=function(){return!0},xn.multiply=Au,xn.nth=function(t,e){return t&&t.length?Fr(t,Ta(e)):i},xn.noConflict=function(){return le._===this&&(le._=xt),this},xn.noop=au,xn.now=Ro,xn.pad=function(t,e,n){t=da(t);var r=(e=Ta(e))?cn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return ki(Te(i),n)+t+ki(he(i),n)},xn.padEnd=function(t,e,n){t=da(t);var r=(e=Ta(e))?cn(t):0;return e&&r<e?t+ki(e-r,n):t},xn.padStart=function(t,e,n){t=da(t);var r=(e=Ta(e))?cn(t):0;return e&&r<e?ki(e-r,n)+t:t},xn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Sn(da(t).replace(rt,""),e||0)},xn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Es(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=ha(t),e===i?(e=t,t=0):e=ha(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var s=mn();return dn(t+s*(e-t+ae("1e-"+((s+"").length-1))),e)}return Kr(t,e)},xn.reduce=function(t,e,n){var r=Go(t)?Le:Ke,i=arguments.length<3;return r(t,ss(e,4),n,i,cr)},xn.reduceRight=function(t,e,n){var r=Go(t)?Be:Ke,i=arguments.length<3;return r(t,ss(e,4),n,i,lr)},xn.repeat=function(t,e,n){return e=(n?Es(t,e,n):e===i)?1:Ta(e),Hr(da(t),e)},xn.replace=function(){var t=arguments,e=da(t[0]);return t.length<3?e:e.replace(t[1],t[2])},xn.result=function(t,e,n){var r=-1,s=(e=Ei(e,t)).length;for(s||(s=1,t=i);++r<s;){var o=null==t?i:t[Ys(e[r])];o===i&&(r=s,o=n),t=Xo(o)?o.call(t):o}return t},xn.round=Pu,xn.runInContext=t,xn.sample=function(t){return(Go(t)?Qn:zr)(t)},xn.size=function(t){if(null==t)return 0;if(Ko(t))return oa(t)?cn(t):t.length;var e=ls(t);return e==P||e==D?t.size:Br(t).length},xn.snakeCase=Ha,xn.some=function(t,e,n){var r=Go(t)?Ye:ei;return n&&Es(t,e,n)&&(e=i),r(t,ss(e,3))},xn.sortedIndex=function(t,e){return ni(t,e)},xn.sortedIndexBy=function(t,e,n){return ri(t,e,ss(n,2))},xn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ni(t,e);if(r<n&&Vo(t[r],e))return r}return-1},xn.sortedLastIndex=function(t,e){return ni(t,e,!0)},xn.sortedLastIndexBy=function(t,e,n){return ri(t,e,ss(n,2),!0)},xn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ni(t,e,!0)-1;if(Vo(t[n],e))return n}return-1},xn.startCase=Wa,xn.startsWith=function(t,e,n){return t=da(t),n=null==n?0:sr(Ta(n),0,t.length),e=oi(e),t.slice(n,n+e.length)==e},xn.subtract=gu,xn.sum=function(t){return t&&t.length?He(t,nu):0},xn.sumBy=function(t,e){return t&&t.length?He(t,ss(e,2)):0},xn.template=function(t,e,n){var r=xn.templateSettings;n&&Es(t,e,n)&&(e=i),t=da(t),e=ma({},e,r,Qi);var s,o,a=ma({},e.imports,r.imports,Qi),u=ba(a),_=Xe(a,u),c=0,l=e.interpolate||St,h="__p += '",T=Rt((e.escape||St).source+"|"+l.source+"|"+(l===$?lt:St).source+"|"+(e.evaluate||St).source+"|$","g"),p="//# sourceURL="+(Lt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(T,(function(e,n,r,i,a,u){return r||(r=i),h+=t.slice(c,u).replace(mt,nn),n&&(s=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),h+="';\n";var f=Lt.call(e,"variable")&&e.variable;if(f){if(_t.test(f))throw new At("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(j,""):h).replace(G,"$1").replace(q,"$1;"),h="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var E=$a((function(){return Pt(u,p+"return "+h).apply(i,_)}));if(E.source=h,Qo(E))throw E;return E},xn.times=function(t,e){if((t=Ta(t))<1||t>l)return[];var n=T,r=dn(t,T);e=ss(e),t-=T;for(var i=We(r,e);++n<t;)e(n);return i},xn.toFinite=ha,xn.toInteger=Ta,xn.toLength=pa,xn.toLower=function(t){return da(t).toLowerCase()},xn.toNumber=fa,xn.toSafeInteger=function(t){return t?sr(Ta(t),-9007199254740991,l):0===t?t:0},xn.toString=da,xn.toUpper=function(t){return da(t).toUpperCase()},xn.trim=function(t,e,n){if((t=da(t))&&(n||e===i))return ze(t);if(!t||!(e=oi(e)))return t;var r=ln(t),s=ln(e);return Ni(r,Je(r,s),Ze(r,s)+1).join("")},xn.trimEnd=function(t,e,n){if((t=da(t))&&(n||e===i))return t.slice(0,hn(t)+1);if(!t||!(e=oi(e)))return t;var r=ln(t);return Ni(r,0,Ze(r,ln(e))+1).join("")},xn.trimStart=function(t,e,n){if((t=da(t))&&(n||e===i))return t.replace(rt,"");if(!t||!(e=oi(e)))return t;var r=ln(t);return Ni(r,Je(r,ln(e))).join("")},xn.truncate=function(t,e){var n=30,r="...";if(Zo(e)){var s="separator"in e?e.separator:s;n="length"in e?Ta(e.length):n,r="omission"in e?oi(e.omission):r}var o=(t=da(t)).length;if(rn(t)){var a=ln(t);o=a.length}if(n>=o)return t;var u=n-cn(r);if(u<1)return r;var _=a?Ni(a,0,u).join(""):t.slice(0,u);if(s===i)return _+r;if(a&&(u+=_.length-u),ia(s)){if(t.slice(u).search(s)){var c,l=_;for(s.global||(s=Rt(s.source,da(ht.exec(s))+"g")),s.lastIndex=0;c=s.exec(l);)var h=c.index;_=_.slice(0,h===i?u:h)}}else if(t.indexOf(oi(s),u)!=u){var T=_.lastIndexOf(s);T>-1&&(_=_.slice(0,T))}return _+r},xn.unescape=function(t){return(t=da(t))&&W.test(t)?t.replace(K,Tn):t},xn.uniqueId=function(t){var e=++Bt;return da(t)+e},xn.upperCase=za,xn.upperFirst=Qa,xn.each=Eo,xn.eachRight=No,xn.first=qs,ou(xn,(Eu={},Nr(xn,(function(t,e){Lt.call(xn.prototype,e)||(Eu[e]=t)})),Eu),{chain:!1}),xn.VERSION="4.17.21",Re(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){xn[t].placeholder=xn})),Re(["drop","take"],(function(t,e){jn.prototype[t]=function(n){n=n===i?1:En(Ta(n),0);var r=this.__filtered__&&!e?new jn(this):this.clone();return r.__filtered__?r.__takeCount__=dn(n,r.__takeCount__):r.__views__.push({size:dn(n,T),type:t+(r.__dir__<0?"Right":"")}),r},jn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Re(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;jn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ss(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Re(["head","last"],(function(t,e){var n="take"+(e?"Right":"");jn.prototype[t]=function(){return this[n](1).value()[0]}})),Re(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");jn.prototype[t]=function(){return this.__filtered__?new jn(this):this[n](1)}})),jn.prototype.compact=function(){return this.filter(nu)},jn.prototype.find=function(t){return this.filter(t).head()},jn.prototype.findLast=function(t){return this.reverse().find(t)},jn.prototype.invokeMap=Wr((function(t,e){return"function"==typeof t?new jn(this):this.map((function(n){return Or(n,t,e)}))})),jn.prototype.reject=function(t){return this.filter(Bo(ss(t)))},jn.prototype.slice=function(t,e){t=Ta(t);var n=this;return n.__filtered__&&(t>0||e<0)?new jn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=Ta(e))<0?n.dropRight(-e):n.take(e-t)),n)},jn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},jn.prototype.toArray=function(){return this.take(T)},Nr(jn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),s=xn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);s&&(xn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof jn,_=a[0],c=u||Go(e),l=function(t){var e=s.apply(xn,we([t],a));return r&&h?e[0]:e};c&&n&&"function"==typeof _&&1!=_.length&&(u=c=!1);var h=this.__chain__,T=!!this.__actions__.length,p=o&&!h,f=u&&!T;if(!o&&c){e=f?e:new jn(this);var E=t.apply(e,a);return E.__actions__.push({func:lo,args:[l],thisArg:i}),new kn(E,h)}return p&&f?t.apply(this,a):(E=this.thru(l),p?r?E.value()[0]:E.value():E)})})),Re(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ot[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);xn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Go(i)?i:[],t)}return this[n]((function(n){return e.apply(Go(n)?n:[],t)}))}})),Nr(jn.prototype,(function(t,e){var n=xn[e];if(n){var r=n.name+"";Lt.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:e,func:n})}})),Cn[Mi(i,2).name]=[{name:"wrapper",func:i}],jn.prototype.clone=function(){var t=new jn(this.__wrapped__);return t.__actions__=Ii(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ii(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ii(this.__views__),t},jn.prototype.reverse=function(){if(this.__filtered__){var t=new jn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},jn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Go(t),r=e<0,i=n?t.length:0,s=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=dn(e,t+o);break;case"takeRight":t=En(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=s.start,a=s.end,u=a-o,_=r?a:o-1,c=this.__iteratees__,l=c.length,h=0,T=dn(u,this.__takeCount__);if(!n||!r&&i==u&&T==u)return li(t,this.__actions__);var p=[];t:for(;u--&&h<T;){for(var f=-1,E=t[_+=e];++f<l;){var d=c[f],N=d.iteratee,S=d.type,m=N(E);if(2==S)E=m;else if(!m){if(1==S)continue t;break t}}p[h++]=E}return p},xn.prototype.at=ho,xn.prototype.chain=function(){return co(this)},xn.prototype.commit=function(){return new kn(this.value(),this.__chain__)},xn.prototype.next=function(){this.__values__===i&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},xn.prototype.plant=function(t){for(var e,n=this;n instanceof Fn;){var r=Ms(n);r.__index__=0,r.__values__=i,e?s.__wrapped__=r:e=r;var s=r;n=n.__wrapped__}return s.__wrapped__=t,e},xn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof jn){var e=t;return this.__actions__.length&&(e=new jn(this)),(e=e.reverse()).__actions__.push({func:lo,args:[Js],thisArg:i}),new kn(e,this.__chain__)}return this.thru(Js)},xn.prototype.toJSON=xn.prototype.valueOf=xn.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},xn.prototype.first=xn.prototype.head,Qt&&(xn.prototype[Qt]=function(){return this}),xn}();le._=pn,(r=function(){return pn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},134:function(t,e,n){var r;t=n.nmd(t),function(){function i(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function s(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}function o(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function a(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function u(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function _(t,e){for(var n=-1,r=null==t?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function c(t,e){return!(null==t||!t.length)&&S(t,e,0)>-1}function l(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function h(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function T(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function p(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function f(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function E(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function d(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function N(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}function S(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):N(t,A,n)}function m(t,e,n,r){for(var i=n-1,s=t.length;++i<s;)if(r(t[i],e))return i;return-1}function A(t){return t!=t}function P(t,e){var n=null==t?0:t.length;return n?I(t,e)/n:Z}function g(t){return function(e){return null==e?K:e[t]}}function y(t){return function(e){return null==t?K:t[e]}}function R(t,e,n,r,i){return i(t,(function(t,i,s){n=r?(r=!1,t):e(n,t,i,s)})),n}function I(t,e){for(var n,r=-1,i=t.length;++r<i;){var s=e(t[r]);s!==K&&(n=n===K?s:n+s)}return n}function D(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function O(t){return t?t.slice(0,G(t)+1).replace(Ht,""):t}function C(t){return function(e){return t(e)}}function b(t,e){return h(e,(function(e){return t[e]}))}function v(t,e){return t.has(e)}function w(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n}function L(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n}function B(t){return"\\"+Qe[t]}function Y(t){return Ge.test(t)}function U(t){return qe.test(t)}function M(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function x(t,e){return function(n){return t(e(n))}}function V(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n];o!==e&&o!==z||(t[n]=z,s[i++]=n)}return s}function F(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function k(t){return Y(t)?function(t){for(var e=ke.lastIndex=0;ke.test(t);)++e;return e}(t):Tn(t)}function j(t){return Y(t)?function(t){return t.match(ke)||[]}(t):function(t){return t.split("")}(t)}function G(t){for(var e=t.length;e--&&Wt.test(t.charAt(e)););return e}function q(t){return t.match(je)||[]}var K,H="Expected a function",W="__lodash_hash_undefined__",z="__lodash_placeholder__",Q=32,X=128,$=1/0,J=9007199254740991,Z=NaN,tt=4294967295,et=tt-1,nt=tt>>>1,rt=[["ary",X],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Q],["partialRight",64],["rearg",256]],it="[object Arguments]",st="[object Array]",ot="[object Boolean]",at="[object Date]",ut="[object Error]",_t="[object Function]",ct="[object GeneratorFunction]",lt="[object Map]",ht="[object Number]",Tt="[object Object]",pt="[object Promise]",ft="[object RegExp]",Et="[object Set]",dt="[object String]",Nt="[object Symbol]",St="[object WeakMap]",mt="[object ArrayBuffer]",At="[object DataView]",Pt="[object Float32Array]",gt="[object Float64Array]",yt="[object Int8Array]",Rt="[object Int16Array]",It="[object Int32Array]",Dt="[object Uint8Array]",Ot="[object Uint8ClampedArray]",Ct="[object Uint16Array]",bt="[object Uint32Array]",vt=/\b__p \+= '';/g,wt=/\b(__p \+=) '' \+/g,Lt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bt=/&(?:amp|lt|gt|quot|#39);/g,Yt=/[&<>"']/g,Ut=RegExp(Bt.source),Mt=RegExp(Yt.source),xt=/<%-([\s\S]+?)%>/g,Vt=/<%([\s\S]+?)%>/g,Ft=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jt=/^\w*$/,Gt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/[\\^$.*+?()[\]{}|]/g,Kt=RegExp(qt.source),Ht=/^\s+/,Wt=/\s/,zt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Qt=/\{\n\/\* \[wrapped with (.+)\] \*/,Xt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Jt=/[()=,{}\[\]\/\s]/,Zt=/\\(\\)?/g,te=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ee=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,re=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,oe=/^(?:0|[1-9]\d*)$/,ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,ce="\\ud800-\\udfff",le="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\u2700-\\u27bf",Te="a-z\\xdf-\\xf6\\xf8-\\xff",pe="A-Z\\xc0-\\xd6\\xd8-\\xde",fe="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",de="["+ce+"]",Ne="["+Ee+"]",Se="["+le+"]",me="\\d+",Ae="["+he+"]",Pe="["+Te+"]",ge="[^"+ce+Ee+me+he+Te+pe+"]",ye="\\ud83c[\\udffb-\\udfff]",Re="[^"+ce+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="["+pe+"]",Ce="\\u200d",be="(?:"+Pe+"|"+ge+")",ve="(?:"+Oe+"|"+ge+")",we="(?:['’](?:d|ll|m|re|s|t|ve))?",Le="(?:['’](?:D|LL|M|RE|S|T|VE))?",Be="(?:"+Se+"|"+ye+")?",Ye="["+fe+"]?",Ue=Ye+Be+"(?:"+Ce+"(?:"+[Re,Ie,De].join("|")+")"+Ye+Be+")*",Me="(?:"+[Ae,Ie,De].join("|")+")"+Ue,xe="(?:"+[Re+Se+"?",Se,Ie,De,de].join("|")+")",Ve=RegExp("['’]","g"),Fe=RegExp(Se,"g"),ke=RegExp(ye+"(?="+ye+")|"+xe+Ue,"g"),je=RegExp([Oe+"?"+Pe+"+"+we+"(?="+[Ne,Oe,"$"].join("|")+")",ve+"+"+Le+"(?="+[Ne,Oe+be,"$"].join("|")+")",Oe+"?"+be+"+"+we,Oe+"+"+Le,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Me].join("|"),"g"),Ge=RegExp("["+Ce+ce+le+fe+"]"),qe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ke=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],He=-1,We={};We[Pt]=We[gt]=We[yt]=We[Rt]=We[It]=We[Dt]=We[Ot]=We[Ct]=We[bt]=!0,We[it]=We[st]=We[mt]=We[ot]=We[At]=We[at]=We[ut]=We[_t]=We[lt]=We[ht]=We[Tt]=We[ft]=We[Et]=We[dt]=We[St]=!1;var ze={};ze[it]=ze[st]=ze[mt]=ze[At]=ze[ot]=ze[at]=ze[Pt]=ze[gt]=ze[yt]=ze[Rt]=ze[It]=ze[lt]=ze[ht]=ze[Tt]=ze[ft]=ze[Et]=ze[dt]=ze[Nt]=ze[Dt]=ze[Ot]=ze[Ct]=ze[bt]=!0,ze[ut]=ze[_t]=ze[St]=!1;var Qe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xe=parseFloat,$e=parseInt,Je="object"==typeof global&&global&&global.Object===Object&&global,Ze="object"==typeof self&&self&&self.Object===Object&&self,tn=Je||Ze||Function("return this")(),en=e&&!e.nodeType&&e,nn=en&&t&&!t.nodeType&&t,rn=nn&&nn.exports===en,sn=rn&&Je.process,on=function(){try{return nn&&nn.require&&nn.require("util").types||sn&&sn.binding&&sn.binding("util")}catch(t){}}(),an=on&&on.isArrayBuffer,un=on&&on.isDate,_n=on&&on.isMap,cn=on&&on.isRegExp,ln=on&&on.isSet,hn=on&&on.isTypedArray,Tn=g("length"),pn=y({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),fn=y({"&":"&","<":"<",">":">",'"':""","'":"'"}),En=y({"&":"&","<":"<",">":">",""":'"',"'":"'"}),dn=function t(e){function n(t){if(Ui(t)&&!Ia(t)&&!(t instanceof Wt)){if(t instanceof y)return t;if(Rs.call(t,"__wrapped__"))return ui(t)}return new y(t)}function r(){}function y(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=K}function Wt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=tt,this.__views__=[]}function ce(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function le(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function he(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Te(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new he;++e<n;)this.add(t[e])}function pe(t){this.size=(this.__data__=new le(t)).size}function fe(t,e){var n=Ia(t),r=!n&&Ra(t),i=!n&&!r&&Oa(t),s=!n&&!r&&!i&&La(t),o=n||r||i||s,a=o?D(t.length,Ns):[],u=a.length;for(var _ in t)!e&&!Rs.call(t,_)||o&&("length"==_||i&&("offset"==_||"parent"==_)||s&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||Hr(_,u))||a.push(_);return a}function Ee(t){var e=t.length;return e?t[Cn(0,e-1)]:K}function de(t,e){return ii(or(t),Ie(e,0,t.length))}function Ne(t){return ii(or(t))}function Se(t,e,n){(n===K||Oi(t[e],n))&&(n!==K||e in t)||ye(t,e,n)}function me(t,e,n){var r=t[e];Rs.call(t,e)&&Oi(r,n)&&(n!==K||e in t)||ye(t,e,n)}function Ae(t,e){for(var n=t.length;n--;)if(Oi(t[n][0],e))return n;return-1}function Pe(t,e,n,r){return yo(t,(function(t,i,s){e(r,t,n(t),s)})),r}function ge(t,e){return t&&ar(e,Xi(e),t)}function ye(t,e,n){"__proto__"==e&&Gs?Gs(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Re(t,e){for(var n=-1,r=e.length,i=ls(r),s=null==t;++n<r;)i[n]=s?K:zi(t,e[n]);return i}function Ie(t,e,n){return t==t&&(n!==K&&(t=t<=n?t:n),e!==K&&(t=t>=e?t:e)),t}function De(t,e,n,r,i,s){var a,u=1&e,_=2&e,c=4&e;if(n&&(a=i?n(t,r,i,s):n(t)),a!==K)return a;if(!Yi(t))return t;var l=Ia(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rs.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return or(t,a)}else{var h=Uo(t),T=h==_t||h==ct;if(Oa(t))return tr(t,u);if(h==Tt||h==it||T&&!i){if(a=_||T?{}:qr(t),!u)return _?function(t,e){return ar(t,Yo(t),e)}(t,function(t,e){return t&&ar(e,$i(e),t)}(a,t)):function(t,e){return ar(t,Bo(t),e)}(t,ge(a,t))}else{if(!ze[h])return i?t:{};a=function(t,e,n){var r=t.constructor;switch(e){case mt:return er(t);case ot:case at:return new r(+t);case At:return function(t,e){return new t.constructor(e?er(t.buffer):t.buffer,t.byteOffset,t.byteLength)}(t,n);case Pt:case gt:case yt:case Rt:case It:case Dt:case Ot:case Ct:case bt:return nr(t,n);case lt:return new r;case ht:case dt:return new r(t);case ft:return function(t){var e=new t.constructor(t.source,ee.exec(t));return e.lastIndex=t.lastIndex,e}(t);case Et:return new r;case Nt:return function(t){return Ao?Es(Ao.call(t)):{}}(t)}}(t,h,u)}}s||(s=new pe);var p=s.get(t);if(p)return p;s.set(t,a),wa(t)?t.forEach((function(r){a.add(De(r,e,n,r,t,s))})):ba(t)&&t.forEach((function(r,i){a.set(i,De(r,e,n,i,t,s))}));var f=l?K:(c?_?Ur:Yr:_?$i:Xi)(t);return o(f||t,(function(r,i){f&&(r=t[i=r]),me(a,i,De(r,e,n,i,t,s))})),a}function Oe(t,e,n){var r=n.length;if(null==t)return!r;for(t=Es(t);r--;){var i=n[r],s=e[i],o=t[i];if(o===K&&!(i in t)||!s(o))return!1}return!0}function Ce(t,e,n){if("function"!=typeof t)throw new Ss(H);return Vo((function(){t.apply(K,n)}),e)}function be(t,e,n,r){var i=-1,s=c,o=!0,a=t.length,u=[],_=e.length;if(!a)return u;n&&(e=h(e,C(n))),r?(s=l,o=!1):e.length>=200&&(s=v,o=!1,e=new Te(e));t:for(;++i<a;){var T=t[i],p=null==n?T:n(T);if(T=r||0!==T?T:0,o&&p==p){for(var f=_;f--;)if(e[f]===p)continue t;u.push(T)}else s(e,p,r)||u.push(T)}return u}function ve(t,e){var n=!0;return yo(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function we(t,e,n){for(var r=-1,i=t.length;++r<i;){var s=t[r],o=e(s);if(null!=o&&(a===K?o==o&&!Fi(o):n(o,a)))var a=o,u=s}return u}function Le(t,e){var n=[];return yo(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function Be(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=Kr),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?Be(a,e-1,n,r,i):T(i,a):r||(i[i.length]=a)}return i}function Ye(t,e){return t&&Io(t,e,Xi)}function Ue(t,e){return t&&Do(t,e,Xi)}function Me(t,e){return _(e,(function(e){return wi(t[e])}))}function xe(t,e){for(var n=0,r=(e=Jn(e,t)).length;null!=t&&n<r;)t=t[si(e[n++])];return n&&n==r?t:K}function ke(t,e,n){var r=e(t);return Ia(t)?r:T(r,n(t))}function je(t){return null==t?t===K?"[object Undefined]":"[object Null]":js&&js in Es(t)?function(t){var e=Rs.call(t,js),n=t[js];try{t[js]=K;var r=!0}catch(t){}var i=Os.call(t);return r&&(e?t[js]=n:delete t[js]),i}(t):function(t){return Os.call(t)}(t)}function Ge(t,e){return t>e}function qe(t,e){return null!=t&&Rs.call(t,e)}function Qe(t,e){return null!=t&&e in Es(t)}function Je(t,e,n){for(var r=n?l:c,i=t[0].length,s=t.length,o=s,a=ls(s),u=1/0,_=[];o--;){var T=t[o];o&&e&&(T=h(T,C(e))),u=eo(T.length,u),a[o]=!n&&(e||i>=120&&T.length>=120)?new Te(o&&T):K}T=t[0];var p=-1,f=a[0];t:for(;++p<i&&_.length<u;){var E=T[p],d=e?e(E):E;if(E=n||0!==E?E:0,!(f?v(f,d):r(_,d,n))){for(o=s;--o;){var N=a[o];if(!(N?v(N,d):r(t[o],d,n)))continue t}f&&f.push(d),_.push(E)}}return _}function Ze(t,e,n){var r=null==(t=ti(t,e=Jn(e,t)))?t:t[si(Ti(e))];return null==r?K:i(r,t,n)}function en(t){return Ui(t)&&je(t)==it}function nn(t,e,n,r,i){return t===e||(null==t||null==e||!Ui(t)&&!Ui(e)?t!=t&&e!=e:function(t,e,n,r,i,s){var o=Ia(t),a=Ia(e),u=o?st:Uo(t),_=a?st:Uo(e),c=(u=u==it?Tt:u)==Tt,l=(_=_==it?Tt:_)==Tt,h=u==_;if(h&&Oa(t)){if(!Oa(e))return!1;o=!0,c=!1}if(h&&!c)return s||(s=new pe),o||La(t)?Lr(t,e,n,r,i,s):function(t,e,n,r,i,s,o){switch(n){case At:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case mt:return!(t.byteLength!=e.byteLength||!s(new Bs(t),new Bs(e)));case ot:case at:case ht:return Oi(+t,+e);case ut:return t.name==e.name&&t.message==e.message;case ft:case dt:return t==e+"";case lt:var a=M;case Et:var u=1&r;if(a||(a=F),t.size!=e.size&&!u)return!1;var _=o.get(t);if(_)return _==e;r|=2,o.set(t,e);var c=Lr(a(t),a(e),r,i,s,o);return o.delete(t),c;case Nt:if(Ao)return Ao.call(t)==Ao.call(e)}return!1}(t,e,u,n,r,i,s);if(!(1&n)){var T=c&&Rs.call(t,"__wrapped__"),p=l&&Rs.call(e,"__wrapped__");if(T||p){var f=T?t.value():t,E=p?e.value():e;return s||(s=new pe),i(f,E,n,r,s)}}return!!h&&(s||(s=new pe),function(t,e,n,r,i,s){var o=1&n,a=Yr(t),u=a.length;if(u!=Yr(e).length&&!o)return!1;for(var _=u;_--;){var c=a[_];if(!(o?c in e:Rs.call(e,c)))return!1}var l=s.get(t),h=s.get(e);if(l&&h)return l==e&&h==t;var T=!0;s.set(t,e),s.set(e,t);for(var p=o;++_<u;){var f=t[c=a[_]],E=e[c];if(r)var d=o?r(E,f,c,e,t,s):r(f,E,c,t,e,s);if(!(d===K?f===E||i(f,E,n,r,s):d)){T=!1;break}p||(p="constructor"==c)}if(T&&!p){var N=t.constructor,S=e.constructor;N!=S&&"constructor"in t&&"constructor"in e&&!("function"==typeof N&&N instanceof N&&"function"==typeof S&&S instanceof S)&&(T=!1)}return s.delete(t),s.delete(e),T}(t,e,n,r,i,s))}(t,e,n,r,nn,i))}function sn(t,e,n,r){var i=n.length,s=i,o=!r;if(null==t)return!s;for(t=Es(t);i--;){var a=n[i];if(o&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<s;){var u=(a=n[i])[0],_=t[u],c=a[1];if(o&&a[2]){if(_===K&&!(u in t))return!1}else{var l=new pe;if(r)var h=r(_,c,u,t,e,l);if(!(h===K?nn(c,_,3,r,l):h))return!1}}return!0}function on(t){return!(!Yi(t)||function(t){return!!Ds&&Ds in t}(t))&&(wi(t)?vs:ie).test(oi(t))}function Tn(t){return"function"==typeof t?t:null==t?is:"object"==typeof t?Ia(t)?Pn(t[0],t[1]):An(t):us(t)}function Nn(t){if(!Xr(t))return Zs(t);var e=[];for(var n in Es(t))Rs.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Sn(t,e){return t<e}function mn(t,e){var n=-1,r=Ci(t)?ls(t.length):[];return yo(t,(function(t,i,s){r[++n]=e(t,i,s)})),r}function An(t){var e=kr(t);return 1==e.length&&e[0][2]?Jr(e[0][0],e[0][1]):function(n){return n===t||sn(n,t,e)}}function Pn(t,e){return zr(t)&&$r(e)?Jr(si(t),e):function(n){var r=zi(n,t);return r===K&&r===e?Qi(n,t):nn(e,r,3)}}function gn(t,e,n,r,i){t!==e&&Io(e,(function(s,o){if(i||(i=new pe),Yi(s))!function(t,e,n,r,i,s,o){var a=ei(t,n),u=ei(e,n),_=o.get(u);if(_)return Se(t,n,_),K;var c=s?s(a,u,n+"",t,e,o):K,l=c===K;if(l){var h=Ia(u),T=!h&&Oa(u),p=!h&&!T&&La(u);c=u,h||T||p?Ia(a)?c=a:bi(a)?c=or(a):T?(l=!1,c=tr(u,!0)):p?(l=!1,c=nr(u,!0)):c=[]:xi(u)||Ra(u)?(c=a,Ra(a)?c=Hi(a):Yi(a)&&!wi(a)||(c=qr(u))):l=!1}l&&(o.set(u,c),i(c,u,r,s,o),o.delete(u)),Se(t,n,c)}(t,e,o,n,gn,r,i);else{var a=r?r(ei(t,o),s,o+"",t,e,i):K;a===K&&(a=s),Se(t,o,a)}}),$i)}function yn(t,e){var n=t.length;if(n)return Hr(e+=e<0?n:0,n)?t[e]:K}function Rn(t,e,n){e=e.length?h(e,(function(t){return Ia(t)?function(e){return xe(e,1===t.length?t[0]:t)}:t})):[is];var r=-1;return e=h(e,C(Vr())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(mn(t,(function(t,n,i){return{criteria:h(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,s=e.criteria,o=i.length,a=n.length;++r<o;){var u=rr(i[r],s[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function In(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=xe(t,o);n(a,o)&&Bn(s,Jn(o,t),a)}return s}function Dn(t,e,n,r){var i=r?m:S,s=-1,o=e.length,a=t;for(t===e&&(e=or(e)),n&&(a=h(t,C(n)));++s<o;)for(var u=0,_=e[s],c=n?n(_):_;(u=i(a,c,u,r))>-1;)a!==t&&Vs.call(a,u,1),Vs.call(t,u,1);return t}function On(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==s){var s=i;Hr(i)?Vs.call(t,i,1):qn(t,i)}}return t}function Cn(t,e){return t+zs(io()*(e-t+1))}function bn(t,e){var n="";if(!t||e<1||e>J)return n;do{e%2&&(n+=t),(e=zs(e/2))&&(t+=t)}while(e);return n}function vn(t,e){return Fo(Zr(t,e,is),t+"")}function wn(t){return Ee(Zi(t))}function Ln(t,e){var n=Zi(t);return ii(n,Ie(e,0,n.length))}function Bn(t,e,n,r){if(!Yi(t))return t;for(var i=-1,s=(e=Jn(e,t)).length,o=s-1,a=t;null!=a&&++i<s;){var u=si(e[i]),_=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(i!=o){var c=a[u];(_=r?r(c,u,a):K)===K&&(_=Yi(c)?c:Hr(e[i+1])?[]:{})}me(a,u,_),a=a[u]}return t}function Yn(t){return ii(Zi(t))}function Un(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=ls(i);++r<i;)s[r]=t[r+e];return s}function Mn(t,e){var n;return yo(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function xn(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=nt){for(;r<i;){var s=r+i>>>1,o=t[s];null!==o&&!Fi(o)&&(n?o<=e:o<e)?r=s+1:i=s}return i}return Vn(t,e,is,n)}function Vn(t,e,n,r){var i=0,s=null==t?0:t.length;if(0===s)return 0;for(var o=(e=n(e))!=e,a=null===e,u=Fi(e),_=e===K;i<s;){var c=zs((i+s)/2),l=n(t[c]),h=l!==K,T=null===l,p=l==l,f=Fi(l);if(o)var E=r||p;else E=_?p&&(r||h):a?p&&h&&(r||!T):u?p&&h&&!T&&(r||!f):!T&&!f&&(r?l<=e:l<e);E?i=c+1:s=c}return eo(s,et)}function Fn(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n],a=e?e(o):o;if(!n||!Oi(a,u)){var u=a;s[i++]=0===o?0:o}}return s}function kn(t){return"number"==typeof t?t:Fi(t)?Z:+t}function jn(t){if("string"==typeof t)return t;if(Ia(t))return h(t,jn)+"";if(Fi(t))return Po?Po.call(t):"";var e=t+"";return"0"==e&&1/t==-$?"-0":e}function Gn(t,e,n){var r=-1,i=c,s=t.length,o=!0,a=[],u=a;if(n)o=!1,i=l;else if(s>=200){var _=e?null:wo(t);if(_)return F(_);o=!1,i=v,u=new Te}else u=e?[]:a;t:for(;++r<s;){var h=t[r],T=e?e(h):h;if(h=n||0!==h?h:0,o&&T==T){for(var p=u.length;p--;)if(u[p]===T)continue t;e&&u.push(T),a.push(h)}else i(u,T,n)||(u!==a&&u.push(T),a.push(h))}return a}function qn(t,e){return null==(t=ti(t,e=Jn(e,t)))||delete t[si(Ti(e))]}function Kn(t,e,n,r){return Bn(t,e,n(xe(t,e)),r)}function Hn(t,e,n,r){for(var i=t.length,s=r?i:-1;(r?s--:++s<i)&&e(t[s],s,t););return n?Un(t,r?0:s,r?s+1:i):Un(t,r?s+1:0,r?i:s)}function Wn(t,e){var n=t;return n instanceof Wt&&(n=n.value()),p(e,(function(t,e){return e.func.apply(e.thisArg,T([t],e.args))}),n)}function zn(t,e,n){var r=t.length;if(r<2)return r?Gn(t[0]):[];for(var i=-1,s=ls(r);++i<r;)for(var o=t[i],a=-1;++a<r;)a!=i&&(s[i]=be(s[i]||o,t[a],e,n));return Gn(Be(s,1),e,n)}function Qn(t,e,n){for(var r=-1,i=t.length,s=e.length,o={};++r<i;)n(o,t[r],r<s?e[r]:K);return o}function Xn(t){return bi(t)?t:[]}function $n(t){return"function"==typeof t?t:is}function Jn(t,e){return Ia(t)?t:zr(t,e)?[t]:ko(Wi(t))}function Zn(t,e,n){var r=t.length;return n=n===K?r:n,!e&&n>=r?t:Un(t,e,n)}function tr(t,e){if(e)return t.slice();var n=t.length,r=Ys?Ys(n):new t.constructor(n);return t.copy(r),r}function er(t){var e=new t.constructor(t.byteLength);return new Bs(e).set(new Bs(t)),e}function nr(t,e){return new t.constructor(e?er(t.buffer):t.buffer,t.byteOffset,t.length)}function rr(t,e){if(t!==e){var n=t!==K,r=null===t,i=t==t,s=Fi(t),o=e!==K,a=null===e,u=e==e,_=Fi(e);if(!a&&!_&&!s&&t>e||s&&o&&u&&!a&&!_||r&&o&&u||!n&&u||!i)return 1;if(!r&&!s&&!_&&t<e||_&&n&&i&&!r&&!s||a&&n&&i||!o&&i||!u)return-1}return 0}function ir(t,e,n,r){for(var i=-1,s=t.length,o=n.length,a=-1,u=e.length,_=to(s-o,0),c=ls(u+_),l=!r;++a<u;)c[a]=e[a];for(;++i<o;)(l||i<s)&&(c[n[i]]=t[i]);for(;_--;)c[a++]=t[i++];return c}function sr(t,e,n,r){for(var i=-1,s=t.length,o=-1,a=n.length,u=-1,_=e.length,c=to(s-a,0),l=ls(c+_),h=!r;++i<c;)l[i]=t[i];for(var T=i;++u<_;)l[T+u]=e[u];for(;++o<a;)(h||i<s)&&(l[T+n[o]]=t[i++]);return l}function or(t,e){var n=-1,r=t.length;for(e||(e=ls(r));++n<r;)e[n]=t[n];return e}function ar(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],u=r?r(n[a],t[a],a,n,t):K;u===K&&(u=t[a]),i?ye(n,a,u):me(n,a,u)}return n}function ur(t,e){return function(n,r){var i=Ia(n)?s:Pe,o=e?e():{};return i(n,t,Vr(r,2),o)}}function _r(t){return vn((function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:K,o=i>2?n[2]:K;for(s=t.length>3&&"function"==typeof s?(i--,s):K,o&&Wr(n[0],n[1],o)&&(s=i<3?K:s,i=1),e=Es(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e}))}function cr(t,e){return function(n,r){if(null==n)return n;if(!Ci(n))return t(n,r);for(var i=n.length,s=e?i:-1,o=Es(n);(e?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function lr(t){return function(e,n,r){for(var i=-1,s=Es(e),o=r(e),a=o.length;a--;){var u=o[t?a:++i];if(!1===n(s[u],u,s))break}return e}}function hr(t){return function(e){var n=Y(e=Wi(e))?j(e):K,r=n?n[0]:e.charAt(0),i=n?Zn(n,1).join(""):e.slice(1);return r[t]()+i}}function Tr(t){return function(e){return p(ns(es(e).replace(Ve,"")),t,"")}}function pr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=go(t.prototype),r=t.apply(n,e);return Yi(r)?r:n}}function fr(t,e,n){var r=pr(t);return function s(){for(var o=arguments.length,a=ls(o),u=o,_=xr(s);u--;)a[u]=arguments[u];var c=o<3&&a[0]!==_&&a[o-1]!==_?[]:V(a,_);return(o-=c.length)<n?Ir(t,e,Nr,s.placeholder,K,a,c,K,K,n-o):i(this&&this!==tn&&this instanceof s?r:t,this,a)}}function Er(t){return function(e,n,r){var i=Es(e);if(!Ci(e)){var s=Vr(n,3);e=Xi(e),n=function(t){return s(i[t],t,i)}}var o=t(e,n,r);return o>-1?i[s?e[o]:o]:K}}function dr(t){return Br((function(e){var n=e.length,r=n,i=y.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new Ss(H);if(i&&!o&&"wrapper"==Mr(s))var o=new y([],!0)}for(r=o?r:n;++r<n;){var a=Mr(s=e[r]),u="wrapper"==a?Lo(s):K;o=u&&Qr(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?o[Mr(u[0])].apply(o,u[3]):1==s.length&&Qr(s)?o[a]():o.thru(s)}return function(){var t=arguments,r=t[0];if(o&&1==t.length&&Ia(r))return o.plant(r).value();for(var i=0,s=n?e[i].apply(this,t):r;++i<n;)s=e[i].call(this,s);return s}}))}function Nr(t,e,n,r,i,s,o,a,u,_){var c=e&X,l=1&e,h=2&e,T=24&e,p=512&e,f=h?K:pr(t);return function E(){for(var d=arguments.length,N=ls(d),S=d;S--;)N[S]=arguments[S];if(T)var m=xr(E),A=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(N,m);if(r&&(N=ir(N,r,i,T)),s&&(N=sr(N,s,o,T)),d-=A,T&&d<_)return Ir(t,e,Nr,E.placeholder,n,N,V(N,m),a,u,_-d);var P=l?n:this,g=h?P[t]:t;return d=N.length,a?N=function(t,e){for(var n=t.length,r=eo(e.length,n),i=or(t);r--;){var s=e[r];t[r]=Hr(s,n)?i[s]:K}return t}(N,a):p&&d>1&&N.reverse(),c&&u<d&&(N.length=u),this&&this!==tn&&this instanceof E&&(g=f||pr(g)),g.apply(P,N)}}function Sr(t,e){return function(n,r){return function(t,e,n,r){return Ye(t,(function(t,i,s){e(r,n(t),i,s)})),r}(n,t,e(r),{})}}function mr(t,e){return function(n,r){var i;if(n===K&&r===K)return e;if(n!==K&&(i=n),r!==K){if(i===K)return r;"string"==typeof n||"string"==typeof r?(n=jn(n),r=jn(r)):(n=kn(n),r=kn(r)),i=t(n,r)}return i}}function Ar(t){return Br((function(e){return e=h(e,C(Vr())),vn((function(n){var r=this;return t(e,(function(t){return i(t,r,n)}))}))}))}function Pr(t,e){var n=(e=e===K?" ":jn(e)).length;if(n<2)return n?bn(e,t):e;var r=bn(e,Ws(t/k(e)));return Y(e)?Zn(j(r),0,t).join(""):r.slice(0,t)}function gr(t,e,n,r){var s=1&e,o=pr(t);return function e(){for(var a=-1,u=arguments.length,_=-1,c=r.length,l=ls(c+u),h=this&&this!==tn&&this instanceof e?o:t;++_<c;)l[_]=r[_];for(;u--;)l[_++]=arguments[++a];return i(h,s?n:this,l)}}function yr(t){return function(e,n,r){return r&&"number"!=typeof r&&Wr(e,n,r)&&(n=r=K),e=ji(e),n===K?(n=e,e=0):n=ji(n),function(t,e,n,r){for(var i=-1,s=to(Ws((e-t)/(n||1)),0),o=ls(s);s--;)o[r?s:++i]=t,t+=n;return o}(e,n,r=r===K?e<n?1:-1:ji(r),t)}}function Rr(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Ki(e),n=Ki(n)),t(e,n)}}function Ir(t,e,n,r,i,s,o,a,u,_){var c=8&e;e|=c?Q:64,4&(e&=~(c?64:Q))||(e&=-4);var l=[t,e,i,c?s:K,c?o:K,c?K:s,c?K:o,a,u,_],h=n.apply(K,l);return Qr(t)&&xo(h,l),h.placeholder=r,ni(h,t,e)}function Dr(t){var e=fs[t];return function(t,n){if(t=Ki(t),(n=null==n?0:eo(Gi(n),292))&&$s(t)){var r=(Wi(t)+"e").split("e");return+((r=(Wi(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}function Or(t){return function(e){var n=Uo(e);return n==lt?M(e):n==Et?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):function(t,e){return h(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Cr(t,e,n,r,i,s,o,a){var u=2&e;if(!u&&"function"!=typeof t)throw new Ss(H);var _=r?r.length:0;if(_||(e&=-97,r=i=K),o=o===K?o:to(Gi(o),0),a=a===K?a:Gi(a),_-=i?i.length:0,64&e){var c=r,l=i;r=i=K}var h=u?K:Lo(t),T=[t,e,n,r,i,c,l,s,o,a];if(h&&function(t,e){var n=t[1],r=e[1],i=n|r,s=i<131,o=r==X&&8==n||r==X&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!s&&!o)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var a=e[3];if(a){var u=t[3];t[3]=u?ir(u,a,e[4]):a,t[4]=u?V(t[3],z):e[4]}(a=e[5])&&(u=t[5],t[5]=u?sr(u,a,e[6]):a,t[6]=u?V(t[5],z):e[6]),(a=e[7])&&(t[7]=a),r&X&&(t[8]=null==t[8]?e[8]:eo(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(T,h),t=T[0],e=T[1],n=T[2],r=T[3],i=T[4],!(a=T[9]=T[9]===K?u?0:t.length:to(T[9]-_,0))&&24&e&&(e&=-25),e&&1!=e)p=8==e||16==e?fr(t,e,a):e!=Q&&33!=e||i.length?Nr.apply(K,T):gr(t,e,n,r);else var p=function(t,e,n){var r=1&e,i=pr(t);return function e(){return(this&&this!==tn&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return ni((h?Oo:xo)(p,T),t,e)}function br(t,e,n,r){return t===K||Oi(t,Ps[n])&&!Rs.call(r,n)?e:t}function vr(t,e,n,r,i,s){return Yi(t)&&Yi(e)&&(s.set(e,t),gn(t,e,K,vr,s),s.delete(e)),t}function wr(t){return xi(t)?K:t}function Lr(t,e,n,r,i,s){var o=1&n,a=t.length,u=e.length;if(a!=u&&!(o&&u>a))return!1;var _=s.get(t),c=s.get(e);if(_&&c)return _==e&&c==t;var l=-1,h=!0,T=2&n?new Te:K;for(s.set(t,e),s.set(e,t);++l<a;){var p=t[l],f=e[l];if(r)var d=o?r(f,p,l,e,t,s):r(p,f,l,t,e,s);if(d!==K){if(d)continue;h=!1;break}if(T){if(!E(e,(function(t,e){if(!v(T,e)&&(p===t||i(p,t,n,r,s)))return T.push(e)}))){h=!1;break}}else if(p!==f&&!i(p,f,n,r,s)){h=!1;break}}return s.delete(t),s.delete(e),h}function Br(t){return Fo(Zr(t,K,li),t+"")}function Yr(t){return ke(t,Xi,Bo)}function Ur(t){return ke(t,$i,Yo)}function Mr(t){for(var e=t.name+"",n=To[e],r=Rs.call(To,e)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==t)return i.name}return e}function xr(t){return(Rs.call(n,"placeholder")?n:t).placeholder}function Vr(){var t=n.iteratee||ss;return t=t===ss?Tn:t,arguments.length?t(arguments[0],arguments[1]):t}function Fr(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function kr(t){for(var e=Xi(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$r(i)]}return e}function jr(t,e){var n=function(t,e){return null==t?K:t[e]}(t,e);return on(n)?n:K}function Gr(t,e,n){for(var r=-1,i=(e=Jn(e,t)).length,s=!1;++r<i;){var o=si(e[r]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++r!=i?s:!!(i=null==t?0:t.length)&&Bi(i)&&Hr(o,i)&&(Ia(t)||Ra(t))}function qr(t){return"function"!=typeof t.constructor||Xr(t)?{}:go(Us(t))}function Kr(t){return Ia(t)||Ra(t)||!!(Fs&&t&&t[Fs])}function Hr(t,e){var n=typeof t;return!!(e=null==e?J:e)&&("number"==n||"symbol"!=n&&oe.test(t))&&t>-1&&t%1==0&&t<e}function Wr(t,e,n){if(!Yi(n))return!1;var r=typeof e;return!!("number"==r?Ci(n)&&Hr(e,n.length):"string"==r&&e in n)&&Oi(n[e],t)}function zr(t,e){if(Ia(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Fi(t))||jt.test(t)||!kt.test(t)||null!=e&&t in Es(e)}function Qr(t){var e=Mr(t),r=n[e];if("function"!=typeof r||!(e in Wt.prototype))return!1;if(t===r)return!0;var i=Lo(r);return!!i&&t===i[0]}function Xr(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ps)}function $r(t){return t==t&&!Yi(t)}function Jr(t,e){return function(n){return null!=n&&n[t]===e&&(e!==K||t in Es(n))}}function Zr(t,e,n){return e=to(e===K?t.length-1:e,0),function(){for(var r=arguments,s=-1,o=to(r.length-e,0),a=ls(o);++s<o;)a[s]=r[e+s];s=-1;for(var u=ls(e+1);++s<e;)u[s]=r[s];return u[e]=n(a),i(t,this,u)}}function ti(t,e){return e.length<2?t:xe(t,Un(e,0,-1))}function ei(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function ni(t,e,n){var r=e+"";return Fo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(zt,"{\n/* [wrapped with "+e+"] */\n")}(r,ai(function(t){var e=t.match(Qt);return e?e[1].split(Xt):[]}(r),n)))}function ri(t){var e=0,n=0;return function(){var r=no(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(K,arguments)}}function ii(t,e){var n=-1,r=t.length,i=r-1;for(e=e===K?r:e;++n<e;){var s=Cn(n,i),o=t[s];t[s]=t[n],t[n]=o}return t.length=e,t}function si(t){if("string"==typeof t||Fi(t))return t;var e=t+"";return"0"==e&&1/t==-$?"-0":e}function oi(t){if(null!=t){try{return ys.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function ai(t,e){return o(rt,(function(n){var r="_."+n[0];e&n[1]&&!c(t,r)&&t.push(r)})),t.sort()}function ui(t){if(t instanceof Wt)return t.clone();var e=new y(t.__wrapped__,t.__chain__);return e.__actions__=or(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function _i(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Gi(n);return i<0&&(i=to(r+i,0)),N(t,Vr(e,3),i)}function ci(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==K&&(i=Gi(n),i=n<0?to(r+i,0):eo(i,r-1)),N(t,Vr(e,3),i,!0)}function li(t){return null!=t&&t.length?Be(t,1):[]}function hi(t){return t&&t.length?t[0]:K}function Ti(t){var e=null==t?0:t.length;return e?t[e-1]:K}function pi(t,e){return t&&t.length&&e&&e.length?Dn(t,e):t}function fi(t){return null==t?t:so.call(t)}function Ei(t){if(!t||!t.length)return[];var e=0;return t=_(t,(function(t){if(bi(t))return e=to(t.length,e),!0})),D(e,(function(e){return h(t,g(e))}))}function di(t,e){if(!t||!t.length)return[];var n=Ei(t);return null==e?n:h(n,(function(t){return i(e,K,t)}))}function Ni(t){var e=n(t);return e.__chain__=!0,e}function Si(t,e){return e(t)}function mi(t,e){return(Ia(t)?o:yo)(t,Vr(e,3))}function Ai(t,e){return(Ia(t)?a:Ro)(t,Vr(e,3))}function Pi(t,e){return(Ia(t)?h:mn)(t,Vr(e,3))}function gi(t,e,n){return e=n?K:e,e=t&&null==e?t.length:e,Cr(t,X,K,K,K,K,e)}function yi(t,e){var n;if("function"!=typeof e)throw new Ss(H);return t=Gi(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=K),n}}function Ri(t,e,n){function r(e){var n=u,r=_;return u=_=K,p=e,l=t.apply(r,n)}function i(t){var n=t-T;return T===K||n>=e||n<0||E&&t-p>=c}function s(){var t=pa();return i(t)?o(t):(h=Vo(s,function(t){var n=e-(t-T);return E?eo(n,c-(t-p)):n}(t)),K)}function o(t){return h=K,d&&u?r(t):(u=_=K,l)}function a(){var t=pa(),n=i(t);if(u=arguments,_=this,T=t,n){if(h===K)return function(t){return p=t,h=Vo(s,e),f?r(t):l}(T);if(E)return vo(h),h=Vo(s,e),r(T)}return h===K&&(h=Vo(s,e)),l}var u,_,c,l,h,T,p=0,f=!1,E=!1,d=!0;if("function"!=typeof t)throw new Ss(H);return e=Ki(e)||0,Yi(n)&&(f=!!n.leading,c=(E="maxWait"in n)?to(Ki(n.maxWait)||0,e):c,d="trailing"in n?!!n.trailing:d),a.cancel=function(){h!==K&&vo(h),p=0,u=T=_=h=K},a.flush=function(){return h===K?l:o(pa())},a}function Ii(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Ss(H);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Ii.Cache||he),n}function Di(t){if("function"!=typeof t)throw new Ss(H);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Oi(t,e){return t===e||t!=t&&e!=e}function Ci(t){return null!=t&&Bi(t.length)&&!wi(t)}function bi(t){return Ui(t)&&Ci(t)}function vi(t){if(!Ui(t))return!1;var e=je(t);return e==ut||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!xi(t)}function wi(t){if(!Yi(t))return!1;var e=je(t);return e==_t||e==ct||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Li(t){return"number"==typeof t&&t==Gi(t)}function Bi(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=J}function Yi(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ui(t){return null!=t&&"object"==typeof t}function Mi(t){return"number"==typeof t||Ui(t)&&je(t)==ht}function xi(t){if(!Ui(t)||je(t)!=Tt)return!1;var e=Us(t);if(null===e)return!0;var n=Rs.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ys.call(n)==Cs}function Vi(t){return"string"==typeof t||!Ia(t)&&Ui(t)&&je(t)==dt}function Fi(t){return"symbol"==typeof t||Ui(t)&&je(t)==Nt}function ki(t){if(!t)return[];if(Ci(t))return Vi(t)?j(t):or(t);if(ks&&t[ks])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ks]());var e=Uo(t);return(e==lt?M:e==Et?F:Zi)(t)}function ji(t){return t?(t=Ki(t))===$||t===-$?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function Gi(t){var e=ji(t),n=e%1;return e==e?n?e-n:e:0}function qi(t){return t?Ie(Gi(t),0,tt):0}function Ki(t){if("number"==typeof t)return t;if(Fi(t))return Z;if(Yi(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Yi(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=O(t);var n=re.test(t);return n||se.test(t)?$e(t.slice(2),n?2:8):ne.test(t)?Z:+t}function Hi(t){return ar(t,$i(t))}function Wi(t){return null==t?"":jn(t)}function zi(t,e,n){var r=null==t?K:xe(t,e);return r===K?n:r}function Qi(t,e){return null!=t&&Gr(t,e,Qe)}function Xi(t){return Ci(t)?fe(t):Nn(t)}function $i(t){return Ci(t)?fe(t,!0):function(t){if(!Yi(t))return function(t){var e=[];if(null!=t)for(var n in Es(t))e.push(n);return e}(t);var e=Xr(t),n=[];for(var r in t)("constructor"!=r||!e&&Rs.call(t,r))&&n.push(r);return n}(t)}function Ji(t,e){if(null==t)return{};var n=h(Ur(t),(function(t){return[t]}));return e=Vr(e),In(t,n,(function(t,n){return e(t,n[0])}))}function Zi(t){return null==t?[]:b(t,Xi(t))}function ts(t){return su(Wi(t).toLowerCase())}function es(t){return(t=Wi(t))&&t.replace(ae,pn).replace(Fe,"")}function ns(t,e,n){return t=Wi(t),(e=n?K:e)===K?U(t)?q(t):function(t){return t.match($t)||[]}(t):t.match(e)||[]}function rs(t){return function(){return t}}function is(t){return t}function ss(t){return Tn("function"==typeof t?t:De(t,1))}function os(t,e,n){var r=Xi(e),i=Me(e,r);null!=n||Yi(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Me(e,Xi(e)));var s=!(Yi(n)&&"chain"in n&&!n.chain),a=wi(t);return o(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=or(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,T([this.value()],arguments))})})),t}function as(){}function us(t){return zr(t)?g(si(t)):function(t){return function(e){return xe(e,t)}}(t)}function _s(){return[]}function cs(){return!1}var ls=(e=null==e?tn:dn.defaults(tn.Object(),e,dn.pick(tn,Ke))).Array,hs=e.Date,Ts=e.Error,ps=e.Function,fs=e.Math,Es=e.Object,ds=e.RegExp,Ns=e.String,Ss=e.TypeError,ms=ls.prototype,As=ps.prototype,Ps=Es.prototype,gs=e["__core-js_shared__"],ys=As.toString,Rs=Ps.hasOwnProperty,Is=0,Ds=function(){var t=/[^.]+$/.exec(gs&&gs.keys&&gs.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Os=Ps.toString,Cs=ys.call(Es),bs=tn._,vs=ds("^"+ys.call(Rs).replace(qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ws=rn?e.Buffer:K,Ls=e.Symbol,Bs=e.Uint8Array,Ys=ws?ws.allocUnsafe:K,Us=x(Es.getPrototypeOf,Es),Ms=Es.create,xs=Ps.propertyIsEnumerable,Vs=ms.splice,Fs=Ls?Ls.isConcatSpreadable:K,ks=Ls?Ls.iterator:K,js=Ls?Ls.toStringTag:K,Gs=function(){try{var t=jr(Es,"defineProperty");return t({},"",{}),t}catch(t){}}(),qs=e.clearTimeout!==tn.clearTimeout&&e.clearTimeout,Ks=hs&&hs.now!==tn.Date.now&&hs.now,Hs=e.setTimeout!==tn.setTimeout&&e.setTimeout,Ws=fs.ceil,zs=fs.floor,Qs=Es.getOwnPropertySymbols,Xs=ws?ws.isBuffer:K,$s=e.isFinite,Js=ms.join,Zs=x(Es.keys,Es),to=fs.max,eo=fs.min,no=hs.now,ro=e.parseInt,io=fs.random,so=ms.reverse,oo=jr(e,"DataView"),ao=jr(e,"Map"),uo=jr(e,"Promise"),_o=jr(e,"Set"),co=jr(e,"WeakMap"),lo=jr(Es,"create"),ho=co&&new co,To={},po=oi(oo),fo=oi(ao),Eo=oi(uo),No=oi(_o),So=oi(co),mo=Ls?Ls.prototype:K,Ao=mo?mo.valueOf:K,Po=mo?mo.toString:K,go=function(){function t(){}return function(e){if(!Yi(e))return{};if(Ms)return Ms(e);t.prototype=e;var n=new t;return t.prototype=K,n}}();n.templateSettings={escape:xt,evaluate:Vt,interpolate:Ft,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,y.prototype=go(r.prototype),y.prototype.constructor=y,Wt.prototype=go(r.prototype),Wt.prototype.constructor=Wt,ce.prototype.clear=function(){this.__data__=lo?lo(null):{},this.size=0},ce.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ce.prototype.get=function(t){var e=this.__data__;if(lo){var n=e[t];return n===W?K:n}return Rs.call(e,t)?e[t]:K},ce.prototype.has=function(t){var e=this.__data__;return lo?e[t]!==K:Rs.call(e,t)},ce.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=lo&&e===K?W:e,this},le.prototype.clear=function(){this.__data__=[],this.size=0},le.prototype.delete=function(t){var e=this.__data__,n=Ae(e,t);return!(n<0||(n==e.length-1?e.pop():Vs.call(e,n,1),--this.size,0))},le.prototype.get=function(t){var e=this.__data__,n=Ae(e,t);return n<0?K:e[n][1]},le.prototype.has=function(t){return Ae(this.__data__,t)>-1},le.prototype.set=function(t,e){var n=this.__data__,r=Ae(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},he.prototype.clear=function(){this.size=0,this.__data__={hash:new ce,map:new(ao||le),string:new ce}},he.prototype.delete=function(t){var e=Fr(this,t).delete(t);return this.size-=e?1:0,e},he.prototype.get=function(t){return Fr(this,t).get(t)},he.prototype.has=function(t){return Fr(this,t).has(t)},he.prototype.set=function(t,e){var n=Fr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Te.prototype.add=Te.prototype.push=function(t){return this.__data__.set(t,W),this},Te.prototype.has=function(t){return this.__data__.has(t)},pe.prototype.clear=function(){this.__data__=new le,this.size=0},pe.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},pe.prototype.get=function(t){return this.__data__.get(t)},pe.prototype.has=function(t){return this.__data__.has(t)},pe.prototype.set=function(t,e){var n=this.__data__;if(n instanceof le){var r=n.__data__;if(!ao||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new he(r)}return n.set(t,e),this.size=n.size,this};var yo=cr(Ye),Ro=cr(Ue,!0),Io=lr(),Do=lr(!0),Oo=ho?function(t,e){return ho.set(t,e),t}:is,Co=Gs?function(t,e){return Gs(t,"toString",{configurable:!0,enumerable:!1,value:rs(e),writable:!0})}:is,bo=vn,vo=qs||function(t){return tn.clearTimeout(t)},wo=_o&&1/F(new _o([,-0]))[1]==$?function(t){return new _o(t)}:as,Lo=ho?function(t){return ho.get(t)}:as,Bo=Qs?function(t){return null==t?[]:(t=Es(t),_(Qs(t),(function(e){return xs.call(t,e)})))}:_s,Yo=Qs?function(t){for(var e=[];t;)T(e,Bo(t)),t=Us(t);return e}:_s,Uo=je;(oo&&Uo(new oo(new ArrayBuffer(1)))!=At||ao&&Uo(new ao)!=lt||uo&&Uo(uo.resolve())!=pt||_o&&Uo(new _o)!=Et||co&&Uo(new co)!=St)&&(Uo=function(t){var e=je(t),n=e==Tt?t.constructor:K,r=n?oi(n):"";if(r)switch(r){case po:return At;case fo:return lt;case Eo:return pt;case No:return Et;case So:return St}return e});var Mo=gs?wi:cs,xo=ri(Oo),Vo=Hs||function(t,e){return tn.setTimeout(t,e)},Fo=ri(Co),ko=function(t){var e=Ii((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Gt,(function(t,n,r,i){e.push(r?i.replace(Zt,"$1"):n||t)})),e}),(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}(),jo=vn((function(t,e){return bi(t)?be(t,Be(e,1,bi,!0)):[]})),Go=vn((function(t,e){var n=Ti(e);return bi(n)&&(n=K),bi(t)?be(t,Be(e,1,bi,!0),Vr(n,2)):[]})),qo=vn((function(t,e){var n=Ti(e);return bi(n)&&(n=K),bi(t)?be(t,Be(e,1,bi,!0),K,n):[]})),Ko=vn((function(t){var e=h(t,Xn);return e.length&&e[0]===t[0]?Je(e):[]})),Ho=vn((function(t){var e=Ti(t),n=h(t,Xn);return e===Ti(n)?e=K:n.pop(),n.length&&n[0]===t[0]?Je(n,Vr(e,2)):[]})),Wo=vn((function(t){var e=Ti(t),n=h(t,Xn);return(e="function"==typeof e?e:K)&&n.pop(),n.length&&n[0]===t[0]?Je(n,K,e):[]})),zo=vn(pi),Qo=Br((function(t,e){var n=null==t?0:t.length,r=Re(t,e);return On(t,h(e,(function(t){return Hr(t,n)?+t:t})).sort(rr)),r})),Xo=vn((function(t){return Gn(Be(t,1,bi,!0))})),$o=vn((function(t){var e=Ti(t);return bi(e)&&(e=K),Gn(Be(t,1,bi,!0),Vr(e,2))})),Jo=vn((function(t){var e=Ti(t);return e="function"==typeof e?e:K,Gn(Be(t,1,bi,!0),K,e)})),Zo=vn((function(t,e){return bi(t)?be(t,e):[]})),ta=vn((function(t){return zn(_(t,bi))})),ea=vn((function(t){var e=Ti(t);return bi(e)&&(e=K),zn(_(t,bi),Vr(e,2))})),na=vn((function(t){var e=Ti(t);return e="function"==typeof e?e:K,zn(_(t,bi),K,e)})),ra=vn(Ei),ia=vn((function(t){var e=t.length,n=e>1?t[e-1]:K;return n="function"==typeof n?(t.pop(),n):K,di(t,n)})),sa=Br((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Re(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Wt&&Hr(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Si,args:[i],thisArg:K}),new y(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(K),t}))):this.thru(i)})),oa=ur((function(t,e,n){Rs.call(t,n)?++t[n]:ye(t,n,1)})),aa=Er(_i),ua=Er(ci),_a=ur((function(t,e,n){Rs.call(t,n)?t[n].push(e):ye(t,n,[e])})),ca=vn((function(t,e,n){var r=-1,s="function"==typeof e,o=Ci(t)?ls(t.length):[];return yo(t,(function(t){o[++r]=s?i(e,t,n):Ze(t,e,n)})),o})),la=ur((function(t,e,n){ye(t,n,e)})),ha=ur((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Ta=vn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Wr(t,e[0],e[1])?e=[]:n>2&&Wr(e[0],e[1],e[2])&&(e=[e[0]]),Rn(t,Be(e,1),[])})),pa=Ks||function(){return tn.Date.now()},fa=vn((function(t,e,n){var r=1;if(n.length){var i=V(n,xr(fa));r|=Q}return Cr(t,r,e,n,i)})),Ea=vn((function(t,e,n){var r=3;if(n.length){var i=V(n,xr(Ea));r|=Q}return Cr(e,r,t,n,i)})),da=vn((function(t,e){return Ce(t,1,e)})),Na=vn((function(t,e,n){return Ce(t,Ki(e)||0,n)}));Ii.Cache=he;var Sa=bo((function(t,e){var n=(e=1==e.length&&Ia(e[0])?h(e[0],C(Vr())):h(Be(e,1),C(Vr()))).length;return vn((function(r){for(var s=-1,o=eo(r.length,n);++s<o;)r[s]=e[s].call(this,r[s]);return i(t,this,r)}))})),ma=vn((function(t,e){return Cr(t,Q,K,e,V(e,xr(ma)))})),Aa=vn((function(t,e){return Cr(t,64,K,e,V(e,xr(Aa)))})),Pa=Br((function(t,e){return Cr(t,256,K,K,K,e)})),ga=Rr(Ge),ya=Rr((function(t,e){return t>=e})),Ra=en(function(){return arguments}())?en:function(t){return Ui(t)&&Rs.call(t,"callee")&&!xs.call(t,"callee")},Ia=ls.isArray,Da=an?C(an):function(t){return Ui(t)&&je(t)==mt},Oa=Xs||cs,Ca=un?C(un):function(t){return Ui(t)&&je(t)==at},ba=_n?C(_n):function(t){return Ui(t)&&Uo(t)==lt},va=cn?C(cn):function(t){return Ui(t)&&je(t)==ft},wa=ln?C(ln):function(t){return Ui(t)&&Uo(t)==Et},La=hn?C(hn):function(t){return Ui(t)&&Bi(t.length)&&!!We[je(t)]},Ba=Rr(Sn),Ya=Rr((function(t,e){return t<=e})),Ua=_r((function(t,e){if(Xr(e)||Ci(e))return ar(e,Xi(e),t),K;for(var n in e)Rs.call(e,n)&&me(t,n,e[n])})),Ma=_r((function(t,e){ar(e,$i(e),t)})),xa=_r((function(t,e,n,r){ar(e,$i(e),t,r)})),Va=_r((function(t,e,n,r){ar(e,Xi(e),t,r)})),Fa=Br(Re),ka=vn((function(t,e){t=Es(t);var n=-1,r=e.length,i=r>2?e[2]:K;for(i&&Wr(e[0],e[1],i)&&(r=1);++n<r;)for(var s=e[n],o=$i(s),a=-1,u=o.length;++a<u;){var _=o[a],c=t[_];(c===K||Oi(c,Ps[_])&&!Rs.call(t,_))&&(t[_]=s[_])}return t})),ja=vn((function(t){return t.push(K,vr),i(Wa,K,t)})),Ga=Sr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Os.call(e)),t[e]=n}),rs(is)),qa=Sr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Os.call(e)),Rs.call(t,e)?t[e].push(n):t[e]=[n]}),Vr),Ka=vn(Ze),Ha=_r((function(t,e,n){gn(t,e,n)})),Wa=_r((function(t,e,n,r){gn(t,e,n,r)})),za=Br((function(t,e){var n={};if(null==t)return n;var r=!1;e=h(e,(function(e){return e=Jn(e,t),r||(r=e.length>1),e})),ar(t,Ur(t),n),r&&(n=De(n,7,wr));for(var i=e.length;i--;)qn(n,e[i]);return n})),Qa=Br((function(t,e){return null==t?{}:function(t,e){return In(t,e,(function(e,n){return Qi(t,n)}))}(t,e)})),Xa=Or(Xi),$a=Or($i),Ja=Tr((function(t,e,n){return e=e.toLowerCase(),t+(n?ts(e):e)})),Za=Tr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),tu=Tr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),eu=hr("toLowerCase"),nu=Tr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),ru=Tr((function(t,e,n){return t+(n?" ":"")+su(e)})),iu=Tr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),su=hr("toUpperCase"),ou=vn((function(t,e){try{return i(t,K,e)}catch(t){return vi(t)?t:new Ts(t)}})),au=Br((function(t,e){return o(e,(function(e){e=si(e),ye(t,e,fa(t[e],t))})),t})),uu=dr(),_u=dr(!0),cu=vn((function(t,e){return function(n){return Ze(n,t,e)}})),lu=vn((function(t,e){return function(n){return Ze(t,n,e)}})),hu=Ar(h),Tu=Ar(u),pu=Ar(E),fu=yr(),Eu=yr(!0),du=mr((function(t,e){return t+e}),0),Nu=Dr("ceil"),Su=mr((function(t,e){return t/e}),1),mu=Dr("floor"),Au=mr((function(t,e){return t*e}),1),Pu=Dr("round"),gu=mr((function(t,e){return t-e}),0);return n.after=function(t,e){if("function"!=typeof e)throw new Ss(H);return t=Gi(t),function(){if(--t<1)return e.apply(this,arguments)}},n.ary=gi,n.assign=Ua,n.assignIn=Ma,n.assignInWith=xa,n.assignWith=Va,n.at=Fa,n.before=yi,n.bind=fa,n.bindAll=au,n.bindKey=Ea,n.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ia(t)?t:[t]},n.chain=Ni,n.chunk=function(t,e,n){e=(n?Wr(t,e,n):e===K)?1:to(Gi(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var i=0,s=0,o=ls(Ws(r/e));i<r;)o[s++]=Un(t,i,i+=e);return o},n.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i},n.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ls(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return T(Ia(n)?or(n):[n],Be(e,1))},n.cond=function(t){var e=null==t?0:t.length,n=Vr();return t=e?h(t,(function(t){if("function"!=typeof t[1])throw new Ss(H);return[n(t[0]),t[1]]})):[],vn((function(n){for(var r=-1;++r<e;){var s=t[r];if(i(s[0],this,n))return i(s[1],this,n)}}))},n.conforms=function(t){return function(t){var e=Xi(t);return function(n){return Oe(n,t,e)}}(De(t,1))},n.constant=rs,n.countBy=oa,n.create=function(t,e){var n=go(t);return null==e?n:ge(n,e)},n.curry=function t(e,n,r){var i=Cr(e,8,K,K,K,K,K,n=r?K:n);return i.placeholder=t.placeholder,i},n.curryRight=function t(e,n,r){var i=Cr(e,16,K,K,K,K,K,n=r?K:n);return i.placeholder=t.placeholder,i},n.debounce=Ri,n.defaults=ka,n.defaultsDeep=ja,n.defer=da,n.delay=Na,n.difference=jo,n.differenceBy=Go,n.differenceWith=qo,n.drop=function(t,e,n){var r=null==t?0:t.length;return r?Un(t,(e=n||e===K?1:Gi(e))<0?0:e,r):[]},n.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Un(t,0,(e=r-(e=n||e===K?1:Gi(e)))<0?0:e):[]},n.dropRightWhile=function(t,e){return t&&t.length?Hn(t,Vr(e,3),!0,!0):[]},n.dropWhile=function(t,e){return t&&t.length?Hn(t,Vr(e,3),!0):[]},n.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Wr(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=Gi(n))<0&&(n=-n>i?0:i+n),(r=r===K||r>i?i:Gi(r))<0&&(r+=i),r=n>r?0:qi(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},n.filter=function(t,e){return(Ia(t)?_:Le)(t,Vr(e,3))},n.flatMap=function(t,e){return Be(Pi(t,e),1)},n.flatMapDeep=function(t,e){return Be(Pi(t,e),$)},n.flatMapDepth=function(t,e,n){return n=n===K?1:Gi(n),Be(Pi(t,e),n)},n.flatten=li,n.flattenDeep=function(t){return null!=t&&t.length?Be(t,$):[]},n.flattenDepth=function(t,e){return null!=t&&t.length?Be(t,e=e===K?1:Gi(e)):[]},n.flip=function(t){return Cr(t,512)},n.flow=uu,n.flowRight=_u,n.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},n.functions=function(t){return null==t?[]:Me(t,Xi(t))},n.functionsIn=function(t){return null==t?[]:Me(t,$i(t))},n.groupBy=_a,n.initial=function(t){return null!=t&&t.length?Un(t,0,-1):[]},n.intersection=Ko,n.intersectionBy=Ho,n.intersectionWith=Wo,n.invert=Ga,n.invertBy=qa,n.invokeMap=ca,n.iteratee=ss,n.keyBy=la,n.keys=Xi,n.keysIn=$i,n.map=Pi,n.mapKeys=function(t,e){var n={};return e=Vr(e,3),Ye(t,(function(t,r,i){ye(n,e(t,r,i),t)})),n},n.mapValues=function(t,e){var n={};return e=Vr(e,3),Ye(t,(function(t,r,i){ye(n,r,e(t,r,i))})),n},n.matches=function(t){return An(De(t,1))},n.matchesProperty=function(t,e){return Pn(t,De(e,1))},n.memoize=Ii,n.merge=Ha,n.mergeWith=Wa,n.method=cu,n.methodOf=lu,n.mixin=os,n.negate=Di,n.nthArg=function(t){return t=Gi(t),vn((function(e){return yn(e,t)}))},n.omit=za,n.omitBy=function(t,e){return Ji(t,Di(Vr(e)))},n.once=function(t){return yi(2,t)},n.orderBy=function(t,e,n,r){return null==t?[]:(Ia(e)||(e=null==e?[]:[e]),Ia(n=r?K:n)||(n=null==n?[]:[n]),Rn(t,e,n))},n.over=hu,n.overArgs=Sa,n.overEvery=Tu,n.overSome=pu,n.partial=ma,n.partialRight=Aa,n.partition=ha,n.pick=Qa,n.pickBy=Ji,n.property=us,n.propertyOf=function(t){return function(e){return null==t?K:xe(t,e)}},n.pull=zo,n.pullAll=pi,n.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Dn(t,e,Vr(n,2)):t},n.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Dn(t,e,K,n):t},n.pullAt=Qo,n.range=fu,n.rangeRight=Eu,n.rearg=Pa,n.reject=function(t,e){return(Ia(t)?_:Le)(t,Di(Vr(e,3)))},n.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],s=t.length;for(e=Vr(e,3);++r<s;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return On(t,i),n},n.rest=function(t,e){if("function"!=typeof t)throw new Ss(H);return vn(t,e=e===K?e:Gi(e))},n.reverse=fi,n.sampleSize=function(t,e,n){return e=(n?Wr(t,e,n):e===K)?1:Gi(e),(Ia(t)?de:Ln)(t,e)},n.set=function(t,e,n){return null==t?t:Bn(t,e,n)},n.setWith=function(t,e,n,r){return r="function"==typeof r?r:K,null==t?t:Bn(t,e,n,r)},n.shuffle=function(t){return(Ia(t)?Ne:Yn)(t)},n.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Wr(t,e,n)?(e=0,n=r):(e=null==e?0:Gi(e),n=n===K?r:Gi(n)),Un(t,e,n)):[]},n.sortBy=Ta,n.sortedUniq=function(t){return t&&t.length?Fn(t):[]},n.sortedUniqBy=function(t,e){return t&&t.length?Fn(t,Vr(e,2)):[]},n.split=function(t,e,n){return n&&"number"!=typeof n&&Wr(t,e,n)&&(e=n=K),(n=n===K?tt:n>>>0)?(t=Wi(t))&&("string"==typeof e||null!=e&&!va(e))&&!(e=jn(e))&&Y(t)?Zn(j(t),0,n):t.split(e,n):[]},n.spread=function(t,e){if("function"!=typeof t)throw new Ss(H);return e=null==e?0:to(Gi(e),0),vn((function(n){var r=n[e],s=Zn(n,0,e);return r&&T(s,r),i(t,this,s)}))},n.tail=function(t){var e=null==t?0:t.length;return e?Un(t,1,e):[]},n.take=function(t,e,n){return t&&t.length?Un(t,0,(e=n||e===K?1:Gi(e))<0?0:e):[]},n.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Un(t,(e=r-(e=n||e===K?1:Gi(e)))<0?0:e,r):[]},n.takeRightWhile=function(t,e){return t&&t.length?Hn(t,Vr(e,3),!1,!0):[]},n.takeWhile=function(t,e){return t&&t.length?Hn(t,Vr(e,3)):[]},n.tap=function(t,e){return e(t),t},n.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Ss(H);return Yi(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ri(t,e,{leading:r,maxWait:e,trailing:i})},n.thru=Si,n.toArray=ki,n.toPairs=Xa,n.toPairsIn=$a,n.toPath=function(t){return Ia(t)?h(t,si):Fi(t)?[t]:or(ko(Wi(t)))},n.toPlainObject=Hi,n.transform=function(t,e,n){var r=Ia(t),i=r||Oa(t)||La(t);if(e=Vr(e,4),null==n){var s=t&&t.constructor;n=i?r?new s:[]:Yi(t)&&wi(s)?go(Us(t)):{}}return(i?o:Ye)(t,(function(t,r,i){return e(n,t,r,i)})),n},n.unary=function(t){return gi(t,1)},n.union=Xo,n.unionBy=$o,n.unionWith=Jo,n.uniq=function(t){return t&&t.length?Gn(t):[]},n.uniqBy=function(t,e){return t&&t.length?Gn(t,Vr(e,2)):[]},n.uniqWith=function(t,e){return e="function"==typeof e?e:K,t&&t.length?Gn(t,K,e):[]},n.unset=function(t,e){return null==t||qn(t,e)},n.unzip=Ei,n.unzipWith=di,n.update=function(t,e,n){return null==t?t:Kn(t,e,$n(n))},n.updateWith=function(t,e,n,r){return r="function"==typeof r?r:K,null==t?t:Kn(t,e,$n(n),r)},n.values=Zi,n.valuesIn=function(t){return null==t?[]:b(t,$i(t))},n.without=Zo,n.words=ns,n.wrap=function(t,e){return ma($n(e),t)},n.xor=ta,n.xorBy=ea,n.xorWith=na,n.zip=ra,n.zipObject=function(t,e){return Qn(t||[],e||[],me)},n.zipObjectDeep=function(t,e){return Qn(t||[],e||[],Bn)},n.zipWith=ia,n.entries=Xa,n.entriesIn=$a,n.extend=Ma,n.extendWith=xa,os(n,n),n.add=du,n.attempt=ou,n.camelCase=Ja,n.capitalize=ts,n.ceil=Nu,n.clamp=function(t,e,n){return n===K&&(n=e,e=K),n!==K&&(n=(n=Ki(n))==n?n:0),e!==K&&(e=(e=Ki(e))==e?e:0),Ie(Ki(t),e,n)},n.clone=function(t){return De(t,4)},n.cloneDeep=function(t){return De(t,5)},n.cloneDeepWith=function(t,e){return De(t,5,e="function"==typeof e?e:K)},n.cloneWith=function(t,e){return De(t,4,e="function"==typeof e?e:K)},n.conformsTo=function(t,e){return null==e||Oe(t,e,Xi(e))},n.deburr=es,n.defaultTo=function(t,e){return null==t||t!=t?e:t},n.divide=Su,n.endsWith=function(t,e,n){t=Wi(t),e=jn(e);var r=t.length,i=n=n===K?r:Ie(Gi(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},n.eq=Oi,n.escape=function(t){return(t=Wi(t))&&Mt.test(t)?t.replace(Yt,fn):t},n.escapeRegExp=function(t){return(t=Wi(t))&&Kt.test(t)?t.replace(qt,"\\$&"):t},n.every=function(t,e,n){var r=Ia(t)?u:ve;return n&&Wr(t,e,n)&&(e=K),r(t,Vr(e,3))},n.find=aa,n.findIndex=_i,n.findKey=function(t,e){return d(t,Vr(e,3),Ye)},n.findLast=ua,n.findLastIndex=ci,n.findLastKey=function(t,e){return d(t,Vr(e,3),Ue)},n.floor=mu,n.forEach=mi,n.forEachRight=Ai,n.forIn=function(t,e){return null==t?t:Io(t,Vr(e,3),$i)},n.forInRight=function(t,e){return null==t?t:Do(t,Vr(e,3),$i)},n.forOwn=function(t,e){return t&&Ye(t,Vr(e,3))},n.forOwnRight=function(t,e){return t&&Ue(t,Vr(e,3))},n.get=zi,n.gt=ga,n.gte=ya,n.has=function(t,e){return null!=t&&Gr(t,e,qe)},n.hasIn=Qi,n.head=hi,n.identity=is,n.includes=function(t,e,n,r){t=Ci(t)?t:Zi(t),n=n&&!r?Gi(n):0;var i=t.length;return n<0&&(n=to(i+n,0)),Vi(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&S(t,e,n)>-1},n.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Gi(n);return i<0&&(i=to(r+i,0)),S(t,e,i)},n.inRange=function(t,e,n){return e=ji(e),n===K?(n=e,e=0):n=ji(n),function(t,e,n){return t>=eo(e,n)&&t<to(e,n)}(t=Ki(t),e,n)},n.invoke=Ka,n.isArguments=Ra,n.isArray=Ia,n.isArrayBuffer=Da,n.isArrayLike=Ci,n.isArrayLikeObject=bi,n.isBoolean=function(t){return!0===t||!1===t||Ui(t)&&je(t)==ot},n.isBuffer=Oa,n.isDate=Ca,n.isElement=function(t){return Ui(t)&&1===t.nodeType&&!xi(t)},n.isEmpty=function(t){if(null==t)return!0;if(Ci(t)&&(Ia(t)||"string"==typeof t||"function"==typeof t.splice||Oa(t)||La(t)||Ra(t)))return!t.length;var e=Uo(t);if(e==lt||e==Et)return!t.size;if(Xr(t))return!Nn(t).length;for(var n in t)if(Rs.call(t,n))return!1;return!0},n.isEqual=function(t,e){return nn(t,e)},n.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:K)?n(t,e):K;return r===K?nn(t,e,K,n):!!r},n.isError=vi,n.isFinite=function(t){return"number"==typeof t&&$s(t)},n.isFunction=wi,n.isInteger=Li,n.isLength=Bi,n.isMap=ba,n.isMatch=function(t,e){return t===e||sn(t,e,kr(e))},n.isMatchWith=function(t,e,n){return n="function"==typeof n?n:K,sn(t,e,kr(e),n)},n.isNaN=function(t){return Mi(t)&&t!=+t},n.isNative=function(t){if(Mo(t))throw new Ts("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return on(t)},n.isNil=function(t){return null==t},n.isNull=function(t){return null===t},n.isNumber=Mi,n.isObject=Yi,n.isObjectLike=Ui,n.isPlainObject=xi,n.isRegExp=va,n.isSafeInteger=function(t){return Li(t)&&t>=-J&&t<=J},n.isSet=wa,n.isString=Vi,n.isSymbol=Fi,n.isTypedArray=La,n.isUndefined=function(t){return t===K},n.isWeakMap=function(t){return Ui(t)&&Uo(t)==St},n.isWeakSet=function(t){return Ui(t)&&"[object WeakSet]"==je(t)},n.join=function(t,e){return null==t?"":Js.call(t,e)},n.kebabCase=Za,n.last=Ti,n.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==K&&(i=(i=Gi(n))<0?to(r+i,0):eo(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):N(t,A,i,!0)},n.lowerCase=tu,n.lowerFirst=eu,n.lt=Ba,n.lte=Ya,n.max=function(t){return t&&t.length?we(t,is,Ge):K},n.maxBy=function(t,e){return t&&t.length?we(t,Vr(e,2),Ge):K},n.mean=function(t){return P(t,is)},n.meanBy=function(t,e){return P(t,Vr(e,2))},n.min=function(t){return t&&t.length?we(t,is,Sn):K},n.minBy=function(t,e){return t&&t.length?we(t,Vr(e,2),Sn):K},n.stubArray=_s,n.stubFalse=cs,n.stubObject=function(){return{}},n.stubString=function(){return""},n.stubTrue=function(){return!0},n.multiply=Au,n.nth=function(t,e){return t&&t.length?yn(t,Gi(e)):K},n.noConflict=function(){return tn._===this&&(tn._=bs),this},n.noop=as,n.now=pa,n.pad=function(t,e,n){t=Wi(t);var r=(e=Gi(e))?k(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Pr(zs(i),n)+t+Pr(Ws(i),n)},n.padEnd=function(t,e,n){t=Wi(t);var r=(e=Gi(e))?k(t):0;return e&&r<e?t+Pr(e-r,n):t},n.padStart=function(t,e,n){t=Wi(t);var r=(e=Gi(e))?k(t):0;return e&&r<e?Pr(e-r,n)+t:t},n.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),ro(Wi(t).replace(Ht,""),e||0)},n.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Wr(t,e,n)&&(e=n=K),n===K&&("boolean"==typeof e?(n=e,e=K):"boolean"==typeof t&&(n=t,t=K)),t===K&&e===K?(t=0,e=1):(t=ji(t),e===K?(e=t,t=0):e=ji(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=io();return eo(t+i*(e-t+Xe("1e-"+((i+"").length-1))),e)}return Cn(t,e)},n.reduce=function(t,e,n){var r=Ia(t)?p:R,i=arguments.length<3;return r(t,Vr(e,4),n,i,yo)},n.reduceRight=function(t,e,n){var r=Ia(t)?f:R,i=arguments.length<3;return r(t,Vr(e,4),n,i,Ro)},n.repeat=function(t,e,n){return e=(n?Wr(t,e,n):e===K)?1:Gi(e),bn(Wi(t),e)},n.replace=function(){var t=arguments,e=Wi(t[0]);return t.length<3?e:e.replace(t[1],t[2])},n.result=function(t,e,n){var r=-1,i=(e=Jn(e,t)).length;for(i||(i=1,t=K);++r<i;){var s=null==t?K:t[si(e[r])];s===K&&(r=i,s=n),t=wi(s)?s.call(t):s}return t},n.round=Pu,n.runInContext=t,n.sample=function(t){return(Ia(t)?Ee:wn)(t)},n.size=function(t){if(null==t)return 0;if(Ci(t))return Vi(t)?k(t):t.length;var e=Uo(t);return e==lt||e==Et?t.size:Nn(t).length},n.snakeCase=nu,n.some=function(t,e,n){var r=Ia(t)?E:Mn;return n&&Wr(t,e,n)&&(e=K),r(t,Vr(e,3))},n.sortedIndex=function(t,e){return xn(t,e)},n.sortedIndexBy=function(t,e,n){return Vn(t,e,Vr(n,2))},n.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=xn(t,e);if(r<n&&Oi(t[r],e))return r}return-1},n.sortedLastIndex=function(t,e){return xn(t,e,!0)},n.sortedLastIndexBy=function(t,e,n){return Vn(t,e,Vr(n,2),!0)},n.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=xn(t,e,!0)-1;if(Oi(t[n],e))return n}return-1},n.startCase=ru,n.startsWith=function(t,e,n){return t=Wi(t),n=null==n?0:Ie(Gi(n),0,t.length),e=jn(e),t.slice(n,n+e.length)==e},n.subtract=gu,n.sum=function(t){return t&&t.length?I(t,is):0},n.sumBy=function(t,e){return t&&t.length?I(t,Vr(e,2)):0},n.template=function(t,e,r){var i=n.templateSettings;r&&Wr(t,e,r)&&(e=K),t=Wi(t),e=xa({},e,i,br);var s,o,a=xa({},e.imports,i.imports,br),u=Xi(a),_=b(a,u),c=0,l=e.interpolate||ue,h="__p += '",T=ds((e.escape||ue).source+"|"+l.source+"|"+(l===Ft?te:ue).source+"|"+(e.evaluate||ue).source+"|$","g"),p="//# sourceURL="+(Rs.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++He+"]")+"\n";t.replace(T,(function(e,n,r,i,a,u){return r||(r=i),h+=t.slice(c,u).replace(_e,B),n&&(s=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),h+="';\n";var f=Rs.call(e,"variable")&&e.variable;if(f){if(Jt.test(f))throw new Ts("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(vt,""):h).replace(wt,"$1").replace(Lt,"$1;"),h="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var E=ou((function(){return ps(u,p+"return "+h).apply(K,_)}));if(E.source=h,vi(E))throw E;return E},n.times=function(t,e){if((t=Gi(t))<1||t>J)return[];var n=tt,r=eo(t,tt);e=Vr(e),t-=tt;for(var i=D(r,e);++n<t;)e(n);return i},n.toFinite=ji,n.toInteger=Gi,n.toLength=qi,n.toLower=function(t){return Wi(t).toLowerCase()},n.toNumber=Ki,n.toSafeInteger=function(t){return t?Ie(Gi(t),-J,J):0===t?t:0},n.toString=Wi,n.toUpper=function(t){return Wi(t).toUpperCase()},n.trim=function(t,e,n){if((t=Wi(t))&&(n||e===K))return O(t);if(!t||!(e=jn(e)))return t;var r=j(t),i=j(e);return Zn(r,w(r,i),L(r,i)+1).join("")},n.trimEnd=function(t,e,n){if((t=Wi(t))&&(n||e===K))return t.slice(0,G(t)+1);if(!t||!(e=jn(e)))return t;var r=j(t);return Zn(r,0,L(r,j(e))+1).join("")},n.trimStart=function(t,e,n){if((t=Wi(t))&&(n||e===K))return t.replace(Ht,"");if(!t||!(e=jn(e)))return t;var r=j(t);return Zn(r,w(r,j(e))).join("")},n.truncate=function(t,e){var n=30,r="...";if(Yi(e)){var i="separator"in e?e.separator:i;n="length"in e?Gi(e.length):n,r="omission"in e?jn(e.omission):r}var s=(t=Wi(t)).length;if(Y(t)){var o=j(t);s=o.length}if(n>=s)return t;var a=n-k(r);if(a<1)return r;var u=o?Zn(o,0,a).join(""):t.slice(0,a);if(i===K)return u+r;if(o&&(a+=u.length-a),va(i)){if(t.slice(a).search(i)){var _,c=u;for(i.global||(i=ds(i.source,Wi(ee.exec(i))+"g")),i.lastIndex=0;_=i.exec(c);)var l=_.index;u=u.slice(0,l===K?a:l)}}else if(t.indexOf(jn(i),a)!=a){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+r},n.unescape=function(t){return(t=Wi(t))&&Ut.test(t)?t.replace(Bt,En):t},n.uniqueId=function(t){var e=++Is;return Wi(t)+e},n.upperCase=iu,n.upperFirst=su,n.each=mi,n.eachRight=Ai,n.first=hi,os(n,function(){var t={};return Ye(n,(function(e,r){Rs.call(n.prototype,r)||(t[r]=e)})),t}(),{chain:!1}),n.VERSION="4.17.21",o(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){n[t].placeholder=n})),o(["drop","take"],(function(t,e){Wt.prototype[t]=function(n){n=n===K?1:to(Gi(n),0);var r=this.__filtered__&&!e?new Wt(this):this.clone();return r.__filtered__?r.__takeCount__=eo(n,r.__takeCount__):r.__views__.push({size:eo(n,tt),type:t+(r.__dir__<0?"Right":"")}),r},Wt.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),o(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Wt.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Vr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),o(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Wt.prototype[t]=function(){return this[n](1).value()[0]}})),o(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Wt.prototype[t]=function(){return this.__filtered__?new Wt(this):this[n](1)}})),Wt.prototype.compact=function(){return this.filter(is)},Wt.prototype.find=function(t){return this.filter(t).head()},Wt.prototype.findLast=function(t){return this.reverse().find(t)},Wt.prototype.invokeMap=vn((function(t,e){return"function"==typeof t?new Wt(this):this.map((function(n){return Ze(n,t,e)}))})),Wt.prototype.reject=function(t){return this.filter(Di(Vr(t)))},Wt.prototype.slice=function(t,e){t=Gi(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Wt(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==K&&(n=(e=Gi(e))<0?n.dropRight(-e):n.take(e-t)),n)},Wt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Wt.prototype.toArray=function(){return this.take(tt)},Ye(Wt.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),s=n[i?"take"+("last"==e?"Right":""):e],o=i||/^find/.test(e);s&&(n.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,u=e instanceof Wt,_=a[0],c=u||Ia(e),l=function(t){var e=s.apply(n,T([t],a));return i&&h?e[0]:e};c&&r&&"function"==typeof _&&1!=_.length&&(u=c=!1);var h=this.__chain__,p=!!this.__actions__.length,f=o&&!h,E=u&&!p;if(!o&&c){e=E?e:new Wt(this);var d=t.apply(e,a);return d.__actions__.push({func:Si,args:[l],thisArg:K}),new y(d,h)}return f&&E?t.apply(this,a):(d=this.thru(l),f?i?d.value()[0]:d.value():d)})})),o(["pop","push","shift","sort","splice","unshift"],(function(t){var e=ms[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);n.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var n=this.value();return e.apply(Ia(n)?n:[],t)}return this[r]((function(n){return e.apply(Ia(n)?n:[],t)}))}})),Ye(Wt.prototype,(function(t,e){var r=n[e];if(r){var i=r.name+"";Rs.call(To,i)||(To[i]=[]),To[i].push({name:e,func:r})}})),To[Nr(K,2).name]=[{name:"wrapper",func:K}],Wt.prototype.clone=function(){var t=new Wt(this.__wrapped__);return t.__actions__=or(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=or(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=or(this.__views__),t},Wt.prototype.reverse=function(){if(this.__filtered__){var t=new Wt(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Wt.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ia(t),r=e<0,i=n?t.length:0,s=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=eo(e,t+o);break;case"takeRight":t=to(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=s.start,a=s.end,u=a-o,_=r?a:o-1,c=this.__iteratees__,l=c.length,h=0,T=eo(u,this.__takeCount__);if(!n||!r&&i==u&&T==u)return Wn(t,this.__actions__);var p=[];t:for(;u--&&h<T;){for(var f=-1,E=t[_+=e];++f<l;){var d=c[f],N=d.iteratee,S=d.type,m=N(E);if(2==S)E=m;else if(!m){if(1==S)continue t;break t}}p[h++]=E}return p},n.prototype.at=sa,n.prototype.chain=function(){return Ni(this)},n.prototype.commit=function(){return new y(this.value(),this.__chain__)},n.prototype.next=function(){this.__values__===K&&(this.__values__=ki(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?K:this.__values__[this.__index__++]}},n.prototype.plant=function(t){for(var e,n=this;n instanceof r;){var i=ui(n);i.__index__=0,i.__values__=K,e?s.__wrapped__=i:e=i;var s=i;n=n.__wrapped__}return s.__wrapped__=t,e},n.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Wt){var e=t;return this.__actions__.length&&(e=new Wt(this)),(e=e.reverse()).__actions__.push({func:Si,args:[fi],thisArg:K}),new y(e,this.__chain__)}return this.thru(fi)},n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=function(){return Wn(this.__wrapped__,this.__actions__)},n.prototype.first=n.prototype.head,ks&&(n.prototype[ks]=function(){return this}),n}();tn._=dn,void 0===(r=function(){return dn}.call(e,n,e,t))||(t.exports=r)}.call(this)},7105:(t,e,n)=>{var r=n(1708);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},3125:t=>{t.exports=function(){}},1972:(t,e,n)=>{var r=n(6233),i=n(9192),s=n(3704),o=n(8328),a=n(5634),u=n(5589),_=n(565),c=n(6628),l=_((function(t,e){var n={};if(null==t)return n;var _=!1;e=r(e,(function(e){return e=o(e,t),_||(_=e.length>1),e})),a(t,c(t),n),_&&(n=i(n,7,u));for(var l=e.length;l--;)s(n,e[l]);return n}));t.exports=l},8644:(t,e,n)=>{var r=n(3612),i=n(565)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},416:(t,e,n)=>{var r=n(4024),i=n(4822),s=n(3297),o=n(1966);t.exports=function(t){return s(t)?r(o(t)):i(t)}},220:(t,e,n)=>{var r=n(5951),i=n(5004),s=n(8339),o=n(4661),a=s((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=a},4093:(t,e,n)=>{var r=n(2222),i=n(4367),s=r((function(t,e,n){return t+(n?" ":"")+i(e)}));t.exports=s},3864:t=>{t.exports=function(){return[]}},8042:t=>{t.exports=function(){return!1}},8753:(t,e,n)=>{var r=n(8761);t.exports=function(t){return null==t?"":r(t)}},5116:(t,e,n)=>{var r=n(4900);t.exports=function(t){return t&&t.length?r(t):[]}},4557:(t,e,n)=>{var r=n(535),i=n(4900);t.exports=function(t,e){return t&&t.length?i(t,r(e,2)):[]}},4367:(t,e,n)=>{var r=n(2032)("toUpperCase");t.exports=r},6376:(t,e,n)=>{var r=n(6564),i=n(8683),s=n(8753),o=n(4160);t.exports=function(t,e,n){return t=s(t),void 0===(e=n?void 0:e)?i(t)?o(t):r(t):t.match(e)||[]}},4258:(t,e,n)=>{"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=n(8790),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),_=a.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},T=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();r=function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===s.call(t),r=o(t),a=e&&"[object String]"===s.call(t),h=[];if(!e&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var p=_&&n;if(a&&t.length>0&&!i.call(t,0))for(var f=0;f<t.length;++f)h.push(String(f));if(r&&t.length>0)for(var E=0;E<t.length;++E)h.push(String(E));else for(var d in t)p&&"prototype"===d||!i.call(t,d)||h.push(String(d));if(u)for(var N=function(t){if("undefined"==typeof window||!T)return l(t);try{return l(t)}catch(t){return!1}}(t),S=0;S<c.length;++S)N&&"constructor"===c[S]||!i.call(t,c[S])||h.push(c[S]);return h}}t.exports=r},698:(t,e,n)=>{"use strict";var r=Array.prototype.slice,i=n(8790),s=Object.keys,o=s?function(t){return s(t)}:n(4258),a=Object.keys;o.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?a(r.call(t)):a(t)})}else Object.keys=o;return Object.keys||o},t.exports=o},8790:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var n=e.call(t),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),r}},2988:(t,e,n)=>{t.exports=n(6434)},856:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(2269),s=n(8041);t.exports=class{get condition(){return this._impl.getCondition()}set condition(t){s.assertPropValue("string"==typeof t,"condition"),this._impl.setCondition(t)}get consumerName(){return this._impl.getConsumerName()}set consumerName(t){s.assertPropValue("string"==typeof t,"consumerName"),this._impl.setConsumerName(t)}get correlation(){return this._impl.getCorrelation()}set correlation(t){s.assertPropValue("string"==typeof t,"correlation"),this._impl.setCorrelation(t)}get mode(){return this._impl.getMode()}set mode(t){s.assertPropValue(t===i.AQ_DEQ_MODE_BROWSE||t===i.AQ_DEQ_MODE_LOCKED||t===i.AQ_DEQ_MODE_REMOVE||t===i.AQ_DEQ_MODE_REMOVE_NO_DATA,"mode"),this._impl.setMode(t)}get msgId(){return this._impl.getMsgId()}set msgId(t){s.assertPropValue(r.isBuffer(t),"msgId"),this._impl.setMsgId(t)}get navigation(){return this._impl.getNavigation()}set navigation(t){s.assertPropValue(t===i.AQ_DEQ_NAV_FIRST_MSG||t===i.AQ_DEQ_NAV_NEXT_TRANSACTION||t===i.AQ_DEQ_NAV_NEXT_MSG,"navigation"),this._impl.setNavigation(t)}get transformation(){return this._impl.getTransformation()}set transformation(t){s.assertPropValue("string"==typeof t,"transformation"),this._impl.setTransformation(t)}get visibility(){return this._impl.getVisibility()}set visibility(t){s.assertPropValue(t===i.AQ_VISIBILITY_IMMEDIATE||t===i.AQ_VISIBILITY_ON_COMMIT,"visibility"),this._impl.setVisibility(t)}get wait(){return this._impl.getWait()}set wait(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"wait"),this._impl.setWait(t)}}},596:(t,e,n)=>{"use strict";const r=n(2269),i=n(8041);t.exports=class{get deliveryMode(){return this._impl.getDeliveryMode()}set deliveryMode(t){i.assertPropValue(t===r.AQ_MSG_DELIV_MODE_PERSISTENT||t===r.AQ_MSG_DELIV_MODE_BUFFERED||t===r.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,"deliveryMode"),this._impl.setDeliveryMode(t)}get transformation(){return this._impl.getTransformation()}set transformation(t){i.assertPropValue("string"==typeof t,"transformation"),this._impl.setTransformation(t)}get visibility(){return this._impl.getVisibility()}set visibility(t){i.assertPropValue(t===r.AQ_VISIBILITY_IMMEDIATE||t===r.AQ_VISIBILITY_ON_COMMIT,"visibility"),this._impl.setVisibility(t)}}},1425:(t,e,n)=>{"use strict";const r=n(3034);t.exports=class{get correlation(){return this._impl.getCorrelation()}get delay(){return this._impl.getDelay()}get deliveryMode(){return this._impl.getDeliveryMode()}get exceptionQueue(){return this._impl.getExceptionQueue()}get expiration(){return this._impl.getExpiration()}get msgId(){return this._impl.getMsgId()}get numAttempts(){return this._impl.getNumAttempts()}get originalMsgId(){return this._impl.getOriginalMsgId()}get payload(){const t=this._impl.getPayload();if(t instanceof r){const e=Object.create(this._payloadTypeClass.prototype);return e._impl=t,e}return t}get priority(){return this._impl.getPriority()}get state(){return this._impl.getState()}}},1337:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(8041),s=n(6770),o=n(856),a=n(596),u=n(1425),_=n(7647),c=n(7207),l=n(6893);class h{_isPayload(t){return"string"==typeof t||r.isBuffer(t)||t instanceof _}_makeMessage(t){const e=new u;return e._impl=t,e._payloadTypeClass=this._payloadTypeClass,e}_verifyMessage(t){let e;return this._isPayload(t)?(e=t,t={}):(t={...t},this._isJson||this._isPayload(t.payload)?e=t.payload:this._payloadTypeClass?e=new this._payloadTypeClass(t.payload):i.throwErr(i.ERR_INVALID_AQ_MESSAGE)),this._isJson?t.payload=c.transformJsonValue(e):"string"==typeof e?t.payload=r.from(e):r.isBuffer(e)?t.payload=e:t.payload=e._impl,void 0!==t.correlation&&i.assertParamPropValue("string"==typeof t.correlation,1,"correlation"),void 0!==t.delay&&i.assertParamPropValue(Number.isInteger(t.delay),1,"delay"),void 0!==t.exceptionQueue&&i.assertParamPropValue("string"==typeof t.exceptionQueue,1,"exceptionQueue"),void 0!==t.expiration&&i.assertParamPropValue(Number.isInteger(t.expiration),1,"expiration"),void 0!==t.priority&&i.assertParamPropValue(Number.isInteger(t.priority),1,"priority"),void 0!==t.recipients&&i.assertParamPropValue(s.isArrayOfStrings(t.recipients),1,"recipients"),t}async create(t,e,n){if(n.payloadType===l.DB_TYPE_JSON)this._isJson=!0,this._payloadType=l.DB_TYPE_JSON,this._payloadTypeName="JSON";else if(void 0===n.payloadType||n.payloadType===l.DB_TYPE_RAW)this._payloadType=l.DB_TYPE_RAW,this._payloadTypeName="RAW";else{if("string"==typeof n.payloadType){const e=await t._getDbObjectClassForName(n.payloadType);this._payloadTypeClass=e,n.payloadType=e}else i.assertParamPropValue(s.isObject(n.payloadType)&&n.payloadType.prototype instanceof _,2,"payloadType"),this._payloadTypeClass=n.payloadType;this._payloadType=l.DB_TYPE_OBJECT,this._payloadTypeName=this._payloadTypeClass.prototype.name}this._name=e,this._impl=await t._impl.getQueue(e,this._payloadTypeClass,this._payloadType)}async deqMany(t){return i.assertArgCount(arguments,1,1),i.assertParamValue(Number.isInteger(t)&&t>0,1),(await this._impl.deq(t)).map((t=>this._makeMessage(t)))}async deqOne(){i.assertArgCount(arguments,0,0);const t=await this._impl.deq(1);if(t.length>0)return this._makeMessage(t[0])}get deqOptions(){if(!this._deqOptions){const t=new o;t._impl=this._impl.deqOptions,this._deqOptions=t}return this._deqOptions}async enqMany(t){i.assertArgCount(arguments,1,1),i.assertParamValue(Array.isArray(t)&&t.length>0,1);const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=this._verifyMessage(t[n]);return(await this._impl.enq(e)).map((t=>this._makeMessage(t)))}async enqOne(t){i.assertArgCount(arguments,1,1),t=this._verifyMessage(t);const e=await this._impl.enq([t]);return this._makeMessage(e[0])}get enqOptions(){if(!this._enqOptions){const t=new a;t._impl=this._impl.enqOptions,this._enqOptions=t}return this._enqOptions}get name(){return this._name}get payloadType(){return this._payloadType}get payloadTypeName(){return this._payloadTypeName}get payloadTypeClass(){return this._payloadTypeClass}}s.wrapFns(h.prototype,"deqOne","deqMany","enqOne","enqMany"),t.exports=h},6530:(t,e,n)=>{"use strict";const r=n(1337),i=n(7647),{Buffer:s}=n(2562),o=n(2733),a=n(9891),u=n(198),_=n(4434),c=n(8536),l=n(8041),h=n(6770),T=n(851),p=n(932),f=n(9023),E=n(2269),d=n(8023),N=n(7207),S=n(6893),m=n(7034),A=new Map;class P extends _{constructor(){super(),this._dbObjectClasses=new Map,this._closing=!1}_addDefaultsToExecOpts(t){t.connection=this,void 0===t.keepInStmtCache&&(t.keepInStmtCache=!0),d.addToOptions(t,"autoCommit","dbObjectAsPojo","fetchArraySize","fetchTypeHandler","maxRows","outFormat","prefetchRows")}_buildDbObjectClass(t){const e=function(e){if(this._impl=new T.DbObjectImpl(t),this.isCollection){const t=new Proxy(this,i._collectionProxyHandler);if(void 0!==e)for(let t=0;t<e.length;t++)this.append(e[t]);return t}void 0!==e&&Object.assign(this,e)};if((e.prototype=Object.create(i.prototype)).constructor=e,e.prototype._objType=t,t.elementTypeClass){const e=this._getDbObjectClass(t.elementTypeClass);t.elementTypeClass=e}if(t.isCollection&&(h.addTypeProperties(t,"elementType"),t.elementTypeInfo.type=t.elementType),t.attributes){const n={};for(const e of t.attributes){e.typeClass&&(e.typeClass=this._getDbObjectClass(e.typeClass)),h.addTypeProperties(e,"type");const t={get(){return this._getAttrValue(e)},set(t){this._setAttrValue(e,t)}};n[e.name]=t}Object.defineProperties(e.prototype,n)}return e.toString=function(){return"DbObjectClass ["+t.fqn+"]"},e}_getDbObjectClass(t){if(t.prototype instanceof i)return t;let e=this._dbObjectClasses.get(t);return e||(e=this._buildDbObjectClass(t),e._connection=this,e._objType=t,t._connection=this._impl,this._dbObjectClasses.set(t,e)),e}async _getDbObjectClassForName(t){let e=this._dbObjectClasses.get(t);if(!e){const n=await this._impl.getDbObjectClass(t);e=this._getDbObjectClass(n),this._dbObjectClasses.set(t,e)}return e}_isBindDir(t){return t===E.BIND_IN||t===E.BIND_OUT||t===E.BIND_INOUT}_isBindValue(t){return null==t||"number"==typeof t||"string"==typeof t||"boolean"==typeof t||"bigint"==typeof t||Array.isArray(t)||t instanceof Float32Array||t instanceof Float64Array||t instanceof Int8Array||s.isBuffer(t)||f.types.isDate(t)||t instanceof o||t instanceof a||t instanceof i}async _processBindUnit(t,e,n){let r=!1;if(void 0===e.dir?t.dir=E.BIND_IN:(l.assert(this._isBindDir(e.dir),l.ERR_INVALID_BIND_DIRECTION),t.dir=e.dir,r=!0),void 0!==e.type?("string"==typeof e.type?(t.type=S.DB_TYPE_OBJECT,t.typeClass=await this._getDbObjectClassForName(e.type),t.objType=t.typeClass._objType):e.type.prototype instanceof i?(t.type=S.DB_TYPE_OBJECT,t.typeClass=e.type,t.objType=t.typeClass._objType):(l.assert(e.type instanceof S.DbType,l.ERR_INVALID_BIND_DATA_TYPE,2),t.type=e.type),r=!0):n&&(t.name&&l.throwErr(l.ERR_MISSING_TYPE_BY_NAME,t.name),l.throwErr(l.ERR_MISSING_TYPE_BY_POS,t.pos)),(t.dir!==E.BIND_IN||n)&&(void 0!==e.maxSize?(l.assertParamPropValue(Number.isInteger(e.maxSize)&&e.maxSize>0,2,"maxSize"),t.maxSize=e.maxSize,t.checkSize=!0,r=!0):n?t.type!==S.DB_TYPE_VARCHAR&&t.type!==S.DB_TYPE_RAW||(t.name&&l.throwErr(l.ERR_MISSING_MAX_SIZE_BY_NAME,t.name),l.throwErr(l.ERR_MISSING_MAX_SIZE_BY_POS,t.pos)):t.maxSize=E.DEFAULT_MAX_SIZE_FOR_OUT_BINDS),t.isArray=!1,n||void 0!==e.maxArraySize&&(l.assertParamPropValue(Number.isInteger(e.maxArraySize)&&e.maxArraySize>0,2,"maxArraySize"),t.maxArraySize=e.maxArraySize,t.isArray=!0),!n&&void 0!==e.val)return e.val;r||l.throwErr(l.ERR_INVALID_BIND_UNIT)}async _processBindValue(t,e,n){const r=N.transformValueIn(t,e,n);t.isArray?t.values=r.concat(t.values.slice(r.length)):t.values[n.pos]=r,t.type===S.DB_TYPE_OBJECT&&void 0===t.typeClass&&(t.typeClass=await this._getDbObjectClass(e._objType),t.objType=t.typeClass._objType)}async _processExecuteBind(t,e){let n;if(t.isArray=!1,this._isBindValue(e)?(t.dir=E.BIND_IN,n=e):n=await this._processBindUnit(t,e,!1),t.dir!==E.BIND_OUT){const e={pos:0,allowArray:!0};await this._processBindValue(t,n,e)}void 0===t.type&&(t.type=S.DB_TYPE_VARCHAR,void 0===t.maxSize&&(t.maxSize=1)),t.isArray&&t.type!==S.DB_TYPE_VARCHAR&&t.type!==S.DB_TYPE_NVARCHAR&&t.type!==S.DB_TYPE_CHAR&&t.type!==S.DB_TYPE_NCHAR&&t.type!==S.DB_TYPE_NUMBER&&t.type!==S.DB_TYPE_BINARY_FLOAT&&t.type!==S.DB_TYPE_BINARY_DOUBLE&&t.type!==S.DB_TYPE_DATE&&t.type!==S.DB_TYPE_TIMESTAMP&&t.type!==S.DB_TYPE_TIMESTAMP_LTZ&&t.type!==S.DB_TYPE_TIMESTAMP_TZ&&t.type!==S.DB_TYPE_RAW&&l.throwErr(l.ERR_INVALID_TYPE_FOR_ARRAY_BIND)}async _processExecuteBinds(t){const e=[];if(Array.isArray(t))for(let n=0;n<t.length;n++){const r=e[n]={pos:n+1,values:[]};await this._processExecuteBind(r,t[n])}else{l.assertParamValue(h.isObject(t),2);const n=Object.getOwnPropertyNames(t);for(let r=0;r<n.length;r++){const i=e[r]={name:n[r],values:[]};await this._processExecuteBind(i,t[n[r]])}}return e}async _processExecuteManyBinds(t,e){const n=[];let r;if(void 0!==e)if(Array.isArray(e)){r=!0;for(let t=0;t<e.length;t++){const r=n[t]={pos:t+1,values:[]};await this._processBindUnit(r,e[t],!0)}}else{r=!1;const t=Object.getOwnPropertyNames(e);for(let r=0;r<t.length;r++){const i=n[r]={name:t[r],values:[]};await this._processBindUnit(i,e[t[r]],!0)}}else{const e=t[0];if(l.assertParamValue(h.isObjectOrArray(e),2),Array.isArray(e)){r=!0;for(let t=0;t<e.length;t++)n[t]={pos:t+1}}else{r=!1;const t=Object.getOwnPropertyNames(e);for(let e=0;e<t.length;e++)n[e]={name:t[e]}}for(let t=0;t<n.length;t++)n[t].dir=E.BIND_IN,n[t].isArray=!1,n[t].values=[]}for(let e=0;e<t.length;e++){const i=t[e],s={pos:e,allowArray:!1};l.assert(r&&Array.isArray(i)||!r&&h.isObject(i),l.ERR_MIXED_BIND);for(let t=0;t<n.length;t++){const e=n[t],o=r?i[t]:i[e.name];await this._processBindValue(e,o,s)}}for(let t=0;t<n.length;t++){const e=n[t];void 0===e.type&&(e.type=S.DB_TYPE_VARCHAR,e.maxSize=1)}return n}_transformOutBind(t,e){let n=t;if(Array.isArray(t)){n=[];for(let r=0;r<t.length;r++)n.push(this._transformOutBind(t[r],e))}else if(t instanceof T.ResultSetImpl)n=new a,n._setup(this,t);else if(t instanceof T.LobImpl)n=new o,n._setup(t,!0);else if(t instanceof T.DbObjectImpl){const r=this._dbObjectClasses.get(t._objType);n=Object.create(r.prototype),n._impl=t,e.dbObjectAsPojo?n=n._toPojo():n.isCollection&&(n=new Proxy(n,i._collectionProxyHandler))}return n}_verifyExecOpts(t,e){const n={};if(l.assertParamValue(h.isObject(t),3),void 0!==t.autoCommit&&(l.assertParamPropValue("boolean"==typeof t.autoCommit,3,"autoCommit"),n.autoCommit=t.autoCommit),void 0!==t.dbObjectAsPojo&&(l.assertParamPropValue("boolean"==typeof t.dbObjectAsPojo,3,"dbObjectAsPojo"),n.dbObjectAsPojo=t.dbObjectAsPojo),void 0!==t.keepInStmtCache&&(l.assertParamPropValue("boolean"==typeof t.keepInStmtCache,3,"keepInStmtCache"),n.keepInStmtCache=t.keepInStmtCache),e)void 0!==t.bindDefs&&(l.assertParamPropValue(h.isObjectOrArray(t.bindDefs),3,"bindDefs"),n.bindDefs=t.bindDefs),void 0!==t.batchErrors&&(l.assertParamPropValue("boolean"==typeof t.batchErrors,3,"batchErrors"),n.batchErrors=t.batchErrors),void 0!==t.dmlRowCounts&&(l.assertParamPropValue("boolean"==typeof t.dmlRowCounts,3,"dmlRowCounts"),n.dmlRowCounts=t.dmlRowCounts);else{if(l.assertParamPropUnsignedIntNonZero(t,3,"fetchArraySize"),n.fetchArraySize=t.fetchArraySize,void 0!==t.fetchInfo){l.assertParamPropValue(h.isObject(t.fetchInfo),3,"fetchInfo");const e=Object.getOwnPropertyNames(t.fetchInfo),r=new Map(d.fetchTypeMap);for(const n of e){const e=t.fetchInfo[n];void 0===e.type&&l.throwErr(l.ERR_NO_TYPE_FOR_CONVERSION),e.type!==E.DEFAULT&&e.type!==S.DB_TYPE_VARCHAR&&e.type!==S.DB_TYPE_RAW&&l.throwErr(l.ERR_INVALID_TYPE_FOR_CONVERSION),r.set(n,e.type)}n.fetchTypeMap=r}if(void 0!==t.fetchTypeHandler){const e=typeof t.fetchTypeHandler;l.assertParamPropValue("function"===e,3,"fetchTypeHandler"),n.fetchTypeHandler=t.fetchTypeHandler}void 0!==t.maxRows&&(l.assertParamPropValue(Number.isInteger(t.maxRows)&&t.maxRows>=0,3,"maxRows"),n.maxRows=t.maxRows),void 0!==t.outFormat&&(l.assertParamPropValue(t.outFormat===E.OUT_FORMAT_ARRAY||t.outFormat===E.OUT_FORMAT_OBJECT,3,"outFormat"),n.outFormat=t.outFormat),void 0!==t.prefetchRows&&(l.assertParamPropValue(Number.isInteger(t.prefetchRows)&&t.prefetchRows>=0,3,"prefetchRows"),n.prefetchRows=t.prefetchRows),void 0!==t.resultSet&&(l.assertParamPropValue("boolean"==typeof t.resultSet,3,"resultSet"),n.resultSet=t.resultSet)}return n}get action(){return null}set action(t){l.assertPropValue("string"==typeof t,"action"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setAction(t)}async breakExecution(){l.assertArgCount(arguments,0,0),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.breakExecution()}get callTimeout(){if(this._impl)return this._impl.getCallTimeout()}set callTimeout(t){l.assertPropValue(Number.isInteger(t)&&t>=0,"callTimeout"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setCallTimeout(t)}async changePassword(t,e,n){l.assertArgCount(arguments,3,3),l.assertParamValue("string"==typeof t,1),l.assertParamValue("string"==typeof e,2),l.assertParamValue("string"==typeof n,3),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.changePassword(t,e,n)}get clientId(){return null}set clientId(t){l.assertPropValue("string"==typeof t,"clientId"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setClientId(t)}get clientInfo(){return null}set clientInfo(t){l.assertPropValue("string"==typeof t,"clientInfo"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setClientInfo(t)}async close(t){let e={};l.assertArgCount(arguments,0,1),1==arguments.length&&(l.assertParamValue(h.isObject(t),1),e=t,l.assertParamPropBool(e,1,"drop")),l.assert(this._impl&&!this._closing,l.ERR_INVALID_CONNECTION),this._closing=!0;try{await this._impl.close(e)}finally{this._closing=!1}delete this._impl,this._dbObjectClasses.clear(),this.emit("_afterConnClose")}async commit(){l.assertArgCount(arguments,0,0),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.commit()}async createLob(t){l.assertArgCount(arguments,1,1),l.assertParamValue(t===S.DB_TYPE_CLOB||t===S.DB_TYPE_BLOB||t===S.DB_TYPE_NCLOB,1),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const e=new o;return e._setup(await this._impl.createLob(t),!1),e}get currentSchema(){if(this._impl)return this._impl.getCurrentSchema()}set currentSchema(t){l.assertPropValue("string"==typeof t,"currentSchema"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setCurrentSchema(t)}get dbOp(){return null}set dbOp(t){l.assertPropValue("string"==typeof t,"dbOp"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setDbOp(t)}get thin(){return d.thin}get ecid(){return null}set ecid(t){l.assertPropValue("string"==typeof t,"ecid"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setECID(t)}decodeOSON(t){return l.assertArgCount(arguments,1,1),l.assertParamValue(s.isBuffer(t),1),new m.OsonDecoder(t).decode()}encodeOSON(t){return(new m.OsonEncoder).encode(N.transformJsonValue(t),this._impl._osonMaxFieldNameSize)}async execute(t,e,n){let r,i=[],s={};h.isObject(t)&&"string"==typeof t.statement?(l.assertArgCount(arguments,1,2),t.values&&(i=await this._processExecuteBinds(t.values)),t=t.statement,2==arguments.length&&(s=this._verifyExecOpts(e,!1))):(l.assertArgCount(arguments,1,3),l.assertParamValue("string"==typeof t,1),arguments.length>=2&&(i=await this._processExecuteBinds(e)),3==arguments.length&&(s=this._verifyExecOpts(n,!1))),this._addDefaultsToExecOpts(s),l.assert(this._impl,l.ERR_INVALID_CONNECTION);try{r=await this._impl.execute(t,1,i,s,!1)}catch(t){throw 1406===t.errorNum&&l.throwErr(l.ERR_INSUFFICIENT_BUFFER_FOR_BINDS),t}if(r.warning&&(r.warning=l.transformErr(r.warning)),void 0!==r.resultSet){const t=new a;t._setup(this,r.resultSet),r.metaData=t._impl.metaData,s.resultSet?r.resultSet=t:(r.rows=await t._getAllRows(),delete r.resultSet)}if(void 0!==r.outBinds)for(const[t,e]of Object.entries(r.outBinds)){const n=this._transformOutBind(e,s);r.outBinds[t]=n}if(r.implicitResults)for(const[t,e]of Object.entries(r.implicitResults)){const n=new a;n._setup(this,e),s.resultSet?r.implicitResults[t]=n:r.implicitResults[t]=await n._getAllRows()}return r}async executeMany(t,e,n){let r,i={},s=[];l.assertArgCount(arguments,2,3),l.assertParamValue("string"==typeof t,1),3==arguments.length&&(i=this._verifyExecOpts(n,!0)),this._addDefaultsToExecOpts(i),"number"==typeof e?(l.assertParamValue(Number.isInteger(e)&&e>0,2),r=e,void 0!==i.bindDefs&&(s=await this._processExecuteManyBinds([],i.bindDefs))):(l.assertParamValue(Array.isArray(e)&&e.length>0,2),r=e.length,s=await this._processExecuteManyBinds(e,i.bindDefs)),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const o=await this._impl.execute(t,r,s,i,!0);if(o.warning&&(o.warning=l.transformErr(o.warning)),void 0!==o.outBinds)for(let t=0;t<o.outBinds.length;t++){const e=o.outBinds[t];for(const[t,n]of Object.entries(e))e[t]=this._transformOutBind(n,i)}return o}get externalName(){if(this._impl)return this._impl.getExternalName()}set externalName(t){l.assertPropValue("string"==typeof t,"externalName"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setExternalName(t)}get dbDomain(){return this._impl&&this._impl.getDbDomain()}get dbName(){return this._impl&&this._impl.getDbName()}async getDbObjectClass(t){return l.assertArgCount(arguments,1,1),l.assertParamValue("string"==typeof t,1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._getDbObjectClassForName(t)}async getQueue(t,e){let n={};l.assertArgCount(arguments,1,2),l.assertParamValue("string"==typeof t,1),2==arguments.length&&(l.assertParamValue(h.isObject(e),2),n={...e}),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const i=new r;return await i.create(this,t,n),i}getSodaDatabase(){l.assertArgCount(arguments,0,0),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const t=new u;return t._impl=this._impl.getSodaDatabase(),t}async getStatementInfo(t){l.assertArgCount(arguments,1,1),l.assertParamValue("string"==typeof t,1),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const e=await this._impl.getStatementInfo(t);if(e.metaData)for(let t=0;t<e.metaData.length;t++){const n=e.metaData[t];h.addTypeProperties(n,"dbType"),n.fetchType=S.DB_TYPE_FETCH_TYPE_MAP.get(n.dbType)}return e}get instanceName(){if(this._impl)return this._impl.getInstanceName()}get internalName(){if(this._impl)return this._impl.getInternalName()}set internalName(t){l.assertPropValue("string"==typeof t,"internalName"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setInternalName(t)}isHealthy(){return void 0!==this._impl&&!this._closing&&this._impl.isHealthy()}get maxOpenCursors(){return this._impl&&this._impl.getMaxOpenCursors()}get warning(){let t=this._impl.getWarning();return t&&(t=l.transformErr(t)),this._impl&&t}get module(){return null}set module(t){l.assertPropValue("string"==typeof t,"module"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setModule(t)}get oracleServerVersion(){if(this._impl)return this._impl.getOracleServerVersion()}get oracleServerVersionString(){if(this._impl)return this._impl.getOracleServerVersionString()}get serviceName(){return this._impl&&this._impl.getServiceName()}get transactionInProgress(){return this._impl&&this._impl.getTransactionInProgress()}async ping(){l.assertArgCount(arguments,0,0),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.ping()}queryStream(t,e,n){l.assertArgCount(arguments,1,3),l.assertParamValue("string"==typeof t,1),3==arguments.length?(l.assertParamValue(h.isObject(n),3),n={...n}):n={},n.resultSet=!0;const r=new c;return p.nextTick((async()=>{try{const i=await this.execute(t,e||[],n);i.resultSet||l.throwErr(l.ERR_NOT_A_QUERY),r._open(i.resultSet)}catch(t){return void r.destroy(t)}})),r}async rollback(){l.assertArgCount(arguments,0,0),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.rollback()}async shutdown(t){let e=E.SHUTDOWN_MODE_DEFAULT;l.assertArgCount(arguments,0,1),void 0!==t&&(l.assertParamValue("number"==typeof e,1),e=t),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.shutdown(e)}async startup(t){let e={};l.assertArgCount(arguments,0,1),1==arguments.length&&(l.assertParamValue("object"==typeof e,1),e=t,l.assertParamPropBool(e,1,"force"),l.assertParamPropBool(e,1,"restrict"),l.assertParamPropString(e,1,"pfile")),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.startup(e)}get stmtCacheSize(){if(this._impl)return this._impl.getStmtCacheSize()}set stmtCacheSize(t){l.assertPropValue(Number.isInteger(t)&&t>=0,"stmtCacheSize"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setStmtCacheSize(t)}async subscribe(t,e){l.assertArgCount(arguments,2,2),l.assertParamValue("string"==typeof t,1),l.assertParamValue(h.isObject(e),2),e={name:t,...e},l.assertParamPropUnsignedInt(e,2,"namespace"),void 0===e.namespace&&(e.namespace=E.SUBSCR_NAMESPACE_DBCHANGE),l.assertParamPropString(e,2,"ipAddress"),l.assertParamPropUnsignedInt(e,2,"port"),l.assertParamPropUnsignedInt(e,2,"timeout"),l.assertParamPropUnsignedInt(e,2,"operations"),l.assertParamPropUnsignedInt(e,2,"qos"),l.assertParamPropUnsignedInt(e,2,"groupingClass"),l.assertParamPropUnsignedInt(e,2,"groupingValue"),l.assertParamPropUnsignedInt(e,2,"groupingType"),l.assertParamPropBool(e,2,"clientInitiated"),l.assertParamPropFunction(e,2,"callback"),l.assert(e.callback,l.ERR_MISSING_SUBSCR_CALLBACK),e.namespace===E.SUBSCR_NAMESPACE_DBCHANGE&&(l.assertParamPropString(e,2,"sql"),l.assert(e.sql&&e.sql.length>0,l.ERR_MISSING_SUBSCR_SQL),void 0!==e.binds&&(e.binds=await this._processExecuteBinds(e.binds))),l.assert(this._impl,l.ERR_INVALID_CONNECTION);const n=A.get(t),r=await this._impl.subscribe(n,e);let i;return e.namespace===E.SUBSCR_NAMESPACE_DBCHANGE?(i=r.subscription,delete r.subscription):i=r,A.set(t,i),r}get tag(){if(this._impl)return this._impl.getTag()}set tag(t){l.assertPropValue("string"==typeof t,"tag"),l.assert(this._impl,l.ERR_INVALID_CONNECTION),this._impl.setTag(t)}async tpcBegin(t,e,n){l.assertArgCount(arguments,1,3),l.assertParamValue(h.isXid(t),1),arguments.length<3?n=60:l.assertParamValue("number"==typeof n,3),arguments.length<2?e=E.TPC_BEGIN_NEW:l.assertParamValue("number"==typeof e,2),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcBegin(t,e,n)}async tpcCommit(t,e){l.assertArgCount(arguments,0,2),arguments.length<2?e=!1:l.assertParamValue("boolean"==typeof e,2),arguments.length>=1&&l.assertParamValue(h.isXid(t),1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcCommit(t,e)}async tpcEnd(t,e){l.assertArgCount(arguments,0,2),arguments.length<2?e=E.TPC_END_NORMAL:l.assertParamValue("number"==typeof e,2),arguments.length>=1&&l.assertParamValue(h.isXid(t),1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcEnd(t,e)}async tpcForget(t){l.assertArgCount(arguments,1,1),l.assertParamValue(h.isXid(t),1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcForget(t)}async tpcPrepare(t){return l.assertArgCount(arguments,0,1),arguments.length>=1&&l.assertParamValue(h.isXid(t),1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcPrepare(t)}async tpcRecover(t){l.assertArgCount(arguments,0,1),1==arguments.length?l.assertParamValue("boolean"==typeof t,1):t=!0;const e={outFormat:E.OUT_FORMAT_OBJECT,resultSet:!1};return(await this.execute(t?'\n SELECT\n formatid as "formatId",\n UTL_RAW.CAST_TO_VARCHAR2(globalid) as "globalTransactionId",\n UTL_RAW.CAST_TO_VARCHAR2(branchid) as "branchQualifier"\n FROM DBA_PENDING_TRANSACTIONS':'\n SELECT\n formatid as "formatId",\n globalid as "globalTransactionId",\n branchid as "branchQualifier"\n FROM DBA_PENDING_TRANSACTIONS',{},e)).rows}async tpcRollback(t){l.assertArgCount(arguments,0,1),1==arguments.length&&l.assertParamValue(h.isXid(t),1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),await this._impl.tpcRollback(t)}async unsubscribe(t){l.assertArgCount(arguments,1,1),l.assertParamValue("string"==typeof t,1),l.assert(this._impl,l.ERR_INVALID_CONNECTION),l.assert(A.has(t),l.ERR_INVALID_SUBSCR),await this._impl.unsubscribe(A.get(t)),A.delete(t)}}P.prototype.break=h.callbackify(P.prototype.breakExecution),h.wrapFns(P.prototype,"changePassword","close","commit","createLob","execute","executeMany","getDbObjectClass","getQueue","getStatementInfo","ping","rollback","shutdown","startup","subscribe","tpcBegin","tpcCommit","tpcEnd","tpcForget","tpcPrepare","tpcRecover","tpcRollback","unsubscribe"),P.prototype.release=P.prototype.close,t.exports=P},2269:(t,e,n)=>{"use strict";const r=n(8196),i=r.VERSION_MAJOR+"."+r.VERSION_MINOR+"."+r.VERSION_PATCH+r.VERSION_SUFFIX;t.exports={VERSION_MAJOR:r.VERSION_MAJOR,VERSION_MINOR:r.VERSION_MINOR,VERSION_PATCH:r.VERSION_PATCH,VERSION_SUFFIX:r.VERSION_SUFFIX,VERSION_STRING:i,DEFAULT_DRIVER_NAME:"node-oracledb : "+i,DEFAULT_ERROR_URL:"https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html",DEFAULT_MAX_SIZE_FOR_OUT_BINDS:200,CSFRM_IMPLICIT:1,CSFRM_NCHAR:2,CQN_OPCODE_ALL_OPS:0,CQN_OPCODE_ALL_ROWS:1,CQN_OPCODE_ALTER:16,CQN_OPCODE_DELETE:8,CQN_OPCODE_DROP:32,CQN_OPCODE_INSERT:2,CQN_OPCODE_UPDATE:4,DEFAULT:0,STMT_TYPE_UNKNOWN:0,STMT_TYPE_SELECT:1,STMT_TYPE_UPDATE:2,STMT_TYPE_DELETE:3,STMT_TYPE_INSERT:4,STMT_TYPE_CREATE:5,STMT_TYPE_DROP:6,STMT_TYPE_ALTER:7,STMT_TYPE_BEGIN:8,STMT_TYPE_DECLARE:9,STMT_TYPE_CALL:10,STMT_TYPE_EXPLAIN_PLAN:15,STMT_TYPE_MERGE:16,STMT_TYPE_ROLLBACK:17,STMT_TYPE_COMMIT:21,SHUTDOWN_MODE_DEFAULT:0,SHUTDOWN_MODE_TRANSACTIONAL:1,SHUTDOWN_MODE_TRANSACTIONAL_LOCAL:2,SHUTDOWN_MODE_IMMEDIATE:3,SHUTDOWN_MODE_ABORT:4,SHUTDOWN_MODE_FINAL:5,STARTUP_MODE_DEFAULT:0,STARTUP_MODE_FORCE:1,STARTUP_MODE_RESTRICT:2,SUBSCR_EVENT_TYPE_SHUTDOWN:2,SUBSCR_EVENT_TYPE_SHUTDOWN_ANY:3,SUBSCR_EVENT_TYPE_STARTUP:1,SUBSCR_EVENT_TYPE_DEREG:5,SUBSCR_EVENT_TYPE_OBJ_CHANGE:6,SUBSCR_EVENT_TYPE_QUERY_CHANGE:7,SUBSCR_EVENT_TYPE_AQ:100,SUBSCR_GROUPING_CLASS_TIME:1,SUBSCR_GROUPING_TYPE_SUMMARY:1,SUBSCR_GROUPING_TYPE_LAST:2,SUBSCR_NAMESPACE_AQ:1,SUBSCR_NAMESPACE_DBCHANGE:2,SUBSCR_QOS_BEST_EFFORT:16,SUBSCR_QOS_DEREG_NFY:2,SUBSCR_QOS_QUERY:8,SUBSCR_QOS_RELIABLE:1,SUBSCR_QOS_ROWIDS:4,SYSASM:32768,SYSBACKUP:131072,SYSDBA:2,SYSDG:262144,SYSKM:524288,SYSOPER:4,SYSPRELIM:8,SYSRAC:1048576,BIND_IN:3001,BIND_INOUT:3002,BIND_OUT:3003,OUT_FORMAT_ARRAY:4001,OUT_FORMAT_OBJECT:4002,SODA_COLL_MAP_MODE:5001,POOL_STATUS_OPEN:6e3,POOL_STATUS_DRAINING:6001,POOL_STATUS_CLOSED:6002,POOL_STATUS_RECONFIGURING:6003,PURITY_DEFAULT:0,PURITY_NEW:1,PURITY_SELF:2,AQ_DEQ_NO_WAIT:0,AQ_DEQ_WAIT_FOREVER:4294967295,AQ_DEQ_MODE_BROWSE:1,AQ_DEQ_MODE_LOCKED:2,AQ_DEQ_MODE_REMOVE:3,AQ_DEQ_MODE_REMOVE_NO_DATA:4,AQ_DEQ_NAV_FIRST_MSG:1,AQ_DEQ_NAV_NEXT_TRANSACTION:2,AQ_DEQ_NAV_NEXT_MSG:3,AQ_MSG_DELIV_MODE_PERSISTENT:1,AQ_MSG_DELIV_MODE_BUFFERED:2,AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED:3,AQ_MSG_STATE_READY:0,AQ_MSG_STATE_WAITING:1,AQ_MSG_STATE_PROCESSED:2,AQ_MSG_STATE_EXPIRED:3,AQ_VISIBILITY_IMMEDIATE:1,AQ_VISIBILITY_ON_COMMIT:2,TPC_BEGIN_JOIN:2,TPC_BEGIN_NEW:1,TPC_BEGIN_PROMOTE:8,TPC_BEGIN_RESUME:4,TPC_END_NORMAL:0,TPC_END_SUSPEND:1048576,VECTOR_FORMAT_FLOAT32:2,VECTOR_FORMAT_FLOAT64:3,VECTOR_FORMAT_INT8:4}},7647:(t,e,n)=>{"use strict";const r=n(2733),i=n(851),s=n(8041),o=n(6893),a=n(9023);function u(t,e,n,r){let i,a=!1;if(n){switch(e.type){case o.DB_TYPE_VARCHAR:case o.DB_TYPE_NVARCHAR:case o.DB_TYPE_NCHAR:case o.DB_TYPE_CHAR:i=Buffer.byteLength(n),i>e.maxSize&&(a=!0);break;case o.DB_TYPE_RAW:i=n.length,i>e.maxSize&&(a=!0)}a&&(void 0!==r?s.throwErr(s.ERR_WRONG_LENGTH_FOR_DBOBJECT_ELEM,r,t.fqn,i,e.maxSize):s.throwErr(s.ERR_WRONG_LENGTH_FOR_DBOBJECT_ATTR,e.name,t.fqn,i,e.maxSize))}}class _{_getAttrValue(t){const e=this._impl.getAttrValue(t);return this._transformValueOut(e,t.typeClass)}_setAttrValue(t,e){const n={fqn:this._objType.fqn,attrName:t.name,type:t.type,typeClass:t.typeClass};e=l.transformValueIn(n,e,{allowArray:!1}),u(this._objType,t,e),this._impl.setAttrValue(t,e)}_toPojo(){if(this.isCollection){const t=this.getValues();if(this.elementType===o.DB_TYPE_OBJECT)for(let e=0;e<t.length;e++)t[e]=t[e]._toPojo();return t}const t={};for(const e in this.attributes){let n=this[e];n instanceof _&&(n=n._toPojo()),t[e]=n}return t}_transformValueOut(t,e){let n=t;return t instanceof i.LobImpl?(n=new r,n._setup(t,!0)):t instanceof i.DbObjectImpl&&(n=Object.create(e.prototype),n._impl=t,n.isCollection&&(n=new Proxy(n,_._collectionProxyHandler))),n}append(t){s.assertArgCount(arguments,1,1);const e={fqn:this._objType.fqn,type:this._objType.elementType,typeClass:this._objType.elementTypeClass};t=l.transformValueIn(e,t,{allowArray:!1});let n=this._impl.getLastIndex();n?n+=1:n=0,u(this._objType,this._objType.elementTypeInfo,t,n),this._impl.append(t)}get attributes(){if(!this._attributes){const t=this._objType.attributes||[],e={};for(let n=0;n<t.length;n++){const r=t[n],i={type:r.type,typeName:r.typeName};r.typeClass&&(i.typeClass=r.typeClass),e[r.name]=i}this._attributes=e}return this._attributes}deleteElement(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t),1),this._impl.deleteElement(t)}get elementType(){return this._objType.elementType}get elementTypeClass(){return this._objType.elementTypeClass}get elementTypeName(){return this._objType.elementTypeName}get fqn(){return this._objType.fqn}getElement(t){s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t),1);const e=this._impl.getElement(t);return this._transformValueOut(e,this.elementTypeClass)}getKeys(){return s.assertArgCount(arguments,0,0),this._impl.getKeys()}getFirstIndex(){return s.assertArgCount(arguments,0,0),this._impl.getFirstIndex()}getLastIndex(){return s.assertArgCount(arguments,0,0),this._impl.getLastIndex()}getNextIndex(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t),1),this._impl.getNextIndex(t)}getPrevIndex(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t),1),this._impl.getPrevIndex(t)}getValues(){s.assertArgCount(arguments,0,0);const t=this._impl.getValues();for(let e=0;e<t.length;e++)t[e]=this._transformValueOut(t[e],this.elementTypeClass);return t}hasElement(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t),1),this._impl.hasElement(t)}get isCollection(){return this._objType.isCollection}get name(){return this._objType.name}get schema(){return this._objType.schema}get packageName(){return this._objType.packageName}setElement(t,e){s.assertArgCount(arguments,2,2),s.assertParamValue(Number.isInteger(t),1);const n={fqn:this._objType.fqn,type:this._objType.elementType,typeClass:this._objType.elementTypeClass};e=l.transformValueIn(n,e,{allowArray:!1}),u(this._objType,this._objType.elementTypeInfo,e,t),this._impl.setElement(t,e)}trim(t){s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t)&&t>=0,1),this._impl.trim(t)}[a.inspect.custom](t,e){return"["+this.fqn+"] "+a.inspect(this._toPojo(),e)}[Symbol.iterator](){if(this.isCollection)return this.getValues()[Symbol.iterator]();throw TypeError("obj is not iterable")}[Symbol.toPrimitive](t){return"number"===t?NaN:"["+this.fqn+"] "+a.inspect(this._toPojo(),{})}get[Symbol.toStringTag](){return this.fqn}toJSON(){return this._toPojo()}toMap(){s.assertArgCount(arguments,0,0),this.isCollection||s.throwErr(s.ERR_OBJECT_IS_NOT_A_COLLECTION,this.name);const t=new Map;return this.getKeys().forEach((e=>{t.set(e,this.getElement(e))})),t}}function c(t){return function(){try{return t.apply(this,arguments)}catch(t){throw s.transformErr(t,s.transformErr)}}}!function(t){for(let e=1;e<arguments.length;e++){const n=arguments[e];t[n]=c(t[n])}}(_.prototype,"_getAttrValue","_setAttrValue","append","deleteElement","getElement","getKeys","getFirstIndex","getLastIndex","getNextIndex","getPrevIndex","getValues","toMap","hasElement","setElement","trim"),_._collectionProxyHandler={deleteProperty(t,e){if("string"==typeof e){const n=+e;if(!isNaN(n))return t.deleteElement(n)}return delete t[e]},get(t,e){if("string"==typeof e){const n=+e;if(!isNaN(n))return t.getElement(n)}const n=t[e];return"function"==typeof n?n.bind(t):n},set(t,e,n){if("string"==typeof e){const r=+e;if(!isNaN(r))return t.setElement(r,n),!0}return t[e]=n,!0}},t.exports=_;const l=n(7207)},8041:(t,e,n)=>{"use strict";const r=n(9023),i="NJS",s=68,o=500,a=new Map;a.set("DPI-1010",3),a.set("DPI-1024",[132,"at index ([0-9]+) does"]),a.set("DPI-1044",115),a.set("DPI-1055",105),a.set("DPI-1063",95),a.set("DPI-1067",[123,"call timeout of ([0-9]+) ms"]),a.set("DPI-1080",o),a.set("OCI-22303",[129,'type "([^"]*"."[^"]*)"']),a.set("OCI-22164",133),a.set("OCI-22165",[131,/index \[([0-9]+)\] must be in the range of \[([0-9]+)\] to \[([0-9]+)\]/]),a.set("ORA-00028",o),a.set("ORA-00600",o),a.set("ORA-24338",107),a.set("ORA-25708",87),a.set("ORA-24344",700);const u=new Map;function _(t){t||h(...Array.prototype.slice.call(arguments,1))}function c(t,e,n){_(t,7,n,e)}function l(t){let e=u.get(t),n=[...arguments];e||(n=[void 0,t],t=s,e=u.get(t));const o=t.toString().padStart(3,"0"),a=`${i}-${o}`;n[0]=`${a}: ${e}`;const _=new Error(r.format(...n));return _.code=a,Error.captureStackTrace(_,l),_}function h(){throw l(...arguments)}u.set(2,"invalid pool"),u.set(3,"invalid or closed connection"),u.set(4,'invalid value for property "%s"'),u.set(5,"invalid value for parameter %d"),u.set(7,'invalid value for "%s" in parameter %d'),u.set(9,"invalid number of parameters"),u.set(10,"unsupported data type %d in column %d"),u.set(11,"encountered bind value and type mismatch"),u.set(12,"encountered invalid bind data type in parameter %d"),u.set(13,"invalid bind direction"),u.set(15,"type was not specified for conversion"),u.set(16,"buffer is too small for OUT binds"),u.set(17,"concurrent operations on ResultSet are not allowed"),u.set(18,"invalid ResultSet"),u.set(19,"ResultSet cannot be returned for non-query statements"),u.set(21,"invalid type for conversion specified"),u.set(22,"invalid Lob"),u.set(23,"concurrent operations on a Lob are not allowed"),u.set(24,"memory allocation failed"),u.set(34,"data type is unsupported for array bind"),u.set(35,"maxArraySize is required for IN OUT array bind"),u.set(36,'length of given array is greater than "maxArraySize"'),u.set(37,'invalid data type at array index %d for bind ":%s"'),u.set(40,'connection request timeout. Request exceeded "queueTimeout" of %d'),u.set(41,"cannot convert ResultSet to QueryStream after invoking methods"),u.set(42,"cannot invoke ResultSet methods after converting to QueryStream"),u.set(43,"ResultSet already converted to QueryStream"),u.set(44,'bind object must contain one of the following attributes: "dir", "type", "maxSize", or "val"'),u.set(45,"cannot load a node-oracledb Thick mode binary for Node.js. Please try using Thin mode. %s"),u.set(46,'pool alias "%s" already exists in the connection pool cache'),u.set(47,'pool alias "%s" not found in connection pool cache'),u.set(52,"invalid data type at array index %d for bind position %d"),u.set(55,"binding by position and name cannot be mixed"),u.set(56,"maxSize for bind position %d must be specified and be greater than zero"),u.set(57,'maxSize for bind "%s" must be specified and greater than zero'),u.set(58,"maxSize of %d is too small for value of length %d in row %d"),u.set(59,"type must be specified for bind position %d"),u.set(60,'type must be specified for bind "%s"'),u.set(61,"invalid subscription"),u.set(62,"subscription notification callback missing"),u.set(63,"subscription notification SQL missing"),u.set(64,"connection pool is closing"),u.set(65,"connection pool was closed"),u.set(66,"invalid SODA document cursor"),u.set(67,"a pre-built node-oracledb Thick mode binary was not found for %s"),u.set(s,"invalid error number %d supplied"),u.set(69,"node-oracledb %s requires Node.js %s or later"),u.set(70,"message must be a string, buffer, database object or an object containing a payload property which itself is a string, buffer or database object"),u.set(75,'only one of "connectString" and "connectionString" can be used'),u.set(76,'connection request rejected. Pool queue length "queueMax" %d reached'),u.set(78,"unsupported data type %d in JSON value"),u.set(80,'only one of "user" and "username" can be used'),u.set(81,"concurrent operations on a connection are disabled"),u.set(82,"connection pool is being reconfigured"),u.set(83,"pool statistics are not enabled"),u.set(84,"invalid access token"),u.set(85,'invalid connection pool configuration with token-based authentication. The "homogeneous" and "externalAuth" attributes must be set to true'),u.set(86,'invalid standalone configuration with token-based authentication. The "externalAuth" attribute must be set to true'),u.set(87,"access token has expired"),u.set(89,"%s is not supported by node-oracledb in Thin mode"),u.set(90,"initOracleClient() was already called with different arguments"),u.set(91,"file %s is missing"),u.set(92,'"poolMax" %d must be greater than or equal to "poolMin" %d'),u.set(95,'setting "batchErrors" or "dmlRowCounts" to true is only permitted for DML statements'),u.set(97,'no bind placeholder named ":%s" was found in the statement text'),u.set(98,"%s positional bind values are required but %s were provided"),u.set(99,"internal error: buffer of length %s insufficient to hold %s bytes"),u.set(100,"national character set id %d is not supported by node-oracledb in Thin mode"),u.set(101,"no credentials specified"),u.set(102,"unexpected end of data: want %d bytes but only %d bytes are available"),u.set(103,"unexpected message type %d received at position %d of packet %d"),u.set(104,"connection pool cannot be closed because connections are busy"),u.set(105,"value is not a number (NaN) and cannot be used in Oracle Database numbers"),u.set(106,"internal error: %s"),u.set(107,"invalid cursor"),u.set(109,"invalid type number %d"),u.set(110,"invalid Oracle type number %d [csfrm: %d]"),u.set(111,"internal error: read a negative integer when expecting a positive integer at position %d of packet %d"),u.set(112,"internal error: read integer of length %d when expecting integer of no more than length %d at position %d of packet %d"),u.set(113,"unexpected data received: %s"),u.set(114,"OSON field names may not exceed %d UTF-8 encoded bytes"),u.set(115,"value cannot be represented as an Oracle Database number"),u.set(116,"password verifier type 0x%s is not supported by node-oracledb in Thin mode"),u.set(118,"node-oracledb Thick mode cannot be enabled because a Thin mode connection has already been created"),u.set(119,"conversion from type %s to type %s is not supported"),u.set(120,"fetchTypeHandler return value must be an object"),u.set(121,'fetchTypeHandler return value attribute "type" must be a valid database type'),u.set(122,'fetchTypeHandler return value attribute "converter" must be a function'),u.set(123,"call timeout of %d ms exceeded"),u.set(125,'"connectString" cannot be empty or undefined. Bequeath connections are not supported in Thin mode'),u.set(126,"OSON version %s is not supported"),u.set(127,"internal error: unknown server side piggyback opcode %s"),u.set(128,'internal error: unknown column type name "%s"'),u.set(129,'invalid object type name: "%s"'),u.set(130,"Oracle TDS data type %d is not supported"),u.set(131,"given index %d must be in the range of %d to %d"),u.set(132,"element at index %d does not exist"),u.set(133,"cannot delete elements of a VARRAY"),u.set(134,"value is of wrong type for attribute %s of object %s"),u.set(135,"value is of wrong type for an element of object %s"),u.set(136,"user name and password cannot be set when using external authentication"),u.set(137,'a bind variable replacement value for placeholder ":%s" was not provided'),u.set(138,"connections to this database server version are not supported by node-oracledb in Thin mode"),u.set(139,"unexpected XML type with flag %d"),u.set(140,"user name must be enclosed in [] when using external authentication with a proxy user"),u.set(141,"the number of batch errors from executemany() exceeds 65535"),u.set(142,"value too large for attribute %s of object %s (actual: %d, maximum: %d)"),u.set(143,"value too large for element %d of object %s (actual: %d, maximum: %d)"),u.set(144,"VECTOR format %d is not supported"),u.set(145,"VECTOR version %d is not supported"),u.set(146,"object %s is not a collection"),u.set(147,"cursor has been closed by the database"),u.set(149,'the bind variable placeholder "%s" cannot be used both before and after the RETURNING clause in a DML RETURNING statement'),u.set(o,"connection to the Oracle Database was broken"),u.set(501,"connection to host %s port %d terminated unexpectedly. (CONNECTION_ID=%s)\n%s"),u.set(503,"connection to host %s port %d could not be established. (CONNECTION_ID=%s)\n%s"),u.set(504,"connection establishment through a web proxy at host %s port %d failed. (CONNECTION_ID=%s)\n%s"),u.set(505,"unable to initiate TLS connection. Please check if wallet credentials are valid"),u.set(506,"connection to host %s port %d encountered TLS handshake failure. (CONNECTION_ID=%s)\n%s"),u.set(507,"TLS detected an invalid certificate. Server DN in certificate does not match the specified DN"),u.set(508,"TLS detected an invalid certificate. %s not present in certificate"),u.set(509,"internal error: invalid packet type or malformed packet received"),u.set(510,'connection to host %s port %d timed out. Request exceeded "%s" of %d seconds. (CONNECTION_ID=%s)'),u.set(511,"connection to listener at host %s port %d was refused. (CONNECTION_ID=%s)\nCause: %s"),u.set(512,"invalid connection string parameters.\n%s"),u.set(513,"error received through in-band notification: %s"),u.set(514,"syntax error in connection string"),u.set(515,"error in Easy Connect connection string: %s: %s"),u.set(516,"no configuration directory set or available to search for tnsnames.ora"),u.set(517,'cannot connect to Oracle Database. Unable to find "%s" in "%s"'),u.set(518,'cannot connect to Oracle Database. Service "%s" is not registered with the listener at host %s port %s. (CONNECTION_ID=%s)'),u.set(519,'cannot connect to Oracle Database. SID "%s" is not registered with the listener at host %s port %s. (CONNECTION_ID=%s)'),u.set(520,"cannot connect to Oracle Database. File tnsnames.ora not found in %s"),u.set(521,"connection to host %s port %d received end-of-file on communication channel. (CONNECTION_ID=%s)"),u.set(700,"creation succeeded with compilation errors"),t.exports={ERR_INTEGRITY_ERROR_CODES:[1,1400,1438,2290,2291,2292,21525,40479],ERR_INVALID_POOL:2,ERR_INVALID_CONNECTION:3,ERR_INVALID_PROPERTY_VALUE:4,ERR_INVALID_PARAMETER_VALUE:5,ERR_INVALID_PROPERTY_VALUE_IN_PARAM:7,ERR_INVALID_NUMBER_OF_PARAMETERS:9,ERR_UNSUPPORTED_DATA_TYPE:10,ERR_BIND_VALUE_AND_TYPE_MISMATCH:11,ERR_INVALID_BIND_DATA_TYPE:12,ERR_INVALID_BIND_DIRECTION:13,ERR_NO_TYPE_FOR_CONVERSION:15,ERR_INSUFFICIENT_BUFFER_FOR_BINDS:16,ERR_BUSY_RS:17,ERR_INVALID_RS:18,ERR_NOT_A_QUERY:19,ERR_INVALID_TYPE_FOR_CONVERSION:21,ERR_INVALID_LOB:22,ERR_BUSY_LOB:23,ERR_INSUFFICIENT_MEMORY:24,ERR_INVALID_TYPE_FOR_ARRAY_BIND:34,ERR_REQUIRED_MAX_ARRAY_SIZE:35,ERR_INVALID_ARRAY_SIZE:36,ERR_INCOMPATIBLE_TYPE_ARRAY_BIND:37,ERR_CONN_REQUEST_TIMEOUT:40,ERR_CANNOT_CONVERT_RS_TO_STREAM:41,ERR_CANNOT_INVOKE_RS_METHODS:42,ERR_RS_ALREADY_CONVERTED:43,ERR_INVALID_BIND_UNIT:44,ERR_CANNOT_LOAD_BINARY:45,ERR_POOL_WITH_ALIAS_ALREADY_EXISTS:46,ERR_POOL_WITH_ALIAS_NOT_FOUND:47,ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND:52,ERR_MIXED_BIND:55,ERR_MISSING_MAX_SIZE_BY_POS:56,ERR_MISSING_MAX_SIZE_BY_NAME:57,ERR_MAX_SIZE_TOO_SMALL:58,ERR_MISSING_TYPE_BY_POS:59,ERR_MISSING_TYPE_BY_NAME:60,ERR_INVALID_SUBSCR:61,ERR_MISSING_SUBSCR_CALLBACK:62,ERR_MISSING_SUBSCR_SQL:63,ERR_POOL_CLOSING:64,ERR_POOL_CLOSED:65,ERR_INVALID_SODA_DOC_CURSOR:66,ERR_NO_BINARY_AVAILABLE:67,ERR_INVALID_ERR_NUM:s,ERR_NODE_TOO_OLD:69,ERR_INVALID_AQ_MESSAGE:70,ERR_DBL_CONNECT_STRING:75,ERR_QUEUE_MAX_EXCEEDED:76,ERR_UNSUPPORTED_DATA_TYPE_IN_JSON:78,ERR_DBL_USER:80,ERR_CONCURRENT_OPS:81,ERR_POOL_RECONFIGURING:82,ERR_POOL_STATISTICS_DISABLED:83,ERR_TOKEN_BASED_AUTH:84,ERR_POOL_TOKEN_BASED_AUTH:85,ERR_CONN_TOKEN_BASED_AUTH:86,ERR_TOKEN_HAS_EXPIRED:87,ERR_NOT_IMPLEMENTED:89,ERR_INIT_ORACLE_CLIENT_ARGS:90,ERR_MISSING_FILE:91,ERR_INVALID_NUMBER_OF_CONNECTIONS:92,ERR_EXEC_MODE_ONLY_FOR_DML:95,ERR_CONNECTION_CLOSED:o,ERR_CONNECTION_LOSTCONTACT:501,ERR_CONNECTION_INCOMPLETE:503,ERR_PROXY_CONNECTION_FAILURE:504,ERR_TLS_INIT_FAILURE:505,ERR_TLS_AUTH_FAILURE:506,ERR_TLS_DNMATCH_FAILURE:507,ERR_TLS_HOSTMATCH_FAILURE:508,ERR_INVALID_PACKET:509,ERR_CONNECTION_TIMEDOUT:510,ERR_CONNECTION_REFUSED:511,ERR_INVALID_CONNECT_STRING_PARAMETERS:512,ERR_CONNECTION_INBAND:513,ERR_INVALID_CONNECT_STRING_SYNTAX:514,ERR_INVALID_EZCONNECT_SYNTAX:515,ERR_NO_CONFIG_DIR:516,ERR_TNS_ENTRY_NOT_FOUND:517,ERR_CONNECTION_EOF:521,ERR_INVALID_BIND_NAME:97,ERR_WRONG_NUMBER_OF_POSITIONAL_BINDS:98,ERR_BUFFER_LENGTH_INSUFFICIENT:99,ERR_NCHAR_CS_NOT_SUPPORTED:100,ERR_MISSING_CREDENTIALS:101,ERR_UNEXPECTED_END_OF_DATA:102,ERR_UNEXPECTED_MESSAGE_TYPE:103,ERR_POOL_HAS_BUSY_CONNECTIONS:104,ERR_INTERNAL:106,ERR_INVALID_REF_CURSOR:107,ERR_UNSUPPORTED_VERIFIER_TYPE:116,ERR_NAN_VALUE:105,ERR_ORACLE_NUMBER_NO_REPR:115,ERR_INVALID_SERVICE_NAME:518,ERR_INVALID_SID:519,ERR_TNS_NAMES_FILE_MISSING:520,ERR_INVALID_TYPE_NUM:109,ERR_INVALID_ORACLE_TYPE_NUM:110,ERR_UNEXPECTED_NEGATIVE_INTEGER:111,ERR_INTEGER_TOO_LARGE:112,ERR_UNEXPECTED_DATA:113,ERR_OSON_FIELD_NAME_LIMITATION:114,ERR_OSON_VERSION_NOT_SUPPORTED:126,ERR_THIN_CONNECTION_ALREADY_CREATED:118,ERR_UNSUPPORTED_CONVERSION:119,ERR_FETCH_TYPE_HANDLER_RETURN_VALUE:120,ERR_FETCH_TYPE_HANDLER_TYPE:121,ERR_FETCH_TYPE_HANDLER_CONVERTER:122,ERR_CALL_TIMEOUT_EXCEEDED:123,ERR_EMPTY_CONNECT_STRING:125,ERR_UNKOWN_SERVER_SIDE_PIGGYBACK:127,ERR_UNKNOWN_COLUMN_TYPE_NAME:128,ERR_INVALID_OBJECT_TYPE_NAME:129,ERR_TDS_TYPE_NOT_SUPPORTED:130,ERR_INVALID_COLL_INDEX_SET:131,ERR_INVALID_COLL_INDEX_GET:132,ERR_DELETE_ELEMENTS_OF_VARRAY:133,ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR:134,ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM:135,ERR_WRONG_CRED_FOR_EXTAUTH:136,ERR_MISSING_BIND_VALUE:137,ERR_SERVER_VERSION_NOT_SUPPORTED:138,ERR_UNEXPECTED_XML_TYPE:139,ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY:140,ERR_TOO_MANY_BATCH_ERRORS:141,ERR_WRONG_LENGTH_FOR_DBOBJECT_ATTR:142,ERR_WRONG_LENGTH_FOR_DBOBJECT_ELEM:143,ERR_VECTOR_FORMAT_NOT_SUPPORTED:144,ERR_VECTOR_VERSION_NOT_SUPPORTED:145,ERR_OBJECT_IS_NOT_A_COLLECTION:146,ERR_CURSOR_HAS_BEEN_CLOSED:147,ERR_DML_RETURNING_DUP_BINDS:149,ERR_CONNECTION_CLOSED_CODE:`${i}-500`,WRN_COMPILATION_CREATE:700,assert:_,assertArgCount:function(t,e,n){_(t.length>=e&&t.length<=n,9)},assertParamPropBool:function(t,e,n){void 0!==t[n]&&c("boolean"==typeof t[n],e,n)},assertParamPropFunction:function(t,e,n){void 0!==t[n]&&c("function"==typeof t[n],e,n)},assertParamPropInt:function(t,e,n){void 0!==t[n]&&c(Number.isInteger(t[n]),e,n)},assertParamPropString:function(t,e,n){void 0!==t[n]&&c("string"==typeof t[n],e,n)},assertParamPropUnsignedInt:function(t,e,n){void 0!==t[n]&&c(Number.isInteger(t[n])&&t[n]>=0,e,n)},assertParamPropUnsignedIntNonZero:function(t,e,n){void 0!==t[n]&&c(Number.isInteger(t[n])&&t[n]>0,e,n)},assertParamPropValue:c,assertParamValue:function(t,e){_(t,5,e)},assertPropValue:function(t,e){_(t,4,e)},getErr:l,throwErr:h,throwNotImplemented:function(t){h(89,t)},transformErr:function(t,e){if(!t.code){const e=t.message.indexOf(":");if(e>0){t.code=t.message.substr(0,e);const r=n(8023);if(t.errorNum&&r.thin&&(t.message+=`\nHelp: https://docs.oracle.com/error-help/db/ora-${t.errorNum.toString().padStart(5,"0")}/`),a.has(t.code)){let e,n=[];const r=a.get(t.code);if("number"==typeof r)e=r;else{e=r[0];const i=r[1],s=t.message.match(i);s&&(n=s.slice(1))}const i=l(e,...n);t.code=i.code,t.message=i.message+"\n"+t.message}}}return t.requiresStackCapture&&(delete t.requiresStackCapture,Error.captureStackTrace(t,e)),t}}},5377:(t,e,n)=>{"use strict";const r=n(8041);t.exports=new class{constructor(){this._featureFlags={},this._featureFlags.oldJsonColumnAsObj=!1}get oldJsonColumnAsObj(){return this._featureFlags.oldJsonColumnAsObj}set oldJsonColumnAsObj(t){r.assertPropValue("boolean"==typeof t,"oldJsonColumnAsObj"),this._featureFlags.oldJsonColumnAsObj=t}}},1905:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{getCondition(){r.throwNotImplemented("getting condition (dequeue options)")}getConsumerName(){r.throwNotImplemented("getting consumer name (dequeue options)")}getCorrelation(){r.throwNotImplemented("getting correlation (dequeue options)")}getMode(){r.throwNotImplemented("getting mode (dequeue options)")}getMsgId(){r.throwNotImplemented("getting message id (dequeue options)")}getNavigation(){r.throwNotImplemented("getting navigation (dequeue options)")}getTransformation(){r.throwNotImplemented("getting transformation (dequeue options)")}getVisibility(){r.throwNotImplemented("getting visibility (dequeue options)")}getWait(){r.throwNotImplemented("getting wait (dequeue options)")}setCondition(){r.throwNotImplemented("setting condition (dequeue options)")}setConsumerName(){r.throwNotImplemented("setting consumer name (dequeue options)")}setCorrelation(){r.throwNotImplemented("setting correlation (dequeue options)")}setMode(){r.throwNotImplemented("setting mode (dequeue options)")}setMsgId(){r.throwNotImplemented("setting message id (dequeue options)")}setNavigation(){r.throwNotImplemented("setting navigation (dequeue options)")}setTransformation(){r.throwNotImplemented("setting transformation (dequeue options)")}setVisibility(){r.throwNotImplemented("setting visibility (dequeue options)")}setWait(){r.throwNotImplemented("setting wait (dequeue options)")}}},4117:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{getDeliveryMode(){r.throwNotImplemented("getting delivery mode (enqueue options)")}getTransformation(){r.throwNotImplemented("getting transformation (enqueue options)")}getVisibility(){r.throwNotImplemented("getting visibility (enqueue options)")}setDeliveryMode(){r.throwNotImplemented("setting delivery mode (enqueue options)")}setTransformation(){r.throwNotImplemented("setting transformation (enqueue options)")}setVisibility(){r.throwNotImplemented("setting visibility (enqueue options)")}}},2894:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{getCorrelation(){r.throwNotImplemented("getting correlation (message)")}getDelay(){r.throwNotImplemented("getting delay (message)")}getDeliveryMode(){r.throwNotImplemented("getting delivery mode (message)")}getExceptionQueue(){r.throwNotImplemented("getting exception queue (message)")}getExpiration(){r.throwNotImplemented("getting expiration (message)")}getMsgId(){r.throwNotImplemented("getting message id (message)")}getNumAttempts(){r.throwNotImplemented("getting number of attempts (message)")}getOriginalMsgId(){r.throwNotImplemented("getting original message id (message)")}getPayload(){r.throwNotImplemented("getting payload (message)")}getPriority(){r.throwNotImplemented("getting priority (message)")}getState(){r.throwNotImplemented("getting state (message)")}}},4610:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{_getConnImpl(){return this._connection}deqMany(){r.throwNotImplemented("dequeuing multiple items from a queue")}deqOne(){r.throwNotImplemented("dequeuing a single item from a queue")}enqMany(){r.throwNotImplemented("enqueuing multiple items from a queue")}enqOne(){r.throwNotImplemented("enqueuing a single item from a queue")}}},44:(t,e,n)=>{"use strict";const r=n(8023),i=n(8041),s=n(9023);t.exports=class{constructor(){this._inProgress=!1,this._dbObjectTypes=new Map,this._requestQueue=[],this._osonMaxFieldNameSize=255}async _acquireLock(){this._inProgress&&(r.errorOnConcurrentExecute&&i.throwErr(i.ERR_CONCURRENT_OPS),await new Promise(((t,e)=>{const n={resolve:t,reject:e};this._requestQueue.push(n)}))),this._inProgress=!0}_getConnImpl(){return this}_getDbObjectType(t,e,n,r){let i;if(r&&(i=this._dbObjectTypes.get(r),i))return i;const s=n?`${t}.${n}.${e}`:`${t}.${e}`;return i=this._dbObjectTypes.get(s),i||(i={oid:r,fqn:s,schema:t,name:e,packageName:n,partial:!0,isXmlType:"SYS"===t&&"XMLTYPE"===e},this._dbObjectTypes.set(s,i)),r&&!i.oid&&(i.oid=r,this._dbObjectTypes.set(r,i)),i}_isDate(t){return s.types.isDate(t)}_releaseLock(){this._requestQueue.length>0?this._requestQueue.shift().resolve():this._inProgress=!1}breakExecution(){i.throwNotImplemented("getting Oracle Server version number")}changePassword(){i.throwNotImplemented("changing the password")}close(){i.throwNotImplemented("closing the connection")}commit(){i.throwNotImplemented("committing the transaction")}createLob(){i.throwNotImplemented("creating a temporary LOB")}execute(){i.throwNotImplemented("executing a SQL statement")}executeMany(){i.throwNotImplemented("executing a SQL statement multiple times")}getCallTimeout(){i.throwNotImplemented("getting call timeout")}getCurrentSchema(){i.throwNotImplemented("getting current schema")}getDbDomain(){i.throwNotImplemented("getting db domain")}getDbName(){i.throwNotImplemented("getting db name")}getDbObjectClass(){i.throwNotImplemented("getting a database object class")}getExternalName(){i.throwNotImplemented("getting the external name")}getInstanceName(){i.throwNotImplemented("getting the Oracle Database instance name.")}getInternalName(){i.throwNotImplemented("getting the internal name")}getMaxOpenCursors(){i.throwNotImplemented("getting max open cursors")}getOracleServerVersion(){i.throwNotImplemented("getting Oracle Server version number")}getOracleServerVersionString(){i.throwNotImplemented("getting Oracle Server version as a string")}getQueue(){i.throwNotImplemented("getting a queue")}getServiceName(){i.throwNotImplemented("getting service name")}getSodaDatabase(){i.throwNotImplemented("getting a SODA database")}getStatementInfo(){i.throwNotImplemented("getting information about a statement")}getStmtCacheSize(){i.throwNotImplemented("getting the statement cache size")}getTag(){i.throwNotImplemented("getting the tag for the connection")}getTransactionInProgress(){i.throwNotImplemented("getting the status of an active transaction on the connection")}getWarning(){i.throwNotImplemented("getting information about warning")}isHealthy(){i.throwNotImplemented("getting the health of the connection")}ping(){i.throwNotImplemented("sending a ping to the database")}rollback(){i.throwNotImplemented("rolling back a transaction")}setAction(){i.throwNotImplemented("setting end-to-end attribute 'action'")}setCallTimeout(){i.throwNotImplemented("setting call timeout")}setClientId(){i.throwNotImplemented("setting end-to-end attribute 'clientId'")}setClientInfo(){i.throwNotImplemented("setting end-to-end attribute 'clientInfo'")}setCurrentSchema(){i.throwNotImplemented("setting the current schema")}setDbOp(){i.throwNotImplemented("setting end-to-end attribute 'dbOp'")}setECID(){i.throwNotImplemented("setting end-to-end attribute 'ecid'")}setExternalName(){i.throwNotImplemented("setting the external name")}setInternalName(){i.throwNotImplemented("setting the internal name")}setStmtCacheSize(){i.throwNotImplemented("setting the size of the statement cache")}setModule(){i.throwNotImplemented("setting end-to-end attribute 'module'")}setTag(){i.throwNotImplemented("setting the tag for the connection")}shutdown(){i.throwNotImplemented("shutting down the database instance")}startup(){i.throwNotImplemented("starting up the database instance")}subscribe(){i.throwNotImplemented("subscribing to events in the database")}tpcBegin(){i.throwNotImplemented("starting a two-phase transaction")}tpcCommit(){i.throwNotImplemented("committing a two-phase transaction")}tpcEnd(){i.throwNotImplemented("ending a two-phase transaction")}tpcForget(){i.throwNotImplemented("forgetting a two-phase transaction")}tpcPrepare(){i.throwNotImplemented("preparing a two-phase transaction")}tpcRollback(){i.throwNotImplemented("rolling back a two-phase transaction")}unsubscribe(){i.throwNotImplemented("unsubscribing from events")}}},1559:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(5068),s=n(8041),o=n(6893),a=n(6770);class u{constructor(t){"number"==typeof t?(this.buf=r.alloc(t),this.size=0,this.maxSize=t):t&&(this.buf=t,this.size=this.maxSize=t.length),this.pos=0}_grow(t){s.throwErr(s.ERR_BUFFER_LENGTH_INSUFFICIENT,this.numBytesLeft(),t)}_readBytesWithLength(t){return this.readBytes(t)}_readInteger(t,e,n){let r=!1,i=this.readUInt8();if(0===i)return 0;if(128&i&&(e||s.throwErr(s.ERR_UNEXPECTED_NEGATIVE_INTEGER,this.pos,this.packetNum),r=!0,i&=127),i>t&&s.throwErr(s.ERR_INTEGER_TOO_LARGE,i,t,this.pos,this.packetNum),!n){const t=this.readBytes(i).readUIntBE(0,i);return r?-t:t}this.skipBytes(i)}numBytesLeft(){return this.size-this.pos}parseBinaryDouble(t){return 128&(t=r.from(t))[0]?t[0]&=127:(t[0]^=255,t[1]^=255,t[2]^=255,t[3]^=255,t[4]^=255,t[5]^=255,t[6]^=255,t[7]^=255),t.readDoubleBE()}parseBinaryFloat(t){return 128&(t=r.from(t))[0]?t[0]&=127:(t[0]^=255,t[1]^=255,t[2]^=255,t[3]^=255),t.readFloatBE()}parseOracleDate(t,e=!0){let n=0;t.length>=11&&(n=Math.floor(t.readUInt32BE(7)/1e6));const r=100*(t[0]-100)+t[1]-100;return a.makeDate(e,r,t[2],t[3],t[4]-1,t[5]-1,t[6]-1,n,0)}parseOracleNumber(t){let e=t[0];const n=Boolean(128&e);n||(e^=255),e-=193;let r=2*e+2;if(1===t.length)return n?"0":"-1e126";let i,s=t.length;n||102!==t[t.length-1]||(s-=1);const o=[];for(let e=1;e<s;e++){i=n?t[e]-1:101-t[e];let a=Math.floor(i/10);0===a&&1===e?r-=1:10===a?(o.push("1"),o.push("0"),r+=1):(0!==a||e>1)&&o.push(a.toString()),a=i%10,(0!==a||e<s-1)&&o.push(a.toString())}const a=[];n||a.push("-"),r<=0&&(a.push("."),r<0&&a.push("0".repeat(-r)));for(let t=0;t<o.length;t++)t>0&&t===r&&a.push("."),a.push(o[t]);if(r>o.length)for(let t=o.length;t<r;t++)a.push("0");return a.join("")}readBinaryDouble(){const t=this.readBytesWithLength();return t?this.parseBinaryDouble(t):null}readBinaryFloat(){const t=this.readBytesWithLength();return t?this.parseBinaryFloat(t):null}readBinaryInteger(){const t=this.readBytesWithLength();return t?(t.length>4&&s.throwErr(s.ERR_INTEGER_TOO_LARGE,t.length,4,this.pos,this.packetNum),t.readIntBE(0,t.length)):0}readBool(){const t=this.readBytesWithLength();return t?1===t[t.length-1]:null}readBytes(t){const e=this.numBytesLeft();t>e&&s.throwErr(s.ERR_UNEXPECTED_END_OF_DATA,t,e);const n=this.buf.subarray(this.pos,this.pos+t);return this.pos+=t,n}readBytesWithLength(){const t=this.readUInt8();return 0===t||t===i.TNS_NULL_LENGTH_INDICATOR?null:this._readBytesWithLength(t)}readDbObject(){const t={};let e=this.readUB4();return e>0&&(t.toid=r.from(this.readBytesWithLength())),e=this.readUB4(),e>0&&(t.oid=r.from(this.readBytesWithLength())),e=this.readUB4(),e>0&&(t.snapshot=r.from(this.readBytesWithLength())),this.skipUB2(),e=this.readUB4(),this.skipUB2(),e>0&&(t.packedData=r.from(this.readBytesWithLength())),t}readInt8(){return this.readBytes(1).readInt8()}readOracleDate(t){const e=this.readBytesWithLength();return e?this.parseOracleDate(e,t):null}readOracleNumber(){const t=this.readBytesWithLength();return t?this.parseOracleNumber(t):null}readSB2(){return this._readInteger(2,!0,!1)}readSB4(){return this._readInteger(4,!0,!1)}readSB8(){return this._readInteger(8,!0,!1)}readStr(t){const e=this.readBytesWithLength();return e?t===i.CSFRM_IMPLICIT?e.toString():r.from(e).swap16().toString("utf16le"):null}readUB2(){return this._readInteger(2,!1,!1)}readUB4(){return this._readInteger(4,!1,!1)}readUB8(){return this._readInteger(8,!1,!1)}readUInt8(){return this.readBytes(1)[0]}readUInt16BE(){return this.readBytes(2).readUInt16BE()}readUInt16LE(){return this.readBytes(2).readUInt16LE()}readUInt32BE(){return this.readBytes(4).readUInt32BE()}reserveBytes(t){t>this.numBytesLeft()&&this._grow(this.pos+t);const e=this.pos;return this.pos+=t,e}skipBytes(t){t>this.numBytesLeft()&&s.throwErr(s.ERR_UNEXPECTED_END_OF_DATA),this.pos+=t}skipSB4(){return this._readInteger(4,!0,!0)}skipUB1(){this.skipBytes(1)}skipUB2(){return this._readInteger(2,!1,!0)}skipUB4(){return this._readInteger(4,!1,!0)}skipUB8(){return this._readInteger(8,!1,!0)}writeBinaryDouble(t,e){e||(e=this.reserveBytes(8)),this.buf.writeDoubleBE(t,e),128&this.buf[e]?(this.buf[e]^=255,this.buf[e+1]^=255,this.buf[e+2]^=255,this.buf[e+3]^=255,this.buf[e+4]^=255,this.buf[e+5]^=255,this.buf[e+6]^=255,this.buf[e+7]^=255):this.buf[e]|=128}writeBinaryFloat(t,e){e||(e=this.reserveBytes(4)),this.buf.writeFloatBE(t,e),128&this.buf[e]?(this.buf[e]^=255,this.buf[e+1]^=255,this.buf[e+2]^=255,this.buf[e+3]^=255):this.buf[e]|=128}writeBytes(t){let e=0,n=t.length;for(;n>0;){const r=this.numBytesLeft();0===r&&this._grow(this.pos+n);const i=Math.min(r,n);t.copy(this.buf,this.pos,e,e+i),this.pos+=i,e+=i,n-=i}}_writeRawBytesAndLength(t,e){if(e<=i.TNS_MAX_SHORT_LENGTH)this.writeUInt8(e),e>0&&this.writeBytes(t);else{let n=0;for(this.writeUInt8(i.TNS_LONG_LENGTH_INDICATOR);e>0;){const r=Math.min(e,i.BUFFER_CHUNK_SIZE);this.writeUB4(r),this.writeBytes(t.subarray(n,n+r)),e-=r,n+=r}this.writeUB4(0)}}writeBytesWithLength(t){const e=t.length;this._writeRawBytesAndLength(t,e)}writeDbObject(t){this.writeUB4(t.toid.length),this.writeBytesWithLength(t.toid),t.oid?(this.writeUB4(t.oid.length),this.writeBytesWithLength(t.oid)):this.writeUB4(0),this.writeUB4(0),this.writeUB4(0);const e=t._getPackedData();this.writeUB4(e.length),this.writeUB4(t.flags),this.writeBytesWithLength(e)}writeOracleDate(t,e,n=!0){let r,s=e._bufferSizeFactor;s>7&&(r=1e3*t.getUTCMilliseconds()*1e3,0===r&&s<=11&&(s=7)),n&&this.writeUInt8(s);const a=this.reserveBytes(s);if(e===o.DB_TYPE_DATE||e==o.DB_TYPE_TIMESTAMP){const e=t.getFullYear();this.buf[a]=Math.trunc(e/100)+100,this.buf[a+1]=e%100+100,this.buf[a+2]=t.getMonth()+1,this.buf[a+3]=t.getDate(),this.buf[a+4]=t.getHours()+1,this.buf[a+5]=t.getMinutes()+1,this.buf[a+6]=t.getSeconds()+1}else{const e=t.getUTCFullYear();this.buf[a]=Math.trunc(e/100)+100,this.buf[a+1]=e%100+100,this.buf[a+2]=t.getUTCMonth()+1,this.buf[a+3]=t.getUTCDate(),this.buf[a+4]=t.getUTCHours()+1,this.buf[a+5]=t.getUTCMinutes()+1,this.buf[a+6]=t.getUTCSeconds()+1}s>7&&(this.buf.writeInt32BE(r,a+7),s>11&&(this.buf[a+11]=i.TZ_HOUR_OFFSET,this.buf[a+12]=i.TZ_MINUTE_OFFSET))}writeOracleNumber(t){let e=!1;"-"===t[0]&&(e=!0,t=t.substring(1));let n=0;const r=t.indexOf("e");r>0&&(n=Number(t.substring(r+1)),t=t.substring(0,r));const o=t.indexOf(".");if(o>0&&(n-=t.length-o-1,t=t.substring(0,o)+t.substring(o+1)),"0"===t[0]&&(t=t.replace(/^0+/,"")),t.length>0&&"0"===t[t.length-1]){const e=t.replace(/0+$/,"");n+=t.length-e.length,t=e}(t.length>i.NUMBER_MAX_DIGITS||n>=126||n<=-131)&&s.throwErr(s.ERR_ORACLE_NUMBER_NO_REPR),(n>0&&n%2==1||n<0&&n%2==-1)&&(n--,t+="0"),t.length%2==1&&(t="0"+t);const a=e&&t.length<i.NUMBER_MAX_DIGITS,u=t.length/2;let _=(n+t.length)/2+192;e?_^=255:0===t.length&&0===n&&(_=128);let c=this.reserveBytes(u+2+a);this.buf[c++]=u+1+a,this.buf[c++]=_;for(let n=0;n<t.length;n+=2){const r=Number(t.substring(n,n+2));this.buf[c++]=e?101-r:r+1}a&&(this.buf[c]=102)}writeStr(t){this.writeBytes(r.from(t))}writeInt32BE(t){const e=this.reserveBytes(4);this.buf.writeInt32BE(t,e)}writeUB4(t){0===t?this.writeUInt8(0):t<=255?(this.writeUInt8(1),this.writeUInt8(t)):t<=65535?(this.writeUInt8(2),this.writeUInt16BE(t)):(this.writeUInt8(4),this.writeUInt32BE(t))}writeUB2(t){0===t?this.writeUInt8(0):t<=255?(this.writeUInt8(1),this.writeUInt8(t)):(this.writeUInt8(2),this.writeUInt16BE(t))}writeUB8(t){0===t?this.writeUInt8(0):t<=255?(this.writeUInt8(1),this.writeUInt8(t)):t<=65535?(this.writeUInt8(2),this.writeUInt16BE(t)):t<=4294967295?(this.writeUInt8(4),this.writeUInt32BE(t)):(this.writeUInt8(8),this.writeUInt64BE(t))}writeUInt8(t){const e=this.reserveBytes(1);this.buf[e]=t}writeSB1(t){const e=this.reserveBytes(1);this.buf[e]=t}writeUInt16BE(t){const e=this.reserveBytes(2);this.buf.writeUInt16BE(t,e)}writeUInt32BE(t){const e=this.reserveBytes(4);this.buf.writeUInt32BE(t,e)}writeUInt64BE(t){const e=this.reserveBytes(8);this.buf.writeUInt32BE(0,e),this.buf.writeUInt32BE(t,e+4)}writeUInt16LE(t){const e=this.reserveBytes(2);this.buf.writeUInt16LE(t,e)}}t.exports={BaseBuffer:u,GrowableBuffer:class extends u{constructor(t){t?super(t):(super(i.BUFFER_CHUNK_SIZE),this.size=this.maxSize)}_grow(t){const e=t%i.BUFFER_CHUNK_SIZE;e>0&&(t+=i.BUFFER_CHUNK_SIZE-e);const n=r.allocUnsafe(t);this.buf.copy(n),this.buf=n,this.maxSize=this.size=t}}}},5068:(t,e,n)=>{"use strict";const r=n(2269);t.exports={TNS_VECTOR_MAGIC_BYTE:219,TNS_VECTOR_VERSION:0,TNS_VECTOR_FLAG_NORMSRC:16,TNS_VECTOR_FLAG_NORM:2,TNS_JSON_MAGIC_BYTE_1:255,TNS_JSON_MAGIC_BYTE_2:74,TNS_JSON_MAGIC_BYTE_3:90,TNS_JSON_VERSION_MAX_FNAME_255:1,TNS_JSON_VERSION_MAX_FNAME_65535:3,TNS_JSON_FLAG_HASH_ID_UINT8:256,TNS_JSON_FLAG_HASH_ID_UINT16:512,TNS_JSON_FLAG_NUM_FNAMES_UINT16:1024,TNS_JSON_FLAG_FNAMES_SEG_UINT32:2048,TNS_JSON_FLAG_TINY_NODES_STAT:8192,TNS_JSON_FLAG_TREE_SEG_UINT32:4096,TNS_JSON_FLAG_REL_OFFSET_MODE:1,TNS_JSON_FLAG_INLINE_LEAF:2,TNS_JSON_FLAG_LEN_IN_PCODE:4,TNS_JSON_FLAG_NUM_FNAMES_UINT32:8,TNS_JSON_FLAG_IS_SCALAR:16,TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16:256,TNS_JSON_TYPE_NULL:48,TNS_JSON_TYPE_TRUE:49,TNS_JSON_TYPE_FALSE:50,TNS_JSON_TYPE_STRING_LENGTH_UINT8:51,TNS_JSON_TYPE_NUMBER_LENGTH_UINT8:52,TNS_JSON_TYPE_BINARY_DOUBLE:54,TNS_JSON_TYPE_STRING_LENGTH_UINT16:55,TNS_JSON_TYPE_STRING_LENGTH_UINT32:56,TNS_JSON_TYPE_TIMESTAMP:57,TNS_JSON_TYPE_BINARY_LENGTH_UINT16:58,TNS_JSON_TYPE_BINARY_LENGTH_UINT32:59,TNS_JSON_TYPE_DATE:60,TNS_JSON_TYPE_INTERVAL_YM:61,TNS_JSON_TYPE_INTERVAL_DS:62,TNS_JSON_TYPE_TIMESTAMP_TZ:124,TNS_JSON_TYPE_TIMESTAMP7:125,TNS_JSON_TYPE_BINARY_FLOAT:127,TNS_JSON_TYPE_OBJECT:132,TNS_JSON_TYPE_ARRAY:192,TNS_JSON_TYPE_EXTENDED:123,TNS_JSON_TYPE_VECTOR:1,TNS_JSON_TYPE_ID:126,TZ_HOUR_OFFSET:20,TZ_MINUTE_OFFSET:60,TNS_MAX_SHORT_LENGTH:252,TNS_DURATION_MID:2147483648,TNS_DURATION_OFFSET:60,TNS_CHUNK_SIZE:32767,TNS_HAS_REGION_ID:128,NUMBER_MAX_DIGITS:40,BUFFER_CHUNK_SIZE:65536,CSFRM_IMPLICIT:r.CSFRM_IMPLICIT,VECTOR_FORMAT_FLOAT32:r.VECTOR_FORMAT_FLOAT32,VECTOR_FORMAT_FLOAT64:r.VECTOR_FORMAT_FLOAT64,VECTOR_FORMAT_INT8:r.VECTOR_FORMAT_INT8,TNS_NULL_LENGTH_INDICATOR:255,TNS_LONG_LENGTH_INDICATOR:254}},7034:(t,e,n)=>{"use strict";const{BaseBuffer:r,GrowableBuffer:i}=n(1559),{Buffer:s}=n(2562),o=n(5068),a=n(8041),u=n(6893),_=n(9023),c=n(8774),l=n(6770);class h{constructor(t,e){this.name=t,this.nameBytes=s.from(t),this.nameBytes.length>e&&a.throwErr(a.ERR_OSON_FIELD_NAME_LIMITATION,e),this.hashId=0x811C9DC5n;for(let t=0;t<this.nameBytes.length;t++){const e=BigInt(this.nameBytes[t]);this.hashId=16777619n*(this.hashId^e)&4294967295n}this.hashId=255&Number(this.hashId)}}class T extends i{constructor(){super(),this.fieldNames=[]}addName(t){t.offset=this.pos,t.nameBytes.length<=255?this.writeUInt8(t.nameBytes.length):this.writeUInt16BE(t.nameBytes.length),this.writeBytes(t.nameBytes),this.fieldNames.push(t)}_processFieldNames(t){this.fieldNames.sort(((t,e)=>t.hashId<e.hashId?-1:t.hashId>e.hashId?1:t.nameBytes.length<e.nameBytes.length?-1:t.nameBytes.length>e.nameBytes.length?1:t.name<e.name?-1:t.name>e.name?1:0));for(let e=0;e<this.fieldNames.length;e++)this.fieldNames[e].fieldId=t+e+1;this.fieldNames.length<256?this.fieldIdSize=1:this.fieldNames.length<65536?this.fieldIdSize=2:this.fieldIdSize=4}}class p extends i{_encodeArray(t,e){this._encodeContainer(o.TNS_JSON_TYPE_ARRAY,t.length);const n=4*t.length;let r=this.reserveBytes(n);for(const n of t)this.buf.writeUInt32BE(this.pos,r),r+=4,this.encodeNode(n,e)}_encodeContainer(t,e){t|=32,e>65535?t|=16:e>255&&(t|=8),this.writeUInt8(t),e<256?this.writeUInt8(e):e<65536?this.writeUInt16BE(e):this.writeUInt32BE(e)}_encodeObject(t,e){const n=t.values.length;this._encodeContainer(o.TNS_JSON_TYPE_OBJECT,n);let r=this.pos,i=this.pos+n*e.fieldIdSize;const s=i+4*n;this.reserveBytes(s-this.pos);for(let n=0;n<t.fields.length;n++){const s=e.fieldNamesMap.get(t.fields[n]);1==e.fieldIdSize?this.buf[r]=s.fieldId:2==e.fieldIdSize?this.buf.writeUInt16BE(s.fieldId,r):this.buf.writeUInt32BE(s.fieldId,r),this.buf.writeUInt32BE(this.pos,i),r+=e.fieldIdSize,i+=4,this.encodeNode(t.values[n],e)}}encodeNode(t,e){if(null==t)this.writeUInt8(o.TNS_JSON_TYPE_NULL);else if("boolean"==typeof t)t?this.writeUInt8(o.TNS_JSON_TYPE_TRUE):this.writeUInt8(o.TNS_JSON_TYPE_FALSE);else if("number"==typeof t)this.writeUInt8(o.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8),this.writeOracleNumber(t.toString());else if("string"==typeof t){const e=s.from(t);e.length<256?(this.writeUInt8(o.TNS_JSON_TYPE_STRING_LENGTH_UINT8),this.writeUInt8(e.length)):e.length<65536?(this.writeUInt8(o.TNS_JSON_TYPE_STRING_LENGTH_UINT16),this.writeUInt16BE(e.length)):(this.writeUInt8(o.TNS_JSON_TYPE_STRING_LENGTH_UINT32),this.writeUInt32BE(e.length)),e.length>0&&this.writeBytes(e)}else if(_.types.isDate(t))0===t.getUTCMilliseconds()?(this.writeUInt8(o.TNS_JSON_TYPE_TIMESTAMP7),this.writeOracleDate(t,u.DB_TYPE_DATE,!1)):(this.writeUInt8(o.TNS_JSON_TYPE_TIMESTAMP),this.writeOracleDate(t,u.DB_TYPE_TIMESTAMP,!1));else if(s.isBuffer(t))t.length<65536?(this.writeUInt8(o.TNS_JSON_TYPE_BINARY_LENGTH_UINT16),this.writeUInt16BE(t.length)):(this.writeUInt8(o.TNS_JSON_TYPE_BINARY_LENGTH_UINT32),this.writeUInt32BE(t.length)),this.writeBytes(t);else if(Array.isArray(t))this._encodeArray(t,e);else if(l.isVectorValue(t)){this.writeUInt8(o.TNS_JSON_TYPE_EXTENDED),this.writeUInt8(o.TNS_JSON_TYPE_VECTOR);const e=(new c.VectorEncoder).encode(t);this.writeUInt32BE(e.length),this.writeBytes(e)}else t instanceof u.JsonId?(this.writeUInt8(o.TNS_JSON_TYPE_ID),this.writeUInt8(t.length),this.writeBytes(s.from(t.buffer))):this._encodeObject(t,e)}}t.exports={OsonDecoder:class extends r{_decodeContainerNode(t){let e,n,r;const i=this.pos-this.treeSegPos-1;let s=this._getNumChildren(t);const o=!(64&t);if(void 0===s){const i=this._getOffset(t);n=this.pos,this.pos=this.treeSegPos+i;const a=this.readUInt8();s=this._getNumChildren(a),e=o?{}:new Array(s),r=this.pos}else o?(e={},r=this.pos,n=this.pos+this.fieldIdLength*s):(e=new Array(s),n=this.pos);for(let a=0;a<s;a++){let s;if(o){let t;t=1===this.fieldIdLength?this.buf[r]:2==this.fieldIdLength?this.buf.readUInt16BE(r):this.buf.readUInt32BE(r),s=this.fieldNames[t-1],r+=this.fieldIdLength}this.pos=n;let u=this._getOffset(t);this.relativeOffsets&&(u+=i),n=this.pos,this.pos=this.treeSegPos+u,o?e[s]=this._decodeNode():e[a]=this._decodeNode()}return e}_decodeNode(){let t=this.readUInt8();if(128&t)return this._decodeContainerNode(t);if(t===o.TNS_JSON_TYPE_NULL)return null;if(t===o.TNS_JSON_TYPE_TRUE)return!0;if(t===o.TNS_JSON_TYPE_FALSE)return!1;if(t===o.TNS_JSON_TYPE_DATE||t===o.TNS_JSON_TYPE_TIMESTAMP7)return this.parseOracleDate(this.readBytes(7));if(t===o.TNS_JSON_TYPE_TIMESTAMP)return this.parseOracleDate(this.readBytes(11));if(t===o.TNS_JSON_TYPE_TIMESTAMP_TZ)return this.parseOracleDate(this.readBytes(13));if(t===o.TNS_JSON_TYPE_BINARY_FLOAT)return this.parseBinaryFloat(this.readBytes(4));if(t===o.TNS_JSON_TYPE_BINARY_DOUBLE)return this.parseBinaryDouble(this.readBytes(8));if(t===o.TNS_JSON_TYPE_STRING_LENGTH_UINT8)return this.readBytes(this.readUInt8()).toString();if(t===o.TNS_JSON_TYPE_STRING_LENGTH_UINT16)return this.readBytes(this.readUInt16BE()).toString();if(t===o.TNS_JSON_TYPE_STRING_LENGTH_UINT32)return this.readBytes(this.readUInt32BE()).toString();if(t===o.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8)return parseFloat(this.readOracleNumber());if(t===o.TNS_JSON_TYPE_ID){const t=this.readBytes(this.readUInt8()),e=new u.JsonId(t.length);return t.copy(e),e}if(t===o.TNS_JSON_TYPE_BINARY_LENGTH_UINT16)return s.from(this.readBytes(this.readUInt16BE()));if(t===o.TNS_JSON_TYPE_BINARY_LENGTH_UINT32)return s.from(this.readBytes(this.readUInt32BE()));if(t===o.TNS_JSON_TYPE_EXTENDED&&(t=this.readUInt8(),t===o.TNS_JSON_TYPE_VECTOR)){const t=this.readBytes(this.readUInt32BE());return new c.VectorDecoder(t).decode()}const e=240&t;if(32===e||96===e){const e=15&t;return parseFloat(this.parseOracleNumber(this.readBytes(e+1)))}if(64===e||80===e){const e=15&t;return parseFloat(this.parseOracleNumber(this.readBytes(e)))}if(!(224&t))return 0===t?"":this.readBytes(t).toString();a.throwErr(a.ERR_UNSUPPORTED_DATA_TYPE_IN_JSON,t)}_getNumChildren(t){const e=24&t;return 0===e?this.readUInt8():8===e?this.readUInt16BE():16===e?this.readUInt32BE():void 0}_getOffset(t){return 32&t?this.readUInt32BE():this.readUInt16BE()}_getFieldNames(t,e,n,r,i){this.skipBytes(e*i);const s=this.pos;this.skipBytes(e*n);const o=this.readBytes(r),a=this.pos;let u;this.pos=s;for(let r=t;r<t+e;r++){let t;u=2===n?this.readUInt16BE():this.readUInt32BE(),t=1===i?o.readUInt8(u):o.readUInt16BE(u),this.fieldNames[r]=o.subarray(u+i,u+t+i).toString()}this.pos=a}decode(){const t=this.readBytes(3);t[0]===o.TNS_JSON_MAGIC_BYTE_1&&t[1]===o.TNS_JSON_MAGIC_BYTE_2&&t[2]===o.TNS_JSON_MAGIC_BYTE_3||a.throwErr(a.ERR_UNEXPECTED_DATA,t.toString("hex"));const e=this.readUInt8();e!==o.TNS_JSON_VERSION_MAX_FNAME_255&&e!==o.TNS_JSON_VERSION_MAX_FNAME_65535&&a.throwErr(a.ERR_OSON_VERSION_NOT_SUPPORTED,e);const n=this.readUInt16BE();if(this.relativeOffsets=n&o.TNS_JSON_FLAG_REL_OFFSET_MODE,n&o.TNS_JSON_FLAG_IS_SCALAR)return n&o.TNS_JSON_FLAG_TREE_SEG_UINT32?this.skipBytes(4):this.skipBytes(2),this._decodeNode();let r,i,s,u,_;n&o.TNS_JSON_FLAG_NUM_FNAMES_UINT32?(r=this.readUInt32BE(),this.fieldIdLength=4):n&o.TNS_JSON_FLAG_NUM_FNAMES_UINT16?(r=this.readUInt16BE(),this.fieldIdLength=2):(r=this.readUInt8(),this.fieldIdLength=1),n&o.TNS_JSON_FLAG_FNAMES_SEG_UINT32?(i=4,s=this.readUInt32BE()):(i=2,s=this.readUInt16BE());let c=0;return e===o.TNS_JSON_VERSION_MAX_FNAME_65535&&(u=this.readUInt16BE()&o.TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16?2:4,c=this.readUInt32BE(),_=this.readUInt32BE()),n&o.TNS_JSON_FLAG_TREE_SEG_UINT32?this.skipBytes(4):this.skipBytes(2),this.skipBytes(2),this.fieldNames=new Array(r+c),r>0&&this._getFieldNames(0,r,i,s,1),c>0&&this._getFieldNames(r,c,u,_,2),this.treeSegPos=this.pos,this._decodeNode()}},OsonEncoder:class extends i{_addFieldName(t){const e=new h(t,this.maxFieldNameSize);this.fieldNamesMap.set(t,e),e.nameBytes.length<=255?this.shortFieldNamesSeg.addName(e):(this.longFieldNamesSeg||(this.longFieldNamesSeg=new T),this.longFieldNamesSeg.addName(e))}_examineNode(t){if(Array.isArray(t))for(const e of t)this._examineNode(e);else if(t&&Array.isArray(t.fields))for(let e=0;e<t.fields.length;e++){const n=t.fields[e],r=t.values[e];this.fieldNamesMap.has(n)||this._addFieldName(n),this._examineNode(r)}}_writeExtendedHeader(){if(1===this.fieldIdSize?this.writeUInt8(this.shortFieldNamesSeg.fieldNames.length):2===this.fieldIdSize?this.writeUInt16BE(this.shortFieldNamesSeg.fieldNames.length):this.writeUInt32BE(this.shortFieldNamesSeg.fieldNames.length),this.shortFieldNamesSeg.pos<65536?this.writeUInt16BE(this.shortFieldNamesSeg.pos):this.writeUInt32BE(this.shortFieldNamesSeg.pos),this.longFieldNamesSeg){let t=0;this.longFieldNamesSeg.pos<65536&&(t=o.TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16),this.writeUInt16BE(t),this.writeUInt32BE(this.longFieldNamesSeg.fieldNames.length),this.writeUInt32BE(this.longFieldNamesSeg.pos)}}_writeFieldNamesSeg(t){for(const e of t.fieldNames)e.nameBytes.length<=255?this.writeUInt8(e.hashId):this.writeUInt16BE(e.hashId);for(const e of t.fieldNames)t.pos<65536?this.writeUInt16BE(e.offset):this.writeUInt32BE(e.offset);t.pos>0&&this.writeBytes(t.buf.subarray(0,t.pos))}encode(t,e){this.maxFieldNameSize=e;let n=o.TNS_JSON_FLAG_INLINE_LEAF;if(Array.isArray(t)||t&&Array.isArray(t.fields)){this.fieldNamesMap=new Map,this.shortFieldNamesSeg=new T,this._examineNode(t);let e=0;this.shortFieldNamesSeg&&(this.shortFieldNamesSeg._processFieldNames(0),e+=this.shortFieldNamesSeg.fieldNames.length),this.longFieldNamesSeg&&(this.longFieldNamesSeg._processFieldNames(e),e+=this.longFieldNamesSeg.fieldNames.length),n|=o.TNS_JSON_FLAG_HASH_ID_UINT8|o.TNS_JSON_FLAG_TINY_NODES_STAT,e>65535?(n|=o.TNS_JSON_FLAG_NUM_FNAMES_UINT32,this.fieldIdSize=4):e>255?(n|=o.TNS_JSON_FLAG_NUM_FNAMES_UINT16,this.fieldIdSize=2):this.fieldIdSize=1,this.shortFieldNamesSeg.pos>65535&&(n|=o.TNS_JSON_FLAG_FNAMES_SEG_UINT32)}else n|=o.TNS_JSON_FLAG_IS_SCALAR;const r=new p;return r.encodeNode(t,this),r.pos>65535&&(n|=o.TNS_JSON_FLAG_TREE_SEG_UINT32),this.writeUInt8(o.TNS_JSON_MAGIC_BYTE_1),this.writeUInt8(o.TNS_JSON_MAGIC_BYTE_2),this.writeUInt8(o.TNS_JSON_MAGIC_BYTE_3),this.longFieldNamesSeg?this.writeUInt8(o.TNS_JSON_VERSION_MAX_FNAME_65535):this.writeUInt8(o.TNS_JSON_VERSION_MAX_FNAME_255),this.writeUInt16BE(n),this.shortFieldNamesSeg&&this._writeExtendedHeader(),r.pos<65536?this.writeUInt16BE(r.pos):this.writeUInt32BE(r.pos),this.shortFieldNamesSeg&&(this.writeUInt16BE(0),this._writeFieldNamesSeg(this.shortFieldNamesSeg),this.longFieldNamesSeg&&this._writeFieldNamesSeg(this.longFieldNamesSeg)),this.writeBytes(r.buf.subarray(0,r.pos)),this.buf.subarray(0,this.pos)}}}},8774:(t,e,n)=>{"use strict";const{BaseBuffer:r,GrowableBuffer:i}=n(1559),{Buffer:s}=n(2562),o=n(5068),a=n(8041);t.exports={VectorDecoder:class extends r{decode(){const t=this.readUInt8();t!=o.TNS_VECTOR_MAGIC_BYTE&&a.throwErr(a.ERR_UNEXPECTED_DATA,s.from([t]).toString("hex"));const e=this.readUInt8();e!=o.TNS_VECTOR_VERSION&&a.throwErr(a.ERR_VECTOR_VERSION_NOT_SUPPORTED,e);const n=this.readUInt16BE(),r=this.readUInt8(),i=this.readUInt32BE();let u,_;r===o.VECTOR_FORMAT_FLOAT32?(u=4,_=new Float32Array(i)):r===o.VECTOR_FORMAT_FLOAT64?(u=8,_=new Float64Array(i)):r===o.VECTOR_FORMAT_INT8?(u=1,_=new Int8Array(i)):a.throwErr(a.ERR_VECTOR_FORMAT_NOT_SUPPORTED,r),n&o.TNS_VECTOR_FLAG_NORM&&this.skipBytes(8);for(let t=0;t<i;t++){const e=this.readBytes(u);r===o.VECTOR_FORMAT_FLOAT32?_[t]=this.parseBinaryFloat(e):r===o.VECTOR_FORMAT_FLOAT64?_[t]=this.parseBinaryDouble(e):_[t]=e[0]}return _}},VectorEncoder:class extends i{encode(t){let e=o.VECTOR_FORMAT_FLOAT32,n=this.writeBinaryFloat.bind(this);Array.isArray(t)||t instanceof Float64Array?(e=o.VECTOR_FORMAT_FLOAT64,n=this.writeBinaryDouble.bind(this)):t instanceof Int8Array&&(e=o.VECTOR_FORMAT_INT8,n=this.writeSB1.bind(this));const r=o.TNS_VECTOR_FLAG_NORM|o.TNS_VECTOR_FLAG_NORMSRC;return this.writeUInt8(o.TNS_VECTOR_MAGIC_BYTE),this.writeUInt8(o.TNS_VECTOR_VERSION),this.writeUInt16BE(r),this.writeUInt8(e),this.writeUInt32BE(t.length),this.reserveBytes(8),t.forEach((t=>{n(t)})),this.buf.subarray(0,this.pos)}}}},3034:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{constructor(t){this._objType=t}append(){r.throwNotImplemented("appending element to collection")}copy(){r.throwNotImplemented("copying an object")}deleteElement(){r.throwNotImplemented("deleting an element from a collection")}getElement(){r.throwNotImplemented("getting an element from a collection")}getFirstIndex(){r.throwNotImplemented("getting the first index in a collection")}getKeys(){r.throwNotImplemented("returning the keys of a collection")}getLastIndex(){r.throwNotImplemented("getting the last index in a collection")}getNextIndex(){r.throwNotImplemented("getting the next index in a collection")}getPrevIndex(){r.throwNotImplemented("getting the previous index in a collection")}getValues(){r.throwNotImplemented("getting the values in a collection")}hasElement(){r.throwNotImplemented("getting if value exists in a collection")}setElement(){r.throwNotImplemented("setting an element in a collection")}trim(){r.throwNotImplemented("trimming elements from a collection")}}},851:(t,e,n)=>{"use strict";const r=n(1905),i=n(4117),s=n(2894),o=n(4610),a=n(3034),u=n(44),_=n(6634),c=n(1217),l=n(9700),h=n(2870),T=n(6243),p=n(2216),f=n(3559),E=n(301);t.exports={AqDeqOptionsImpl:r,AqEnqOptionsImpl:i,AqMessageImpl:s,AqQueueImpl:o,DbObjectImpl:a,ConnectionImpl:u,LobImpl:_,PoolImpl:c,ResultSetImpl:l,SodaCollectionImpl:h,SodaDatabaseImpl:T,SodaDocCursorImpl:p,SodaDocumentImpl:f,SodaOperationImpl:E}},6634:(t,e,n)=>{"use strict";const r=n(44),i=n(8041);t.exports=class{_getConnImpl(){let t=this._parentObj;for(;!(t instanceof r);)t=t._parentObj;return t}close(){i.throwNotImplemented("closing a LOB")}getData(){i.throwNotImplemented("getting all of the data from a LOB")}read(){i.throwNotImplemented("reading from a LOB")}write(){i.throwNotImplemented("writing to a LOB")}}},1217:(t,e,n)=>{"use strict";const r=n(8041),i=n(6770);t.exports=class{async _accessTokenHandler(t,e,n,s){let o;try{let e=t(n,s);e instanceof Promise&&(e=await e),i.isTokenValid(e)||r.throwErr(r.ERR_TOKEN_HAS_EXPIRED),"object"==typeof e&&void 0!==e.privateKey&&(e.privateKey=i.denormalizePrivateKey(e.privateKey)),o=e}finally{this.returnAccessToken(e,o)}}close(){r.throwNotImplemented("closing the pool")}create(){r.throwNotImplemented("creating the pool")}getConnection(){r.throwNotImplemented("getting a connection from the pool")}getConnectionsInUse(){r.throwNotImplemented("getting num connection in use")}getConnectionsOpen(){r.throwNotImplemented("getting num connection open")}getPoolIncrement(){r.throwNotImplemented("getting the pool increment")}getPoolMax(){r.throwNotImplemented("getting the pool max")}getPoolMaxPerShard(){r.throwNotImplemented("getting the pool max per shard")}getPoolMin(){r.throwNotImplemented("getting the pool min")}getPoolPingInterval(){r.throwNotImplemented("getting the pool ping interval")}getPoolPingTimeout(){r.throwNotImplemented("getting the pool ping Timeout")}getPoolTimeout(){r.throwNotImplemented("getting the pool timeout")}getStmtCacheSize(){r.throwNotImplemented("getting the pool statement cache size")}getSodaMetaDataCache(){r.throwNotImplemented("getting the SODA metadata cache flag")}reconfigure(){r.throwNotImplemented("reconfiguring the pool")}setAccessToken(){r.throwNotImplemented("sets the access token")}}},9700:(t,e,n)=>{"use strict";const r=n(2269),i=n(8041),s=n(6770),o=n(8023),a=n(5377),u=n(6893),_=n(2733),c=n(7034);t.exports=class{_determineFetchType(t,e){if(delete t.fetchType,delete t.converter,e.fetchTypeHandler){const n=e.fetchTypeHandler(t);void 0!==n&&(i.assert("object"==typeof n,i.ERR_FETCH_TYPE_HANDLER_RETURN_VALUE),void 0!==n.type&&i.assert(n.type instanceof u.DbType,i.ERR_FETCH_TYPE_HANDLER_TYPE),void 0!==n.converter&&i.assert("function"==typeof n.converter,i.ERR_FETCH_TYPE_HANDLER_CONVERTER),t.fetchType=n.type,t.converter=n.converter)}if(t.fetchType||(e.fetchTypeMap&&e.fetchTypeMap.has(t.name)?(t.fetchType=e.fetchTypeMap.get(t.name),t.fetchType===r.DEFAULT&&(t.fetchType=u.DB_TYPE_FETCH_TYPE_MAP.get(t.dbType))):t.fetchType=o.fetchTypeMap.get(t.dbType)),t.fetchType!==t.dbType){const e=u.DB_TYPE_CONVERSION_MAP.get(t.dbType),n=e&&e.get(t.fetchType);n||i.throwErr(i.ERR_UNSUPPORTED_CONVERSION,t.dbType.name,t.fetchType.name),t.fetchType=n}let n;const s=t.converter;if(t.dbType!==u.DB_TYPE_JSON&&a.oldJsonColumnAsObj&&void 0===s){let e;t.isOson?(e=async function(t){if(!t)return t;let e=t;return t instanceof _&&(e=await t.getData()),new c.OsonDecoder(e).decode()},n=e):t.isJson&&(e=async function(t){if(!t)return t;let e=t;return t instanceof _&&(e=await t.getData()),e instanceof Buffer&&(e=e.toString()),e=JSON.parse(e),e},n=e)}if(o.thin&&(t.dbType===u.DB_TYPE_NUMBER&&t.fetchType===u.DB_TYPE_NUMBER?n=t=>null===t?null:parseFloat(t):t.fetchType===u.DB_TYPE_VARCHAR?t.dbType===u.DB_TYPE_BINARY_DOUBLE||t.dbType===u.DB_TYPE_BINARY_FLOAT||t.dbType===u.DB_TYPE_DATE||t.dbType===u.DB_TYPE_TIMESTAMP||t.dbType===u.DB_TYPE_TIMESTAMP_LTZ||t.dbType===u.DB_TYPE_TIMESTAMP_TZ?n=t=>null===t?null:t.toString():t.dbType===u.DB_TYPE_RAW&&(n=t=>null===t?null:t.toString("hex").toUpperCase()):t.dbType===u.DB_TYPE_XMLTYPE&&(n=async function(t){return t?"string"==typeof t?t:await t.getData():t}),s&&n)){const t=n;n=e=>s(t(e))}n&&(t.converter=n)}_getConnImpl(){return this._parentObj}_setup(t,e){this._parentObj=t.connection._impl,this.metaData=e,this.lobIndices=[],this.dbObjectIndices=[],this.nestedCursorIndices=[],this.converterIndices=[],this.outFormat=t.outFormat,this.fetchArraySize=t.fetchArraySize,this.dbObjectAsPojo=t.dbObjectAsPojo,this.maxRows=t.maxRows;const n=new Map;for(let t=0;t<e.length;t++){const r=e[t].name;n.has(r)||n.set(r,t)}for(let r=0;r<e.length;r++){const i=e[r];if(i.dbTypeClass){const e=t.connection._getDbObjectClass(i.dbTypeClass);i.dbTypeClass=e}s.addTypeProperties(i,"dbType"),this._determineFetchType(i,t),i.fetchType===u.DB_TYPE_CURSOR?this.nestedCursorIndices.push(r):i.fetchType===u.DB_TYPE_CLOB||i.fetchType===u.DB_TYPE_NCLOB||i.fetchType===u.DB_TYPE_BLOB?this.lobIndices.push(r):i.fetchType===u.DB_TYPE_OBJECT&&this.dbObjectIndices.push(r),i.converter&&this.converterIndices.push(r);let o=i.name;if(n.get(o)!==r){let t=0;for(;n.has(o);)t+=1,o=`${i.name}_${t}`;n.set(o,r),i.name=o}}}close(){i.throwNotImplemented("closing a result set")}getRows(){i.throwNotImplemented("getting rows")}}},2870:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{_getConnImpl(){return this._database._connection}createIndex(){r.throwNotImplemented("creating an index on a SODA collection")}drop(){r.throwNotImplemented("dropping a SODA collection")}dropIndex(){r.throwNotImplemented("dropping an index on a SODA collection")}find(){r.throwNotImplemented("creating a SODA operation")}getDataGuide(){r.throwNotImplemented("getting the data guide for the collection")}getMetaData(){r.throwNotImplemented("getting the metadata for the collection")}getName(){r.throwNotImplemented("getting the name of the collection")}insertMany(){r.throwNotImplemented("inserting multiple docs into a collection")}insertManyAndGet(){r.throwNotImplemented("insert/return many docs in a collection")}insertOne(){r.throwNotImplemented("inserting a single doc into a collection")}insertOneAndGet(){r.throwNotImplemented("insert/return a single doc in a collection")}save(){r.throwNotImplemented("saving a single doc in a collection")}saveAndGet(){r.throwNotImplemented("saving a single doc in a collection")}truncate(){r.throwNotImplemented("removing all docs from a collection")}}},6243:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{_getConnImpl(){return this._connection}createCollection(){r.throwNotImplemented("creating a SODA collection")}createDocument(){r.throwNotImplemented("creating a SODA document")}getCollectionNames(){r.throwNotImplemented("getting a list of SODA collection names")}openCollection(){r.throwNotImplemented("getting a list of SODA collection names")}}},2216:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{_getConnImpl(){return this._operation._getConnImpl()}close(){r.throwNotImplemented("closing a SODA document cursor")}getNext(){r.throwNotImplemented("getting a document from a SODA doc cursor")}}},3559:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{getContentAsBuffer(){r.throwNotImplemented("getting doc content as a buffer")}getContentAsString(){r.throwNotImplemented("getting doc content as a string")}getCreatedOn(){r.throwNotImplemented("getting the created date of a document")}getKey(){r.throwNotImplemented("getting the key of a document")}getLastModified(){r.throwNotImplemented("getting the last modified date of a doc")}getMediaType(){r.throwNotImplemented("getting the media type of a document")}getVersion(){r.throwNotImplemented("getting the version of a document")}}},301:(t,e,n)=>{"use strict";const r=n(8041);t.exports=class{_getConnImpl(){return this._collection._database._connection}count(){r.throwNotImplemented("getting a count of documents")}getCursor(){r.throwNotImplemented("getting a cursor for documents")}getDocuments(){r.throwNotImplemented("getting a cursor for documents")}getOne(){r.throwNotImplemented("getting a single document")}remove(){r.throwNotImplemented("removing documents from a collection")}replaceOne(){r.throwNotImplemented("replacing a single document")}replaceOneAndGet(){r.throwNotImplemented("replacing/returning a single document")}}},2733:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),{Duplex:i}=n(2203),s=n(2269),o=n(8041),a=n(6770),u=n(6893);class _ extends i{constructor(){super({decodeStrings:!1}),this.offset=1,this._isActive=!1,this.once("finish",(function(){this._autoCloseLob&&this.destroy()}))}async _destroy(t,e){if(t&&t.message.startsWith("NJS-003:")&&delete this._impl,this._impl){const t=this._impl;delete this._impl;try{await t.close()}catch(t){return void e(t)}}e(t)}async _read(){try{const t=await this._serializedRead(this.offset);t?(this.offset+=t.length,this.push(t)):(this.push(null),this._autoCloseLob&&this.destroy())}catch(t){throw this._autoCloseLob&&this.destroy(t),t}}async _readData(t){o.assert(this._impl,o.ERR_INVALID_LOB);try{return await this._impl.read(t)}catch(t){throw o.transformErr(t,this._readData)}}_setup(t,e){this._impl=t,this._chunkSize=t.getChunkSize(),this._pieceSize=t.getPieceSize(),this._length=t.getLength(),this._type=t.getType(),"number"==typeof this._type&&(this._type=u.getTypeByNum(this._type)),this._autoCloseLob=e}async _write(t,e,n){this.type!=s.DB_TYPE_BLOB||r.isBuffer(t)?this.type==s.DB_TYPE_CLOB&&r.isBuffer(t)&&(t=t.toString()):t=r.from(t);try{await this._serializedWrite(this.offset,t)}catch(t){return this._autoCloseLob&&this.destroy(t),void n(t)}this.offset+=t.length,n(null)}async _writeData(t,e){o.assert(this._impl,o.ERR_INVALID_LOB);try{await this._impl.write(t,e)}catch(t){throw o.transformErr(t,this._writeData)}}get chunkSize(){return this._chunkSize}async close(){if(o.assertArgCount(arguments,0,0),this._impl){const t=this._impl;delete this._impl;try{await t.close(),this.emit("close")}catch(t){this.destroy(t)}}}async getData(t,e){return o.assertArgCount(arguments,0,2),void 0===t?t=1:o.assertParamValue(Number.isInteger(t)&&t>0,1),void 0===e?e=0:o.assertParamValue(Number.isInteger(e)&&e>0,2),o.assert(this._impl,o.ERR_INVALID_LOB),await this._impl.getData(t,e)}get length(){return this._length}get pieceSize(){return this._pieceSize}set pieceSize(t){o.assertPropValue(Number.isInteger(t)&&t>=0,"pieceSize"),o.assert(this._impl,o.ERR_INVALID_LOB),this._impl.setPieceSize(t),this._pieceSize=t}get type(){return this._type}}a.wrapFns(_.prototype,o.ERR_BUSY_LOB,"close","getData"),_.prototype._serializedRead=a.serialize(_.prototype._readData),_.prototype._serializedWrite=a.serialize(_.prototype._writeData),t.exports=_},6434:(t,e,n)=>{"use strict";const r=n(2269),i=n(6770),s=n(8041),o=n(6893),a=n(851),u=n(932),_=n(9023),c=u.version.substring(1).split(".").map(Number);s.assert(c[0]>14||14===c[0]&&c[1]>=6,s.ERR_NODE_TOO_OLD,i.PACKAGE_JSON_VERSION,"14.6");const l=n(856),h=n(596),T=n(1425),p=n(1337),f=n(5377),E=n(7647),d=n(6530),N=n(2733),S=n(7784),m=n(6287),A=n(9891),P=n(8023),g=n(198),y=n(7547),R=n(9947),I=n(3434),D=n(9698),O={},C={},b="default";let v;function w(){n(150)}async function L(t,e){const n={};if(void 0!==t.user&&(s.assertParamPropValue("string"==typeof t.user,1,"user"),n.user=t.user),void 0!==t.username&&(s.assert(void 0===n.user,s.ERR_DBL_USER),s.assertParamPropValue("string"==typeof t.username,1,"username"),n.user=t.username),void 0!==t.password&&(s.assertParamPropValue("string"==typeof t.password,1,"password"),n.password=t.password),void 0!==t.connectString&&(s.assertParamPropValue("string"==typeof t.connectString,1,"connectString"),n.connectString=t.connectString),void 0!==t.connectionString&&(s.assert(void 0===n.connectString,s.ERR_DBL_CONNECT_STRING),s.assertParamPropValue("string"==typeof t.connectionString,1,"connectionString"),n.connectString=t.connectionString),void 0!==t.walletPassword&&(s.assertParamPropValue("string"==typeof t.walletPassword,1,"walletPassword"),n.walletPassword=t.walletPassword),void 0!==t.walletLocation&&(s.assertParamPropValue("string"==typeof t.walletLocation,1,"walletLocation"),n.walletLocation=t.walletLocation),void 0!==t.edition&&(s.assertParamPropValue("string"==typeof t.edition,1,"edition"),n.edition=t.edition),void 0!==t.stmtCacheSize&&(s.assertParamPropValue(Number.isInteger(t.stmtCacheSize)&&t.stmtCacheSize>=0,1,"stmtCacheSize"),n.stmtCacheSize=t.stmtCacheSize),n.externalAuth=P.externalAuth,void 0!==t.externalAuth&&(s.assertParamPropValue("boolean"==typeof t.externalAuth,1,"externalAuth"),n.externalAuth=t.externalAuth),void 0!==t.events&&(s.assertParamPropValue("boolean"==typeof t.events,1,"events"),n.events=t.events),void 0!==t.poolAlias&&(s.assertParamPropValue("string"==typeof t.poolAlias&&t.poolAlias.length>0,1,"poolAlias"),n.poolAlias=t.poolAlias),void 0!==t.configDir&&(s.assertParamPropValue("string"==typeof t.configDir,1,"configDir"),n.configDir=t.configDir),void 0!==t.sslServerCertDN&&(s.assertParamPropValue("string"==typeof t.sslServerCertDN,1,"sslServerCertDN"),n.sslServerCertDN=t.sslServerCertDN),void 0!==t.sslServerDNMatch&&(s.assertParamPropValue("boolean"==typeof t.sslServerDNMatch,1,"sslServerDNMatch"),n.sslServerDNMatch=t.sslServerDNMatch),void 0!==t.sslAllowWeakDNMatch&&(s.assertParamPropValue("boolean"==typeof t.sslAllowWeakDNMatch,1,"sslAllowWeakDNMatch"),n.sslAllowWeakDNMatch=t.sslAllowWeakDNMatch),void 0!==t.httpsProxy&&(s.assertParamPropValue("string"==typeof t.httpsProxy,1,"httpsProxy"),n.httpsProxy=t.httpsProxy),void 0!==t.httpsProxyPort&&(s.assertParamPropValue(Number.isInteger(t.httpsProxyPort)&&t.httpsProxyPort>=0,1,"httpsProxyPort"),n.httpsProxyPort=t.httpsProxyPort),void 0!==t.retryCount&&(s.assertParamPropValue(Number.isInteger(t.retryCount)&&t.retryCount>=0,1,"retryCount"),n.retryCount=t.retryCount),void 0!==t.retryDelay&&(s.assertParamPropValue(Number.isInteger(t.retryDelay)&&t.retryDelay>=0,1,"retryDelay"),n.retryDelay=t.retryDelay),void 0!==t.connectTimeout&&(s.assertParamPropValue(Number.isInteger(t.connectTimeout)&&t.connectTimeout>=0,1,"connectTimeout"),n.connectTimeout=t.connectTimeout),void 0!==t.transportConnectTimeout&&(s.assertParamPropValue(Number.isInteger(t.transportConnectTimeout)&&t.transportConnectTimeout>=0,1,"transportConnectTimeout"),n.transportConnectTimeout=t.transportConnectTimeout),void 0!==t.expireTime&&(s.assertParamPropValue(Number.isInteger(t.expireTime)&&t.expireTime>=0,1,"expireTime"),n.expireTime=t.expireTime),void 0!==t.sdu&&(s.assertParamPropValue(Number.isInteger(t.sdu)&&t.sdu>0,1,"sdu"),n.sdu=t.sdu),void 0!==t.connectionIdPrefix&&(s.assertParamPropValue("string"==typeof t.connectionIdPrefix,1,"connectionIdPrefix"),n.connectionIdPrefix=t.connectionIdPrefix),void 0!==t.privilege&&(s.assertParamPropValue(i.isPrivilege(t.privilege),1,"privilege"),n.privilege=t.privilege),e)void 0!==t.poolMax&&(s.assertParamPropValue(Number.isInteger(t.poolMax)&&t.poolMax>0,1,"poolMax"),n.poolMax=t.poolMax),void 0!==t.poolMaxPerShard&&(s.assertParamPropValue(Number.isInteger(t.poolMaxPerShard)&&t.poolMaxPerShard>=0,1,"poolMaxPerShard"),n.poolMaxPerShard=t.poolMaxPerShard),void 0!==t.poolMin&&(s.assertParamPropValue(Number.isInteger(t.poolMin)&&t.poolMin>=0,1,"poolMin"),n.poolMin=t.poolMin),void 0!==t.poolIncrement&&(s.assertParamPropValue(Number.isInteger(t.poolIncrement)&&t.poolIncrement>=0,1,"poolIncrement"),n.poolIncrement=t.poolIncrement),void 0!==t.poolTimeout&&(s.assertParamPropValue(Number.isInteger(t.poolTimeout)&&t.poolTimeout>=0,1,"poolTimeout"),n.poolTimeout=t.poolTimeout),void 0!==t.poolPingInterval&&(s.assertParamPropValue(Number.isInteger(t.poolPingInterval)&&t.poolPingInterval>=-2147483648&&t.poolPingInterval<=2147483647,1,"poolPingInterval"),n.poolPingInterval=t.poolPingInterval),void 0!==t.poolPingTimeout&&(s.assertParamPropValue(Number.isInteger(t.poolPingTimeout)&&t.poolPingTimeout>=0,1,"poolPingTimeout"),n.poolPingTimeout=t.poolPingTimeout),n.homogeneous=!0,void 0!==t.homogeneous&&(s.assertParamPropValue("boolean"==typeof t.homogeneous,1,"homogeneous"),n.homogeneous=t.homogeneous),void 0!==t.queueTimeout&&(s.assertParamPropValue(Number.isInteger(t.queueTimeout)&&t.queueTimeout>=0,1,"queueTimeout"),n.queueTimeout=t.queueTimeout),void 0!==t.queueMax&&(s.assertParamPropValue(Number.isInteger(t.queueMax),1,"queueMax"),n.queueMax=t.queueMax),n.sodaMetaDataCache=!1,void 0!==t.sodaMetaDataCache&&(s.assertParamPropValue("boolean"==typeof t.sodaMetaDataCache,1,"sodaMetaDataCache"),n.sodaMetaDataCache=t.sodaMetaDataCache),void 0!==t.sessionCallback&&(s.assertParamPropValue("string"==typeof t.sessionCallback||"function"==typeof t.sessionCallback,1,"sessionCallback"),n.sessionCallback=t.sessionCallback),n.enableStatistics=!1,void 0!==t.enableStatistics&&(s.assertParamPropValue("boolean"==typeof t.enableStatistics,1,"enableStatistics"),n.enableStatistics=t.enableStatistics),n.enableStatistics||void 0===t._enableStats||(s.assertParamPropValue("boolean"==typeof t._enableStats,1,"_enableStats"),n.enableStatistics=t._enableStats);else{if(void 0!==t.newPassword&&(s.assertParamPropValue("string"==typeof t.newPassword,1,"newPassword"),n.newPassword=t.newPassword),void 0!==t.shardingKey){const e=t.shardingKey;s.assertParamPropValue(i.isShardingKey(e),1,"shardingKey"),n.shardingKey=t.shardingKey}if(void 0!==t.superShardingKey){const e=t.superShardingKey;s.assertParamPropValue(i.isShardingKey(e),1,"superShardingKey"),n.superShardingKey=t.superShardingKey}}if(void 0!==t.accessToken){let r;s.assert(void 0===n.user&&void 0===n.password,s.ERR_TOKEN_BASED_AUTH),e?s.assert(n.homogeneous&&n.externalAuth,s.ERR_POOL_TOKEN_BASED_AUTH):s.assert(n.externalAuth,s.ERR_CONN_TOKEN_BASED_AUTH),"function"==typeof t.accessToken?(n.accessTokenFn=t.accessToken,n.accessTokenConfig=t.accessTokenConfig,r=await t.accessToken(!1,t.accessTokenConfig),i.isTokenValid(r)||(r=await t.accessToken(!0,t.accessTokenConfig))):r=t.accessToken,s.assert(i.isTokenValid(r),s.ERR_TOKEN_HAS_EXPIRED),void 0!==r.privateKey&&(s.assert("string"==typeof r.privateKey,s.ERR_TOKEN_BASED_AUTH),r.privateKey=i.denormalizePrivateKey(r.privateKey)),"string"==typeof r?n.token=r:(n.token=r.token,n.privateKey=r.privateKey)}return void 0===n.token&&n.externalAuth&&(n.password&&s.throwErr(s.ERR_WRONG_CRED_FOR_EXTAUTH),n.user&&(e?s.throwErr(s.ERR_WRONG_CRED_FOR_EXTAUTH):"["===n.user[0]&&"]"===n.user.slice(-1)||s.throwErr(s.ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY))),n}t.exports={AqDeqOptions:l,AqEnqOptions:h,AqMessage:T,AqQueue:p,BaseDbObject:E,Connection:d,JsonId:o.JsonId,Lob:N,Pool:S,PoolStatistics:m,ResultSet:A,SodaDatabase:g,SodaCollection:y,SodaDocCursor:R,SodaDocument:I,SodaOperation:D,getConnection:i.callbackify((async function(t){let e,n={};if(s.assertArgCount(arguments,0,1),0==arguments.length?e=b:"string"==typeof t?e=t:(n=t,s.assertParamValue(i.isObject(n),1),e=n.poolAlias),e){const t=O[e];return s.assert(t,s.ERR_POOL_WITH_ALIAS_NOT_FOUND,e),await t.getConnection(n)}n=await L(n,!1),P.addToOptions(n,"connectionClass","edition","events","externalAuth","stmtCacheSize"),void 0!==v||P.thinDriverInitialized||w();const r=new d;return r._impl=new a.ConnectionImpl,await r._impl.connect(n),void 0===v&&(P.thinDriverInitialized=!0),r})),createPool:i.callbackify((async function(t){let e;s.assertArgCount(arguments,1,1),s.assertParamValue(i.isObject(t),1);const n=(t=await L(t,!0)).sessionCallback;"function"==typeof n&&delete t.sessionCallback,void 0!==t.poolAlias?e=t.poolAlias:void 0!==t.poolAlias||O[b]||C[b]||(e=b),(O[e]||C[e])&&s.throwErr(s.ERR_POOL_WITH_ALIAS_ALREADY_EXISTS,e),P.addToOptions(t,"connectionClass","edition","events","externalAuth","stmtCacheSize","poolMax","poolMaxPerShard","poolMin","poolIncrement","poolTimeout","poolPingInterval","poolPingTimeout","queueMax","queueTimeout"),t.poolMin>t.poolMax&&s.throwErr(s.ERR_INVALID_NUMBER_OF_CONNECTIONS,t.poolMax,t.poolMin),void 0!==v||P.thinDriverInitialized||w(),e&&(C[e]=!0);const r=new S;try{await r._impl.create(t)}finally{e&&delete C[e]}return e&&(O[e]=r),r._setup(t,e),r._sessionCallback=n,r.on("_afterPoolClose",(()=>{r.poolAlias&&delete O[r.poolAlias]})),void 0===v&&(P.thinDriverInitialized=!0),r})),getPool:function(t){s.assertArgCount(arguments,0,1),t&&s.assertParamValue("string"==typeof t||"number"==typeof t,1);const e=O[t=t||b];return e||s.throwErr(s.ERR_POOL_WITH_ALIAS_NOT_FOUND,t),e},initOracleClient:function(t){let e={};if(s.assertArgCount(arguments,0,1),void 0!==t&&(s.assertParamValue(i.isObject(t),1),e={...t},s.assertParamPropString(e,1,"libDir"),s.assertParamPropString(e,1,"configDir"),s.assertParamPropString(e,1,"errorUrl"),s.assertParamPropString(e,1,"driverName"),s.assertParamPropString(e,1,"binaryDir")),P.thinDriverInitialized&&s.throwErr(s.ERR_THIN_CONNECTION_ALREADY_CREATED),void 0===v){const o=function(t){const e="function"==typeof require?require:n(7342),r=["../"+i.RELEASE_DIR+"/"+i.BINARY_FILE,"../"+i.RELEASE_DIR+"/"+i.BUILD_FILE,"../build/Debug/"+i.BUILD_FILE,"./node_modules/oracledb/"+i.RELEASE_DIR+"/"+i.BINARY_FILE,"./node_modules/oracledb/"+i.RELEASE_DIR+"/"+i.BUILD_FILE];let o;void 0!==t.binaryDir&&r.splice(0,0,t.binaryDir+"/"+i.BINARY_FILE,t.binaryDir+"/"+i.BUILD_FILE);for(let t=0;t<r.length;t++)try{o=e(r[t]);break}catch(e){if("MODULE_NOT_FOUND"!==e.code||t==r.length-1){let t;t="MODULE_NOT_FOUND"===e.code?`\n Looked for ${r.map((t=>n(6928).resolve(__dirname,t))).join(", ")}\n ${i.getInstallURL()}\n`:`\n Node.js require('oracledb') error was:\n ${e.message}\n ${i.getInstallHelp()}\n`,s.throwErr(s.ERR_CANNOT_LOAD_BINARY,t)}}return o}(e);void 0===e.driverName&&(e.driverName=r.DEFAULT_DRIVER_NAME+" thk"),void 0===e.errorUrl&&(e.errorUrl=r.DEFAULT_ERROR_URL);try{o.initOracleClient(e,a,P)}catch(t){const e=s.transformErr(t);throw"DPI-1047"===e.code&&(e.message+="\n"+i.getInstallHelp()),e}v=t||{}}else _.isDeepStrictEqual(v,e)||s.throwErr(s.ERR_INIT_ORACLE_CLIENT_ARGS);P.thin=!1},shutdown:i.callbackify((async function(t,e){let n={},i=r.SHUTDOWN_MODE_DEFAULT;s.assertArgCount(arguments,0,2),2==arguments.length?(s.assertParamValue("object"==typeof t,1),s.assertParamValue("number"==typeof e,2),n=t,i=e):1==arguments.length&&(s.assertParamValue("object"==typeof t,1),n=t);const o={user:n.user,password:n.password,connectString:n.connectString,connectionString:n.connectionString,externalAuth:n.externalAuth,privilege:r.SYSOPER},a=await this.getConnection(o);await a.shutdown(i),i!=this.SHUTDOWN_MODE_ABORT&&(await a.execute("ALTER DATABASE CLOSE"),await a.execute("ALTER DATABASE DISMOUNT"),await a.shutdown(this.SHUTDOWN_MODE_FINAL)),await a.close()})),startup:i.callbackify((async function(t,e){let n={},r={};s.assertArgCount(arguments,0,2),2==arguments.length?(s.assertParamValue("object"==typeof t,1),s.assertParamValue("object"==typeof e,2),n=t,r=e):1==arguments.length&&(s.assertParamValue("object"==typeof t,1),n=t);const i={user:n.user,password:n.password,connectString:n.connectString,connectionString:n.connectionString,externalAuth:n.externalAuth,privilege:this.SYSOPER|this.SYSPRELIM};let o=await this.getConnection(i);await o.startup(r),await o.close(),i.privilege=this.SYSOPER,o=await this.getConnection(i),await o.execute("ALTER DATABASE MOUNT"),await o.execute("ALTER DATABASE OPEN"),await o.close()})),CQN_OPCODE_ALL_OPS:r.CQN_OPCODE_ALL_OPS,CQN_OPCODE_ALL_ROWS:r.CQN_OPCODE_ALL_ROWS,CQN_OPCODE_ALTER:r.CQN_OPCODE_ALTER,CQN_OPCODE_DELETE:r.CQN_OPCODE_DELETE,CQN_OPCODE_DROP:r.CQN_OPCODE_DROP,CQN_OPCODE_INSERT:r.CQN_OPCODE_INSERT,CQN_OPCODE_UPDATE:r.CQN_OPCODE_UPDATE,DB_TYPE_BFILE:o.DB_TYPE_BFILE,DB_TYPE_BINARY_DOUBLE:o.DB_TYPE_BINARY_DOUBLE,DB_TYPE_BINARY_FLOAT:o.DB_TYPE_BINARY_FLOAT,DB_TYPE_BINARY_INTEGER:o.DB_TYPE_BINARY_INTEGER,DB_TYPE_BLOB:o.DB_TYPE_BLOB,DB_TYPE_BOOLEAN:o.DB_TYPE_BOOLEAN,DB_TYPE_CHAR:o.DB_TYPE_CHAR,DB_TYPE_CLOB:o.DB_TYPE_CLOB,DB_TYPE_CURSOR:o.DB_TYPE_CURSOR,DB_TYPE_DATE:o.DB_TYPE_DATE,DB_TYPE_INTERVAL_DS:o.DB_TYPE_INTERVAL_DS,DB_TYPE_INTERVAL_YM:o.DB_TYPE_INTERVAL_YM,DB_TYPE_JSON:o.DB_TYPE_JSON,DB_TYPE_LONG:o.DB_TYPE_LONG,DB_TYPE_LONG_NVARCHAR:o.DB_TYPE_LONG_NVARCHAR,DB_TYPE_LONG_RAW:o.DB_TYPE_LONG_RAW,DB_TYPE_NCHAR:o.DB_TYPE_NCHAR,DB_TYPE_NCLOB:o.DB_TYPE_NCLOB,DB_TYPE_NUMBER:o.DB_TYPE_NUMBER,DB_TYPE_NVARCHAR:o.DB_TYPE_NVARCHAR,DB_TYPE_OBJECT:o.DB_TYPE_OBJECT,DB_TYPE_RAW:o.DB_TYPE_RAW,DB_TYPE_ROWID:o.DB_TYPE_ROWID,DB_TYPE_TIMESTAMP:o.DB_TYPE_TIMESTAMP,DB_TYPE_TIMESTAMP_LTZ:o.DB_TYPE_TIMESTAMP_LTZ,DB_TYPE_TIMESTAMP_TZ:o.DB_TYPE_TIMESTAMP_TZ,DB_TYPE_VARCHAR:o.DB_TYPE_VARCHAR,DB_TYPE_XMLTYPE:o.DB_TYPE_XMLTYPE,DB_TYPE_VECTOR:o.DB_TYPE_VECTOR,DEFAULT:r.DEFAULT,STMT_TYPE_UNKNOWN:r.STMT_TYPE_UNKNOWN,STMT_TYPE_SELECT:r.STMT_TYPE_SELECT,STMT_TYPE_UPDATE:r.STMT_TYPE_UPDATE,STMT_TYPE_DELETE:r.STMT_TYPE_DELETE,STMT_TYPE_INSERT:r.STMT_TYPE_INSERT,STMT_TYPE_CREATE:r.STMT_TYPE_CREATE,STMT_TYPE_DROP:r.STMT_TYPE_DROP,STMT_TYPE_ALTER:r.STMT_TYPE_ALTER,STMT_TYPE_BEGIN:r.STMT_TYPE_BEGIN,STMT_TYPE_DECLARE:r.STMT_TYPE_DECLARE,STMT_TYPE_CALL:r.STMT_TYPE_CALL,STMT_TYPE_EXPLAIN_PLAN:r.STMT_TYPE_EXPLAIN_PLAN,STMT_TYPE_MERGE:r.STMT_TYPE_MERGE,STMT_TYPE_ROLLBACK:r.STMT_TYPE_ROLLBACK,STMT_TYPE_COMMIT:r.STMT_TYPE_COMMIT,SHUTDOWN_MODE_DEFAULT:r.SHUTDOWN_MODE_DEFAULT,SHUTDOWN_MODE_TRANSACTIONAL:r.SHUTDOWN_MODE_TRANSACTIONAL,SHUTDOWN_MODE_TRANSACTIONAL_LOCAL:r.SHUTDOWN_MODE_TRANSACTIONAL_LOCAL,SHUTDOWN_MODE_IMMEDIATE:r.SHUTDOWN_MODE_IMMEDIATE,SHUTDOWN_MODE_ABORT:r.SHUTDOWN_MODE_ABORT,SHUTDOWN_MODE_FINAL:r.SHUTDOWN_MODE_FINAL,STARTUP_MODE_DEFAULT:r.STARTUP_MODE_DEFAULT,STARTUP_MODE_FORCE:r.STARTUP_MODE_FORCE,STARTUP_MODE_RESTRICT:r.STARTUP_MODE_RESTRICT,SUBSCR_EVENT_TYPE_SHUTDOWN:r.SUBSCR_EVENT_TYPE_SHUTDOWN,SUBSCR_EVENT_TYPE_SHUTDOWN_ANY:r.SUBSCR_EVENT_TYPE_SHUTDOWN_ANY,SUBSCR_EVENT_TYPE_STARTUP:r.SUBSCR_EVENT_TYPE_STARTUP,SUBSCR_EVENT_TYPE_DEREG:r.SUBSCR_EVENT_TYPE_DEREG,SUBSCR_EVENT_TYPE_OBJ_CHANGE:r.SUBSCR_EVENT_TYPE_OBJ_CHANGE,SUBSCR_EVENT_TYPE_QUERY_CHANGE:r.SUBSCR_EVENT_TYPE_QUERY_CHANGE,SUBSCR_EVENT_TYPE_AQ:r.SUBSCR_EVENT_TYPE_AQ,SUBSCR_GROUPING_CLASS_TIME:r.SUBSCR_GROUPING_CLASS_TIME,SUBSCR_GROUPING_TYPE_SUMMARY:r.SUBSCR_GROUPING_TYPE_SUMMARY,SUBSCR_GROUPING_TYPE_LAST:r.SUBSCR_GROUPING_TYPE_LAST,SUBSCR_NAMESPACE_AQ:r.SUBSCR_NAMESPACE_AQ,SUBSCR_NAMESPACE_DBCHANGE:r.SUBSCR_NAMESPACE_DBCHANGE,SUBSCR_QOS_BEST_EFFORT:r.SUBSCR_QOS_BEST_EFFORT,SUBSCR_QOS_DEREG_NFY:r.SUBSCR_QOS_DEREG_NFY,SUBSCR_QOS_QUERY:r.SUBSCR_QOS_QUERY,SUBSCR_QOS_RELIABLE:r.SUBSCR_QOS_RELIABLE,SUBSCR_QOS_ROWIDS:r.SUBSCR_QOS_ROWIDS,SYSASM:r.SYSASM,SYSBACKUP:r.SYSBACKUP,SYSDBA:r.SYSDBA,SYSDG:r.SYSDG,SYSKM:r.SYSKM,SYSOPER:r.SYSOPER,SYSPRELIM:r.SYSPRELIM,SYSRAC:r.SYSRAC,BIND_IN:r.BIND_IN,BIND_INOUT:r.BIND_INOUT,BIND_OUT:r.BIND_OUT,OUT_FORMAT_ARRAY:r.OUT_FORMAT_ARRAY,OUT_FORMAT_OBJECT:r.OUT_FORMAT_OBJECT,SODA_COLL_MAP_MODE:r.SODA_COLL_MAP_MODE,POOL_STATUS_OPEN:r.POOL_STATUS_OPEN,POOL_STATUS_DRAINING:r.POOL_STATUS_DRAINING,POOL_STATUS_CLOSED:r.POOL_STATUS_CLOSED,POOL_STATUS_RECONFIGURING:r.POOL_STATUS_RECONFIGURING,AQ_DEQ_NO_WAIT:r.AQ_DEQ_NO_WAIT,AQ_DEQ_WAIT_FOREVER:r.AQ_DEQ_WAIT_FOREVER,AQ_DEQ_MODE_BROWSE:r.AQ_DEQ_MODE_BROWSE,AQ_DEQ_MODE_LOCKED:r.AQ_DEQ_MODE_LOCKED,AQ_DEQ_MODE_REMOVE:r.AQ_DEQ_MODE_REMOVE,AQ_DEQ_MODE_REMOVE_NO_DATA:r.AQ_DEQ_MODE_REMOVE_NO_DATA,AQ_DEQ_NAV_FIRST_MSG:r.AQ_DEQ_NAV_FIRST_MSG,AQ_DEQ_NAV_NEXT_TRANSACTION:r.AQ_DEQ_NAV_NEXT_TRANSACTION,AQ_DEQ_NAV_NEXT_MSG:r.AQ_DEQ_NAV_NEXT_MSG,AQ_MSG_DELIV_MODE_PERSISTENT:r.AQ_MSG_DELIV_MODE_PERSISTENT,AQ_MSG_DELIV_MODE_BUFFERED:r.AQ_MSG_DELIV_MODE_BUFFERED,AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED:r.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,AQ_MSG_STATE_READY:r.AQ_MSG_STATE_READY,AQ_MSG_STATE_WAITING:r.AQ_MSG_STATE_WAITING,AQ_MSG_STATE_PROCESSED:r.AQ_MSG_STATE_PROCESSED,AQ_MSG_STATE_EXPIRED:r.AQ_MSG_STATE_EXPIRED,AQ_VISIBILITY_IMMEDIATE:r.AQ_VISIBILITY_IMMEDIATE,AQ_VISIBILITY_ON_COMMIT:r.AQ_VISIBILITY_ON_COMMIT,TPC_BEGIN_JOIN:r.TPC_BEGIN_JOIN,TPC_BEGIN_NEW:r.TPC_BEGIN_NEW,TPC_BEGIN_PROMOTE:r.TPC_BEGIN_PROMOTE,TPC_BEGIN_RESUME:r.TPC_BEGIN_RESUME,TPC_END_NORMAL:r.TPC_END_NORMAL,TPC_END_SUSPEND:r.TPC_END_SUSPEND,VECTOR_FORMAT_FLOAT32:r.VECTOR_FORMAT_FLOAT32,VECTOR_FORMAT_FLOAT64:r.VECTOR_FORMAT_FLOAT64,VECTOR_FORMAT_INT8:r.VECTOR_FORMAT_INT8,BLOB:o.DB_TYPE_BLOB,BUFFER:o.DB_TYPE_RAW,CLOB:o.DB_TYPE_CLOB,CURSOR:o.DB_TYPE_CURSOR,DATE:o.DB_TYPE_TIMESTAMP,NCLOB:o.DB_TYPE_NCLOB,NUMBER:o.DB_TYPE_NUMBER,STRING:o.DB_TYPE_VARCHAR,ARRAY:r.OUT_FORMAT_ARRAY,OBJECT:r.OUT_FORMAT_OBJECT,future:f,get autoCommit(){return P.autoCommit},get connectionClass(){return P.connectionClass},get dbObjectAsPojo(){return P.dbObjectAsPojo},get edition(){return P.edition},get errorOnConcurrentExecute(){return P.errorOnConcurrentExecute},get events(){return P.events},get externalAuth(){return P.externalAuth},get fetchArraySize(){return P.fetchArraySize},get fetchAsBuffer(){return P.fetchAsBuffer},get fetchAsString(){return P.fetchAsString},get fetchTypeHandler(){return P.fetchTypeHandler},get lobPrefetchSize(){return P.lobPrefetchSize},get maxRows(){return P.maxRows},get oracleClientVersion(){return P.oracleClientVersion},get oracleClientVersionString(){return P.oracleClientVersionString},get outFormat(){return P.outFormat},get poolIncrement(){return P.poolIncrement},get poolMax(){return P.poolMax},get poolMaxPerShard(){return P.poolMaxPerShard},get poolMin(){return P.poolMin},get poolPingInterval(){return P.poolPingInterval},get poolPingTimeout(){return P.poolPingTimeout},get poolTimeout(){return P.poolTimeout},get prefetchRows(){return P.prefetchRows},get stmtCacheSize(){return P.stmtCacheSize},get thin(){return P.thin},get version(){return 1e4*r.VERSION_MAJOR+100*r.VERSION_MINOR+r.VERSION_PATCH},get versionString(){return r.VERSION_STRING},get versionSuffix(){return r.VERSION_SUFFIX},set autoCommit(t){s.assertPropValue("boolean"==typeof t,"autoCommit"),P.autoCommit=t},set connectionClass(t){s.assertPropValue("string"==typeof t,"connectionClass"),P.connectionClass=t},set dbObjectAsPojo(t){s.assertPropValue("boolean"==typeof t,"dbObjectAsPojo"),P.dbObjectAsPojo=t},set edition(t){s.assertPropValue("string"==typeof t,"edition"),P.edition=t},set errorOnConcurrentExecute(t){s.assertPropValue("boolean"==typeof t,"errorOnConcurrentExecute"),P.errorOnConcurrentExecute=t},set events(t){s.assertPropValue("boolean"==typeof t,"events"),P.events=t},set externalAuth(t){s.assertPropValue("boolean"==typeof t,"externalAuth"),P.externalAuth=t},set fetchArraySize(t){s.assertPropValue(Number.isInteger(t)&&t>0,"fetchArraySize"),P.fetchArraySize=t},set fetchAsBuffer(t){s.assertPropValue(Array.isArray(t),"fetchAsBuffer"),P.createFetchTypeMap(P.fetchAsString,t),P.fetchAsBuffer=t},set fetchAsString(t){s.assertPropValue(Array.isArray(t),"fetchAsString"),P.createFetchTypeMap(t,P.fetchAsBuffer),P.fetchAsString=t},set fetchTypeHandler(t){void 0!==t&&s.assertPropValue("function"==typeof t,"fetchTypeHandler"),P.fetchTypeHandler=t},set lobPrefetchSize(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"lobPrefetchSize"),P.lobPrefetchSize=t},set maxRows(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"maxRows"),P.maxRows=t},set outFormat(t){t!==r.OUT_FORMAT_ARRAY&&t!==r.OUT_FORMAT_OBJECT&&s.throwErr(s.ERR_INVALID_PROPERTY_VALUE,"outFormat"),P.outFormat=t},set poolIncrement(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolIncrement"),P.poolIncrement=t},set poolMax(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolMax"),P.poolMax=t},set poolMaxPerShard(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolMaxPerShard"),P.poolMaxPerShard=t},set poolMin(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolMin"),P.poolMin=t},set poolPingInterval(t){s.assertPropValue(Number.isInteger(t)&&t<2**31&&t>=(-2)**31,"poolPingInterval"),P.poolPingInterval=t},set poolPingTimeout(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolPingTimeout"),P.poolPingTimeout=t},set poolTimeout(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"poolTimeout"),P.poolTimeout=t},set prefetchRows(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"prefetchRows"),P.prefetchRows=t},set stmtCacheSize(t){s.assertPropValue(Number.isInteger(t)&&t>=0,"stmtCacheSize"),P.stmtCacheSize=t}}},7784:(t,e,n)=>{"use strict";const r=n(6530),i=n(4434),s=n(2269),o=n(8041),a=n(8023),u=n(6770),_=n(851),c=n(6287);class l extends i{constructor(){super(),this._impl=new _.PoolImpl,this._queueMax=0,this._queueTimeout=0,this._enableStatistics=!1,this._timeOfReset=this._createdDate=Date.now(),this._sessionCallback=void 0,this._connRequestQueue=[],this._connectionClass=a.connectionClass}_checkPoolOpen(t){this.status===s.POOL_STATUS_DRAINING?o.throwErr(o.ERR_POOL_CLOSING):this.status===s.POOL_STATUS_CLOSED?o.throwErr(o.ERR_POOL_CLOSED):t||this.status===s.POOL_STATUS_RECONFIGURING&&o.throwErr(o.ERR_POOL_RECONFIGURING)}_checkRequestQueue(){let t=this._connectionsOut;for(;this._connRequestQueue.length>0&&t<this.poolMax;){t+=1;const e=this._connRequestQueue.shift();this._enableStatistics&&(this._totalRequestsDequeued+=1,this._updateWaitStatistics(e)),e.timeoutHandle&&clearTimeout(e.timeoutHandle),e.resolve()}}get _enableStats(){return this._enableStatistics}_resetStatistics(){this._timeOfReset=Date.now(),this._totalConnectionRequests=0,this._totalRequestsEnqueued=0,this._totalRequestsDequeued=0,this._totalFailedRequests=0,this._totalRequestsRejected=0,this._totalRequestTimeouts=0,this._maximumQueueLength=this._connRequestQueue.length,this._totalTimeInQueue=0,this._minTimeInQueue=0,this._maxTimeInQueue=0}_setup(t,e){this._queueTimeout=t.queueTimeout,this._queueMax=t.queueMax,this._enableStatistics=t.enableStatistics,this._edition=t.edition,this._eventsFlag=t.events,this._externalAuth=t.externalAuth,this._homogeneous=t.homogeneous,this._user=t.user,this._connectString=t.connectString,this._status=s.POOL_STATUS_OPEN,this._connectionsOut=0,this._poolAlias=e,this.on("_checkRequestQueue",this._checkRequestQueue),this._resetStatistics()}_updateWaitStatistics(t){const e=Date.now()-t.enqueuedTime;this._totalTimeInQueue+=e,0===this._minTimeInQueue?this._minTimeInQueue=e:this._minTimeInQueue=Math.min(this._minTimeInQueue,e),this._maxTimeInQueue=Math.max(this._maxTimeInQueue,e)}_verifyGetConnectionOptions(t){const e={};if(void 0!==t.user&&(o.assertParamPropValue("string"==typeof t.user,1,"user"),e.user=t.user),void 0!==t.username&&(o.assert(void 0===e.user,o.ERR_DBL_USER),o.assertParamPropValue("string"==typeof t.username,1,"username"),e.user=t.username),this.externalAuth&&e.user&&("["!==e.user[0]||"]"!==e.user.slice(-1))&&o.throwErr(o.ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY),void 0!==t.password&&(o.assertParamPropValue("string"==typeof t.password,1,"password"),this.externalAuth&&o.throwErr(o.ERR_WRONG_CRED_FOR_EXTAUTH),e.password=t.password),void 0!==t.tag&&(o.assertParamPropValue("string"==typeof t.tag,1,"tag"),e.tag=t.tag),void 0!==t.matchAnyTag&&(o.assertParamPropValue("boolean"==typeof t.matchAnyTag,1,"matchAnyTag"),e.matchAnyTag=t.matchAnyTag),void 0!==t.shardingKey){const n=t.shardingKey;o.assertParamPropValue(u.isShardingKey(n),1,"shardingKey"),e.shardingKey=t.shardingKey}if(void 0!==t.superShardingKey){const n=t.superShardingKey;o.assertParamPropValue(u.isShardingKey(n),1,"superShardingKey"),e.superShardingKey=t.superShardingKey}return void 0!==t.privilege&&(o.assertParamPropValue(u.isPrivilege(t.privilege),1,"privilege"),e.privilege=t.privilege),e}async close(t){let e=0,n=!1;o.assertArgCount(arguments,0,1),1==arguments.length&&(o.assertParamValue("number"==typeof t,1),(t<0||isNaN(t)||t>2**31)&&o.throwErr(o.ERR_INVALID_PARAMETER_VALUE,1),n=!0,this._connectionsOut>0&&(e=1e3*t)),this._checkPoolOpen(!1),e>0&&(this._status=s.POOL_STATUS_DRAINING,await new Promise((t=>{const n=setTimeout((()=>{this.removeAllListeners("_allCheckedIn"),t()}),e);this.once("_allCheckedIn",(()=>{clearTimeout(n),t()}))}))),!n&&this._connectionsOut>0&&o.throwErr(o.ERR_POOL_HAS_BUSY_CONNECTIONS),await this._impl.close(),this._status=s.POOL_STATUS_CLOSED,this.emit("_afterPoolClose")}get connectionsInUse(){return this._impl.getConnectionsInUse()}get connectionsOpen(){return this._impl.getConnectionsOpen()}get connectString(){return this._connectString}get thin(){return a.thin}get edition(){return this._edition}get enableStatistics(){return this._enableStatistics}get events(){return this._eventsFlag}get externalAuth(){return this._externalAuth}async getConnection(t){let e,n={};o.assertArgCount(arguments,0,1),1==arguments.length&&(o.assertParamValue(u.isObject(t),1),n=this._verifyGetConnectionOptions(t)),n.connectionClass=this._connectionClass,this._checkPoolOpen(!0),this._enableStatistics&&(this._totalConnectionRequests+=1);try{e=this.poolMax}catch(t){throw this._enableStatistics&&(this._totalFailedRequests+=1),t}(this._connectionsOut>=e||this.status===s.POOL_STATUS_RECONFIGURING)&&(this._connRequestQueue.length>=this._queueMax&&this._queueMax>=0&&(this._enableStatistics&&(this._totalRequestsRejected+=1),o.throwErr(o.ERR_QUEUE_MAX_EXCEEDED,this._queueMax)),await new Promise(((t,e)=>{const n={resolve:t,reject:e};0!==this._queueTimeout&&(n.timeoutHandle=setTimeout((()=>{const t=this._connRequestQueue.indexOf(n);t>=0&&this._connRequestQueue.splice(t,1),this._enableStatistics&&(this._totalRequestTimeouts+=1,this._updateWaitStatistics(n));try{o.throwErr(o.ERR_CONN_REQUEST_TIMEOUT,this._queueTimeout)}catch(t){e(t)}}),this._queueTimeout)),this._connRequestQueue.push(n),this._enableStatistics&&(n.enqueuedTime=Date.now(),this._totalRequestsEnqueued+=1,this._maximumQueueLength=Math.max(this._maximumQueueLength,this._connRequestQueue.length))})),this._checkPoolOpen(!0)),this._connectionsOut+=1;try{const t=new r;t._impl=await this._impl.getConnection(n),t._pool=this;const e=n.tag||"";if("function"==typeof this.sessionCallback&&(t._impl._newSession||t.tag!=e))try{await new Promise(((n,r)=>{this.sessionCallback(t,e,(function(t){t?r(t):n()}))}))}catch(e){throw await t.close({drop:!0}),e}return t.on("_afterConnClose",(()=>{this._connectionsOut-=1,this.emit("_checkRequestQueue"),0==this._connectionsOut&&this.emit("_allCheckedIn")})),t}catch(t){throw this._connectionsOut-=1,this._enableStatistics&&(this._totalFailedRequests+=1),this.emit("_checkRequestQueue"),t}}getStatistics(){return this._checkPoolOpen(!1),!0!==this._enableStatistics?null:new c(this)}get homogeneous(){return this._homogeneous}logStatistics(){const t=this.getStatistics();null===t&&o.throwErr(o.ERR_POOL_STATISTICS_DISABLED),t.logStatistics()}get poolAlias(){return this._poolAlias}get poolIncrement(){return this._impl.getPoolIncrement()}get poolMax(){return this._impl.getPoolMax()}get poolMaxPerShard(){return this._impl.getPoolMaxPerShard()}get poolMin(){return this._impl.getPoolMin()}get poolPingInterval(){return this._impl.getPoolPingInterval()}get poolPingTimeout(){return this._impl.getPoolPingTimeout()}get poolTimeout(){return this._impl.getPoolTimeout()}get queueMax(){return this._queueMax}get queueTimeout(){return this._queueTimeout}async reconfigure(t){o.assertArgCount(arguments,1,1),o.assertParamValue(u.isObject(t)),o.assertParamPropUnsignedInt(t,1,"queueMax"),o.assertParamPropUnsignedInt(t,1,"queueTimeout"),o.assertParamPropBool(t,1,"enableStatistics"),o.assertParamPropBool(t,1,"resetStatistics"),o.assertParamPropUnsignedInt(t,1,"poolMin"),o.assertParamPropUnsignedIntNonZero(t,1,"poolMax"),o.assertParamPropUnsignedInt(t,1,"poolMaxPerShard"),o.assertParamPropUnsignedInt(t,1,"poolIncrement"),o.assertParamPropInt(t,1,"poolPingInterval"),o.assertParamPropUnsignedInt(t,1,"poolTimeout"),o.assertParamPropUnsignedInt(t,1,"stmtCacheSize"),o.assertParamPropBool(t,1,"sodaMetaDataCache"),t.poolMin>t.poolMax&&o.throwErr(o.ERR_INVALID_NUMBER_OF_CONNECTIONS,t.poolMax,t.poolMin),this._checkPoolOpen(!1),this._status=s.POOL_STATUS_RECONFIGURING;try{await this._impl.reconfigure(t),(1==t.resetStatistics||1==t.enableStatistics&&0==this._enableStatistics)&&this._resetStatistics(),void 0!==t.queueMax&&(this._queueMax=t.queueMax),void 0!==t.queueTimeout&&(this._queueTimeout=t.queueTimeout),void 0!==t.enableStatistics&&(this._enableStatistics=t.enableStatistics)}finally{this._status=s.POOL_STATUS_OPEN}this.emit("_checkRequestQueue")}get sessionCallback(){return this._sessionCallback}async setAccessToken(t){o.assertArgCount(arguments,1,1),o.assertParamValue(u.isObject(t),1),o.assertParamPropString(t,1,"token"),o.assertParamPropString(t,1,"privateKey"),await this._impl.setAccessToken(t)}get sodaMetaDataCache(){return this._impl.getSodaMetaDataCache()}get status(){return this._status}get stmtCacheSize(){return this._impl.getStmtCacheSize()}get user(){return this._user}}l.prototype.close=u.callbackify(l.prototype.close),l.prototype.getConnection=u.callbackify(l.prototype.getConnection),l.prototype.reconfigure=u.callbackify(l.prototype.reconfigure),l.prototype.setAccessToken=u.callbackify(l.prototype.setAccessToken),l.prototype.terminate=l.prototype.close,l.prototype._logStats=l.prototype.logStatistics,t.exports=l},6287:(t,e,n)=>{"use strict";const r=n(932),i=n(8023);t.exports=class{constructor(t){let e=0;0!==t._totalRequestsEnqueued&&(e=Math.round(t._totalTimeInQueue/t._totalRequestsEnqueued)),this.gatheredDate=Date.now(),this.upTime=this.gatheredDate-t._createdDate,this.upTimeSinceReset=this.gatheredDate-t._timeOfReset,this.connectionRequests=t._totalConnectionRequests,this.requestsEnqueued=t._totalRequestsEnqueued,this.requestsDequeued=t._totalRequestsDequeued,this.failedRequests=t._totalFailedRequests,this.rejectedRequests=t._totalRequestsRejected,this.requestTimeouts=t._totalRequestTimeouts,this.maximumQueueLength=t._maximumQueueLength,this.currentQueueLength=t._connRequestQueue.length,this.timeInQueue=t._totalTimeInQueue,this.minimumTimeInQueue=t._minTimeInQueue,this.maximumTimeInQueue=t._maxTimeInQueue,this.averageTimeInQueue=e,this.connectionsInUse=t.connectionsInUse,this.connectionsOpen=t.connectionsOpen,this.connectString=t.connectString,this.edition=t.edition,this.events=t.events,this.externalAuth=t.externalAuth,this.homogeneous=t.homogeneous,this.poolAlias=t.poolAlias,this.poolIncrement=t.poolIncrement,this.poolMax=t.poolMax,this.poolMaxPerShard=t.poolMaxPerShard,this.poolMin=t.poolMin,this.poolPingInterval=t.poolPingInterval,this.poolPingTimeout=t.poolPingTimeout,this.poolTimeout=t.poolTimeout,this.queueMax=t.queueMax,this.queueTimeout=t.queueTimeout,this.sodaMetaDataCache=t.sodaMetaDataCache,this.stmtCacheSize=t.stmtCacheSize,this.user=t.user,this.threadPoolSize=r.env.UV_THREADPOOL_SIZE,this.thin=i.thin}logStatistics(){console.log("\nDriver:"),console.log("...thin mode:",this.thin),console.log("Pool statistics:"),console.log("...gathered at:",new Date(this.gatheredDate).toISOString()),console.log("...up time (milliseconds):",this.upTime),console.log("...up time from last reset (milliseconds)",this.upTimeSinceReset),console.log("...connection requests:",this.connectionRequests),console.log("...requests enqueued:",this.requestsEnqueued),console.log("...requests dequeued:",this.requestsDequeued),console.log("...requests failed:",this.failedRequests),console.log("...requests exceeding queueMax:",this.rejectedRequests),console.log("...requests exceeding queueTimeout:",this.requestTimeouts),console.log("...current queue length:",this.currentQueueLength),console.log("...maximum queue length:",this.maximumQueueLength),console.log("...sum of time in queue (milliseconds):",this.timeInQueue),console.log("...minimum time in queue (milliseconds):",this.minimumTimeInQueue),console.log("...maximum time in queue (milliseconds):",this.maximumTimeInQueue),console.log("...average time in queue (milliseconds):",this.averageTimeInQueue),console.log("...pool connections in use:",this.connectionsInUse),console.log("...pool connections open:",this.connectionsOpen),console.log("Pool attributes:"),console.log("...connectString:",this.connectString),console.log("...edition:",this.edition),console.log("...events:",this.events),console.log("...externalAuth:",this.externalAuth),console.log("...homogeneous:",this.homogeneous),console.log("...poolAlias:",this.poolAlias),console.log("...poolIncrement:",this.poolIncrement),console.log("...poolMax:",this.poolMax),console.log("...poolMaxPerShard:",this.poolMaxPerShard),console.log("...poolMin:",this.poolMin),console.log("...poolPingInterval (seconds):",this.poolPingInterval),console.log("...poolPingTimeout (milliseconds):",this.poolPingTimeout),console.log("...poolTimeout (seconds):",this.poolTimeout),console.log("...queueMax:",this.queueMax),console.log("...queueTimeout (milliseconds):",this.queueTimeout),console.log("...sessionCallback:",this.sessionCallback),console.log("...sodaMetaDataCache:",this.sodaMetaDataCache),console.log("...stmtCacheSize:",this.stmtCacheSize),console.log("...user:",this.user),console.log("Related environment variables:"),console.log("...UV_THREADPOOL_SIZE:",this.threadPoolSize)}}},8536:(t,e,n)=>{"use strict";const r=n(932),{Readable:i}=n(2203);t.exports=class extends i{constructor(t){super({objectMode:!0}),this._fetching=!1,this._numRows=0,t&&r.nextTick((()=>{this._open(t)}))}async _destroy(t,e){if(this._resultSet){const t=this._resultSet;this._resultSet=null,this._fetching&&await new Promise((t=>this.once("_doneFetching",t)));try{await t._impl.close()}catch(t){return void e(t)}}e(t)}_open(t){this._resultSet=t,this.emit("open"),this.emit("metadata",t.metaData)}async _read(){if(this._resultSet)try{this._fetching=!0,this._resultSet._allowGetRowCall=!0;const t=await this._resultSet.getRow();t?this.push(t):this.push(null)}catch(t){this.destroy(t)}finally{this._fetching=!1,this._resultSet?this._resultSet._allowGetRowCall=!1:this.emit("_doneFetching")}else this.once("open",this._read)}}},9891:(t,e,n)=>{"use strict";const r=n(8536),i=n(7647),s=n(6770),o=n(2269),a=n(2733),u=n(8041);class _{constructor(){this._rowCache=[],this._processingStarted=!1,this._convertedToStream=!1,this._allowGetRowCall=!1,this._isActive=!1}async _getAllRows(){try{let t=this._impl.maxRows,e=this._impl.fetchArraySize,n=[];for(;;){t>0&&e>=t&&(e=t);const r=await this._getRows(e);if(r&&(await this._processRows(r,!0),n=n.concat(r)),r.length==t||r.length<e)break;t>0&&(t-=r.length)}return n}finally{await this._impl.close(),delete this._impl}}async _getRows(t){let e={};return this._impl.nestedCursorIndices.length>0&&(e={connection:this._connection,outFormat:this._impl.outFormat,fetchArraySize:this._impl.fetchArraySize,dbObjectAsPojo:this._impl.dbObjectAsPojo,maxRows:this._impl.maxRows,fetchTypeMap:this._impl.fetchTypeMap}),await this._impl.getRows(t,e)}async _processRows(t,e){for(const n of this._impl.nestedCursorIndices)for(let r=0;r<t.length;r++){const i=t[r][n];if(i){const s=new _;s._setup(this._connection,i),this._impl.metaData[n].metaData=i.metaData,t[r][n]=e?await s._getAllRows():s}}for(const e of this._impl.lobIndices)for(let n=0;n<t.length;n++){const r=t[n][e];r&&(t[n][e]=new a)._setup(r,!0)}for(const e of this._impl.dbObjectIndices){const n=this._impl.metaData[e].dbTypeClass;for(let r=0;r<t.length;r++){const s=t[r][e];if(s){const o=t[r][e]=Object.create(n.prototype);o._impl=s,this._impl.dbObjectAsPojo?t[r][e]=o._toPojo():o.isCollection&&(t[r][e]=new Proxy(o,i._collectionProxyHandler))}}}for(const e of this._impl.converterIndices){const n=this._impl.metaData[e].converter;this._connection._impl._inProgress=!1;try{for(let r=0;r<t.length;r++){let i=n(t[r][e]);i instanceof Promise&&(i=await i),t[r][e]=i}}finally{this._connection._impl._inProgress=!0}}if(this._impl.outFormat===o.OUT_FORMAT_OBJECT)for(let e=0;e<t.length;e++){const n=t[e],r=t[e]={},i=this._impl.metaData;for(let t=0;t<i.length;t++)r[i[t].name]=n[t]}}_setup(t,e){this._connection=t,this._impl=e}async close(){u.assertArgCount(arguments,0,0),u.assert(this._impl&&this._connection._impl,u.ERR_INVALID_RS),this._convertedToStream&&u.throwErr(u.ERR_CANNOT_INVOKE_RS_METHODS),this._processingStarted=!0;const t=this._impl;delete this._impl,await t.close()}async getRow(){if(u.assertArgCount(arguments,0,0),u.assert(this._impl&&this._connection._impl,u.ERR_INVALID_RS),this._convertedToStream&&!this._allowGetRowCall&&u.throwErr(u.ERR_CANNOT_INVOKE_RS_METHODS),this._allowGetRowCall=!1,this._processingStarted=!0,0==this._rowCache.length){const t=await this._getRows(this._impl.fetchArraySize);await this._processRows(t,!1),this._rowCache=t}return this._rowCache.shift()}async getRows(t){let e,n;if(u.assertArgCount(arguments,0,1),u.assert(this._impl&&this._connection._impl,u.ERR_INVALID_RS),0==arguments.length?t=0:u.assertParamValue(Number.isInteger(t)&&t>=0,1),this._convertedToStream&&u.throwErr(u.ERR_CANNOT_INVOKE_RS_METHODS),this._processingStarted=!0,0==t){n=this._rowCache;const t=this._impl.fetchArraySize;for(;;){const e=await this._getRows(t);if(e&&(await this._processRows(e,!1),n=n.concat(e)),e.length<t)break}return n}if(0===this._rowCache.length)n=await this._getRows(t),await this._processRows(n,!1);else if(e=t-this._rowCache.length,e<=0)n=this._rowCache.splice(0,t);else{const t=await this._getRows(e);await this._processRows(t,!1),n=this._rowCache.concat(t),this._rowCache=[]}return n}get metaData(){if(this._impl)return this._impl.metaData}toQueryStream(){return u.assertArgCount(arguments,0,0),this._processingStarted&&u.throwErr(u.ERR_CANNOT_CONVERT_RS_TO_STREAM),this._convertedToStream&&u.throwErr(u.ERR_RS_ALREADY_CONVERTED),this._convertedToStream=!0,new r(this)}[Symbol.asyncIterator](){const t=this;return{async next(){const e=await t.getRow();return{value:e,done:void 0===e}},return:()=>({done:!0})}}}s.wrapFns(_.prototype,u.ERR_BUSY_RS,"close","getRow","getRows"),t.exports=_},8023:(t,e,n)=>{"use strict";const r=n(2269),i=n(8041),s=n(6893),o=n(6770),a=n(8774);t.exports=new class{constructor(){this.autoCommit=!1,this.connectionClass="",this.dbObjectAsPojo=!1,this.edition="",this.errorOnConcurrentExecute=!1,this.events=!1,this.externalAuth=!1,this.fetchArraySize=100,this.fetchAsBuffer=[],this.fetchAsString=[],this.lobPrefetchSize=16384,this.maxRows=0,this.outFormat=r.OUT_FORMAT_ARRAY,this.poolIncrement=1,this.poolMax=4,this.poolMaxPerShard=0,this.poolMin=0,this.poolPingInterval=60,this.poolPingTimeout=5e3,this.poolTimeout=60,this.prefetchRows=2,this.queueTimeout=6e4,this.queueMax=500,this.stmtCacheSize=30,this.thin=!0,this.thinDriverInitialized=!1,this.createFetchTypeMap(this.fetchAsString,this.fetchAsBuffer),this.fetchTypeHandler=void 0,this._JsonId=s.JsonId}_getDateComponents(t,e){return t?[e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),1e3*e.getMilliseconds()*1e3]:[e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),1e3*e.getUTCMilliseconds()*1e3]}_makeDate(t,e,n,r,i,s,a,u,_){return o.makeDate(t,e,n,r,i,s,a,u,_)}_decodeVector(t){return new a.VectorDecoder(t).decode()}_encodeVector(t){return(new a.VectorEncoder).encode(t)}addToOptions(t){for(let e=1;e<arguments.length;e++){const n=arguments[e];void 0===t[n]&&(t[n]=this[n])}}createFetchTypeMap(t,e){const n=new Map(s.DB_TYPE_FETCH_TYPE_MAP);for(const e of t)switch(e){case s.DB_TYPE_NUMBER:n.set(s.DB_TYPE_BINARY_DOUBLE,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_BINARY_FLOAT,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_BINARY_INTEGER,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_NUMBER,s.DB_TYPE_VARCHAR);break;case s.DB_TYPE_TIMESTAMP:n.set(s.DB_TYPE_DATE,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_TIMESTAMP,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_TIMESTAMP_TZ,s.DB_TYPE_VARCHAR),n.set(s.DB_TYPE_TIMESTAMP_LTZ,s.DB_TYPE_VARCHAR);break;case s.DB_TYPE_CLOB:case s.DB_TYPE_NCLOB:n.set(s.DB_TYPE_CLOB,s.DB_TYPE_LONG),n.set(s.DB_TYPE_NCLOB,s.DB_TYPE_LONG_NVARCHAR);break;case s.DB_TYPE_VECTOR:n.set(s.DB_TYPE_VECTOR,s.DB_TYPE_LONG);break;case s.DB_TYPE_RAW:n.set(s.DB_TYPE_RAW,s.DB_TYPE_VARCHAR);break;case s.DB_TYPE_JSON:n.set(s.DB_TYPE_JSON,s.DB_TYPE_VARCHAR);break;default:i.throwErr(i.ERR_INVALID_TYPE_FOR_CONVERSION)}for(const t of e)t===s.DB_TYPE_BLOB?n.set(s.DB_TYPE_BLOB,s.DB_TYPE_LONG_RAW):i.throwErr(i.ERR_INVALID_TYPE_FOR_CONVERSION);this.fetchTypeMap=n}}},7547:(t,e,n)=>{"use strict";const r=n(3434),i=n(9698),s=n(8041),o=n(6770),a=n(8023);class u{async createIndex(t){s.assertArgCount(arguments,1,1),s.assertParamValue(o.isObject(t),1);const e={autoCommit:a.autoCommit};return await this._impl.createIndex(JSON.stringify(t),e)}async drop(){s.assertArgCount(arguments,0,0);const t={autoCommit:a.autoCommit};return await this._impl.drop(t)}async dropIndex(t,e){const n={autoCommit:a.autoCommit};return s.assertArgCount(arguments,1,2),s.assertParamValue("string"==typeof t,1),2==arguments.length&&(s.assertParamValue("object"==typeof e,2),void 0!==e.force&&(s.assertParamPropValue("boolean"==typeof e.force,2,"force"),n.force=e.force)),await this._impl.dropIndex(t,n)}find(){s.assertArgCount(arguments,0,0);const t=new i;return t._impl=this._impl.find(),t}async getDataGuide(){s.assertArgCount(arguments,0,0);const t=new r;return t._impl=await this._impl.getDataGuide(),t}async insertMany(t){s.assertArgCount(arguments,1,1),s.assertParamValue(Array.isArray(t)&&t.length>0,1);const e=Array(t.length);for(let n=0;n<t.length;n++)e[n]=o.verifySodaDoc(t[n]);const n={autoCommit:a.autoCommit};await this._impl.insertMany(e,n)}async insertManyAndGet(t,e){const n={autoCommit:a.autoCommit};s.assertArgCount(arguments,1,2),s.assertParamValue(Array.isArray(t)&&t.length>0,1),2==arguments.length&&(s.assertParamValue(o.isObject(e),2),void 0!==e.hint&&(s.assertParamPropValue("string"==typeof e.hint,2,"hint"),n.hint=e.hint));const i=Array(t.length);for(let e=0;e<t.length;e++)i[e]=o.verifySodaDoc(t[e]);const u=await this._impl.insertManyAndGet(i,n);for(let e=0;e<t.length;e++)(i[e]=new r)._impl=u[e];return i}async insertOne(t){s.assertArgCount(arguments,1,1),t=o.verifySodaDoc(t);const e={autoCommit:a.autoCommit};await this._impl.insertOne(t,e)}async insertOneAndGet(t,e){const n={autoCommit:a.autoCommit};s.assertArgCount(arguments,1,2),t=o.verifySodaDoc(t),2==arguments.length&&(s.assertParamValue(o.isObject(e),2),void 0!==e.hint&&(s.assertParamPropValue("string"==typeof e.hint,2,"hint"),n.hint=e.hint));const i=new r;return i._impl=await this._impl.insertOneAndGet(t,n),i}async listIndexes(){return(await this._impl.listIndexes()).map((t=>JSON.parse(t)))}get metaData(){return JSON.parse(this._impl.getMetaData())}get name(){return this._impl.getName()}async save(t){s.assertArgCount(arguments,1,1),t=o.verifySodaDoc(t);const e={autoCommit:a.autoCommit};await this._impl.save(t,e)}async saveAndGet(t,e){s.assertArgCount(arguments,1,2),t=o.verifySodaDoc(t);const n={autoCommit:a.autoCommit};2==arguments.length&&(s.assertParamValue(o.isObject(e),2),void 0!==e.hint&&(s.assertParamPropValue("string"==typeof e.hint,2,"hint"),n.hint=e.hint));const i=new r;return i._impl=await this._impl.saveAndGet(t,n),i}async truncate(){s.assertArgCount(arguments,0,0),await this._impl.truncate()}}o.wrapFns(u.prototype,"createIndex","drop","dropIndex","getDataGuide","insertMany","insertManyAndGet","insertOne","insertOneAndGet","listIndexes","save","saveAndGet","truncate"),t.exports=u},198:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(7547),s=n(3434),o=n(8041),a=n(6770),u=n(8023);class _{_getConnection(){return this._connection}async createCollection(t,e){const n={autoCommit:u.autoCommit};o.assertArgCount(arguments,1,2),o.assertParamValue("string"==typeof t,1),2==arguments.length&&(o.assertParamValue(a.isObject(e),2),void 0!==e.mode&&(o.assertParamPropValue(Number.isInteger(e.mode)&&e.mode>0,2,"mode"),n.mode=e.mode),void 0!==e.metaData&&(o.assertParamPropValue(a.isObject(e.metaData),2,"metaData"),n.metaData=JSON.stringify(e.metaData)));const r=new i;return r._impl=await this._impl.createCollection(t,n),r}createDocument(t,e){let n={};o.assertArgCount(arguments,1,2),o.assertParamValue(r.isBuffer(t)||"string"==typeof t||a.isObject(t),1),arguments.length>1&&(o.assertParamValue(a.isObject(e),2),n=e,o.assertParamPropString(n,2,"key"),o.assertParamPropString(n,2,"mediaType")),"string"==typeof t?t=r.from(t):a.isObject(t)&&(t=r.from(JSON.stringify(t)));const i=new s;return i._impl=this._impl.createDocument(t,n),i}async getCollectionNames(t){let e={};return o.assertArgCount(arguments,0,1),1==arguments.length&&(o.assertParamValue(a.isObject(t),1),e=t,void 0!==e.startsWith&&o.assertParamPropValue("string"==typeof e.startsWith,1,"startsWith"),void 0!==e.limit&&o.assertParamPropValue(Number.isInteger(e.limit),1,"limit")),await this._impl.getCollectionNames(e)}async openCollection(t){o.assertArgCount(arguments,1,1),o.assertParamValue("string"==typeof t,1);const e={autoCommit:u.autoCommit},n=await this._impl.openCollection(t,e);if(n){const t=new i;return t._impl=n,t}}}a.wrapFns(_.prototype,"createCollection","getCollectionNames","openCollection"),t.exports=_},9947:(t,e,n)=>{"use strict";const r=n(8041),i=n(6770),s=n(3434);class o{async close(){r.assertArgCount(arguments,0,0),r.assert(this._impl,r.ERR_INVALID_SODA_DOC_CURSOR),await this._impl.close(),delete this._impl}async getNext(){r.assertArgCount(arguments,0,0),r.assert(this._impl,r.ERR_INVALID_SODA_DOC_CURSOR);const t=await this._impl.getNext();if(t){const e=new s;return e._impl=t,e}}[Symbol.asyncIterator](){const t=this;return{async next(){const e=await t.getNext();return{value:e,done:void 0===e}},return:()=>({done:!0})}}}i.wrapFns(o.prototype,"close","getNext"),t.exports=o},3434:t=>{"use strict";class e{get createdOn(){return this._impl.getCreatedOn()}getContent(){return JSON.parse(this._impl.getContentAsString())}getContentAsBuffer(){return this._impl.getContentAsBuffer()}getContentAsString(){return this._impl.getContentAsString()}get key(){return this._impl.getKey()}get lastModified(){return this._impl.getLastModified()}get mediaType(){return this._impl.getMediaType()}get version(){return this._impl.getVersion()}}e.prototype._sodaDocumentMarker=!0,t.exports=e},9698:(t,e,n)=>{"use strict";const r=n(9947),i=n(3434),s=n(8041),o=n(6770),a=n(8023);class u{constructor(){this._options={autoCommit:a.autoCommit,fetchArraySize:a.fetchArraySize}}async count(){return s.assertArgCount(arguments,0,0),await this._impl.count(this._options)}async getCursor(){s.assertArgCount(arguments,0,0);const t=new r;return t._impl=await this._impl.getCursor(this._options),t}async getDocuments(){s.assertArgCount(arguments,0,0);const t=await this._impl.getDocuments(this._options),e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=new i,e[n]._impl=t[n];return e}async getOne(){s.assertArgCount(arguments,0,0);const t=await this._impl.getOne(this._options);if(t){const e=new i;return e._impl=t,e}}lock(){return s.assertArgCount(arguments,0,0),this._options.lock=!0,this}async replaceOne(t){return s.assertArgCount(arguments,1,1),t=o.verifySodaDoc(t),await this._impl.replaceOne(this._options,t)}async replaceOneAndGet(t){s.assertArgCount(arguments,1,1),t=o.verifySodaDoc(t);const e=await this._impl.replaceOneAndGet(this._options,t);if(e){const t=new i;return t._impl=e,t}}async remove(){return s.assertArgCount(arguments,0,0),await this._impl.remove(this._options)}fetchArraySize(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(Number.isInteger(t)&&t>=0,1),this._options.fetchArraySize=t,this}filter(t){return s.assertArgCount(arguments,1,1),s.assertParamValue(o.isObject(t),1),this._options.filter=JSON.stringify(t),this}hint(t){return s.assertArgCount(arguments,1,1),s.assertParamValue("string"==typeof t,1),this._options.hint=t,this}key(t){return s.assertArgCount(arguments,1,1),s.assertParamValue("string"==typeof t,1),this._options.key=t,this._options.keys=void 0,this}keys(t){s.assertArgCount(arguments,1,1),s.assertParamValue(Array.isArray(t),1);for(let e=0;e<t.length;e++)s.assertParamValue("string"==typeof t[e],1);return this._options.keys=t,this._options.key=void 0,this}limit(t){return s.assertArgCount(arguments,1,1),s.assertParamValue("number"==typeof t,1),this._options.limit=t,this}skip(t){return s.assertArgCount(arguments,1,1),s.assertParamValue("number"==typeof t,1),this._options.skip=t,this}version(t){return s.assertArgCount(arguments,1,1),s.assertParamValue("string"==typeof t,1),this._options.version=t,this}}o.wrapFns(u.prototype,"count","getCursor","getDocuments","getOne","remove","replaceOne","replaceOneAndGet"),t.exports=u},7468:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(44),s=n(8625),o=n(1159),a=n(4583),{BaseBuffer:u}=n(1559),{NetworkSession:_}=n(7696),{Statement:c}=n(3483),l=n(2456),h=n(8881),T=n(3762),p=n(932),f=n(6893),E=n(8041),d=n(9448),N=n(8073),S=new global.FinalizationRegistry((t=>{t.disconnect()}));class m extends u{}t.exports=class extends i{async close(){try{if(this._protocol.txnInProgress&&await this.rollback(),this._drcpEnabled&&(await this._sessRelease(),this._drcpEstablishSession=!0),this._pool&&!this._dropSess)await this._pool.release(this);else{if(!this._drcpEnabled){const t=new d.LogOffMessage(this);await this._protocol._processMessage(t)}this.nscon.disconnect()}}catch(t){this.nscon.disconnect(h.NSFIMM)}}async _sessRelease(){const t=new d.SessionReleaseMessage(this);this.isPooled()||(t.sessReleaseMode=T.DRCP_DEAUTHENTICATE),await this._protocol._processMessage(t)}async _getElementTypeObj(t){const e=[{name:"owner",type:f.DB_TYPE_VARCHAR,dir:T.BIND_IN,maxSize:128,values:[t.schema]},{name:"name",type:f.DB_TYPE_VARCHAR,dir:T.BIND_IN,maxSize:128,values:[t.name]},{name:"package_name",type:f.DB_TYPE_VARCHAR,dir:T.BIND_IN,maxSize:128,values:[t.packageName]}];let n;t.packageName?n="\n select\n elem_type_owner,\n elem_type_name,\n elem_type_package\n from all_plsql_coll_types\n where owner = :owner\n and type_name = :name\n and package_name = :package_name":(e.pop(),n="\n select\n elem_type_owner,\n elem_type_name\n from all_coll_types\n where owner = :owner\n and type_name = :name");const r={connection:{_impl:this},prefetchRows:2},i=await this.execute(n,1,e,r,!1),s=await i.resultSet.getRows(1,r);await i.resultSet.close();const o=s[0];t.elementTypeClass=this._getDbObjectType(o[0],o[1],o[2]),t.elementTypeClass.partial&&this._partialDbObjectTypes.push(t.elementTypeClass)}async _execute(t,e,n,r,i){const s=t.bindInfoList.length,o=n.length;s===o||0!==o&&n[0].name||E.throwErr(E.ERR_WRONG_NUMBER_OF_POSITIONAL_BINDS,s,o);for(let e=0;e<n.length;e++)await this._bind(t,n[e],e+1);t.isPlSql&&(r.batchErrors||r.dmlRowCounts)&&E.throwErr(E.ERR_EXEC_MODE_ONLY_FOR_DML);const a=new d.ExecuteMessage(this,t,r);a.numExecs=e,a.arrayDmlRowCounts=r.dmlRowCounts,a.batchErrors=r.batchErrors,t.isPlSql&&(0===t.cursorId||t.requiresFullExecute)&&(a.numExecs=1,a.noImplicitRelease=!0,await this._protocol._processMessage(a),t.requiresFullExecute=!1,a.numExecs=e-1,a.offset=1,a.noImplicitRelease=!1),a.numExecs>0&&(await this._protocol._processMessage(a),t.requiresFullExecute=!1),t.requiresDefine&&t.sql&&(t.requiresFullExecute=!0,await this._protocol._processMessage(a),t.requiresFullExecute=!1,t.requiresDefine=!1);const u={};if(a.warning&&(u.warning=a.warning),t.numQueryVars>0)u.resultSet=a.resultSet;else{t.bufferRowIndex=0;const n=l.getOutBinds(t,e,i);n&&(u.outBinds=n),i?(t.isPlSql||(u.rowsAffected=t.rowCount,delete t.rowCount),r.dmlRowCounts&&(u.dmlRowCounts=r.dmlRowCounts),r.batchErrors&&(u.batchErrors=r.batchErrors)):(t.isPlSql&&r.implicitResultSet&&(u.implicitResults=r.implicitResultSet),t.lastRowid&&(u.lastRowid=t.lastRowid,delete t.lastRowid),t.isPlSql?t.rowCount&&(u.rowsAffected=t.rowCount):u.rowsAffected=t.rowCount||0,t.rowCount&&delete t.rowCount),this._returnStatement(t)}return u}_parseTDSAttr(t,e){let n,r,i;for(;;)if(i=t.readUInt8(),i===T.TNS_OBJ_TDS_TYPE_EMBED_ADT_INFO)t.skipBytes(1);else if(i!==T.TNS_OBJ_TDS_TYPE_SUBTYPE_MARKER)break;switch(i){case T.TNS_OBJ_TDS_TYPE_NUMBER:return e.precision=t.readInt8(),e.scale=t.readInt8(),f.DB_TYPE_NUMBER;case T.TNS_OBJ_TDS_TYPE_FLOAT:return e.precision=t.readInt8(),f.DB_TYPE_NUMBER;case T.TNS_OBJ_TDS_TYPE_VARCHAR:case T.TNS_OBJ_TDS_TYPE_CHAR:return e.maxSize=t.readUInt16BE(),n=i===T.TNS_OBJ_TDS_TYPE_VARCHAR?T.TNS_DATA_TYPE_VARCHAR:T.TNS_DATA_TYPE_CHAR,r=t.readUInt8(),r&=127,t.skipBytes(2),f.getTypeByOraTypeNum(n,r);case T.TNS_OBJ_TDS_TYPE_RAW:return e.maxSize=t.readUInt16BE(),f.DB_TYPE_RAW;case T.TNS_OBJ_TDS_TYPE_BINARY_FLOAT:return f.DB_TYPE_BINARY_FLOAT;case T.TNS_OBJ_TDS_TYPE_BINARY_DOUBLE:return f.DB_TYPE_BINARY_DOUBLE;case T.TNS_OBJ_TDS_TYPE_DATE:return f.DB_TYPE_DATE;case T.TNS_OBJ_TDS_TYPE_TIMESTAMP:return t.skipBytes(1),f.DB_TYPE_TIMESTAMP;case T.TNS_OBJ_TDS_TYPE_TIMESTAMP_LTZ:return t.skipBytes(1),f.DB_TYPE_TIMESTAMP_LTZ;case T.TNS_OBJ_TDS_TYPE_TIMESTAMP_TZ:return t.skipBytes(1),f.DB_TYPE_TIMESTAMP_TZ;case T.TNS_OBJ_TDS_TYPE_BOOLEAN:return f.DB_TYPE_BOOLEAN;case T.TNS_OBJ_TDS_TYPE_CLOB:return f.DB_TYPE_CLOB;case T.TNS_OBJ_TDS_TYPE_BLOB:return f.DB_TYPE_BLOB;case T.TNS_OBJ_TDS_TYPE_OBJ:return t.skipBytes(5),f.DB_TYPE_OBJECT;case T.TNS_OBJ_TDS_TYPE_START_EMBED_ADT:for(;0!==this._parseTDSAttr(t,{}););return f.DB_TYPE_OBJECT;case T.TNS_OBJ_TDS_TYPE_END_EMBED_ADT:return 0;default:E.throwErr(E.ERR_TDS_TYPE_NOT_SUPPORTED,i)}}async _parseTDS(t,e){const n=new m(t);n.skipBytes(4),n.skipBytes(2),n.skipBytes(2);const r=n.readUInt16BE();if(n.skipBytes(1),n.skipBytes(1),n.skipBytes(2),n.skipBytes(4),e.isCollection=!1,1===r){const t=n.pos;n.readUInt8()===T.TNS_OBJ_TDS_TYPE_COLL?e.isCollection=!0:n.pos=t}if(e.isCollection){const t=n.readUInt32BE();e.maxNumElements=n.readUInt32BE(),e.collectionType=n.readUInt8(),e.collectionType===T.TNS_OBJ_PLSQL_INDEX_TABLE&&(e.collectionFlags=T.TNS_OBJ_HAS_INDEXES),n.pos=t,e.elementTypeInfo={},e.elementType=this._parseTDSAttr(n,e.elementTypeInfo),e.elementType===f.DB_TYPE_OBJECT&&await this._getElementTypeObj(e)}else if(e.attributes)for(const t of e.attributes)this._parseTDSAttr(n,t)}async _populateDbObjectTypeInfo(t){const e=[{name:"full_name",type:f.DB_TYPE_VARCHAR,dir:T.BIND_INOUT,maxSize:500,values:[t]},{name:"ret_val",type:f.DB_TYPE_BINARY_INTEGER,dir:T.BIND_OUT,values:[]},{name:"oid",type:f.DB_TYPE_RAW,maxSize:16,dir:T.BIND_OUT,values:[]},{name:"version",type:f.DB_TYPE_BINARY_INTEGER,dir:T.BIND_OUT,values:[]},{name:"tds",type:f.DB_TYPE_RAW,maxSize:2e3,dir:T.BIND_OUT,values:[]},{name:"attrs_rc",type:f.DB_TYPE_CURSOR,dir:T.BIND_OUT,values:[]},{name:"package_name",type:f.DB_TYPE_VARCHAR,maxSize:128,dir:T.BIND_OUT,values:[]},{name:"schema",type:f.DB_TYPE_VARCHAR,maxSize:128,dir:T.BIND_OUT,values:[]},{name:"name",type:f.DB_TYPE_VARCHAR,maxSize:128,dir:T.BIND_OUT,values:[]}],n={connection:{_impl:this},nullifyInvalidCursor:!0},r=await this.execute("\n declare\n t_Instantiable varchar2(3);\n t_SuperTypeOwner varchar2(128);\n t_SuperTypeName varchar2(128);\n t_SubTypeRefCursor sys_refcursor;\n t_Pos pls_integer;\n begin\n :ret_val := dbms_pickler.get_type_shape(:full_name, :oid,\n :version, :tds, t_Instantiable, t_SuperTypeOwner,\n t_SuperTypeName, :attrs_rc, t_SubTypeRefCursor);\n :package_name := null;\n if substr(:full_name, length(:full_name) - 7) = '%ROWTYPE' then\n t_Pos := instr(:full_name, '.');\n :schema := substr(:full_name, 1, t_Pos - 1);\n :name := substr(:full_name, t_Pos + 1);\n else\n begin\n select owner, type_name\n into :schema, :name\n from all_types\n where type_oid = :oid;\n exception\n when no_data_found then\n begin\n select owner, package_name, type_name\n into :schema, :package_name, :name\n from all_plsql_types\n where type_oid = :oid;\n exception\n when no_data_found then\n null;\n end;\n end;\n end if;\n end;",1,e,n,!1);0!==r.outBinds.ret_val&&E.throwErr(E.ERR_INVALID_OBJECT_TYPE_NAME,t);const i=this._getDbObjectType(r.outBinds.schema,r.outBinds.name,r.outBinds.package_name,r.outBinds.oid);if(!i.partial)return i;i.version=r.outBinds.version;const s=await r.outBinds.attrs_rc.getRows(1e3,{});if(s.length>0){i.attributes=[];for(const t of s){const e={name:t[1]};t[4]?(e.type=f.DB_TYPE_OBJECT,e.typeClass=this._getDbObjectType(t[4],t[3],t[5],t[6]),e.typeClass.partial&&this._partialDbObjectTypes.push(e.typeClass)):e.type=f.getTypeByColumnTypeName(t[3]),i.attributes.push(e)}}return await this._parseTDS(r.outBinds.tds,i),i.partial=!1,i}async _populatePartialDbObjectTypes(){for(;this._partialDbObjectTypes.length>0;){const t=this._partialDbObjectTypes.pop();let e,n="%ROWTYPE",r=t.name;r.endsWith(n)?r=r.substring(0,r.length-n.length):n="",e=t.packageName?`"${t.schema}"."${t.packageName}"."${r}"${n}`:`"${t.schema}"."${r}"${n}`,await this._populateDbObjectTypeInfo(e)}}async commit(){const t=new d.CommitMessage(this);await this._protocol._processMessage(t)}async breakExecution(){await this._protocol.breakMessage()}isHealthy(){try{return 0===this.nscon.recvInbandNotif()}catch{return!1}}isPooled(){return!!this._pool}async connect(t){let e;t.connectString||E.throwErr(E.ERR_EMPTY_CONNECT_STRING),l.checkCredentials(t),this.sessionID=0,this.serialNum=0,this.autoCommit=!1,this.serverVersion="",this.statementCache=null,this.currentSchema="",this.invokeSessionCallback=!0,this.statementCacheSize=t.stmtCacheSize,this._currentSchemaModified=!1,this._tempLobsToClose=[],this._tempLobsTotalSize=0,this._drcpEstablishSession=!1,this._cclass=null,this._clientIdentifier="",this._clientIdentifierModified=!1,this._action="",this._actionModified=!1,this._dbOp="",this._dbOpModified=!1,this._clientInfo="",this._clientInfoModified=!1,this._module="",this._moduleModified=!1,this._drcpEnabled=!1,this.serviceName="",this.remoteAddress="",this.comboKey=null,this.nscon=new _,S.register(this,this.nscon),await this.nscon.connect(t),this.isPooled()?(e=t._connInfo[0],this.serviceName=t._connInfo[2],this.purity=t._connInfo[3]|T.PURITY_DEFAULT,this.sid=t._connInfo[4]):(e=this.nscon.getOption(h.SERVERTYPE),this.serviceName=this.nscon.getOption(h.SVCNAME),this.sid=this.nscon.getOption(h.SID),this.purity=this.nscon.getOption(h.PURITY)|T.PURITY_DEFAULT),e&&(this._drcpEnabled="pooled"===e.toLowerCase()),this.remoteAddress=this.nscon.getOption(h.REMOTEADDR),this.connectionClass=t.connectionClass,this.purity===T.PURITY_DEFAULT&&this._drcpEnabled&&(this.isPooled()?this.purity=T.PURITY_SELF:this.purity=T.PURITY_NEW),this._protocol=new a(this),this._protocol.caps.protocolVersion<T.TNS_VERSION_MIN_ACCEPTED&&E.throwErr(E.ERR_SERVER_VERSION_NOT_SUPPORTED);try{const e=new d.ProtocolMessage(this),n=new d.DataTypeMessage(this),r=new d.AuthMessage(this,t);if(this.nscon.supportsFastAuth){const t=new d.FastAuthMessage(this);t.protocolMessage=e,t.dataTypeMessage=n,t.authMessage=r,await this._protocol._processMessage(t),t.reNegotiate&&(await this._protocol._processMessage(n),await this._protocol._processMessage(r))}else await this._protocol._processMessage(e),await this._protocol._processMessage(n),await this._protocol._processMessage(r);t.token||await this._protocol._processMessage(r)}catch(t){throw this.nscon.disconnect(),t}this.statementCache=new N(this.statementCacheSize),this._partialDbObjectTypes=[],t.debugJDWP?this.jdwpData=r.from(t.debugJDWP):p.env.ORA_DEBUG_JDWP&&(this.jdwpData=r.from(p.env.ORA_DEBUG_JDWP)),this._protocol.connInProgress=!1}_returnStatement(t){this.statementCache.returnStatement(t)}_prepare(t,e){const n=this._getStatement(t,e.keepInStmtCache);return n.bufferRowIndex=0,n.bufferRowCount=0,n.lastRowIndex=0,n.moreRowsToFetch=!0,n}async _bind(t,e,n=0){const r=t.bindInfoDict,i=t.bindInfoList;if(t.isPlSql&&e.maxSize>32767){e.type===f.DB_TYPE_RAW||e.type===f.DB_TYPE_LONG_RAW?e.type=f.DB_TYPE_BLOB:e.type._csfrm===T.CSFRM_NCHAR?e.type=f.DB_TYPE_NCLOB:e.type=f.DB_TYPE_CLOB;const t=e.maxSize;delete e.maxSize,e.outConverter=async function(e){if(null===e)return null;const n=await e.getData(),r=e._length;return n&&r>t&&E.throwErr(E.ERR_INSUFFICIENT_BUFFER_FOR_BINDS),n}}if(e.type===f.DB_TYPE_CLOB||e.type===f.DB_TYPE_NCLOB||e.type===f.DB_TYPE_BLOB)for(const[t,n]of e.values.entries())if(!(n instanceof o))if(n&&n.length>0){const r=new o;await r.create(this,e.type),await r.write(1,n),e.values[t]=r}else e.values[t]=null;if(e.name){let n;n=e.name.startsWith('"')&&e.name.endsWith('"')?e.name.substring(1,e.name.length-1):e.name.toUpperCase(),n.startsWith(":")&&(n=e.name.substring(1)),r.has(n)||E.throwErr(E.ERR_INVALID_BIND_NAME,n),r.get(n).forEach((n=>{t._setVariable(n,e)}))}else{const r=i[n-1];t._setVariable(r,e)}}_createResultSet(t,e){const n=new s;if(e||(e=new c),n._resultSetNew(this,e,t),e.queryVars.length>0){const r=l.getMetadataMany(e.queryVars);n._setup(t,r)}return n}async getDbObjectClass(t){const e=await this._populateDbObjectTypeInfo(t);return await this._populatePartialDbObjectTypes(),e}async getStatementInfo(t){const e={},n={},r=this._prepare(t,e);e.connection=this;try{if(!r.isDdl){const t=new d.ExecuteMessage(this,r,e);t.parseOnly=!0,await this._protocol._processMessage(t)}return r.numQueryVars>0&&(n.metaData=l.getMetadataMany(r.queryVars)),n.bindNames=Array.from(r.bindInfoDict.keys()),n.statementType=r.statementType,n}finally{this._returnStatement(r)}}async execute(t,e,n,r,i){const s=this._prepare(t,r);try{return await this._execute(s,e,n,r,i)}catch(t){throw this._returnStatement(s),t}}_getStatement(t,e=!1){return this.statementCache.getStatement(t,e,this._drcpEstablishSession)}async ping(){const t=new d.PingMessage(this);await this._protocol._processMessage(t)}async rollback(){const t=new d.RollbackMessage(this);await this._protocol._processMessage(t)}getOracleServerVersion(){return this.serverVersion}getOracleServerVersionString(){return this.serverVersionString}setCurrentSchema(t){this._currentSchemaModified=!0,this.currentSchema=t}getCurrentSchema(){return this.currentSchema}setClientId(t){this._clientIdentifierModified=!0,this._clientIdentifier=t}setDbOp(t){this._dbOpModified=!0,this._dbOp=t}setClientInfo(t){this._clientInfoModified=!0,this._clientInfo=t}setModule(t){this._moduleModified=!0,this._module=t,this._actionModified=!0}setAction(t){this._actionModified=!0,this._action=t}async changePassword(t,e,n){const r={user:t,newPassword:n,password:e,changePassword:!0},i=new d.AuthMessage(this,r);await this._protocol._processMessage(i)}async createLob(t){const e=new o;return await e.create(this,t),e}getStmtCacheSize(){return this.statementCache._maxSize}setCallTimeout(t){this._protocol.callTimeout=t}getCallTimeout(){return this._protocol.callTimeout}getTag(){return""}getInstanceName(){return this.instanceName}getDbDomain(){return this.dbDomain}getDbName(){return this.dbName}getMaxOpenCursors(){return this.maxOpenCursors}getServiceName(){return this.serviceName}getTransactionInProgress(){return this._protocol.txnInProgress}getWarning(){return this.warning}}},4785:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(8041),o=n(6893),a=n(3034),{GrowableBuffer:u}=n(1559),_=n(1159);class c extends u{_readBytesWithLength(t){return t===i.TNS_LONG_LENGTH_INDICATOR&&(t=this.readUInt32BE()),this.readBytes(t)}getIsAtomicNull(){const t=this.readUInt8();return t===i.TNS_OBJ_ATOMIC_NULL||t===i.TNS_NULL_LENGTH_INDICATOR||(this.pos-=1,!1)}readHeader(t){if(t.imageFlags=this.readUInt8(),t.imageVersion=this.readUInt8(),this.readLength(),!(t.imageFlags&i.TNS_OBJ_NO_PREFIX_SEG)){const t=this.readLength();this.skipBytes(t)}}readLength(){const t=this.readUInt8();return t!==i.TNS_LONG_LENGTH_INDICATOR?t:this.readUInt32BE()}writeHeader(t){this.writeUInt8(t.imageFlags),this.writeUInt8(t.imageVersion),this.writeUInt8(i.TNS_LONG_LENGTH_INDICATOR),this.writeUInt32BE(0),t._objType.isCollection&&(this.writeUInt8(1),this.writeUInt8(1))}writeLength(t){t<=i.TNS_OBJ_MAX_SHORT_LENGTH?this.writeUInt8(t):(this.writeUInt8(i.TNS_LONG_LENGTH_INDICATOR),this.writeUInt32BE(t))}_writeRawBytesAndLength(t,e){this.writeLength(e),this.writeBytes(t)}}class l extends a{constructor(t,e){if("function"==typeof t&&(t=t.prototype._objType),super(t),this.packedData=e,this.unpackedAttrs=new Map,e)this.unpackedAssocArray=new Map,this.unpackedAssocKeys=void 0;else if(t){const e=r.from([0,34,i.TNS_OBJ_NON_NULL_OID,i.TNS_OBJ_HAS_EXTENT_OID]);this.toid=r.concat([e,t.oid,i.TNS_EXTENT_OID]),this.flags=i.TNS_OBJ_TOP_LEVEL,this.imageFlags=i.TNS_OBJ_IS_VERSION_81,this.imageVersion=i.TNS_OBJ_IMAGE_VERSION,t.isCollection?(this.imageFlags|=i.TNS_OBJ_IS_COLLECTION,t.collectionType===i.TNS_OBJ_PLSQL_INDEX_TABLE?this.unpackedAssocArray=new Map:this.unpackedArray=[]):this.imageFlags|=i.TNS_OBJ_NO_PREFIX_SEG}}_ensureAssocKeys(){this.unpackedAssocKeys||(this.unpackedAssocKeys=[...this.unpackedAssocArray.keys()].sort())}_ensureUnpacked(){this.packedData&&this._unpackData()}_getPackedData(){if(this.packedData)return this.packedData;const t=new c;t.writeHeader(this),this._packData(t);const e=t.pos;return t.pos=3,t.writeUInt32BE(e),t.buf.subarray(0,e)}_packData(t){const e=this._objType;if(e.isCollection)if(t.writeUInt8(e.collectionFlags),e.collectionType===i.TNS_OBJ_PLSQL_INDEX_TABLE){this._ensureAssocKeys(),t.writeLength(this.unpackedAssocKeys.length);for(const n of this.unpackedAssocKeys)t.writeInt32BE(n),this._packValue(t,e.elementType,e.elementTypeClass,this.unpackedAssocArray.get(n))}else{t.writeLength(this.unpackedArray.length);for(const n of this.unpackedArray)this._packValue(t,e.elementType,e.elementTypeClass,n)}else for(const n of e.attributes)this._packValue(t,n.type,n.typeClass,this.unpackedAttrs.get(n.name))}_packValue(t,e,n,a){if(null==a)n&&!n.prototype.isCollection?t.writeUInt8(i.TNS_OBJ_ATOMIC_NULL):t.writeUInt8(i.TNS_NULL_LENGTH_INDICATOR);else switch(e){case o.DB_TYPE_CHAR:case o.DB_TYPE_VARCHAR:t.writeBytesWithLength(r.from(a));break;case o.DB_TYPE_NCHAR:case o.DB_TYPE_NVARCHAR:t.writeBytesWithLength(r.from(a,"utf16le").swap16());break;case o.DB_TYPE_NUMBER:t.writeOracleNumber(a.toString());break;case o.DB_TYPE_BINARY_INTEGER:case o.DB_TYPE_BOOLEAN:t.writeUInt8(4),t.writeUInt32BE(a);break;case o.DB_TYPE_RAW:t.writeBytesWithLength(a);break;case o.DB_TYPE_BINARY_DOUBLE:t.writeUInt8(8),t.writeBinaryDouble(a);break;case o.DB_TYPE_BINARY_FLOAT:t.writeUInt8(4),t.writeBinaryFloat(a);break;case o.DB_TYPE_DATE:case o.DB_TYPE_TIMESTAMP:case o.DB_TYPE_TIMESTAMP_LTZ:case o.DB_TYPE_TIMESTAMP_TZ:t.writeOracleDate(a,e);break;case o.DB_TYPE_OBJECT:this._objType.isCollection||a._objType.isCollection?t.writeBytesWithLength(a._getPackedData()):a._packData(t);break;default:s.throwErr(s.ERR_NOT_IMPLEMENTED,e)}}_unpackData(){const t=new c(this.packedData);t.readHeader(this),this._unpackDataFromBuf(t),this.packedData=void 0}_unpackDataFromBuf(t){let e,n,r,s;const o=this._objType;if(o.isCollection){o.collectionType===i.TNS_OBJ_PLSQL_INDEX_TABLE?n=new Map:e=[],this.collectionFlags=t.readUInt8();const s=t.readLength();for(let a=0;a<s;a++){o.collectionType===i.TNS_OBJ_PLSQL_INDEX_TABLE&&(r=t.readUInt32BE());const s=this._unpackValue(t,o.elementType,o.elementTypeClass);o.collectionType===i.TNS_OBJ_PLSQL_INDEX_TABLE?n.set(r,s):e.push(s)}}else{s=new Map;for(const e of o.attributes){const n=this._unpackValue(t,e.type,e.typeClass);s.set(e.name,n)}}this.unpackedAttrs=s,this.unpackedArray=e,this.unpackedAssocArray=n}_unpackValue(t,e,n){let a,u,_;switch(e){case o.DB_TYPE_NUMBER:return _=t.readOracleNumber(),null!==_&&(_=parseFloat(_)),_;case o.DB_TYPE_BINARY_INTEGER:return t.readBinaryInteger();case o.DB_TYPE_VARCHAR:case o.DB_TYPE_CHAR:return t.readStr(i.CSFRM_IMPLICIT);case o.DB_TYPE_NVARCHAR:case o.DB_TYPE_NCHAR:return t.readStr(i.CSFRM_NCHAR);case o.DB_TYPE_RAW:return _=t.readBytesWithLength(),null!==_&&(_=r.from(_)),_;case o.DB_TYPE_BINARY_DOUBLE:return t.readBinaryDouble();case o.DB_TYPE_BINARY_FLOAT:return t.readBinaryFloat();case o.DB_TYPE_DATE:case o.DB_TYPE_TIMESTAMP:return t.readOracleDate(!0);case o.DB_TYPE_TIMESTAMP_LTZ:case o.DB_TYPE_TIMESTAMP_TZ:return t.readOracleDate(!1);case o.DB_TYPE_BOOLEAN:return t.readBool();case o.DB_TYPE_OBJECT:return a=t.getIsAtomicNull(),a?null:(u=new l(n),u._objType.isCollection||this._objType.isCollection?u.packedData=r.from(t.readBytesWithLength()):u._unpackDataFromBuf(t),u);default:s.throwErr(s.ERR_NOT_IMPLEMENTED,e)}}append(t){if(this._ensureUnpacked(),this.unpackedArray){const e=this._objType;e.maxNumElements>0&&this.unpackedArray.length>=e.maxNumElements&&s.throwErr(s.ERR_INVALID_COLL_INDEX_SET,this.unpackedArray.length,0,e.maxNumElements),this.unpackedArray.push(t)}else{let e;if(this._ensureAssocKeys(),0===this.unpackedAssocKeys.length)e=0;else{const t=this.unpackedAssocKeys.length-1;e=this.unpackedAssocKeys[t]+1}this.unpackedAssocArray.set(e,t),this.unpackedAssocKeys.push(e)}}deleteElement(t){this._ensureUnpacked(),this.unpackedArray?(this._objType.collectionType==i.TNS_OBJ_VARRAY&&s.throwErr(s.ERR_DELETE_ELEMENTS_OF_VARRAY),this.unpackedArray.splice(t,1)):(this._unpackedAssocKeys=void 0,this.unpackedAssocArray.delete(t))}getAttrValue(t){this._ensureUnpacked();const e=this.unpackedAttrs.get(t.name);return void 0===e?null:e}getElement(t){let e;return this._ensureUnpacked(),e=this.unpackedArray?this.unpackedArray[t]:this.unpackedAssocArray.get(t),void 0===e&&s.throwErr(s.ERR_INVALID_COLL_INDEX_GET,t),e}getFirstIndex(){return this._ensureUnpacked(),this.unpackedArray?0:this.unpackedAssocArray?(this._ensureAssocKeys(),this.unpackedAssocKeys[0]):void 0}getKeys(){return this._ensureUnpacked(),this.unpackedArray?Array.from(this.unpackedArray.keys()):this.unpackedAssocArray?(this._ensureAssocKeys(),Array.from(this.unpackedAssocKeys)):[]}getLastIndex(){if(this._ensureUnpacked(),this.unpackedArray){if(this.unpackedArray.length>0)return this.unpackedArray.length-1}else if(this.unpackedAssocArray)return this._ensureAssocKeys(),this.unpackedAssocKeys[this.unpackedAssocKeys.length-1]}getNextIndex(t){if(this._ensureUnpacked(),this.unpackedArray){if(t+1<this.unpackedArray.length)return t+1}else if(this.unpackedAssocArray){this._ensureAssocKeys();for(const e of this.unpackedAssocKeys)if(e>t)return e}}getPrevIndex(t){if(this._ensureUnpacked(),this.unpackedArray){if(t>0)return t-1}else if(this.unpackedAssocArray){this._ensureAssocKeys();for(const e of this.unpackedAssocKeys.reverse())if(e<t)return e}}getValues(){const t=[];if(this._ensureUnpacked(),this.unpackedArray)return Array.from(this.unpackedArray);if(this.unpackedAssocArray){this._ensureAssocKeys();for(const e of this.unpackedAssocKeys)t.push(this.unpackedAssocArray.get(e))}return t}hasElement(t){return this._ensureUnpacked(),this.unpackedArray?t>=0&&t<this.unpackedArray.length:this.unpackedAssocArray.has(t)}setAttrValue(t,e){this._ensureUnpacked(),this.unpackedAttrs.set(t.name,e)}setElement(t,e){if(this._ensureUnpacked(),this.unpackedArray){const n=Math.max(this.unpackedArray.length-1,0);t>n&&s.throwErr(s.ERR_INVALID_COLL_INDEX_SET,t,0,n),this.unpackedArray[t]=e}else this.unpackedAssocArray.has(t)||(this.unpackedAssocKeys=void 0),this.unpackedAssocArray.set(t,e)}trim(t){this._ensureUnpacked(),t>0&&(this.unpackedArray=this.unpackedArray.slice(0,this.unpackedArray.length-t))}}t.exports={ThinDbObjectImpl:l,readXML:function(t,e){let n;const a=new c(e);a.readHeader({}),a.skipBytes(1);const u=a.readUInt32BE();u&i.TNS_XML_TYPE_FLAG_SKIP_NEXT_4&&a.skipBytes(4);const l=a.numBytesLeft(),h=a.readBytes(l);if(u&i.TNS_XML_TYPE_STRING)n=h.toString();else if(u&i.TNS_XML_TYPE_LOB){const e=new _,i=r.from(h);e.init(t,i,o.DB_TYPE_CLOB,0,0),n=e}else s.throwErr(s.ERR_UNEXPECTED_XML_TYPE,u);return n}}},150:(t,e,n)=>{"use strict";const r=n(7468),i=n(8625),s=n(6478),o=n(1159),{ThinDbObjectImpl:a}=n(4785),u=n(851);u.ConnectionImpl=r,u.ResultSetImpl=i,u.PoolImpl=s,u.LobImpl=o,u.DbObjectImpl=a},1159:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(6634),s=n(3762),o=n(5286),a=n(8041);t.exports=class extends i{_getConnImpl(){return this.conn}async _sendMessage(t){const e=new o(this.conn,t);return await this.conn._protocol._processMessage(e),t.operation===s.TNS_LOB_OP_READ?e.data?e.data:null:e.amount}getChunkSize(){return this._chunkSize}async _getChunkSizeAsync(){this.checkConn();const t={operation:s.TNS_LOB_OP_GET_CHUNK_SIZE,sourceLobImpl:this,sendAmount:!0};this._chunkSize=this._pieceSize=await this._sendMessage(t)}getLength(){return this._length}getPieceSize(){return this._pieceSize}setPieceSize(t){this._pieceSize=t}getType(){return this.dbType}async getData(t=1,e=this._length){return e||(e=this._length),await this.read(t,e)}async read(t,e){this.checkConn();const n={operation:s.TNS_LOB_OP_READ,sourceLobImpl:this,sourceOffset:t,sendAmount:!0,amount:e||this._pieceSize};return await this._sendMessage(n)}async write(t,e){this.checkConn();const n={operation:s.TNS_LOB_OP_WRITE,sourceLobImpl:this,sourceOffset:t,data:e};await this._sendMessage(n),this._length+=e.length}getCsfrm(){return this.dbType._csfrm!==s.CSFRM_NCHAR&&this._locator[s.TNS_LOB_LOC_OFFSET_FLAG_3]&s.TNS_LOB_LOC_FLAGS_VAR_LENGTH_CHARSET?s.CSFRM_NCHAR:this.dbType._csfrm}async create(t,e){this.dirtyLength=!1,this.conn=t,this.dbType=e,this._locator=r.alloc(40),this._isTempLob=!0,this._length=0;const n={operation:s.TNS_LOB_OP_CREATE_TEMP,sourceLobImpl:this,amount:s.TNS_DURATION_SESSION,destOffset:e._oraTypeNum,sourceOffset:e._csfrm,sendAmount:!0};await this._sendMessage(n),await this._getChunkSizeAsync()}checkConn(){this.conn.nscon.connected||a.throwErr(a.ERR_INVALID_CONNECTION)}close(){this.checkConn(),this._isTempLob&&(this.conn._tempLobsToClose.push(this._locator),this.conn._tempLobsTotalSize+=this._locator.length)}init(t,e,n,r,i){this.dirtyLength=!1,this.conn=t,this._locator=e,this._isTempLob=!1,(this._locator[s.TNS_LOB_LOC_OFFSET_FLAG_4]&s.TNS_LOB_LOC_FLAGS_TEMP==s.TNS_LOB_LOC_FLAGS_TEMP||this._locator[s.TNS_LOB_LOC_OFFSET_FLAG_1]&s.TNS_LOB_LOC_FLAGS_ABSTRACT==s.TNS_LOB_LOC_FLAGS_ABSTRACT)&&(this._isTempLob=!0),this.dbType=n,this._length=r,this._chunkSize=i,this._pieceSize=i}}},6478:(t,e,n)=>{"use strict";const r=n(1217),i=n(7468),s=n(5914),o=n(8041),a=n(8023),u=n(6770),_=n(2456),{getConnectionInfo:c}=n(7696),l=n(6982),h=n(4434),T=n(3557);t.exports=class extends r{_init(t){if(t.homogeneous||o.throwErr(o.ERR_NOT_IMPLEMENTED,"Heterogeneous Pooling"),_.checkCredentials(t),this._availableObjects=[],this._name="node-thin",this._poolMin=t.poolMin,this._poolMax=t.poolMax,this._poolIncrement=t.poolIncrement,this._poolTimeout=t.poolTimeout,this._poolPingInterval=t.poolPingInterval,this._poolPingTimeout=t.poolPingTimeout,this._stmtCacheSize=t.stmtCacheSize,this._userConfig=t,this._freeConnectionList=[],this._usedConnectionList=new Set,this._password=t.password,this._walletPassword=t.walletPassword,this._obfuscatedPassword=[],this._obfuscatedWalletPassword=[],this._token=t.token,this._obfuscatedToken=[],this._privateKey=t.privateKey,this._obfuscatedPrivateKey=[],this._schedulerJob=null,this._poolCloseWaiter=null,this._pendingRequests=[],void 0!==this._password){const t=s.setObfuscatedValue(this._password);this._password=t.value,this._obfuscatedPassword=t.obfuscatedValue,this._userConfig.password=null}if(void 0!==this._walletPassword){const t=s.setObfuscatedValue(this._walletPassword);this._walletPassword=t.value,this._obfuscatedWalletPassword=t.obfuscatedValue,this._userConfig.walletPassword=null}if(void 0!==this._token){const t=s.setObfuscatedValue(this._token);this._token=t.value,this._obfuscatedToken=t.obfuscatedValue,this._userConfig.token=null}if(void 0!==this._privateKey){const t=s.setObfuscatedValue(this._privateKey);this._privateKey=t.value,this._obfuscatedPrivateKey=t.obfuscatedValue,this._userConfig.privateKey=null}this._accessTokenFn=t.accessTokenFn,this._accessTokenConfig=t.accessTokenConfig,this._isDRCPEnabled=!1,this._implicitPool=null,this.eventEmitter=new h,this.eventEmitter.on("_removePoolConnection",(async t=>{await this._destroy(t)}))}async create(t){this._init(t),this._userConfig._connInfo=await c(t),this._isDRCPEnabled="pooled"===String(this._userConfig._connInfo[0]).toLowerCase(),this._isDRCPEnabled&&""===a.connectionClass&&this._generateConnectionClass(),this.bgThreadFunc()}setAccessToken(t){if(t.token){this._token=t.token;const e=s.setObfuscatedValue(this._token);this._token=e.value,this._obfuscatedToken=e.obfuscatedValue}if(t.privateKey){this._privateKey=t.privateKey;const e=s.setObfuscatedValue(this._privateKey);this._privateKey=e.value,this._obfuscatedPrivateKey=e.obfuscatedValue}}async _getConnAttrs(){let t;const e=Object.assign({},this._userConfig);if(null===e.password&&(e.password=s.getDeobfuscatedValue(this._password,this._obfuscatedPassword)),null===e.walletPassword&&(e.walletPassword=s.getDeobfuscatedValue(this._walletPassword,this._obfuscatedWalletPassword)),null===e.token&&(e.token=s.getDeobfuscatedValue(this._token,this._obfuscatedToken),u.isTokenExpired(e.token)))if("function"==typeof this._accessTokenFn){if(t=await this._accessTokenFn(!0,this._accessTokenConfig),"string"==typeof t)if(e.token=t,u.isTokenExpired(e.token))o.throwErr(o.ERR_TOKEN_HAS_EXPIRED);else{const t=s.setObfuscatedValue(e.token);this._token=t.value,this._obfuscatedToken=t.obfuscatedValue}else if("object"==typeof t)if(e.token=t.token,e.privateKey=t.privateKey,u.isTokenExpired(e.token))o.throwErr(o.ERR_TOKEN_HAS_EXPIRED);else{const t=s.setObfuscatedValue(e.token);this._token=t.value,this._obfuscatedToken=t.obfuscatedValue;const n=s.setObfuscatedValue(e.privateKey);this._privateKey=n.value,this._obfuscatedPrivateKey=n.obfuscatedValue}}else o.throwErr(o.ERR_TOKEN_HAS_EXPIRED);return null===e.privateKey&&(e.privateKey=s.getDeobfuscatedValue(this._privateKey,this._obfuscatedPrivateKey)),e}async getConnection(){return await this.acquire()}async _destroy(t){t.nscon.ntAdapter.connected&&(t._dropSess=!0,await t.close())}async close(){await new Promise((t=>{this._poolCloseWaiter=t,this.bgWaiter&&this.bgWaiter()})),this._schedulerJob&&(clearTimeout(this._schedulerJob),this._schedulerJob=null);for(const t of this._freeConnectionList)await this._destroy(t);for(const t of this._usedConnectionList)await this._destroy(t);this.eventEmitter.removeAllListeners()}getPoolMax(){return this._poolMax}getPoolMin(){return this._poolMin}getConnectionsInUse(){return this._usedConnectionList.size}getConnectionsOpen(){return this._freeConnectionList.length+this._usedConnectionList.size}getPoolIncrement(){return this._poolIncrement}getPoolMaxPerShard(){}getPoolPingInterval(){return this._poolPingInterval}getPoolPingTimeout(){return this._poolPingTimeout}getPoolTimeout(){return this._poolTimeout}getSodaMetaDataCache(){}getStmtCacheSize(){return this._stmtCacheSize}_setScheduler(){!this._schedulerJob&&this._poolTimeout>0&&this._freeConnectionList.length>0&&this._freeConnectionList.length+this._usedConnectionList.size>this._poolMin&&(this._schedulerJob=setTimeout((()=>{this._scanIdleConnection()}),1e3*this._poolTimeout))}_scanIdleConnection(){for(;this._usedConnectionList.size+this._freeConnectionList.length>this._poolMin&&this._freeConnectionList.length>0;){const t=this._freeConnectionList[0];if(Date.now()-t._lastTimeUsed<1e3*this._poolTimeout)break;this.eventEmitter.emit("_removePoolConnection",t),this._freeConnectionList.shift()}this._schedulerJob=null,this._setScheduler()}_getNumConnsToCreate(){const t=this._freeConnectionList.length+this._usedConnectionList.size;return t<this._poolMin?this._poolMin-t:this._pendingRequests.length>0?Math.min(this._poolIncrement,this._poolMax-t):0}async bgThreadFunc(){for(;!this._poolCloseWaiter;){let t=this._poolMax-this.getConnectionsOpen();for(;t>0&&this._freeConnectionList.length>0;){const e=this._freeConnectionList.shift();this.eventEmitter.emit("_removePoolConnection",e),t--}const e=this._getNumConnsToCreate();for(let t=0;t<e;t++){try{const t=await this._getConnAttrs(),e=new i;e._pool=this,await e.connect(t),e._newSession=!0,e._dropSess=!1,e._lastTimeUsed=Date.now(),this._freeConnectionList.push(e)}catch(t){this._bgErr=t}if(this._poolIncrement>1&&this._poolMax-this._usedConnectionList.size-this._freeConnectionList.length>1&&this._setScheduler(),this._pendingRequests.length>0&&this._pendingRequests.shift().resolve(),await new Promise((t=>T.setImmediate(t))),this._poolCloseWaiter)break}if(this._poolCloseWaiter)break;(0==this._pendingRequests.length||this._bgErr)&&(await new Promise((t=>{this.bgWaiter=t})),this.bgWaiter=null)}this._poolCloseWaiter()}async acquire(){for(;this._freeConnectionList.length>0;){const t=this._freeConnectionList.pop();if(!t.isHealthy()){this.eventEmitter.emit("_removePoolConnection",t);continue}let e=!1;if((0===this._poolPingInterval||this._poolPingInterval>0&&Date.now()-t._lastTimeUsed>1e3*this._poolPingInterval)&&(e=!0),e){let e;try{this._poolPingTimeout&&(e=setTimeout((()=>{t.nscon.forceDisconnect()}),this._poolPingTimeout)),await t.ping()}catch{t.nscon.forceDisconnect();continue}finally{clearTimeout(e)}}return this._usedConnectionList.add(t),t}if(await new Promise((t=>{this._pendingRequests.push({resolve:t}),this.bgWaiter&&this.bgWaiter()})),this._bgErr){const t=this._bgErr;throw this._bgErr=null,this._pendingRequests.length>0&&this.bgWaiter&&this.bgWaiter(),t}const t=this._freeConnectionList.pop();return this._usedConnectionList.add(t),t}release(t){t.warning=void 0,this._usedConnectionList.delete(t),t.nscon.connected&&(t._lastTimeUsed=Date.now(),t._newSession=!1,this._freeConnectionList.length+this._usedConnectionList.size<this._poolMax?this._freeConnectionList.push(t):this.eventEmitter.emit("_removePoolConnection",t)),this._setScheduler()}_generateConnectionClass(){this._userConfig.connectionClass=l.randomBytes(16).toString("base64"),this._userConfig.connectionClass="NJS:"+this._userConfig.connectionClass}reconfigure(t){void 0!==t.poolIncrement&&(this._poolIncrement=t.poolIncrement),void 0!==t.poolTimeout&&this._poolTimeout!==t.poolTimeout&&(this._poolTimeout=t.poolTimeout,this._schedulerJob&&(clearTimeout(this._schedulerJob),this._schedulerJob=null)),void 0!==t.poolPingInterval&&(this._poolPingInterval=t.poolPingInterval),void 0!==t.stmtCacheSize&&(this._stmtCacheSize=t.stmtCacheSize),void 0!==t.poolMax&&(this._poolMax=t.poolMax),void 0!==t.poolMin&&(this._poolMin=t.poolMin),this.bgWaiter&&this.bgWaiter()}}},6621:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(8041);t.exports=class{constructor(t){this.protocolVersion=t.sAtts.version,this.ttcFieldVersion=i.TNS_CCAP_FIELD_VERSION_MAX,this.supports12cLogon=!0,this.supportsOob=!1,this.nCharsetId=i.TNS_CHARSET_UTF16,this.compileCaps=r.alloc(i.TNS_CCAP_MAX),this.runtimeCaps=r.alloc(i.TNS_RCAP_MAX),this.initCompileCaps(t),this.initRuntimeCaps(),this.maxStringSize=0}adjustForServerCompileCaps(t,e){t[i.TNS_CCAP_FIELD_VERSION]<this.ttcFieldVersion&&(this.ttcFieldVersion=t[i.TNS_CCAP_FIELD_VERSION],this.compileCaps[i.TNS_CCAP_FIELD_VERSION]=this.ttcFieldVersion),this.ttcFieldVersion<i.TNS_CCAP_FIELD_VERSION_23_4&&e.endOfRequestSupport&&(this.compileCaps[i.TNS_CCAP_TTC4]^=i.TNS_CCAP_END_OF_REQUEST,e.endOfRequestSupport=!1)}adjustForServerRuntimeCaps(t){t[i.TNS_RCAP_TTC]&i.TNS_RCAP_TTC_32K?this.maxStringSize=32767:this.maxStringSize=4e3}initCompileCaps(t){this.compileCaps[i.TNS_CCAP_SQL_VERSION]=i.TNS_CCAP_SQL_VERSION_MAX,this.compileCaps[i.TNS_CCAP_LOGON_TYPES]=i.TNS_CCAP_O5LOGON|i.TNS_CCAP_O5LOGON_NP|i.TNS_CCAP_O7LOGON|i.TNS_CCAP_O8LOGON_LONG_IDENTIFIER|i.TNS_CCAP_O9LOGON_LONG_PASSWORD,this.compileCaps[i.TNS_CCAP_FIELD_VERSION]=this.ttcFieldVersion,this.compileCaps[i.TNS_CCAP_SERVER_DEFINE_CONV]=1,this.compileCaps[i.TNS_CCAP_TTC1]=i.TNS_CCAP_FAST_BVEC|i.TNS_CCAP_END_OF_CALL_STATUS|i.TNS_CCAP_IND_RCD,this.compileCaps[i.TNS_CCAP_OCI1]=i.TNS_CCAP_FAST_SESSION_PROPAGATE|i.TNS_CCAP_APP_CTX_PIGGYBACK,this.compileCaps[i.TNS_CCAP_TDS_VERSION]=i.TNS_CCAP_TDS_VERSION_MAX,this.compileCaps[i.TNS_CCAP_RPC_VERSION]=i.TNS_CCAP_RPC_VERSION_MAX,this.compileCaps[i.TNS_CCAP_RPC_SIG]=i.TNS_CCAP_RPC_SIG_VALUE,this.compileCaps[i.TNS_CCAP_DBF_VERSION]=i.TNS_CCAP_DBF_VERSION_MAX,this.compileCaps[i.TNS_CCAP_LOB]=i.TNS_CCAP_LOB_UB8_SIZE|i.TNS_CCAP_LOB_ENCS|i.TNS_CCAP_LOB_PREFETCH|i.TNS_CCAP_LOB_TEMP_SIZE|i.TNS_CCAP_LOB_12C|i.TNS_CCAP_LOB_PREFETCH_DATA,this.compileCaps[i.TNS_CCAP_UB2_DTY]=1,this.compileCaps[i.TNS_CCAP_LOB2]=i.TNS_CCAP_LOB2_QUASI|i.TNS_CCAP_LOB2_2GB_PREFETCH,this.compileCaps[i.TNS_CCAP_TTC3]=i.TNS_CCAP_IMPLICIT_RESULTS|i.TNS_CCAP_BIG_CHUNK_CLR|i.TNS_CCAP_KEEP_OUT_ORDER,this.compileCaps[i.TNS_CCAP_TTC2]=i.TNS_CCAP_ZLNP,this.compileCaps[i.TNS_CCAP_OCI2]=i.TNS_CCAP_DRCP,this.compileCaps[i.TNS_CCAP_CLIENT_FN]=i.TNS_CCAP_CLIENT_FN_MAX,this.compileCaps[i.TNS_CCAP_TTC4]=i.TNS_CCAP_INBAND_NOTIFICATION,t.endOfRequestSupport&&(this.compileCaps[i.TNS_CCAP_TTC4]|=i.TNS_CCAP_END_OF_REQUEST),this.compileCaps[i.TNS_CCAP_CTB_FEATURE_BACKPORT]=i.TNS_CCAP_CTB_IMPLICIT_POOL,this.compileCaps[i.TNS_CCAP_TTC5]=i.TNS_CCAP_VECTOR_SUPPORT}initRuntimeCaps(){this.runtimeCaps[i.TNS_RCAP_COMPAT]=i.TNS_RCAP_COMPAT_81,this.runtimeCaps[i.TNS_RCAP_TTC]=i.TNS_RCAP_TTC_ZERO_COPY|i.TNS_RCAP_TTC_32K}checkNCharsetId(){this.nCharsetId!==i.TNS_CHARSET_UTF16&&s.throwErr(s.ERR_NCHAR_CS_NOT_SUPPORTED,this.nCharsetId)}}},3762:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(2269),s=n(5068);t.exports={BIND_IN:i.BIND_IN,BIND_INOUT:i.BIND_INOUT,BIND_OUT:i.BIND_OUT,CLIENT_VERSION:i.VERSION_MAJOR<<24|i.VERSION_MINOR<<20|i.VERSION_PATCH<<12,CSFRM_IMPLICIT:i.CSFRM_IMPLICIT,CSFRM_NCHAR:i.CSFRM_NCHAR,DRIVER_NAME:i.DEFAULT_DRIVER_NAME+" thn",PURITY_DEFAULT:i.PURITY_DEFAULT,PURITY_NEW:i.PURITY_NEW,PURITY_SELF:i.PURITY_SELF,SYSASM:i.SYSASM,SYSBKP:i.SYSBKP,SYSDBA:i.SYSDBA,SYSDG:i.SYSDG,SYSKM:i.SYSKM,SYSOPER:i.SYSOPER,SYSRAC:i.SYSRAC,AUTH_MODE_DEFAULT:0,AUTH_MODE_PRELIM:8,AUTH_MODE_SYSASM:32768,AUTH_MODE_SYSBKP:131072,AUTH_MODE_SYSDBA:2,AUTH_MODE_SYSDGD:262144,AUTH_MODE_SYSKMT:524288,AUTH_MODE_SYSOPER:4,AUTH_MODE_SYSRAC:1048576,TNS_AUTH_MODE_LOGON:1,TNS_AUTH_MODE_CHANGE_PASSWORD:2,TNS_AUTH_MODE_SYSDBA:32,TNS_AUTH_MODE_SYSOPER:64,TNS_AUTH_MODE_PRELIM:128,TNS_AUTH_MODE_WITH_PASSWORD:256,TNS_AUTH_MODE_SYSASM:4194304,TNS_AUTH_MODE_SYSBKP:16777216,TNS_AUTH_MODE_SYSDGD:33554432,TNS_AUTH_MODE_SYSKMT:67108864,TNS_AUTH_MODE_SYSRAC:134217728,TNS_AUTH_MODE_IAM_TOKEN:536870912,TNS_PACKET_TYPE_CONNECT:1,TNS_PACKET_TYPE_ACCEPT:2,TNS_PACKET_TYPE_REFUSE:4,TNS_PACKET_TYPE_REDIRECT:5,TNS_PACKET_TYPE_DATA:6,TNS_PACKET_TYPE_RESEND:11,TNS_PACKET_TYPE_MARKER:12,TNS_PACKET_TYPE_CONTROL:14,TNS_DATA_TYPE_DEFAULT:0,TNS_DATA_TYPE_VARCHAR:1,TNS_DATA_TYPE_NUMBER:2,TNS_DATA_TYPE_BINARY_INTEGER:3,TNS_DATA_TYPE_FLOAT:4,TNS_DATA_TYPE_STR:5,TNS_DATA_TYPE_VNU:6,TNS_DATA_TYPE_PDN:7,TNS_DATA_TYPE_LONG:8,TNS_DATA_TYPE_VCS:9,TNS_DATA_TYPE_TIDDEF:10,TNS_DATA_TYPE_ROWID:11,TNS_DATA_TYPE_DATE:12,TNS_DATA_TYPE_VBI:15,TNS_DATA_TYPE_RAW:23,TNS_DATA_TYPE_LONG_RAW:24,TNS_DATA_TYPE_UB2:25,TNS_DATA_TYPE_UB4:26,TNS_DATA_TYPE_SB1:27,TNS_DATA_TYPE_SB2:28,TNS_DATA_TYPE_SB4:29,TNS_DATA_TYPE_SWORD:30,TNS_DATA_TYPE_UWORD:31,TNS_DATA_TYPE_PTRB:32,TNS_DATA_TYPE_PTRW:33,TNS_DATA_TYPE_OER8:290,TNS_DATA_TYPE_FUN:291,TNS_DATA_TYPE_AUA:292,TNS_DATA_TYPE_RXH7:293,TNS_DATA_TYPE_NA6:294,TNS_DATA_TYPE_OAC9:39,TNS_DATA_TYPE_AMS:40,TNS_DATA_TYPE_BRN:41,TNS_DATA_TYPE_BRP:298,TNS_DATA_TYPE_BRV:299,TNS_DATA_TYPE_KVA:300,TNS_DATA_TYPE_CLS:301,TNS_DATA_TYPE_CUI:302,TNS_DATA_TYPE_DFN:303,TNS_DATA_TYPE_DQR:304,TNS_DATA_TYPE_DSC:305,TNS_DATA_TYPE_EXE:306,TNS_DATA_TYPE_FCH:307,TNS_DATA_TYPE_GBV:308,TNS_DATA_TYPE_GEM:309,TNS_DATA_TYPE_GIV:310,TNS_DATA_TYPE_OKG:311,TNS_DATA_TYPE_HMI:312,TNS_DATA_TYPE_INO:313,TNS_DATA_TYPE_LNF:315,TNS_DATA_TYPE_ONT:316,TNS_DATA_TYPE_OPE:317,TNS_DATA_TYPE_OSQ:318,TNS_DATA_TYPE_SFE:319,TNS_DATA_TYPE_SPF:320,TNS_DATA_TYPE_VSN:321,TNS_DATA_TYPE_UD7:322,TNS_DATA_TYPE_DSA:323,TNS_DATA_TYPE_UIN:68,TNS_DATA_TYPE_PIN:327,TNS_DATA_TYPE_PFN:328,TNS_DATA_TYPE_PPT:329,TNS_DATA_TYPE_STO:331,TNS_DATA_TYPE_ARC:333,TNS_DATA_TYPE_MRS:334,TNS_DATA_TYPE_MRT:335,TNS_DATA_TYPE_MRG:336,TNS_DATA_TYPE_MRR:337,TNS_DATA_TYPE_MRC:338,TNS_DATA_TYPE_VER:339,TNS_DATA_TYPE_LON2:340,TNS_DATA_TYPE_INO2:341,TNS_DATA_TYPE_ALL:342,TNS_DATA_TYPE_UDB:343,TNS_DATA_TYPE_AQI:344,TNS_DATA_TYPE_ULB:345,TNS_DATA_TYPE_ULD:346,TNS_DATA_TYPE_SLS:91,TNS_DATA_TYPE_SID:348,TNS_DATA_TYPE_NA7:349,TNS_DATA_TYPE_LVC:94,TNS_DATA_TYPE_LVB:95,TNS_DATA_TYPE_CHAR:96,TNS_DATA_TYPE_AVC:97,TNS_DATA_TYPE_AL7:354,TNS_DATA_TYPE_K2RPC:355,TNS_DATA_TYPE_BINARY_FLOAT:100,TNS_DATA_TYPE_BINARY_DOUBLE:101,TNS_DATA_TYPE_CURSOR:102,TNS_DATA_TYPE_RDD:104,TNS_DATA_TYPE_XDP:359,TNS_DATA_TYPE_OSL:106,TNS_DATA_TYPE_OKO8:363,TNS_DATA_TYPE_EXT_NAMED:108,TNS_DATA_TYPE_INT_NAMED:109,TNS_DATA_TYPE_EXT_REF:110,TNS_DATA_TYPE_INT_REF:111,TNS_DATA_TYPE_CLOB:112,TNS_DATA_TYPE_BLOB:113,TNS_DATA_TYPE_BFILE:114,TNS_DATA_TYPE_CFILE:115,TNS_DATA_TYPE_RSET:116,TNS_DATA_TYPE_CWD:117,TNS_DATA_TYPE_JSON:119,TNS_DATA_TYPE_OAC122:120,TNS_DATA_TYPE_UD12:380,TNS_DATA_TYPE_AL8:381,TNS_DATA_TYPE_LFOP:382,TNS_DATA_TYPE_VECTOR:127,TNS_DATA_TYPE_FCRT:383,TNS_DATA_TYPE_DNY:384,TNS_DATA_TYPE_OPR:385,TNS_DATA_TYPE_PLS:386,TNS_DATA_TYPE_XID:387,TNS_DATA_TYPE_TXN:388,TNS_DATA_TYPE_DCB:389,TNS_DATA_TYPE_CCA:390,TNS_DATA_TYPE_WRN:391,TNS_DATA_TYPE_TLH:393,TNS_DATA_TYPE_TOH:394,TNS_DATA_TYPE_FOI:395,TNS_DATA_TYPE_SID2:396,TNS_DATA_TYPE_TCH:397,TNS_DATA_TYPE_PII:398,TNS_DATA_TYPE_PFI:399,TNS_DATA_TYPE_PPU:400,TNS_DATA_TYPE_PTE:401,TNS_DATA_TYPE_CLV:146,TNS_DATA_TYPE_RXH8:404,TNS_DATA_TYPE_N12:405,TNS_DATA_TYPE_AUTH:406,TNS_DATA_TYPE_KVAL:407,TNS_DATA_TYPE_DTR:152,TNS_DATA_TYPE_DUN:153,TNS_DATA_TYPE_DOP:154,TNS_DATA_TYPE_VST:155,TNS_DATA_TYPE_ODT:156,TNS_DATA_TYPE_FGI:413,TNS_DATA_TYPE_DSY:414,TNS_DATA_TYPE_DSYR8:415,TNS_DATA_TYPE_DSYH8:416,TNS_DATA_TYPE_DSYL:417,TNS_DATA_TYPE_DSYT8:418,TNS_DATA_TYPE_DSYV8:419,TNS_DATA_TYPE_DSYP:420,TNS_DATA_TYPE_DSYF:421,TNS_DATA_TYPE_DSYK:422,TNS_DATA_TYPE_DSYY:423,TNS_DATA_TYPE_DSYQ:424,TNS_DATA_TYPE_DSYC:425,TNS_DATA_TYPE_DSYA:426,TNS_DATA_TYPE_OT8:427,TNS_DATA_TYPE_DOL:172,TNS_DATA_TYPE_DSYTY:429,TNS_DATA_TYPE_AQE:430,TNS_DATA_TYPE_KV:431,TNS_DATA_TYPE_AQD:432,TNS_DATA_TYPE_AQ8:433,TNS_DATA_TYPE_TIME:178,TNS_DATA_TYPE_TIME_TZ:179,TNS_DATA_TYPE_TIMESTAMP:180,TNS_DATA_TYPE_TIMESTAMP_TZ:181,TNS_DATA_TYPE_INTERVAL_YM:182,TNS_DATA_TYPE_INTERVAL_DS:183,TNS_DATA_TYPE_EDATE:184,TNS_DATA_TYPE_ETIME:185,TNS_DATA_TYPE_ETTZ:186,TNS_DATA_TYPE_ESTAMP:187,TNS_DATA_TYPE_ESTZ:188,TNS_DATA_TYPE_EIYM:189,TNS_DATA_TYPE_EIDS:190,TNS_DATA_TYPE_RFS:449,TNS_DATA_TYPE_RXH10:450,TNS_DATA_TYPE_DCLOB:195,TNS_DATA_TYPE_DBLOB:196,TNS_DATA_TYPE_DBFILE:197,TNS_DATA_TYPE_DJSON:198,TNS_DATA_TYPE_KPN:454,TNS_DATA_TYPE_KPDNR:455,TNS_DATA_TYPE_DSYD:456,TNS_DATA_TYPE_DSYS:457,TNS_DATA_TYPE_DSYR:458,TNS_DATA_TYPE_DSYH:459,TNS_DATA_TYPE_DSYT:460,TNS_DATA_TYPE_DSYV:461,TNS_DATA_TYPE_AQM:462,TNS_DATA_TYPE_OER11:463,TNS_DATA_TYPE_UROWID:208,TNS_DATA_TYPE_AQL:466,TNS_DATA_TYPE_OTC:467,TNS_DATA_TYPE_KFNO:468,TNS_DATA_TYPE_KFNP:469,TNS_DATA_TYPE_KGT8:470,TNS_DATA_TYPE_RASB4:471,TNS_DATA_TYPE_RAUB2:472,TNS_DATA_TYPE_RAUB1:473,TNS_DATA_TYPE_RATXT:474,TNS_DATA_TYPE_RSSB4:475,TNS_DATA_TYPE_RSUB2:476,TNS_DATA_TYPE_RSUB1:477,TNS_DATA_TYPE_RSTXT:478,TNS_DATA_TYPE_RIDL:479,TNS_DATA_TYPE_GLRDD:480,TNS_DATA_TYPE_GLRDG:481,TNS_DATA_TYPE_GLRDC:482,TNS_DATA_TYPE_OKO:483,TNS_DATA_TYPE_DPP:484,TNS_DATA_TYPE_DPLS:485,TNS_DATA_TYPE_DPMOP:486,TNS_DATA_TYPE_TIMESTAMP_LTZ:231,TNS_DATA_TYPE_ESITZ:232,TNS_DATA_TYPE_UB8:233,TNS_DATA_TYPE_STAT:490,TNS_DATA_TYPE_RFX:491,TNS_DATA_TYPE_FAL:492,TNS_DATA_TYPE_CKV:493,TNS_DATA_TYPE_DRCX:494,TNS_DATA_TYPE_KGH:495,TNS_DATA_TYPE_AQO:496,TNS_DATA_TYPE_PNTY:241,TNS_DATA_TYPE_OKGT:498,TNS_DATA_TYPE_KPFC:499,TNS_DATA_TYPE_FE2:500,TNS_DATA_TYPE_SPFP:501,TNS_DATA_TYPE_DPULS:502,TNS_DATA_TYPE_BOOLEAN:252,TNS_DATA_TYPE_AQA:509,TNS_DATA_TYPE_KPBF:510,TNS_DATA_TYPE_TSM:513,TNS_DATA_TYPE_MSS:514,TNS_DATA_TYPE_KPC:516,TNS_DATA_TYPE_CRS:517,TNS_DATA_TYPE_KKS:518,TNS_DATA_TYPE_KSP:519,TNS_DATA_TYPE_KSPTOP:520,TNS_DATA_TYPE_KSPVAL:521,TNS_DATA_TYPE_PSS:522,TNS_DATA_TYPE_NLS:523,TNS_DATA_TYPE_ALS:524,TNS_DATA_TYPE_KSDEVTVAL:525,TNS_DATA_TYPE_KSDEVTTOP:526,TNS_DATA_TYPE_KPSPP:527,TNS_DATA_TYPE_KOL:528,TNS_DATA_TYPE_LST:529,TNS_DATA_TYPE_ACX:530,TNS_DATA_TYPE_SCS:531,TNS_DATA_TYPE_RXH:532,TNS_DATA_TYPE_KPDNS:533,TNS_DATA_TYPE_KPDCN:534,TNS_DATA_TYPE_KPNNS:535,TNS_DATA_TYPE_KPNCN:536,TNS_DATA_TYPE_KPS:537,TNS_DATA_TYPE_APINF:538,TNS_DATA_TYPE_TEN:539,TNS_DATA_TYPE_XSSCS:540,TNS_DATA_TYPE_XSSSO:541,TNS_DATA_TYPE_XSSAO:542,TNS_DATA_TYPE_KSRPC:543,TNS_DATA_TYPE_KVL:560,TNS_DATA_TYPE_SESSGET:563,TNS_DATA_TYPE_SESSREL:564,TNS_DATA_TYPE_XSSDEF:565,TNS_DATA_TYPE_PDQCINV:572,TNS_DATA_TYPE_PDQIDC:573,TNS_DATA_TYPE_KPDQCSTA:574,TNS_DATA_TYPE_KPRS:575,TNS_DATA_TYPE_KPDQIDC:576,TNS_DATA_TYPE_RTSTRM:578,TNS_DATA_TYPE_SESSRET:579,TNS_DATA_TYPE_SCN6:580,TNS_DATA_TYPE_KECPA:581,TNS_DATA_TYPE_KECPP:582,TNS_DATA_TYPE_SXA:583,TNS_DATA_TYPE_KVARR:584,TNS_DATA_TYPE_KPNGN:585,TNS_DATA_TYPE_XSNSOP:590,TNS_DATA_TYPE_XSATTR:591,TNS_DATA_TYPE_XSNS:592,TNS_DATA_TYPE_TXT:593,TNS_DATA_TYPE_XSSESSNS:594,TNS_DATA_TYPE_XSATTOP:595,TNS_DATA_TYPE_XSCREOP:596,TNS_DATA_TYPE_XSDETOP:597,TNS_DATA_TYPE_XSDESOP:598,TNS_DATA_TYPE_XSSETSP:599,TNS_DATA_TYPE_XSSIDP:600,TNS_DATA_TYPE_XSPRIN:601,TNS_DATA_TYPE_XSKVL:602,TNS_DATA_TYPE_XSSSDEF2:603,TNS_DATA_TYPE_XSNSOP2:604,TNS_DATA_TYPE_XSNS2:605,TNS_DATA_TYPE_IMPLRES:611,TNS_DATA_TYPE_OER19:612,TNS_DATA_TYPE_UB1ARRAY:613,TNS_DATA_TYPE_SESSSTATE:614,TNS_DATA_TYPE_AC_REPLAY:615,TNS_DATA_TYPE_AC_CONT:616,TNS_DATA_TYPE_KPDNREQ:622,TNS_DATA_TYPE_KPDNRNF:623,TNS_DATA_TYPE_KPNGNC:624,TNS_DATA_TYPE_KPNRI:625,TNS_DATA_TYPE_AQENQ:626,TNS_DATA_TYPE_AQDEQ:627,TNS_DATA_TYPE_AQJMS:628,TNS_DATA_TYPE_KPDNRPAY:629,TNS_DATA_TYPE_KPDNRACK:630,TNS_DATA_TYPE_KPDNRMP:631,TNS_DATA_TYPE_KPDNRDQ:632,TNS_DATA_TYPE_CHUNKINFO:636,TNS_DATA_TYPE_SCN:637,TNS_DATA_TYPE_SCN8:638,TNS_DATA_TYPE_UD21:639,TNS_DATA_TYPE_TNP:640,TNS_DATA_TYPE_OAC:646,TNS_DATA_TYPE_OER:652,TNS_DATA_TYPE_UDS:663,TNS_TYPE_REP_NATIVE:0,TNS_TYPE_REP_UNIVERSAL:1,TNS_TYPE_REP_ORACLE:10,TNS_MSG_TYPE_PROTOCOL:1,TNS_MSG_TYPE_DATA_TYPES:2,TNS_MSG_TYPE_FUNCTION:3,TNS_MSG_TYPE_ERROR:4,TNS_MSG_TYPE_ROW_HEADER:6,TNS_MSG_TYPE_ROW_DATA:7,TNS_MSG_TYPE_PARAMETER:8,TNS_MSG_TYPE_STATUS:9,TNS_MSG_TYPE_IO_VECTOR:11,TNS_MSG_TYPE_LOB_DATA:14,TNS_MSG_TYPE_WARNING:15,TNS_MSG_TYPE_DESCRIBE_INFO:16,TNS_MSG_TYPE_PIGGYBACK:17,TNS_MSG_TYPE_FLUSH_OUT_BINDS:19,TNS_MSG_TYPE_BIT_VECTOR:21,TNS_MSG_TYPE_SERVER_SIDE_PIGGYBACK:23,TNS_MSG_TYPE_ONEWAY_FN:26,TNS_MSG_TYPE_IMPLICIT_RESULTSET:27,TNS_MSG_TYPE_RENEGOTIATE:28,TNS_MSG_TYPE_END_OF_REQUEST:29,TNS_MSG_TYPE_FAST_AUTH:34,TNS_KEYWORD_NUM_CURRENT_SCHEMA:168,TNS_KEYWORD_NUM_EDITION:172,TNS_BIND_USE_INDICATORS:1,TNS_BIND_USE_LENGTH:2,TNS_BIND_ARRAY:64,TNS_BIND_DIR_OUTPUT:16,TNS_BIND_DIR_INPUT:32,TNS_BIND_DIR_INPUT_OUTPUT:48,TNS_EXEC_OPTION_PARSE:1,TNS_EXEC_OPTION_BIND:8,TNS_EXEC_OPTION_DEFINE:16,TNS_EXEC_OPTION_EXECUTE:32,TNS_EXEC_OPTION_FETCH:64,TNS_EXEC_OPTION_COMMIT:256,TNS_EXEC_OPTION_COMMIT_REEXECUTE:1,TNS_EXEC_OPTION_PLSQL_BIND:1024,TNS_EXEC_OPTION_DML_ROWCOUNTS:16384,TNS_EXEC_OPTION_NOT_PLSQL:32768,TNS_EXEC_OPTION_IMPLICIT_RESULTSET:32768,TNS_EXEC_OPTION_DESCRIBE:131072,TNS_EXEC_OPTION_NO_COMPRESSED_FETCH:262144,TNS_EXEC_OPTION_BATCH_ERRORS:524288,TNS_EXEC_OPTION_NO_IMPL_REL:2097152,TNS_SERVER_PIGGYBACK_QUERY_CACHE_INVALIDATION:1,TNS_SERVER_PIGGYBACK_OS_PID_MTS:2,TNS_SERVER_PIGGYBACK_TRACE_EVENT:3,TNS_SERVER_PIGGYBACK_SESS_RET:4,TNS_SERVER_PIGGYBACK_SYNC:5,TNS_SERVER_PIGGYBACK_LTXID:7,TNS_SERVER_PIGGYBACK_AC_REPLAY_CONTEXT:8,TNS_SERVER_PIGGYBACK_EXT_SYNC:9,TNS_SESSGET_SESSION_CHANGED:4,TNS_LOB_OP_GET_LENGTH:1,TNS_LOB_OP_READ:2,TNS_LOB_OP_TRIM:32,TNS_LOB_OP_WRITE:64,TNS_LOB_OP_GET_CHUNK_SIZE:16384,TNS_LOB_OP_CREATE_TEMP:272,TNS_LOB_OP_FREE_TEMP:273,TNS_LOB_OP_OPEN:32768,TNS_LOB_OP_CLOSE:65536,TNS_LOB_OP_IS_OPEN:69632,TNS_LOB_OP_ARRAY:524288,TNS_LOB_LOC_OFFSET_FLAG_1:4,TNS_LOB_LOC_OFFSET_FLAG_3:6,TNS_LOB_LOC_OFFSET_FLAG_4:7,TNS_LOB_QLOCATOR_VERSION:4,TNS_LOB_LOC_FLAGS_BLOB:1,TNS_LOB_LOC_FLAGS_VALUE_BASED:32,TNS_LOB_LOC_FLAGS_ABSTRACT:64,TNS_LOB_LOC_FLAGS_INIT:8,TNS_LOB_LOC_FLAGS_TEMP:1,TNS_LOB_LOC_FLAGS_VAR_LENGTH_CHARSET:128,TNS_LOB_OPEN_READ_WRITE:2,TNS_LOB_PREFETCH_FLAG:33554432,TNS_JSON_MAX_LENGTH:33554432,TNS_END_TO_END_ACTION:16,TNS_END_TO_END_CLIENT_IDENTIFIER:1,TNS_END_TO_END_CLIENT_INFO:256,TNS_END_TO_END_DBOP:512,TNS_END_TO_END_MODULE:8,TNS_VERSION_MIN_ACCEPTED:315,TNS_VERSION_MIN_LARGE_SDU:315,TNS_FUNC_AUTH_PHASE_ONE:118,TNS_FUNC_AUTH_PHASE_TWO:115,TNS_FUNC_CLOSE_CURSORS:105,TNS_FUNC_COMMIT:14,TNS_FUNC_EXECUTE:94,TNS_FUNC_FETCH:5,TNS_FUNC_LOB_OP:96,TNS_FUNC_LOGOFF:9,TNS_FUNC_PING:147,TNS_FUNC_ROLLBACK:15,TNS_FUNC_SET_END_TO_END_ATTR:135,TNS_FUNC_REEXECUTE:4,TNS_FUNC_REEXECUTE_AND_FETCH:78,TNS_FUNC_SET_SCHEMA:152,TNS_FUNC_SESSION_GET:162,TNS_FUNC_SESSION_RELEASE:163,TNS_FUNC_SESSION_STATE:176,TNS_FUNC_CANCEL_ALL:120,TNS_CHARSET_UTF8:873,TNS_CHARSET_UTF16:2e3,TNS_ENCODING_UTF8:"UTF-8",TNS_ENCODING_UTF16:"UTF-16LE",TNS_ENCODING_MULTI_BYTE:1,TNS_ENCODING_CONV_LENGTH:2,TNS_CCAP_SQL_VERSION:0,TNS_CCAP_LOGON_TYPES:4,TNS_CCAP_CTB_FEATURE_BACKPORT:5,TNS_CCAP_FIELD_VERSION:7,TNS_CCAP_SERVER_DEFINE_CONV:8,TNS_CCAP_TTC1:15,TNS_CCAP_OCI1:16,TNS_CCAP_TDS_VERSION:17,TNS_CCAP_RPC_VERSION:18,TNS_CCAP_RPC_SIG:19,TNS_CCAP_DBF_VERSION:21,TNS_CCAP_LOB:23,TNS_CCAP_TTC2:26,TNS_CCAP_UB2_DTY:27,TNS_CCAP_OCI2:31,TNS_CCAP_CLIENT_FN:34,TNS_CCAP_TTC3:37,TNS_CCAP_TTC4:40,TNS_CCAP_LOB2:42,TNS_CCAP_TTC5:44,TNS_CCAP_MAX:51,TNS_CCAP_SQL_VERSION_MAX:6,TNS_CCAP_FIELD_VERSION_11_2:6,TNS_CCAP_FIELD_VERSION_12_1:7,TNS_CCAP_FIELD_VERSION_12_2:8,TNS_CCAP_FIELD_VERSION_12_2_EXT1:9,TNS_CCAP_FIELD_VERSION_18_1:10,TNS_CCAP_FIELD_VERSION_18_1_EXT_1:11,TNS_CCAP_FIELD_VERSION_19_1:12,TNS_CCAP_FIELD_VERSION_19_1_EXT_1:13,TNS_CCAP_FIELD_VERSION_20_1:14,TNS_CCAP_FIELD_VERSION_20_1_EXT_1:15,TNS_CCAP_FIELD_VERSION_21_1:16,TNS_CCAP_FIELD_VERSION_23_1:17,TNS_CCAP_FIELD_VERSION_23_1_EXT_1:18,TNS_CCAP_FIELD_VERSION_23_1_EXT_2:19,TNS_CCAP_FIELD_VERSION_23_1_EXT_3:20,TNS_CCAP_FIELD_VERSION_23_1_EXT_4:21,TNS_CCAP_FIELD_VERSION_23_1_EXT_5:22,TNS_CCAP_FIELD_VERSION_23_1_EXT_6:23,TNS_CCAP_FIELD_VERSION_23_4:24,TNS_CCAP_FIELD_VERSION_MAX:24,TNS_CCAP_O5LOGON:8,TNS_CCAP_O5LOGON_NP:2,TNS_CCAP_O7LOGON:32,TNS_CCAP_O8LOGON_LONG_IDENTIFIER:64,TNS_CCAP_O9LOGON_LONG_PASSWORD:128,TNS_CCAP_END_OF_CALL_STATUS:1,TNS_CCAP_IND_RCD:8,TNS_CCAP_FAST_BVEC:32,TNS_CCAP_FAST_SESSION_PROPAGATE:16,TNS_CCAP_APP_CTX_PIGGYBACK:128,TNS_CCAP_TDS_VERSION_MAX:3,TNS_CCAP_RPC_VERSION_MAX:7,TNS_CCAP_RPC_SIG_VALUE:3,TNS_CCAP_DBF_VERSION_MAX:1,TNS_CCAP_IMPLICIT_RESULTS:16,TNS_CCAP_BIG_CHUNK_CLR:32,TNS_CCAP_KEEP_OUT_ORDER:128,TNS_CCAP_LOB_UB8_SIZE:1,TNS_CCAP_LOB_ENCS:2,TNS_CCAP_LOB_PREFETCH_DATA:4,TNS_CCAP_LOB_TEMP_SIZE:8,TNS_CCAP_LOB_PREFETCH:64,TNS_CCAP_LOB_12C:128,TNS_CCAP_DRCP:16,TNS_CCAP_ZLNP:4,TNS_CCAP_INBAND_NOTIFICATION:4,TNS_CCAP_END_OF_REQUEST:32,TNS_CCAP_CLIENT_FN_MAX:12,TNS_CCAP_LOB2_QUASI:1,TNS_CCAP_LOB2_2GB_PREFETCH:4,TNS_CCAP_CTB_IMPLICIT_POOL:8,TNS_CCAP_VECTOR_SUPPORT:8,TNS_RCAP_COMPAT:0,TNS_RCAP_TTC:6,TNS_RCAP_MAX:7,TNS_RCAP_COMPAT_81:2,TNS_RCAP_TTC_ZERO_COPY:1,TNS_RCAP_TTC_32K:4,TNS_VERIFIER_TYPE_11G_1:45394,TNS_VERIFIER_TYPE_11G_2:6949,TNS_VERIFIER_TYPE_12C:18453,TNS_UDS_FLAGS_IS_JSON:256,TNS_UDS_FLAGS_IS_OSON:2048,TNS_EOCS_FLAGS_TXN_IN_PROGRESS:2,TNS_EOCS_FLAGS_SESS_RELEASE:32768,TNS_ESCAPE_CHAR:253,TNS_LONG_LENGTH_INDICATOR:s.TNS_LONG_LENGTH_INDICATOR,TNS_NULL_LENGTH_INDICATOR:s.TNS_NULL_LENGTH_INDICATOR,TNS_MAX_ROWID_LENGTH:18,TNS_DURATION_SESSION:10,TNS_MAX_LONG_LENGTH:2147483647,TNS_SDU:8192,TNS_TDU:65535,TNS_MAX_CONNECT_DATA:230,TNS_MAX_UROWID_LENGTH:3950,TNS_SERVER_CONVERTS_CHARS:1,DRCP_DEAUTHENTICATE:2,TNS_OBJ_IS_VERSION_81:128,TNS_OBJ_IS_DEGENERATE:16,TNS_OBJ_IS_COLLECTION:8,TNS_OBJ_NO_PREFIX_SEG:4,TNS_OBJ_IMAGE_VERSION:1,TNS_OBJ_MAX_SHORT_LENGTH:245,TNS_OBJ_ATOMIC_NULL:253,TNS_OBJ_NON_NULL_OID:2,TNS_OBJ_HAS_EXTENT_OID:8,TNS_OBJ_TOP_LEVEL:1,TNS_OBJ_HAS_INDEXES:16,TNS_OBJ_PLSQL_INDEX_TABLE:1,TNS_OBJ_NESTED_TABLE:2,TNS_OBJ_VARRAY:3,TNS_OBJ_TDS_TYPE_CHAR:1,TNS_OBJ_TDS_TYPE_DATE:2,TNS_OBJ_TDS_TYPE_FLOAT:5,TNS_OBJ_TDS_TYPE_NUMBER:6,TNS_OBJ_TDS_TYPE_VARCHAR:7,TNS_OBJ_TDS_TYPE_BOOLEAN:8,TNS_OBJ_TDS_TYPE_RAW:19,TNS_OBJ_TDS_TYPE_TIMESTAMP:21,TNS_OBJ_TDS_TYPE_TIMESTAMP_TZ:23,TNS_OBJ_TDS_TYPE_OBJ:27,TNS_OBJ_TDS_TYPE_COLL:28,TNS_OBJ_TDS_TYPE_CLOB:29,TNS_OBJ_TDS_TYPE_BLOB:30,TNS_OBJ_TDS_TYPE_TIMESTAMP_LTZ:33,TNS_OBJ_TDS_TYPE_BINARY_FLOAT:37,TNS_OBJ_TDS_TYPE_START_EMBED_ADT:39,TNS_OBJ_TDS_TYPE_END_EMBED_ADT:40,TNS_OBJ_TDS_TYPE_SUBTYPE_MARKER:43,TNS_OBJ_TDS_TYPE_EMBED_ADT_INFO:44,TNS_OBJ_TDS_TYPE_BINARY_DOUBLE:45,TNS_XML_TYPE_LOB:1,TNS_XML_TYPE_STRING:4,TNS_XML_TYPE_FLAG_SKIP_NEXT_4:1048576,TNS_ERR_INCONSISTENT_DATA_TYPES:932,TNS_ERR_VAR_NOT_IN_SELECT_LIST:1007,TNS_ERR_INBAND_MESSAGE:12573,TNS_ERR_INVALID_SERVICE_NAME:12514,TNS_ERR_INVALID_SID:12505,TNS_ERR_NO_DATA_FOUND:1403,TNS_ERR_SESSION_SHUTDOWN:12572,TNS_WARN_COMPILATION_CREATE:32,TNS_VECTOR_MAX_LENGTH:1048576,VECTOR_FORMAT_FLEX:0,VECTOR_META_FLAG_FLEXIBLE_DIM:1,PACKET_HEADER_SIZE:8,NUMBER_AS_TEXT_CHARS:172,CHUNKED_BYTES_CHUNK_SIZE:65536,TNS_DATA_FLAGS_END_OF_REQUEST:8192,TNS_BASE64_ALPHABET_ARRAY:r.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),TNS_EXTENT_OID:r.from("00000000000000000000000000010001","hex")}},3605:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(6982);let s="aes-256-cbc";const o=r.from([0,1]),a=new class{_decrypt(t,e){const n=r.alloc(16,0),o=i.createDecipheriv(s,t,n);o.setAutoPadding(!1);let a=o.update(e);return a=r.concat([a,o.final()]),a}_encrypt(t,e,n){const o=r.alloc(16,0),a=16-e.length%16,u=r.alloc(a,a);a>0&&(n?e+=r.alloc(a):e=r.concat([e,u]));const _=i.createCipheriv(s,t,o);let c=_.update(e);return c=r.concat([c,_.final()]),n||(c=c.slice(0,e.length)),e.fill(0),c}_setEncryptedPasswordBuffers(t,e,n,s){const o=r.alloc(16);i.randomFillSync(o,0,16);const a=r.concat([o,t]);if(s.encodedPassword=this._encrypt(n,a),a.fill(0),s.encodedPassword=s.encodedPassword.slice().toString("hex").toUpperCase(),e){const t=r.concat([o,e]);s.encodedNewPassword=this._encrypt(n,t),t.fill(0),s.encodedNewPassword=s.encodedNewPassword.slice().toString("hex").toUpperCase()}t.fill(0),e&&e.fill(0)}updateVerifierData(t,e,n,o,a){let u=32,_="sha512";const c=r.from(t.AUTH_VFR_DATA,"hex"),l=r.from(t.AUTH_SESSKEY,"hex");let h=Number(t.AUTH_PBKDF2_VGEN_COUNT);const T=r.from(e,"utf8");let p,f,E;if(o){s="aes-192-cbc",u=24,_="sha1";const t=i.createHash(_);t.update(T),t.update(c);const e=t.digest();p=r.alloc(e.length+4),e.copy(p,0,0,e.length)}else{s="aes-256-cbc";const t=r.from("AUTH_PBKDF2_SPEEDY_KEY","utf8"),e=r.concat([c,t]);f=i.pbkdf2Sync(T,e,h,64,"sha512");const n=i.createHash(_);n.update(f),n.update(c),p=n.digest().slice(0,u)}n&&(E=r.from(n,"utf8"));const d=this._decrypt(p,l),N=r.alloc(d.length);i.randomFillSync(N);const S=this._encrypt(p,N);if(48===d.length){a.sessionKey=S.slice().toString("hex").toUpperCase().slice(0,96);const t=r.alloc(24);for(let e=16;e<=40;e++)t[e-16]=d[e]^N[e];const e=i.createHash("md5").update(t.subarray(0,16)).digest(),n=i.createHash("md5").update(t.subarray(16)).digest();a.comboKey=r.concat([e,n]).slice(0,u)}else{a.sessionKey=S.slice().toString("hex").toUpperCase().slice(0,64);const e=r.from(t.AUTH_PBKDF2_CSK_SALT,"hex");h=Number(t.AUTH_PBKDF2_SDER_COUNT);const n=r.concat([N.slice(0,u),d.slice(0,u)]).toString("hex").toUpperCase(),s=r.from(n,"utf8");a.comboKey=i.pbkdf2Sync(s,e,h,u,"sha512")}const m=r.alloc(16);if(!o){i.randomFillSync(m,0,16);const t=r.concat([m,f]);a.speedyKey=this._encrypt(a.comboKey,t),a.speedyKey=a.speedyKey.slice(0,80).toString("hex").toUpperCase()}this._setEncryptedPasswordBuffers(T,E,a.comboKey,a)}getEncryptedJSWPData(t,e){let n=this._encrypt(t,e,!0);return n=n.slice().toString("hex").toUpperCase(),n=r.concat([n,o]),n}updatePasswordsWithComboKey(t,e,n,i){const s=r.from(t,"utf8");let o;e&&(o=r.from(e,"utf8")),this._setEncryptedPasswordBuffers(s,o,n,i)}};t.exports=a},5732:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(8041),o=n(932),a=n(3605),u=n(3815),_=n(2456),c=_.CLIENT_INFO,l=n(6982);t.exports=class extends u{constructor(t,e){super(t),this.functionCode=i.TNS_FUNC_AUTH_PHASE_ONE,this.messageType=i.TNS_MSG_TYPE_FUNCTION,this.sessionData={},this.conn=t,this.sessionKey="",this.encodedPassword="",this.changePassword=!1,Object.defineProperty(this,"password",{enumerable:!1,value:e.password}),this.username=e.user,void 0===this.username?this.username="":this.username=this.username.trim(),this.schemaUser="",this.proxyUser="",this.proxyStatus=-1,0!==this.username.length&&(this.proxyStatusObj=_.checkProxyUserValidity(this.username),0===this.proxyStatusObj.status&&(this.proxyStatus=0,this.proxyUser=this.proxyStatusObj.proxyUser,this.schemaUser=this.proxyStatusObj.schemaUser,this.username=this.proxyUser)),this.newPassword=e.newPassword,e.changePassword&&(this.changePassword=!0,this.functionCode=i.TNS_FUNC_AUTH_PHASE_TWO),this.username?this.userByteLen=r.byteLength(this.username):this.userByteLen=0,this.token=e.token,this.token&&(this.functionCode=i.TNS_FUNC_AUTH_PHASE_TWO),this.privateKey=e.privateKey,this.privateKey&&(this.privateKey=_.normalizePrivateKey(this.privateKey)),this.serviceName=this.conn.serviceName,this.remoteAddress=this.conn.remoteAddress,this.setAuthMode(e)}setAuthMode(t){this.newPassword||(this.authMode=i.TNS_AUTH_MODE_LOGON),t.privilege&i.SYSDBA&&(this.authMode|=i.TNS_AUTH_MODE_SYSDBA),t.privilege&i.SYSOPER&&(this.authMode|=i.TNS_AUTH_MODE_SYSOPER),t.privilege&i.SYSASM&&(this.authMode|=i.TNS_AUTH_MODE_SYSASM),t.privilege&i.SYSBKP&&(this.authMode|=i.TNS_AUTH_MODE_SYSBKP),t.privilege&i.SYSDG&&(this.authMode|=i.TNS_AUTH_MODE_SYSDGD),t.privilege&i.SYSKM&&(this.authMode|=i.TNS_AUTH_MODE_SYSKMT),t.privilege&i.SYSRAC&&(this.authMode|=i.TNS_AUTH_MODE_SYSRAC),this.privateKey&&(this.authMode|=i.TNS_AUTH_MODE_IAM_TOKEN),this.newPassword&&(this.authMode|=i.TNS_AUTH_MODE_CHANGE_PASSWORD),this.token||(this.authMode|=i.TNS_AUTH_MODE_WITH_PASSWORD)}getAlterTimezoneStatement(){let t,e;if(o.env.ORA_SDTZ)e=o.env.ORA_SDTZ;else{const n=(new Date).getTimezoneOffset();let r=Math.trunc(n/60);const i=Math.abs((n-60*r)%60);r<0?(t="+",r=-r):t="-",r=r.toLocaleString("en-US",{minimumIntegerDigits:2}),e=`${t}${r}:${i}`}return`ALTER SESSION SET TIME_ZONE ='${e}'\0`}encode(t){let e=!1;if(this.writeFunctionHeader(t),this.userByteLen>0?t.writeUInt8(1):t.writeUInt8(0),t.writeUB4(this.userByteLen),t.writeUB4(this.authMode),this.functionCode===i.TNS_FUNC_AUTH_PHASE_ONE)t.writeUInt8(1),t.writeUB4(5),t.writeUInt8(0),t.writeUInt8(1),this.userByteLen>0&&t.writeBytesWithLength(r.from(this.username)),t.writeKeyValue("AUTH_TERMINAL",c.terminal),t.writeKeyValue("AUTH_PROGRAM_NM",c.program),t.writeKeyValue("AUTH_MACHINE",c.hostName),t.writeKeyValue("AUTH_PID",c.pid),t.writeKeyValue("AUTH_SID",c.userName);else{let n=0;if(this.changePassword?(a.updatePasswordsWithComboKey(this.password,this.newPassword,this.conn.comboKey,this),n=2):(n=4,this.token?n+=1:(n+=2,this.verifierType===i.TNS_VERIFIER_TYPE_11G_1||this.verifierType===i.TNS_VERIFIER_TYPE_11G_2?e=!0:this.verifierType!==i.TNS_VERIFIER_TYPE_12C?s.throwErr(s.ERR_UNSUPPORTED_VERIFIER_TYPE,this.verifierType.toString(16)):n+=1,a.updateVerifierData(this.sessionData,this.password,this.newPassword,e,this),this.conn.comboKey=this.comboKey,this.newPassword&&(n+=1)),this.privateKey&&(n+=2),this.conn.connectionClass&&(n+=1),this.conn.purity&&(n+=1),this.conn.jdwpData&&(this.encryptedJDWPData=a.getEncryptedJSWPData(this.sessionKey,this.conn.jdwpData),n+=1),0!==this.schemaUser.length&&(n+=1)),t.writeUInt8(1),t.writeUB4(n),t.writeUInt8(1),t.writeUInt8(1),this.userByteLen>0&&t.writeBytesWithLength(r.from(this.username)),this.token?t.writeKeyValue("AUTH_TOKEN",this.token):this.changePassword||(t.writeKeyValue("AUTH_SESSKEY",this.sessionKey,1),e||t.writeKeyValue("AUTH_PBKDF2_SPEEDY_KEY",this.speedyKey)),this.changePassword||(t.writeKeyValue("SESSION_CLIENT_CHARSET","873"),t.writeKeyValue("SESSION_CLIENT_DRIVER_NAME",i.DRIVER_NAME),t.writeKeyValue("SESSION_CLIENT_VERSION",i.CLIENT_VERSION.toString()),t.writeKeyValue("AUTH_ALTER_SESSION",this.getAlterTimezoneStatement(),1)),this.encodedPassword&&t.writeKeyValue("AUTH_PASSWORD",this.encodedPassword),0===this.proxyStatus&&t.writeKeyValue("PROXY_CLIENT_NAME",this.schemaUser),this.encodedNewPassword&&t.writeKeyValue("AUTH_NEWPASSWORD",this.encodedNewPassword),this.conn.connectionClass&&t.writeKeyValue("AUTH_KPPL_CONN_CLASS",this.conn.connectionClass),this.conn.purity&&t.writeKeyValue("AUTH_KPPL_PURITY",""+this.conn.purity),this.privateKey){const e="date: "+(new Date).toGMTString()+"\n(request-target): "+this.serviceName+"\nhost: "+this.remoteAddress,n=l.createSign("RSA-SHA256").update(e).sign(this.privateKey,"base64");t.writeKeyValue("AUTH_HEADER",e),t.writeKeyValue("AUTH_SIGNATURE",n)}this.conn.jdwpData&&t.writeKeyValue("AUTH_ORA_DEBUG_JDWP",this.encryptedJDWPData)}}processReturnParameter(t){const e=t.readUB2();for(let n=0;n<e;n++){t.skipUB4();const e=t.readStr(i.CSFRM_IMPLICIT);let n="";t.readUB4()>0&&(n=t.readStr(i.CSFRM_IMPLICIT));const r=t.readUB4();"AUTH_VFR_DATA"===e&&(this.verifierType=r),this.sessionData[e]=n}if(this.functionCode===i.TNS_FUNC_AUTH_PHASE_ONE)this.functionCode=i.TNS_FUNC_AUTH_PHASE_TWO;else{let e,n,r,s;this.conn.dbDomain=this.sessionData.AUTH_SC_DB_DOMAIN,this.conn.dbName=this.sessionData.AUTH_SC_DBUNIQUE_NAME,this.conn.maxOpenCursors=Number(this.sessionData.AUTH_MAX_OPEN_CURSORS||0),this.conn.serviceName=this.sessionData.AUTH_SC_SERVICE_NAME,this.conn.instanceName=this.sessionData.AUTH_INSTANCENAME;const o=Number(this.sessionData.AUTH_VERSION_NO),a=o>>24&255;this.conn.warning=this.warning,t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_18_1_EXT_1?(e=o>>16&255,n=o>>12&15,r=o>>4&255,s=15&o):(e=o>>20&15,n=o>>12&255,r=o>>8&15,s=255&o),this.conn.serverVersionString=a+"."+e+"."+n+"."+r+"."+s,this.conn.serverVersion=1e8*a+1e6*e+1e4*n+100*r+1*s}}}},3815:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(8041);t.exports=class{constructor(t){this.errorInfo={},this.connection=t,this.messageType=i.TNS_MSG_TYPE_FUNCTION,this.functionCode=0,this.callStatus=0,this.flushOutBinds=!1,this.endOfResponse=!1,this.endToEndSeqNum=0,this.errorOccurred=!1,this.warning=void 0}preProcess(){}async postProcess(){}writeFunctionHeader(t){t.writeUInt8(this.messageType),t.writeUInt8(this.functionCode),t.writeSeqNum(),t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_23_1_EXT_1&&t.writeUB8(0)}processErrorInfo(t){this.callStatus=t.readUB4(),t.skipUB2(),t.skipUB4(),t.skipUB2(),t.skipUB2(),t.skipUB2(),this.errorInfo.cursorId=t.readUB2();const e=t.readSB2();t.skipUB1(),t.skipUB1(),t.skipUB1(),t.skipUB1(),t.skipUB1(),t.readUInt8()&i.TNS_WARN_COMPILATION_CREATE&&(this.warning=s.getErr(s.WRN_COMPILATION_CREATE)),this.errorInfo.rowID=t.readRowID(),t.skipUB4(),t.skipUB1(),t.skipUB1(),t.skipUB2(),t.skipUB4(),t.readUB4()>0&&t.skipBytesChunked();const n=t.readUB2();if(n>0){this.errorInfo.batchErrors=[];const e=t.readUInt8();for(let r=0;r<n;r++){e===i.TNS_LONG_LENGTH_INDICATOR&&t.skipUB4();const n=t.readUB2();this.errorInfo.batchErrors.push(new Error(n))}e===i.TNS_LONG_LENGTH_INDICATOR&&t.skipBytes(1)}const r=t.readUB4();if(r>0){r>65535&&s.throwErr(s.ERR_TOO_MANY_BATCH_ERRORS);const e=t.readUInt8();let o;for(let s=0;s<r;s++)e===i.TNS_LONG_LENGTH_INDICATOR&&t.skipUB4(),o=t.readUB4(),s<n&&(this.errorInfo.batchErrors[s].offset=o);e===i.TNS_LONG_LENGTH_INDICATOR&&t.skipBytes(1)}const o=t.readUB2();if(o>0){t.skipBytes(1);for(let e=0;e<o;e++)t.skipUB2(),this.errorInfo.batchErrors[e].message=t.readStr(i.CSFRM_IMPLICIT),t.skipBytes(2)}this.errorInfo.num=t.readUB4(),this.errorInfo.rowCount=t.readUB8(),t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_20_1&&(t.skipUB4(),t.skipUB4()),0!==this.errorInfo.num&&(this.errorOccurred=!0,e>=0&&(this.errorInfo.pos=e),this.errorInfo.message=t.readStr(i.CSFRM_IMPLICIT),this.errorInfo.message=this.errorInfo.message.trim()),this.endOfResponse=!this.connection.nscon.endOfRequestSupport}processReturnParameter(){}processWarningInfo(t){const e=t.readUB2(),n=t.readUB2();if(t.skipUB2(),0!=e&&n>0){const n=t.readStr(i.CSFRM_IMPLICIT).trim();this.warning=new Error(n),this.warning.errorNum=e}}decode(t){this.process(t)}process(t){this.endOfResponse=!1,this.flushOutBinds=!1;do{this.savePoint(t);const e=t.readUInt8();this.processMessage(t,e)}while(!this.endOfResponse)}savePoint(t){t.savePoint()}processMessage(t,e){e===i.TNS_MSG_TYPE_ERROR?this.processErrorInfo(t):e===i.TNS_MSG_TYPE_WARNING?this.processWarningInfo(t):e===i.TNS_MSG_TYPE_STATUS?(this.callStatus=t.readUB4(),this.endToEndSeqNum=t.readUB2(),this.endOfResponse=!this.connection.nscon.endOfRequestSupport):e===i.TNS_MSG_TYPE_PARAMETER?this.processReturnParameter(t):e===i.TNS_MSG_TYPE_SERVER_SIDE_PIGGYBACK?this.processServerSidePiggyBack(t):e===i.TNS_MSG_TYPE_END_OF_REQUEST?this.endOfResponse=!0:s.throwErr(s.ERR_UNEXPECTED_MESSAGE_TYPE,e,t.pos,t.packetNum)}processServerSidePiggyBack(t){const e=t.readUInt8();if(e===i.TNS_SERVER_PIGGYBACK_LTXID)t.readUB4()>0&&t.skipBytesChunked();else if(e===i.TNS_SERVER_PIGGYBACK_QUERY_CACHE_INVALIDATION||e===i.TNS_SERVER_PIGGYBACK_TRACE_EVENT);else if(e===i.TNS_SERVER_PIGGYBACK_OS_PID_MTS){const e=t.readUB2();t.skipUB1(),t.skipBytes(e)}else if(e===i.TNS_SERVER_PIGGYBACK_SYNC){t.skipUB2(),t.skipUB1();const e=t.readUB4();t.skipBytes(1);for(let n=0;n<e;n++){let e=t.readUB2();e>0&&t.skipBytesChunked(),e=t.readUB2(),e>0&&t.skipBytesChunked(),t.skipUB2()}t.skipUB4()}else if(e===i.TNS_SERVER_PIGGYBACK_EXT_SYNC)t.skipUB2(),t.skipUB1();else if(e===i.TNS_SERVER_PIGGYBACK_AC_REPLAY_CONTEXT)t.skipUB2(),t.skipUB1(),t.skipUB4(),t.skipUB4(),t.skipUB1(),t.readUB4()>0&&t.skipBytesChunked();else if(e===i.TNS_SERVER_PIGGYBACK_SESS_RET){t.skipUB2(),t.skipUB1();const e=t.readUB2();if(e>0){t.skipUB1();for(let n=0;n<e;++n){let e=t.readUB2();e>0&&t.skipBytesChunked(),e=t.readUB2(),e>0&&t.skipBytesChunked(),t.skipUB2()}}t.readUB4()&i.TNS_SESSGET_SESSION_CHANGED&&this.connection._drcpEstablishSession&&this.connection.statementCache.clearCursors(),this.connection._drcpEstablishSession=!1,t.skipUB4(),t.skipUB2()}else s.throwErr(s.ERR_UNKOWN_SERVER_SIDE_PIGGYBACK,e)}writePiggybacks(t){this.connection._currentSchemaModified&&this._writeCurrentSchemaPiggyback(t),this.connection.statementCache._cursorsToClose.size>0&&!this.connection._drcpEstablishSession&&this.writeCloseCursorsPiggyBack(t),(this.connection._actionModified||this.connection._clientIdentifierModified||this.connection._dbopModified||this.connection._clientInfoModified||this.connection._moduleModified)&&this._writeEndToEndPiggybacks(t),this.connection._tempLobsTotalSize>0&&this.writeCloseTempLobsPiggyback(t)}writePiggybackHeader(t,e){t.writeUInt8(i.TNS_MSG_TYPE_PIGGYBACK),t.writeUInt8(e),t.writeSeqNum(),t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_23_1_EXT_1&&t.writeUB8(0)}writeCloseCursorsPiggyBack(t){this.writePiggybackHeader(t,i.TNS_FUNC_CLOSE_CURSORS),t.writeUInt8(1),this.connection.statementCache.writeCursorsToClose(t)}writeCloseTempLobsPiggyback(t){const e=this.connection._tempLobsToClose,n=i.TNS_LOB_OP_FREE_TEMP|i.TNS_LOB_OP_ARRAY;this.writePiggybackHeader(t,i.TNS_FUNC_LOB_OP),t.writeUInt8(1),t.writeUB4(this.connection._tempLobsTotalSize),t.writeUInt8(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUB4(n),t.writeUInt8(0),t.writeUB4(0),t.writeUB8(0),t.writeUB8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0);for(const n of e)t.writeBytes(n);this.connection._tempLobsToClose=[],this.connection._tempLobsTotalSize=0}_writeCurrentSchemaPiggyback(t){this.writePiggybackHeader(t,i.TNS_FUNC_SET_SCHEMA),t.writeUInt8(1);const e=r.byteLength(this.connection.currentSchema);t.writeUB4(e),t.writeBytesWithLength(r.from(this.connection.currentSchema))}_writeEndToEndPiggybacks(t){let e=0;this.connection._actionModified&&(e|=i.TNS_END_TO_END_ACTION),this.connection._clientIdentifierModified&&(e|=i.TNS_END_TO_END_CLIENT_IDENTIFIER),this.connection._clientInfoModified&&(e|=i.TNS_END_TO_END_CLIENT_INFO),this.connection._moduleModified&&(e|=i.TNS_END_TO_END_MODULE),this.connection._dbOpModified&&(e|=i.TNS_END_TO_END_DBOP),this.writePiggybackHeader(t,i.TNS_FUNC_SET_END_TO_END_ATTR),t.writeUInt8(0),t.writeUInt8(0),t.writeUB4(e);const n=this.writeEndEndTraceValue(t,this.connection._clientIdentifier,this.connection._clientIdentifierModified),r=this.writeEndEndTraceValue(t,this.connection._module,this.connection._moduleModified),s=this.writeEndEndTraceValue(t,this.connection._action,this.connection._actionModified);t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0);const o=this.writeEndEndTraceValue(t,this.connection._clientInfo,this.connection._clientInfoModified);t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0);const a=this.writeEndEndTraceValue(t,this.connection._dbOp,this.connection._dbOpModified);this.connection._clientIdentifierModified&&this.connection._clientIdentifier&&t.writeBytesWithLength(n),this.connection._moduleModified&&this.connection._module&&t.writeBytesWithLength(r),this.connection._actionModified&&this.connection._action&&t.writeBytesWithLength(s),this.connection._clientInfoModified&&this.connection._clientInfo&&t.writeBytesWithLength(o),this.connection._dbOpModified&&this.connection._dbOp&&t.writeBytesWithLength(a),this.connection._actionModified=!1,this.connection._action="",this.connection._clientIdentifierModified=!1,this.connection._clientIdentifier="",this.connection._clientInfoModified=!1,this.connection._clientInfo="",this.connection._dbOpModified=!1,this.connection._dbOp="",this.connection._moduleModified=!1,this.connection._module=""}writeEndEndTraceValue(t,e,n){let i;return n?(t.writeUInt8(1),e?(i=r.from(e),t.writeUB4(i.length)):t.writeUB4(0)):(t.writeUInt8(0),t.writeUB4(0)),i}saveDeferredErr(){this.deferredErr||(this.deferredErr=s.getErr(...arguments))}}},2283:(t,e,n)=>{"use strict";const r=n(3815),i=n(3762);t.exports=class extends r{constructor(t){super(t),this.functionCode=i.TNS_FUNC_COMMIT}encode(t){this.writeFunctionHeader(t)}}},7030:(t,e,n)=>{"use strict";const r=n(3762),i=n(3815),s=[[r.TNS_DATA_TYPE_VARCHAR,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_NUMBER,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_LONG,r.TNS_DATA_TYPE_LONG,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DATE,r.TNS_DATA_TYPE_DATE,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_RAW,r.TNS_DATA_TYPE_RAW,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LONG_RAW,r.TNS_DATA_TYPE_LONG_RAW,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UB2,r.TNS_DATA_TYPE_UB2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UB4,r.TNS_DATA_TYPE_UB4,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SB1,r.TNS_DATA_TYPE_SB1,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_SB2,r.TNS_DATA_TYPE_SB2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SB4,r.TNS_DATA_TYPE_SB4,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SWORD,r.TNS_DATA_TYPE_SWORD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UWORD,r.TNS_DATA_TYPE_UWORD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PTRB,r.TNS_DATA_TYPE_PTRB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PTRW,r.TNS_DATA_TYPE_PTRW,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TIDDEF,r.TNS_DATA_TYPE_TIDDEF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ROWID,r.TNS_DATA_TYPE_ROWID,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AMS,r.TNS_DATA_TYPE_AMS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BRN,r.TNS_DATA_TYPE_BRN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CWD,r.TNS_DATA_TYPE_CWD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OAC122,r.TNS_DATA_TYPE_OAC122,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OER8,r.TNS_DATA_TYPE_OER8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FUN,r.TNS_DATA_TYPE_FUN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AUA,r.TNS_DATA_TYPE_AUA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RXH7,r.TNS_DATA_TYPE_RXH7,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_NA6,r.TNS_DATA_TYPE_NA6,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BRP,r.TNS_DATA_TYPE_BRP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BRV,r.TNS_DATA_TYPE_BRV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KVA,r.TNS_DATA_TYPE_KVA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CLS,r.TNS_DATA_TYPE_CLS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CUI,r.TNS_DATA_TYPE_CUI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DFN,r.TNS_DATA_TYPE_DFN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DQR,r.TNS_DATA_TYPE_DQR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSC,r.TNS_DATA_TYPE_DSC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EXE,r.TNS_DATA_TYPE_EXE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FCH,r.TNS_DATA_TYPE_FCH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GBV,r.TNS_DATA_TYPE_GBV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GEM,r.TNS_DATA_TYPE_GEM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GIV,r.TNS_DATA_TYPE_GIV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OKG,r.TNS_DATA_TYPE_OKG,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_HMI,r.TNS_DATA_TYPE_HMI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INO,r.TNS_DATA_TYPE_INO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LNF,r.TNS_DATA_TYPE_LNF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ONT,r.TNS_DATA_TYPE_ONT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OPE,r.TNS_DATA_TYPE_OPE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OSQ,r.TNS_DATA_TYPE_OSQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SFE,r.TNS_DATA_TYPE_SFE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SPF,r.TNS_DATA_TYPE_SPF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_VSN,r.TNS_DATA_TYPE_VSN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UD7,r.TNS_DATA_TYPE_UD7,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSA,r.TNS_DATA_TYPE_DSA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PIN,r.TNS_DATA_TYPE_PIN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PFN,r.TNS_DATA_TYPE_PFN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PPT,r.TNS_DATA_TYPE_PPT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_STO,r.TNS_DATA_TYPE_STO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ARC,r.TNS_DATA_TYPE_ARC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MRS,r.TNS_DATA_TYPE_MRS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MRT,r.TNS_DATA_TYPE_MRT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MRG,r.TNS_DATA_TYPE_MRG,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MRR,r.TNS_DATA_TYPE_MRR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MRC,r.TNS_DATA_TYPE_MRC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_VER,r.TNS_DATA_TYPE_VER,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LON2,r.TNS_DATA_TYPE_LON2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INO2,r.TNS_DATA_TYPE_INO2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ALL,r.TNS_DATA_TYPE_ALL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UDB,r.TNS_DATA_TYPE_UDB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQI,r.TNS_DATA_TYPE_AQI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ULB,r.TNS_DATA_TYPE_ULB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ULD,r.TNS_DATA_TYPE_ULD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SID,r.TNS_DATA_TYPE_SID,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_NA7,r.TNS_DATA_TYPE_NA7,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AL7,r.TNS_DATA_TYPE_AL7,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_K2RPC,r.TNS_DATA_TYPE_K2RPC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XDP,r.TNS_DATA_TYPE_XDP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OKO8,r.TNS_DATA_TYPE_OKO8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UD12,r.TNS_DATA_TYPE_UD12,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AL8,r.TNS_DATA_TYPE_AL8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LFOP,r.TNS_DATA_TYPE_LFOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FCRT,r.TNS_DATA_TYPE_FCRT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DNY,r.TNS_DATA_TYPE_DNY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OPR,r.TNS_DATA_TYPE_OPR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PLS,r.TNS_DATA_TYPE_PLS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XID,r.TNS_DATA_TYPE_XID,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TXN,r.TNS_DATA_TYPE_TXN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DCB,r.TNS_DATA_TYPE_DCB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CCA,r.TNS_DATA_TYPE_CCA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_WRN,r.TNS_DATA_TYPE_WRN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TLH,r.TNS_DATA_TYPE_TLH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TOH,r.TNS_DATA_TYPE_TOH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FOI,r.TNS_DATA_TYPE_FOI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SID2,r.TNS_DATA_TYPE_SID2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TCH,r.TNS_DATA_TYPE_TCH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PII,r.TNS_DATA_TYPE_PII,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PFI,r.TNS_DATA_TYPE_PFI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PPU,r.TNS_DATA_TYPE_PPU,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PTE,r.TNS_DATA_TYPE_PTE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RXH8,r.TNS_DATA_TYPE_RXH8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_N12,r.TNS_DATA_TYPE_N12,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AUTH,r.TNS_DATA_TYPE_AUTH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KVAL,r.TNS_DATA_TYPE_KVAL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FGI,r.TNS_DATA_TYPE_FGI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSY,r.TNS_DATA_TYPE_DSY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYR8,r.TNS_DATA_TYPE_DSYR8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYH8,r.TNS_DATA_TYPE_DSYH8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYL,r.TNS_DATA_TYPE_DSYL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYT8,r.TNS_DATA_TYPE_DSYT8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYV8,r.TNS_DATA_TYPE_DSYV8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYP,r.TNS_DATA_TYPE_DSYP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYF,r.TNS_DATA_TYPE_DSYF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYK,r.TNS_DATA_TYPE_DSYK,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYY,r.TNS_DATA_TYPE_DSYY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYQ,r.TNS_DATA_TYPE_DSYQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYC,r.TNS_DATA_TYPE_DSYC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYA,r.TNS_DATA_TYPE_DSYA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OT8,r.TNS_DATA_TYPE_OT8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYTY,r.TNS_DATA_TYPE_DSYTY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQE,r.TNS_DATA_TYPE_AQE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KV,r.TNS_DATA_TYPE_KV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQD,r.TNS_DATA_TYPE_AQD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQ8,r.TNS_DATA_TYPE_AQ8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RFS,r.TNS_DATA_TYPE_RFS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RXH10,r.TNS_DATA_TYPE_RXH10,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPN,r.TNS_DATA_TYPE_KPN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNR,r.TNS_DATA_TYPE_KPDNR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYD,r.TNS_DATA_TYPE_DSYD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYS,r.TNS_DATA_TYPE_DSYS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYR,r.TNS_DATA_TYPE_DSYR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYH,r.TNS_DATA_TYPE_DSYH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYT,r.TNS_DATA_TYPE_DSYT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DSYV,r.TNS_DATA_TYPE_DSYV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQM,r.TNS_DATA_TYPE_AQM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OER11,r.TNS_DATA_TYPE_OER11,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQL,r.TNS_DATA_TYPE_AQL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OTC,r.TNS_DATA_TYPE_OTC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KFNO,r.TNS_DATA_TYPE_KFNO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KFNP,r.TNS_DATA_TYPE_KFNP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KGT8,r.TNS_DATA_TYPE_KGT8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RASB4,r.TNS_DATA_TYPE_RASB4,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RAUB2,r.TNS_DATA_TYPE_RAUB2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RAUB1,r.TNS_DATA_TYPE_RAUB1,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RATXT,r.TNS_DATA_TYPE_RATXT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RSSB4,r.TNS_DATA_TYPE_RSSB4,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RSUB2,r.TNS_DATA_TYPE_RSUB2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RSUB1,r.TNS_DATA_TYPE_RSUB1,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RSTXT,r.TNS_DATA_TYPE_RSTXT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RIDL,r.TNS_DATA_TYPE_RIDL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GLRDD,r.TNS_DATA_TYPE_GLRDD,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GLRDG,r.TNS_DATA_TYPE_GLRDG,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_GLRDC,r.TNS_DATA_TYPE_GLRDC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OKO,r.TNS_DATA_TYPE_OKO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DPP,r.TNS_DATA_TYPE_DPP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DPLS,r.TNS_DATA_TYPE_DPLS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DPMOP,r.TNS_DATA_TYPE_DPMOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_STAT,r.TNS_DATA_TYPE_STAT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RFX,r.TNS_DATA_TYPE_RFX,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FAL,r.TNS_DATA_TYPE_FAL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CKV,r.TNS_DATA_TYPE_CKV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DRCX,r.TNS_DATA_TYPE_DRCX,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KGH,r.TNS_DATA_TYPE_KGH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQO,r.TNS_DATA_TYPE_AQO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OKGT,r.TNS_DATA_TYPE_OKGT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPFC,r.TNS_DATA_TYPE_KPFC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_FE2,r.TNS_DATA_TYPE_FE2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SPFP,r.TNS_DATA_TYPE_SPFP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DPULS,r.TNS_DATA_TYPE_DPULS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQA,r.TNS_DATA_TYPE_AQA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPBF,r.TNS_DATA_TYPE_KPBF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TSM,r.TNS_DATA_TYPE_TSM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_MSS,r.TNS_DATA_TYPE_MSS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPC,r.TNS_DATA_TYPE_KPC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CRS,r.TNS_DATA_TYPE_CRS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KKS,r.TNS_DATA_TYPE_KKS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSP,r.TNS_DATA_TYPE_KSP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSPTOP,r.TNS_DATA_TYPE_KSPTOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSPVAL,r.TNS_DATA_TYPE_KSPVAL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PSS,r.TNS_DATA_TYPE_PSS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_NLS,r.TNS_DATA_TYPE_NLS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ALS,r.TNS_DATA_TYPE_ALS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSDEVTVAL,r.TNS_DATA_TYPE_KSDEVTVAL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSDEVTTOP,r.TNS_DATA_TYPE_KSDEVTTOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPSPP,r.TNS_DATA_TYPE_KPSPP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KOL,r.TNS_DATA_TYPE_KOL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LST,r.TNS_DATA_TYPE_LST,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ACX,r.TNS_DATA_TYPE_ACX,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SCS,r.TNS_DATA_TYPE_SCS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RXH,r.TNS_DATA_TYPE_RXH,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNS,r.TNS_DATA_TYPE_KPDNS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDCN,r.TNS_DATA_TYPE_KPDCN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPNNS,r.TNS_DATA_TYPE_KPNNS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPNCN,r.TNS_DATA_TYPE_KPNCN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPS,r.TNS_DATA_TYPE_KPS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_APINF,r.TNS_DATA_TYPE_APINF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TEN,r.TNS_DATA_TYPE_TEN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSCS,r.TNS_DATA_TYPE_XSSCS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSSO,r.TNS_DATA_TYPE_XSSSO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSAO,r.TNS_DATA_TYPE_XSSAO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KSRPC,r.TNS_DATA_TYPE_KSRPC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KVL,r.TNS_DATA_TYPE_KVL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSDEF,r.TNS_DATA_TYPE_XSSDEF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PDQCINV,r.TNS_DATA_TYPE_PDQCINV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PDQIDC,r.TNS_DATA_TYPE_PDQIDC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDQCSTA,r.TNS_DATA_TYPE_KPDQCSTA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPRS,r.TNS_DATA_TYPE_KPRS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDQIDC,r.TNS_DATA_TYPE_KPDQIDC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RTSTRM,r.TNS_DATA_TYPE_RTSTRM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SESSGET,r.TNS_DATA_TYPE_SESSGET,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SESSREL,r.TNS_DATA_TYPE_SESSREL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SESSRET,r.TNS_DATA_TYPE_SESSRET,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SCN6,r.TNS_DATA_TYPE_SCN6,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KECPA,r.TNS_DATA_TYPE_KECPA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KECPP,r.TNS_DATA_TYPE_KECPP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SXA,r.TNS_DATA_TYPE_SXA,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KVARR,r.TNS_DATA_TYPE_KVARR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPNGN,r.TNS_DATA_TYPE_KPNGN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BINARY_INTEGER,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_FLOAT,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_STR,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_VNU,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_PDN,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_VCS,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_VBI,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OAC9,r.TNS_DATA_TYPE_OAC9,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UIN,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_SLS,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_LVC,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_LVB,r.TNS_DATA_TYPE_RAW,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CHAR,r.TNS_DATA_TYPE_CHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AVC,r.TNS_DATA_TYPE_CHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BINARY_FLOAT,r.TNS_DATA_TYPE_BINARY_FLOAT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BINARY_DOUBLE,r.TNS_DATA_TYPE_BINARY_DOUBLE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CURSOR,r.TNS_DATA_TYPE_CURSOR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RDD,r.TNS_DATA_TYPE_ROWID,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OSL,r.TNS_DATA_TYPE_OSL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EXT_NAMED,r.TNS_DATA_TYPE_INT_NAMED,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INT_NAMED,r.TNS_DATA_TYPE_INT_NAMED,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EXT_REF,r.TNS_DATA_TYPE_INT_REF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INT_REF,r.TNS_DATA_TYPE_INT_REF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CLOB,r.TNS_DATA_TYPE_CLOB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BLOB,r.TNS_DATA_TYPE_BLOB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BFILE,r.TNS_DATA_TYPE_BFILE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CFILE,r.TNS_DATA_TYPE_CFILE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_RSET,r.TNS_DATA_TYPE_CURSOR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_JSON,r.TNS_DATA_TYPE_JSON,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DJSON,r.TNS_DATA_TYPE_DJSON,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CLV,r.TNS_DATA_TYPE_CLV,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DTR,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_DUN,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_DOP,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_VST,r.TNS_DATA_TYPE_VARCHAR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ODT,r.TNS_DATA_TYPE_DATE,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_DOL,r.TNS_DATA_TYPE_NUMBER,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_TIME,r.TNS_DATA_TYPE_TIME,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TIME_TZ,r.TNS_DATA_TYPE_TIME_TZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TIMESTAMP,r.TNS_DATA_TYPE_TIMESTAMP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TIMESTAMP_TZ,r.TNS_DATA_TYPE_TIMESTAMP_TZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INTERVAL_YM,r.TNS_DATA_TYPE_INTERVAL_YM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_INTERVAL_DS,r.TNS_DATA_TYPE_INTERVAL_DS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EDATE,r.TNS_DATA_TYPE_DATE,r.TNS_TYPE_REP_ORACLE],[r.TNS_DATA_TYPE_ETIME,r.TNS_DATA_TYPE_ETIME,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ETTZ,r.TNS_DATA_TYPE_ETTZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ESTAMP,r.TNS_DATA_TYPE_ESTAMP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ESTZ,r.TNS_DATA_TYPE_ESTZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EIYM,r.TNS_DATA_TYPE_EIYM,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_EIDS,r.TNS_DATA_TYPE_EIDS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DCLOB,r.TNS_DATA_TYPE_CLOB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DBLOB,r.TNS_DATA_TYPE_BLOB,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_DBFILE,r.TNS_DATA_TYPE_BFILE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UROWID,r.TNS_DATA_TYPE_UROWID,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TIMESTAMP_LTZ,r.TNS_DATA_TYPE_TIMESTAMP_LTZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_ESITZ,r.TNS_DATA_TYPE_TIMESTAMP_LTZ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UB8,r.TNS_DATA_TYPE_UB8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_PNTY,r.TNS_DATA_TYPE_INT_NAMED,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_BOOLEAN,r.TNS_DATA_TYPE_BOOLEAN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSNSOP,r.TNS_DATA_TYPE_XSNSOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSATTR,r.TNS_DATA_TYPE_XSATTR,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSNS,r.TNS_DATA_TYPE_XSNS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UB1ARRAY,r.TNS_DATA_TYPE_UB1ARRAY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SESSSTATE,r.TNS_DATA_TYPE_SESSSTATE,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AC_REPLAY,r.TNS_DATA_TYPE_AC_REPLAY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AC_CONT,r.TNS_DATA_TYPE_AC_CONT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_IMPLRES,r.TNS_DATA_TYPE_IMPLRES,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OER19,r.TNS_DATA_TYPE_OER19,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TXT,r.TNS_DATA_TYPE_TXT,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSESSNS,r.TNS_DATA_TYPE_XSSESSNS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSATTOP,r.TNS_DATA_TYPE_XSATTOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSCREOP,r.TNS_DATA_TYPE_XSCREOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSDETOP,r.TNS_DATA_TYPE_XSDETOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSDESOP,r.TNS_DATA_TYPE_XSDESOP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSETSP,r.TNS_DATA_TYPE_XSSETSP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSIDP,r.TNS_DATA_TYPE_XSSIDP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSPRIN,r.TNS_DATA_TYPE_XSPRIN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSKVL,r.TNS_DATA_TYPE_XSKVL,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSSSDEF2,r.TNS_DATA_TYPE_XSSSDEF2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSNSOP2,r.TNS_DATA_TYPE_XSNSOP2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_XSNS2,r.TNS_DATA_TYPE_XSNS2,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNREQ,r.TNS_DATA_TYPE_KPDNREQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNRNF,r.TNS_DATA_TYPE_KPDNRNF,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPNGNC,r.TNS_DATA_TYPE_KPNGNC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPNRI,r.TNS_DATA_TYPE_KPNRI,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQENQ,r.TNS_DATA_TYPE_AQENQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQDEQ,r.TNS_DATA_TYPE_AQDEQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_AQJMS,r.TNS_DATA_TYPE_AQJMS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNRPAY,r.TNS_DATA_TYPE_KPDNRPAY,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNRACK,r.TNS_DATA_TYPE_KPDNRACK,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNRMP,r.TNS_DATA_TYPE_KPDNRMP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_KPDNRDQ,r.TNS_DATA_TYPE_KPDNRDQ,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SCN,r.TNS_DATA_TYPE_SCN,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_SCN8,r.TNS_DATA_TYPE_SCN8,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_CHUNKINFO,r.TNS_DATA_TYPE_CHUNKINFO,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UD21,r.TNS_DATA_TYPE_UD21,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_UDS,r.TNS_DATA_TYPE_UDS,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_TNP,r.TNS_DATA_TYPE_TNP,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OER,r.TNS_DATA_TYPE_OER,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_OAC,r.TNS_DATA_TYPE_OAC,r.TNS_TYPE_REP_UNIVERSAL],[r.TNS_DATA_TYPE_VECTOR,r.TNS_DATA_TYPE_VECTOR,r.TNS_TYPE_REP_UNIVERSAL]];t.exports=class extends i{processMessage(t,e){if(e===r.TNS_MSG_TYPE_DATA_TYPES){for(;0!==t.readUInt16BE();)0!==t.readUInt16BE()&&t.skipBytes(4);this.endOfResponse=!this.connection.nscon.endOfRequestSupport}else super.processMessage(t,e)}encode(t){t.writeUInt8(r.TNS_MSG_TYPE_DATA_TYPES),t.writeUInt16LE(r.TNS_CHARSET_UTF8),t.writeUInt16LE(r.TNS_CHARSET_UTF8),t.writeUInt8(r.TNS_ENCODING_MULTI_BYTE|r.TNS_ENCODING_CONV_LENGTH),t.writeBytesWithLength(t.caps.compileCaps),t.writeBytesWithLength(t.caps.runtimeCaps);for(const e of s)t.writeUInt16BE(e[0]),t.writeUInt16BE(e[1]),t.writeUInt16BE(e[2]),t.writeUInt16BE(0);t.writeUInt16BE(0)}}},1375:(t,e,n)=>{"use strict";const r=n(9386),i=n(3762),s=n(8041);t.exports=class extends r{constructor(t,e,n,r){super(t,e,n),!r&&e.isQuery&&(r=t._createResultSet(n,e)),this.resultSet=r,this.functionCode=i.TNS_FUNC_EXECUTE,this.bindParams=void 0,this.currentRow=0}writeExecuteMessage(t){let e=0,n=0,r=0,o=1;const a=this.statement,u=a.bindInfoList;if(this.noImplicitRelease&&(n|=i.TNS_EXEC_OPTION_NO_IMPL_REL),a.requiresDefine||this.parseOnly||!u||(r=u.length),a.requiresDefine?e|=i.TNS_EXEC_OPTION_DEFINE:!this.parseOnly&&a.sql&&(n|=i.TNS_EXEC_OPTION_IMPLICIT_RESULTSET,e|=i.TNS_EXEC_OPTION_EXECUTE),(0===a.cursorId||a.isDdl)&&(e|=i.TNS_EXEC_OPTION_PARSE),a.isQuery&&(this.parseOnly?e|=i.TNS_EXEC_OPTION_DESCRIBE:(o=0===a.cursorId||a.requiresDefine?this.options.prefetchRows:this.options.fetchArraySize,o>0&&!a.noPrefetch&&(e|=i.TNS_EXEC_OPTION_FETCH))),a.isPlSql||this.parseOnly?a.isPlSql&&r>0&&(e|=i.TNS_EXEC_OPTION_PLSQL_BIND):e|=i.TNS_EXEC_OPTION_NOT_PLSQL,r>0&&(e|=i.TNS_EXEC_OPTION_BIND),this.batchErrors&&(e|=i.TNS_EXEC_OPTION_BATCH_ERRORS),this.arrayDmlRowCounts&&(n=i.TNS_EXEC_OPTION_DML_ROWCOUNTS),this.options.autoCommit&&(e|=i.TNS_EXEC_OPTION_COMMIT),this.writePiggybacks(t),this.writeFunctionHeader(t),t.writeUB4(e),t.writeUB4(a.cursorId),0===a.cursorId||a.isDdl?(t.writeUInt8(1),t.writeUB4(a.sqlLength)):(t.writeUInt8(0),t.writeUB4(0)),t.writeUInt8(1),t.writeUB4(13),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUB4(o),t.writeUB4(i.TNS_MAX_LONG_LENGTH),0===r?(t.writeUInt8(0),t.writeUB4(0)):(t.writeUInt8(1),t.writeUB4(r)),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),a.requiresDefine?(t.writeUInt8(1),t.writeUB4(this.statement.queryVars.length)):(t.writeUInt8(0),t.writeUB4(0)),t.writeUB4(0),t.writeUInt8(0),t.writeUInt8(1),t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0),t.writeUB4(0),this.arrayDmlRowCounts?(t.writeUInt8(1),t.writeUB4(this.numExecs),t.writeUInt8(1)):(t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0)),t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_12_2&&(t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.writeUB4(0),t.writeUInt8(0),t.caps.ttcFieldVersion>=i.TNS_CCAP_FIELD_VERSION_12_2_EXT1&&(t.writeUInt8(0),t.writeUB4(0))),0===a.cursorId||a.isDdl?a.sql?(t.writeBytesWithLength(a.sqlBytes),t.writeUB4(1)):s.throwErr(s.ERR_INVALID_REF_CURSOR):t.writeUB4(0),a.isQuery?0===a.cursorId?t.writeUB4(0):t.writeUB4(o):t.writeUB4(this.numExecs),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(a.isQuery?1:0),t.writeUB4(0),t.writeUB4(n),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),a.requiresDefine)this.writeColumnMetadata(t,this.statement.queryVars);else if(r>0)return this.processBindParams(t,u)}writeReExecuteMessage(t){const e=this.statement;let n,r=e.bindInfoList,s=0,o=0;if(void 0!==r){e.isQuery||(this.outVariables=[],r.forEach((t=>{t.bindDir!==i.TNS_BIND_DIR_INPUT&&this.outVariables.push(t.bindVar)})));const t=[];r.forEach((e=>{e.bindDir===i.TNS_BIND_DIR_OUTPUT||e.isReturnBind||t.push(e)})),r=t}return this.functionCode===i.TNS_FUNC_REEXECUTE_AND_FETCH?(s|=i.TNS_EXEC_OPTION_EXECUTE,n=this.options.prefetchRows):(this.options.autoCommit&&(o|=i.TNS_EXEC_OPTION_COMMIT_REEXECUTE),n=this.numExecs),this.writePiggybacks(t),this.writeFunctionHeader(t),t.writeUB4(e.cursorId),t.writeUB4(n),t.writeUB4(s),t.writeUB4(o),r}encode(t){if(0===this.currentRow){const e=this.statement;0===e.cursorId||e.requiresFullExecute||this.parseOnly||e.requiresDefine||e.noPrefetch||e.isDdl||this.batchErrors?(this.functionCode=i.TNS_FUNC_EXECUTE,this.bindParams=this.writeExecuteMessage(t)):(e.isQuery&&this.options.prefetchRows>0?this.functionCode=i.TNS_FUNC_REEXECUTE_AND_FETCH:this.functionCode=i.TNS_FUNC_REEXECUTE,this.bindParams=this.writeReExecuteMessage(t))}if(this.bindParams&&this.bindParams.length>0){const e=t.nsi.ntAdapter;for(;this.currentRow<this.numExecs;)if(t.writeUInt8(i.TNS_MSG_TYPE_ROW_DATA),this.writeBindParamsRow(t,this.bindParams,this.currentRow),this.currentRow++,this.currentRow<this.numExecs&&e.shouldPauseWrite())return!0}this.currentRow=0,this.bindParams=void 0}}},4826:(t,e,n)=>{"use strict";const r=n(3762),i=n(3815);t.exports=class extends i{encode(t){t.writeUInt8(r.TNS_MSG_TYPE_FAST_AUTH),t.writeUInt8(1),t.writeUInt8(r.TNS_SERVER_CONVERTS_CHARS),t.writeUInt8(0),this.protocolMessage.encode(t),t.writeUInt16BE(0),t.writeUInt8(0),t.writeUInt16BE(0),t.caps.ttcFieldVersion=r.TNS_CCAP_FIELD_VERSION_19_1_EXT_1,t.writeUInt8(t.caps.ttcFieldVersion),this.dataTypeMessage.encode(t),this.authMessage.encode(t),t.caps.ttcFieldVersion=r.TNS_CCAP_FIELD_VERSION_MAX}processMessage(t,e){e===r.TNS_MSG_TYPE_RENEGOTIATE?this.reNegotiate=!0:e===r.TNS_MSG_TYPE_PROTOCOL?this.protocolMessage.processMessage(t,e):e===r.TNS_MSG_TYPE_DATA_TYPES?this.dataTypeMessage.processMessage(t,e):(this.authMessage.processMessage(t,e),this.endOfResponse=this.authMessage.endOfResponse)}}},2752:(t,e,n)=>{"use strict";const r=n(3762),i=n(9386),s=n(8041);t.exports=class extends i{constructor(t,e,n,i){super(t,e,n),this.resultSet=i,this.functionCode=r.TNS_FUNC_FETCH}encode(t){this.writeFunctionHeader(t),0===this.statement.cursorId&&s.throwErr(s.ERR_CURSOR_HAS_BEEN_CLOSED),t.writeUB4(this.statement.cursorId),t.writeUB4(this.options.fetchArraySize)}}},9448:(t,e,n)=>{"use strict";const r=n(5732),i=n(2283),s=n(7030),o=n(1375),a=n(2752),u=n(5286),_=n(3817),c=n(5674),l=n(3462),h=n(9630),T=n(8915),p=n(4826);t.exports={AuthMessage:r,CommitMessage:i,FastAuthMessage:p,DataTypeMessage:s,ExecuteMessage:o,FetchMessage:a,LobOpMessage:u,LogOffMessage:_,PingMessage:c,ProtocolMessage:l,RollbackMessage:h,SessionReleaseMessage:T}},5286:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(3815);t.exports=class extends s{constructor(t,e){super(t),this.sourceLobImpl=e.sourceLobImpl||null,this.operation=e.operation,this.destLobImpl=e.destLobImpl||null,this.sourceOffset=e.sourceOffset||0,this.destOffset=e.destOffset||0,this.boolFlag=!1,e.data&&(this.data=e.data),this.functionCode=i.TNS_FUNC_LOB_OP,this.sendAmount=e.sendAmount,this.amount=e.amount||0}encode(t){this.writeFunctionHeader(t),null===this.sourceLobImpl?(t.writeUInt8(0),t.writeUB4(0)):(t.writeUInt8(1),t.writeUB4(this.sourceLobImpl._locator.length)),null===this.destLobImpl?(t.writeUInt8(0),t.writeUB4(0)):(t.writeUInt8(1),t.writeUB4(this.destLobImpl._locator.length)),t.writeUB4(0),t.writeUB4(0),this.operation===i.TNS_LOB_OP_CREATE_TEMP?t.writeUInt8(1):t.writeUInt8(0),t.writeUInt8(0),this.operation===i.TNS_LOB_OP_CREATE_TEMP||this.operation===i.TNS_LOB_OP_IS_OPEN?t.writeUInt8(1):t.writeUInt8(0),t.writeUB4(this.operation),t.writeUInt8(0),t.writeUInt8(0),t.writeUB8(this.sourceOffset),t.writeUB8(this.destOffset),this.sendAmount?t.writeUInt8(1):t.writeUInt8(0);for(let e=0;e<3;e++)t.writeUInt16BE(0);if(this.sourceLobImpl&&t.writeBytes(this.sourceLobImpl._locator),this.destLobImpl&&t.writeBytes(this.destLobImpl._locator),this.operation===i.TNS_LOB_OP_CREATE_TEMP&&(this.sourceLobImpl.dbType._csfrm===i.CSFRM_NCHAR?(t.caps.checkNCharsetId(),t.writeUB4(i.TNS_CHARSET_UTF16)):t.writeUB4(i.TNS_CHARSET_UTF8)),this.data){let e;t.writeUInt8(i.TNS_MSG_TYPE_LOB_DATA),this.sourceLobImpl.dbType._oraTypeNum===i.TNS_DATA_TYPE_BLOB?e=this.data:this.sourceLobImpl.getCsfrm()===i.CSFRM_NCHAR?(e=this.data,r.isBuffer(this.data)&&(e=e.toString()),e=r.from(e,i.TNS_ENCODING_UTF16).swap16()):e=r.from(this.data),t.writeBytesWithLength(e)}this.sendAmount&&t.writeUB8(this.amount)}processMessage(t,e){if(e===i.TNS_MSG_TYPE_LOB_DATA){const e=this.sourceLobImpl.dbType._oraTypeNum;let n=t.readBytesWithLength();null!==n&&(n=e===i.TNS_DATA_TYPE_BLOB?r.from(n):this.sourceLobImpl.getCsfrm()===i.CSFRM_NCHAR?r.from(n).swap16().toString("utf16le"):n.toString()),this.data=n}else super.processMessage(t,e)}processReturnParameter(t){let e,n,r,s;null!==this.sourceLobImpl&&(s=this.sourceLobImpl._locator.length,e=t.readBytes(s),n=e.slice(0,s),n.copy(this.sourceLobImpl._locator)),null!==this.destLobImpl&&(s=this.destLobImpl._locator.length,e=t.readBytes(s),n=e.slice(0,s),n.copy(this.destLobImpl._locator)),this.operation===i.TNS_LOB_OP_CREATE_TEMP?(t.skipUB2(),t.skipBytes(3)):this.sendAmount&&(this.amount=t.readSB8()),this.operation===i.TNS_LOB_OP_IS_OPEN&&(r=t.readUB1(),this.boolFlag=r>0)}}},3817:(t,e,n)=>{"use strict";const r=n(3815),i=n(3762);t.exports=class extends r{constructor(t){super(t),this.functionCode=i.TNS_FUNC_LOGOFF}encode(t){this.writePiggybacks(t),this.writeFunctionHeader(t)}}},5674:(t,e,n)=>{"use strict";const r=n(3815),i=n(3762);t.exports=class extends r{constructor(t){super(t),this.functionCode=i.TNS_FUNC_PING}encode(t){this.writeFunctionHeader(t)}}},3462:(t,e,n)=>{"use strict";const r=n(3762),i=n(3815);t.exports=class extends i{encode(t){t.writeUInt8(r.TNS_MSG_TYPE_PROTOCOL),t.writeUInt8(6),t.writeUInt8(0),t.writeStr("node-oracledb"),t.writeUInt8(0)}processMessage(t,e){e===r.TNS_MSG_TYPE_PROTOCOL?(this.processProtocolInfo(t),this.endOfResponse=!this.connection.nscon.endOfRequestSupport):super.processMessage(t,e)}processProtocolInfo(t){this.serverVersion=t.readUInt8(),t.skipUB1(),this.serverBanner=t.readNullTerminatedBytes(48),t.caps.charSetID=t.readUInt16LE(),this.serverFlags=t.readUInt8();const e=t.readUInt16LE();e>0&&t.skipBytes(5*e);const n=t.readUInt16BE(),i=t.readBytes(n),s=6+i[5]+i[6];t.caps.nCharsetId=(i[s+3]<<8)+i[s+4];const o=t.readBytesWithLength();o&&(this.serverCompileCaps=Buffer.from(o),t.caps.adjustForServerCompileCaps(this.serverCompileCaps,this.connection.nscon),t.caps.ttcFieldVersion>=r.TNS_CCAP_FIELD_VERSION_23_1?this.connection._osonMaxFieldNameSize=65535:this.connection._osonMaxFieldNameSize=255);const a=t.readBytesWithLength();a&&(this.serverRunTimeCaps=Buffer.from(a),t.caps.adjustForServerRuntimeCaps(this.serverRunTimeCaps))}}},9630:(t,e,n)=>{"use strict";const r=n(3815),i=n(3762);t.exports=class extends r{constructor(t){super(t),this.functionCode=i.TNS_FUNC_ROLLBACK}encode(t){this.writeFunctionHeader(t)}}},8915:(t,e,n)=>{"use strict";const r=n(3815),i=n(3762);t.exports=class extends r{constructor(t){super(t),this.functionCode=i.TNS_FUNC_SESSION_RELEASE,this.messageType=i.TNS_MSG_TYPE_ONEWAY_FN,this.sessReleaseMode=0}encode(t){this.writeFunctionHeader(t),t.writeUInt8(0),t.writeUInt8(0),t.writeUB4(this.sessReleaseMode)}decode(){}}},9386:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(5914),s=n(3762),o=n(3815),{ThinDbObjectImpl:a,readXML:u}=n(4785),_=n(1159),c=n(8041),l=n(6893),h=t=>0===t||t===s.TNS_NULL_LENGTH_INDICATOR;t.exports=class extends o{constructor(t,e=null,n=null){super(t),this.statement=e,this.options=n,this.offset=0,this.numExecs=1,this.arrayDmlRowCounts=!1,this.requiresDefine=!1,this.rowIndex=e.bufferRowCount||0,this.dmlRowCounts=[],this.batchErrors=!1,this.outVariables=[],this.inFetch=!1,this.parseOnly=!1,this.resultSetsToSetup=[],this.deferredErr=null}processMessage(t,e){if(e===s.TNS_MSG_TYPE_DESCRIBE_INFO){t.skipBytesChunked();const e=this.statement.queryVars;this.statement.queryVars=[],this.statement.numQueryVars=0,this.statement.bufferRowCount=0,this.statement.bufferRowIndex=0,this.processDescribeInfo(t,this.resultSet,e),this.outVariables=this.statement.queryVars}else e===s.TNS_MSG_TYPE_ROW_HEADER?this.processRowHeader(t):e===s.TNS_MSG_TYPE_ROW_DATA?this.processRowData(t):e===s.TNS_MSG_TYPE_IMPLICIT_RESULTSET?this.processImplicitResultSet(t):e===s.TNS_MSG_TYPE_BIT_VECTOR?this.processBitVector(t):e===s.TNS_MSG_TYPE_IO_VECTOR?this.processIOVector(t):e===s.TNS_MSG_TYPE_FLUSH_OUT_BINDS?(this.flushOutBinds=!0,this.endOfResponse=!0):e===s.TNS_MSG_TYPE_ERROR?this.processErrorInfo(t):super.processMessage(t,e)}processErrorInfo(t){super.processErrorInfo(t),0!==this.errorInfo.cursorId&&(this.statement.cursorId=this.errorInfo.cursorId),this.statement.isPlSql||(this.statement.rowCount=this.errorInfo.rowCount),this.errorInfo.rowCount>0&&(this.statement.lastRowid=i.encodeRowID(this.errorInfo.rowID)),this.options.batchErrors=this.errorInfo.batchErrors,this.batchErrors&&null===this.options.batchErrors&&(this.options.batchErrors=[]),this.errorInfo.num===s.TNS_ERR_NO_DATA_FOUND&&this.statement.isQuery?(this.errorInfo.num=0,this.errorOccurred=!1,this.statement.moreRowsToFetch=!1):this.retry?this.retry=!1:!this.statement.isQuery||this.errorInfo.num!==s.TNS_ERR_VAR_NOT_IN_SELECT_LIST&&this.errorInfo.num!==s.TNS_ERR_INCONSISTENT_DATA_TYPES?0!==this.errorInfo.num&&0!==this.errorInfo.cursorId&&(c.ERR_INTEGRITY_ERROR_CODES.includes(this.errorInfo.num)||(this.connection.statementCache.clearCursor(this.statement),this.statement.returnToCache=!1)):(this.retry=!0,this.connection.statementCache.clearCursor(this.statement)),this.errorInfo.batchErrors&&(this.errorOccurred=!1)}_adjustFetchType(t,e){(e.fetchInfo.dbType._oraTypeNum===s.TNS_DATA_TYPE_CLOB&&t.fetchInfo.fetchType._oraTypeNum===s.TNS_DATA_TYPE_LONG||e.fetchInfo.dbType._oraTypeNum===s.TNS_DATA_TYPE_BLOB&&t.fetchInfo.fetchType._oraTypeNum===s.TNS_DATA_TYPE_LONG_RAW)&&(e.type=t.fetchInfo.fetchType,e.maxSize=t.maxSize)}processDescribeInfo(t,e,n){const r=e.statement;t.skipUB4(),r.numQueryVars=t.readUB4(),r.numQueryVars>0&&t.skipUB1(),e.metadata=[];const i=[],s=[];for(let e=0;e<r.numQueryVars;e++){const r=this.processColumnInfo(t,e+1);n&&e<n.length&&this._adjustFetchType(n[e],r),s.push(r),i.push(r.fetchInfo)}let o=t.readUB4();o>0&&t.skipBytesChunked(),t.skipUB4(),t.skipUB4(),t.skipUB4(),t.skipUB4(),o=t.readUB4(),o>0&&t.skipBytesChunked(),e.metadata=i,r.queryVars=s,this.resultSetsToSetup.push(e)}processColumnInfo(t,e){const n=t.readUInt8();t.skipUB1();const i=t.readInt8(),o=t.readInt8(),a=t.readUB4();let u;t.skipUB4(),t.skipUB8();let _=t.readUB4();_>0&&(u=r.from(t.readBytesWithLength())),t.skipUB2(),t.skipUB2();const c=t.readUInt8();let h=t.readUB4();n===s.TNS_DATA_TYPE_RAW&&(h=a),t.caps.ttcFieldVersion>=s.TNS_CCAP_FIELD_VERSION_12_2&&t.skipUB4();const T=Boolean(t.readUInt8());let p,f,E;t.skipUB1(),_=t.readUB4(),_>0&&(p=t.readStr(s.CSFRM_IMPLICIT)),_=t.readUB4(),_>0&&(f=t.readStr(s.CSFRM_IMPLICIT)),_=t.readUB4(),_>0&&(E=t.readStr(s.CSFRM_IMPLICIT)),t.skipUB2();const d=t.readUB4(),N={name:p,dbType:l.getTypeByOraTypeNum(n,c),nullable:T};if(N.isJson=Boolean(d&s.TNS_UDS_FLAGS_IS_JSON),N.isOson=Boolean(d&s.TNS_UDS_FLAGS_IS_OSON),t.caps.ttcFieldVersion>=s.TNS_CCAP_FIELD_VERSION_23_1&&(_=t.readUB4(),_>0&&(N.domainSchema=t.readStr(s.CSFRM_IMPLICIT)),_=t.readUB4(),_>0&&(N.domainName=t.readStr(s.CSFRM_IMPLICIT))),t.caps.ttcFieldVersion>=s.TNS_CCAP_FIELD_VERSION_23_1_EXT_3&&t.readUB4()>0){N.annotations={},t.skipUB1();const e=t.readUB4();let n,r;t.skipUB1();for(let i=0;i<e;i++)t.skipUB4(),r="",n=t.readStr(s.CSFRM_IMPLICIT),_=t.readUB4(),_>0&&(r=t.readStr(s.CSFRM_IMPLICIT)),N.annotations[n]=r,t.skipUB4();t.skipUB4()}if(t.caps.ttcFieldVersion>=s.TNS_CCAP_FIELD_VERSION_23_4){const e=t.readUB4(),n=t.readUInt8(),r=t.readUInt8();N.dbType===l.DB_TYPE_VECTOR&&(r&s.VECTOR_META_FLAG_FLEXIBLE_DIM||(N.vectorDimensions=e),n!==s.VECTOR_FORMAT_FLEX&&(N.vectorFormat=n))}switch(N.dbType){case l.DB_TYPE_VARCHAR:case l.DB_TYPE_NVARCHAR:case l.DB_TYPE_CHAR:case l.DB_TYPE_NCHAR:case l.DB_TYPE_RAW:N.byteSize=h;break;case l.DB_TYPE_NUMBER:N.precision=i;break;case l.DB_TYPE_TIMESTAMP:case l.DB_TYPE_TIMESTAMP_TZ:case l.DB_TYPE_TIMESTAMP_LTZ:N.precision=o;break;case l.DB_TYPE_OBJECT:N.dbTypeClass=this.connection._getDbObjectType(f,E,void 0,u),N.dbTypeClass.partial&&this.connection._partialDbObjectTypes.push(N.dbTypeClass),N.dbTypeClass.isXmlType&&(N.dbType=l.DB_TYPE_XMLTYPE)}return N.dbType===l.DB_TYPE_NUMBER&&(N.scale=o),{fetchInfo:N,type:N.dbType,maxSize:a,columnNum:e,values:new Array(this.options.fetchArraySize)}}processRowHeader(t){t.skipUB1(),t.skipUB2(),t.skipUB4(),t.skipUB4(),t.skipUB2();let e=t.readUB4();e>0&&(this.bitVector=r.from(t.readBytesWithLength())),e=t.readUB4(),e>0&&t.skipBytesChunked()}isDuplicateData(t){if(!this.bitVector)return!1;const e=Math.floor(t/8),n=t%8;return!(this.bitVector[e]&1<<n)}processRowData(t){let e;for(const[n,r]of this.outVariables.entries())if(r.isArray){r.numElementsInArray=t.readUB4();const n=new Array(r.numElementsInArray).fill(null);for(let i=0;i<r.numElementsInArray;i++)e=this.processColumnData(t,r,i),n[i]=e;r.values[this.rowIndex]=n}else if(this.statement.isReturning){const e=t.readUB4(),n=Array(e).fill(null);for(let i=0;i<e;i++)n[i]=this.processColumnData(t,r,i);r.values[this.rowIndex]=n}else this.isDuplicateData(n)?(e=0===this.rowIndex&&r.outConverter?r.lastRawValue:r.values[this.statement.lastRowIndex],r.values[this.rowIndex]=e):(e=this.processColumnData(t,r,this.rowIndex),r.values[this.rowIndex]=e);this.rowIndex++,this.inFetch&&(this.statement.lastRowIndex=this.rowIndex-1,this.statement.bufferRowCount++,this.bitVector=null)}processIOVector(t){let e;t.skipUB1();const n=t.readUB2(),r=256*t.readUB4()+n;t.skipUB4(),t.skipUB2(),e=t.readUB2(),e>0&&t.skipBytes(e),e=t.readUB2(),e>0&&t.skipBytes(e),this.outVariables=[];for(let e=0;e<r;e++){const n=this.statement.bindInfoList[e];n.bindDir=t.readUInt8(),n.bindDir!==s.TNS_BIND_DIR_INPUT&&this.outVariables.push(n.bindVar)}}processColumnData(t,e){const n=e.type,o=n._oraTypeNum,T=n._csfrm;let p=null;if(0===e.maxSize&&o!==s.TNS_DATA_TYPE_LONG&&o!==s.TNS_DATA_TYPE_LONG_RAW&&o!==s.TNS_DATA_TYPE_UROWID)p=null;else if(o===s.TNS_DATA_TYPE_VARCHAR||o===s.TNS_DATA_TYPE_CHAR||o===s.TNS_DATA_TYPE_LONG)T===s.CSFRM_NCHAR&&t.caps.checkNCharsetId(),p=t.readStr(T);else if(o===s.TNS_DATA_TYPE_RAW||o===s.TNS_DATA_TYPE_LONG_RAW)p=t.readBytesWithLength(),null!==p&&(p=r.from(p));else if(o===s.TNS_DATA_TYPE_NUMBER)p=t.readOracleNumber(),this.inFetch||null===p||(p=parseFloat(p));else if(o===s.TNS_DATA_TYPE_DATE||o===s.TNS_DATA_TYPE_TIMESTAMP||o===s.TNS_DATA_TYPE_TIMESTAMP_LTZ||o===s.TNS_DATA_TYPE_TIMESTAMP_TZ){const e=o===s.TNS_DATA_TYPE_DATE||o===s.TNS_DATA_TYPE_TIMESTAMP;p=t.readOracleDate(e)}else if(o===s.TNS_DATA_TYPE_ROWID)if(this.inFetch){const e=t.readUInt8();if(h(e))p=null;else{const e=t.readRowID();p=i.encodeRowID(e)}}else p=t.readStr(s.CSFRM_IMPLICIT);else if(o===s.TNS_DATA_TYPE_UROWID)p=this.inFetch?t.readURowID():t.readStr(s.CSFRM_IMPLICIT);else if(o===s.TNS_DATA_TYPE_BINARY_DOUBLE)p=t.readBinaryDouble();else if(o===s.TNS_DATA_TYPE_BINARY_FLOAT)p=t.readBinaryFloat();else if(o===s.TNS_DATA_TYPE_BINARY_INTEGER)p=t.readOracleNumber(),null!==p&&(p=parseFloat(p));else if(o===s.TNS_DATA_TYPE_CURSOR){const n=t.readUInt8();h(n)?p=null:(p=this.createCursorFromDescribe(t),p.statement.cursorId=t.readUB2(),0===p.statement.cursorId&&e.dir!==s.BIND_IN&&(this.options.nullifyInvalidCursor?p=null:c.throwErr(c.ERR_INVALID_REF_CURSOR)))}else if(o===s.TNS_DATA_TYPE_BOOLEAN)p=t.readBool();else if(o===s.TNS_DATA_TYPE_CLOB||o===s.TNS_DATA_TYPE_BLOB){if(t.readUB4()>0){p=new _;const e=t.readUB8(),i=t.readUB4(),s=r.from(t.readBytesWithLength());p.init(this.connection,s,n,e,i)}}else if(o===s.TNS_DATA_TYPE_JSON)p=t.readOson();else if(o===s.TNS_DATA_TYPE_VECTOR)p=t.readVector();else if(o===s.TNS_DATA_TYPE_INT_NAMED){const n=t.readDbObject();if(n.packedData){const t=e.fetchInfo?e.fetchInfo.dbTypeClass:e.typeClass;e.type===l.DB_TYPE_XMLTYPE?p=u(this.connection,n.packedData):(p=new a(t,n.packedData),p.toid=n.toid,p.oid=n.oid)}}else c.throwErr(c.ERR_UNSUPPORTED_DATA_TYPE,n.num,e.columnNum);if(this.inFetch)(o===s.TNS_DATA_TYPE_LONG||o===s.TNS_DATA_TYPE_LONG_RAW||e.maxSize>t.caps.maxStringSize)&&(t.skipSB4(),t.skipUB4());else{const e=t.readSB4();e<0&&o===s.TNS_DATA_TYPE_BOOLEAN?p=null:0!==e&&null!==p&&o!==s.TNS_DATA_TYPE_INT_NAMED&&this.saveDeferredErr(c.ERR_INSUFFICIENT_BUFFER_FOR_BINDS)}return p}processReturnParameter(t){let e,n=0,r=t.readUB2();for(let e=0;e<r;e++)t.skipUB4();let i=t.readUB2();i>0&&t.skipBytes(i),r=t.readUB2();for(let o=0;o<r;o++)i=t.readUB2(),i>0&&(e=t.readStr(s.CSFRM_IMPLICIT)),i=t.readUB2(),i>0&&t.skipBytesChunked(),n=t.readUB2(),n===s.TNS_KEYWORD_NUM_CURRENT_SCHEMA?this.connection.currentSchema=e:n===s.TNS_KEYWORD_NUM_EDITION&&(this.connection._edition=e);if(i=t.readUB2(),i>0&&t.skip(i),this.arrayDmlRowCounts){const e=t.readUB4(),n=this.options.dmlRowCounts=[];for(let r=0;r<e;r++){const e=t.readUB8();n.push(e)}}}async postProcess(){if(this.deferredErr)throw this.deferredErr;if(this.outVariables)for(const t of this.outVariables)if(t.isArray){if(t.outConverter)for(let e=0;e<t.numElementsInArray;e++)t.values[0][e]=await t.outConverter(t.values[0][e])}else t.outConverter&&(t.values[0]=await t.outConverter(t.values[0]));await this.connection._populatePartialDbObjectTypes();for(const t of this.resultSetsToSetup){t._setup(this.options,t.metadata);for(const e of t.statement.queryVars)e.type!==l.DB_TYPE_CLOB&&e.type!==l.DB_TYPE_NCLOB&&e.type!==l.DB_TYPE_BLOB&&e.type!==l.DB_TYPE_JSON&&e.type!==l.DB_TYPE_VECTOR||(e.type!==e.fetchInfo.fetchType&&(e.type=e.fetchInfo.fetchType,e.maxSize=s.TNS_MAX_LONG_LENGTH),t.statement.noPrefetch||(t.statement.requiresDefine=!0,t.statement.noPrefetch=!0))}}preProcess(){if(this.statement.isReturning&&!this.parseOnly){this.outVariables=[];for(const t of this.statement.bindInfoList)t.isReturnBind&&this.outVariables.push(t.bindVar)}if(this.statement.isQuery&&(this.inFetch=!0,this.statement.queryVars)){this.outVariables=[];for(let t=0;t<this.statement.queryVars.length;t++)this.outVariables.push(this.statement.queryVars[t])}}processBitVector(t){this.numColumnsSent=t.readUB2();let e=Math.floor(this.statement.numQueryVars/8);this.statement.numQueryVars%8>0&&(e+=1),this.bitVector=r.from(t.readBytes(e))}processBindParams(t,e){const n=[],r=[];for(const t of e)t.isReturnBind||r.push(t),n.push(t.bindVar);return this.writeColumnMetadata(t,n),r}writeColumnMetadata(t,e){for(const n of e){let e=n.type._oraTypeNum,r=n.maxSize||n.type._bufferSizeFactor,i=0;n.type._csfrm===s.CSFRM_NCHAR&&(r*=n.type._bufferSizeFactor),[s.TNS_DATA_TYPE_ROWID,s.TNS_DATA_TYPE_UROWID].includes(e)&&(e=s.TNS_DATA_TYPE_VARCHAR,r=s.TNS_MAX_UROWID_LENGTH);let o=s.TNS_BIND_USE_INDICATORS;n.isArray&&(o|=s.TNS_BIND_ARRAY);let a=0;if(n.type===l.DB_TYPE_BLOB||n.type===l.DB_TYPE_CLOB||n.type===l.DB_TYPE_NCLOB?a=s.TNS_LOB_PREFETCH_FLAG:n.type===l.DB_TYPE_JSON?(a=s.TNS_LOB_PREFETCH_FLAG,r=i=s.TNS_JSON_MAX_LENGTH):n.type===l.DB_TYPE_VECTOR&&(a=s.TNS_LOB_PREFETCH_FLAG,r=i=s.TNS_VECTOR_MAX_LENGTH),t.writeUInt8(e),t.writeUInt8(o),t.writeUInt8(0),t.writeUInt8(0),r>t.caps.maxStringSize?t.writeUB4(s.TNS_MAX_LONG_LENGTH):t.writeUB4(r),n.isArray?t.writeUB4(n.maxArraySize):t.writeUB4(0),t.writeUB4(a),n.objType){const e=n.objType;t.writeUB4(e.oid.length),t.writeBytesWithLength(e.oid),t.writeUB2(e.version)}else t.writeUB4(0),t.writeUB2(0);0!==n.type._csfrm?t.writeUB2(s.TNS_CHARSET_UTF8):t.writeUB2(0),t.writeUInt8(n.type._csfrm),t.writeUB4(i),t.caps.ttcFieldVersion>=s.TNS_CCAP_FIELD_VERSION_12_2&&t.writeUB4(0)}}writeBindParamsRow(t,e,n){const r=this.offset;let i=!1;for(const s of e){if(s.isReturnBind)continue;const e=s.bindVar;if(e.isArray){const n=e.values.length;t.writeUB4(n);for(let r=0;r<n;r++)this.writeBindParamsColumn(t,e,e.values[r])}else!this.statement.isPlSql&&e.maxSize>t.caps.maxStringSize?i=!0:this.writeBindParamsColumn(t,e,e.values[n+r])}if(i)for(const i of e){if(i.isReturnBind)continue;const e=i.bindVar;e.maxSize>t.caps.maxStringSize&&this.writeBindParamsColumn(t,e,e.values[n+r])}}writeBindParamsColumn(t,e,n){const i=e.type._oraTypeNum;let o;if(null==n&&i!==s.TNS_DATA_TYPE_CURSOR&&i!==s.TNS_DATA_TYPE_JSON)i===s.TNS_DATA_TYPE_BOOLEAN?(t.writeUInt8(s.TNS_ESCAPE_CHAR),t.writeUInt8(1)):i===s.TNS_DATA_TYPE_INT_NAMED?(t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(0),t.writeUB4(s.TNS_OBJ_TOP_LEVEL)):t.writeUInt8(0);else if(i===s.TNS_DATA_TYPE_NUMBER||i===s.TNS_DATA_TYPE_BINARY_INTEGER)o="boolean"==typeof n?n?"1":"0":n.toString(),t.writeOracleNumber(o);else if(i===s.TNS_DATA_TYPE_VARCHAR||i===s.TNS_DATA_TYPE_CHAR||i===s.TNS_DATA_TYPE_LONG||i===s.TNS_DATA_TYPE_RAW||i===s.TNS_DATA_TYPE_LONG_RAW)e.type._csfrm===s.CSFRM_NCHAR?(t.caps.checkNCharsetId(),n=r.from(n,s.TNS_ENCODING_UTF16).swap16()):n=r.from(n),t.writeBytesWithLength(n);else if(i===s.TNS_DATA_TYPE_DATE||i===s.TNS_DATA_TYPE_TIMESTAMP||i===s.TNS_DATA_TYPE_TIMESTAMP_TZ||i===s.TNS_DATA_TYPE_TIMESTAMP_LTZ)t.writeOracleDate(n,e.type);else if(i===s.TNS_DATA_TYPE_BINARY_DOUBLE)t.writeUInt8(8),t.writeBinaryDouble(n);else if(i===s.TNS_DATA_TYPE_BINARY_FLOAT)t.writeUInt8(4),t.writeBinaryFloat(n);else if(i===s.TNS_DATA_TYPE_CURSOR){let e=n;n||(e=this.connection._createResultSet()),0===e.statement.cursorId?(t.writeUInt8(1),t.writeUInt8(0)):(t.writeUB4(1),t.writeUB4(e.statement.cursorId))}else if(i===s.TNS_DATA_TYPE_BOOLEAN)n?(t.writeUInt8(2),t.writeUInt16BE(257)):t.writeUInt16BE(256);else if(i===s.TNS_DATA_TYPE_CLOB||i===s.TNS_DATA_TYPE_BLOB)t.writeUB4(n._locator.length),t.writeBytesWithLength(n._locator);else if([s.TNS_DATA_TYPE_ROWID,s.TNS_DATA_TYPE_UROWID].includes(i))t.writeBytesWithLength(r.from(n));else if(i===s.TNS_DATA_TYPE_JSON)t.writeOson(n,this.connection._osonMaxFieldNameSize);else if(i===s.TNS_DATA_TYPE_VECTOR)t.writeVector(n);else if(i===s.TNS_DATA_TYPE_INT_NAMED)t.writeDbObject(n);else{const t=`Binding data of type ${e.type}`;c.throwErr(c.ERR_NOT_IMPLEMENTED,t)}}createCursorFromDescribe(t){const e=this.connection._createResultSet(this.options);return e.options.moreRowsToFetch=!0,e.statement.isQuery=!0,e.statement.requiresFullExecute=!0,this.processDescribeInfo(t,e),e}processImplicitResultSet(t){this.options.implicitResultSet=[];const e=t.readUB4();for(let n=0;n<e;n++){const e=t.readUInt8();t.skipBytes(e);const n=this.createCursorFromDescribe(t);n.statement.cursorId=t.readUB2(),this.options.implicitResultSet.push(n)}}}},9827:(t,e,n)=>{"use strict";const{BaseBuffer:r}=n(1559),{Buffer:i}=n(2562),s=n(3762),o=n(7034),a=n(5914),u=n(8774),_=n(8041),c=i.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","utf8");class l{constructor(t){this.allocLen=t;const e=t%s.CHUNKED_BYTES_CHUNK_SIZE;e>0&&(this.allocLen+=s.CHUNKED_BYTES_CHUNK_SIZE-e),this.buf=i.allocUnsafe(this.allocLen),this.actualLen=0}}class h{constructor(){this.chunks=[]}endChunkedRead(){if(this.chunks.length>1){let t=0;for(const e of this.chunks)t+=e.actualLen;let e=0;const n=new l(t);for(const t of this.chunks)t.buf.copy(n.buf,e,0,t.actualLen),e+=t.actualLen;n.actualLen=t,this.chunks=[n]}const t=this.chunks[0];return t.buf.subarray(0,t.actualLen)}getBuf(t){let e;this.chunks.length>0&&(e=this.chunks[this.chunks.length-1],e.allocLen-e.actualLen<t&&(e=void 0)),e||(e=new l(t),this.chunks.push(e));const n=e.buf.subarray(e.actualLen,e.actualLen+t);return e.actualLen+=t,n}startChunkedRead(){this.chunks.length>0&&(this.chunks=this.chunks.splice(0,1),this.chunks[0].actualLen=0)}}t.exports={ReadPacket:class extends r{constructor(t,e){super(),this.nsi=t,this.caps=e,this.chunkedBytesBuf=new h}_readBytesWithLength(t){if(t!==s.TNS_LONG_LENGTH_INDICATOR)return this.readBytes(t);for(this.chunkedBytesBuf.startChunkedRead();;){const t=this.readUB4();if(0===t)break;this.readBytes(t,!0)}return this.chunkedBytesBuf.endChunkedRead()}skipBytes(t){this.pos===this.size&&this.receivePacket();const e=this.numBytesLeft();if(t<=e)this.pos+=t;else for(t-=e;t>0;){this.receivePacket();const e=Math.min(t,this.size-this.pos);this.pos+=e,t-=e}}readBytes(t,e=!1){this.pos===this.size&&this.receivePacket();const n=this.numBytesLeft();if(t<=n){let n;return e?(n=this.chunkedBytesBuf.getBuf(t),this.buf.copy(n,0,this.pos,this.pos+t)):n=this.buf.subarray(this.pos,this.pos+t),this.pos+=t,n}let r;r=e?this.chunkedBytesBuf.getBuf(t):i.allocUnsafe(t);let s=0;for(this.buf.copy(r,s,this.pos,this.pos+n),s+=n,t-=n;t>0;){this.receivePacket();const e=Math.min(t,this.size-this.pos);this.buf.copy(r,s,this.pos,this.pos+e),this.pos+=e,s+=e,t-=e}return r}receivePacket(){if(this.savedPacketPos===this.savedPackets.length){const t=this.nsi.syncRecvPacket();if(!t||this.nsi.isBreak)throw new a.OutOfPacketsError;this.savedPackets.push(t)}this.startPacket(this.savedPackets[this.savedPacketPos++])}restorePoint(){this.savedPacketPos=0,this.startPacket(this.savedPackets[this.savedPacketPos++]),this.pos=this.savedPos}savePoint(){this.savedPackets?this.savedPackets=this.savedPackets.splice(this.savedPacketPos-1):this.savedPackets=[this.packet],this.savedPacketPos=1,this.savedPos=this.pos}startPacket(t){this.packet=t,this.buf=t.buf,this.pos=10,this.size=t.buf.length,this.packetNum=t.num}async waitForPackets(t=!1){let e=await this.nsi.recvPacket();if(this.savedPackets?this.savedPackets.push(e):(this.savedPackets=[e],this.savedPacketPos=0),t&&this.nsi.endOfRequestSupport)for(;!(e.type!==s.TNS_PACKET_TYPE_DATA||e.buf.readUInt16BE(8)&s.TNS_DATA_FLAGS_END_OF_REQUEST||11===e.buf.length&&e.buf[10]===s.TNS_MSG_TYPE_END_OF_REQUEST);)e=await this.nsi.recvPacket(),this.savedPackets.push(e);this.startPacket(this.savedPackets[this.savedPacketPos++])}readOson(){if(0===this.readUB4())return null;this.skipUB8(),this.skipUB4();const t=new o.OsonDecoder(this.readBytesWithLength());return this.skipBytesChunked(),t.decode()}readURowID(){let t=0,e=1,n=this.readBytesWithLength();if(null===n)return null;n=this.readBytesWithLength();let r=n.length;if(n&&1===n[0]){const t=n.readUInt32BE(1),e=n.readUInt16BE(5),r=n.readUInt32BE(7),i=n.readUInt16BE(11);return a.encodeRowID({rba:t,partitionID:e,blockNum:r,slotNum:i})}let s=4*Math.floor(r/3);const o=r%3;1===o?s+=1:2===o&&(s+=3);const u=i.allocUnsafe(s);for(r-=1,u[0]=42,t+=1;r>0;){let i=n[e]>>2;if(u[t]=c[i],t+=1,i=(3&n[e])<<4,1==r){u[t]=c[i];break}if(e+=1,i|=(240&n[e])>>4,u[t]=c[i],t+=1,i=(15&n[e])<<2,2==r){u[t]=c[i];break}e+=1,i|=(192&n[e])>>6,u[t]=c[i],t+=1,i=63&n[e],u[t]=c[i],t+=1,e+=1,r-=3}return u.toString("utf-8")}readRowID(){const t=this.readUB4(),e=this.readUB2();return this.skipUB1(),{rba:t,partitionID:e,blockNum:this.readUB4(),slotNum:this.readUB2()}}readVector(){if(0===this.readUB4())return null;this.skipUB8(),this.skipUB4();const t=new u.VectorDecoder(this.readBytesWithLength());return this.skipBytesChunked(),t.decode()}skipBytesChunked(){const t=this.readUInt8();if(0!==t&&t!==s.TNS_NULL_LENGTH_INDICATOR)if(t!==s.TNS_LONG_LENGTH_INDICATOR)this.skipBytes(t);else for(;;){const t=this.readUB4();if(0===t)break;this.skipBytes(t)}}readNullTerminatedBytes(t=50){let e=0;const n=i.allocUnsafe(t);for(;e<t&&(n[e]=this.readUInt8(),0!==n[e]);)e+=1;if(e===t){const e=`Byte Arrray Exceeded MaxSize ${t}`;_.throwErr(_.ERR_INTERNAL,e)}return n.subarray(0,e+1)}},WritePacket:class extends r{constructor(t,e,n){super(t.sAtts.sdu),this.size=this.maxSize,this.isLargeSDU=t.sAtts.version>=s.TNS_VERSION_MIN_LARGE_SDU,this.protocol=n,this.packetType=s.TNS_PACKET_TYPE_DATA,this.caps=e,this.nsi=t}_grow(){this._sendPacket()}_sendPacket(t=!1){const e=this.pos;this.pos=0,this.isLargeSDU?this.writeUInt32BE(e):(this.writeUInt16BE(e),this.writeUInt16BE(0)),this.writeUInt8(this.packetType),this.writeUInt8(0),this.writeUInt16BE(0);let n=this.buf.subarray(0,e);t?this.buf.writeUInt16BE(2048,8):(n=i.from(n),this.startPacket()),this.nsi.ntAdapter||_.throwErr(_.ERR_INVALID_CONNECTION),this.nsi.ntAdapter.send(n)}startPacket(t=0){this.pos=s.PACKET_HEADER_SIZE,this.packetType===s.TNS_PACKET_TYPE_DATA&&this.writeUInt16BE(t)}startRequest(t,e=0){this.packetType=t,this.startPacket(e)}endRequest(){this.pos>s.PACKET_HEADER_SIZE&&this._sendPacket(!0)}writeKeyValue(t,e,n=0){const r=i.byteLength(t),s=i.byteLength(e);this.writeUB4(r),this.writeBytesWithLength(i.from(t)),this.writeUB4(s),s>0&&this.writeBytesWithLength(i.from(e)),this.writeUB4(n)}writeOson(t,e){const n=(new o.OsonEncoder).encode(t,e);this.writeQLocator(n.length),this.writeBytesWithLength(n)}writeSeqNum(){this.writeUInt8(this.protocol.sequenceId),this.protocol.sequenceId=(this.protocol.sequenceId+1)%256}writeVector(t){const e=(new u.VectorEncoder).encode(t);this.writeQLocator(e.length),this.writeBytesWithLength(e)}writeQLocator(t){this.writeUB4(40),this.writeUInt8(40),this.writeUInt16BE(38),this.writeUInt16BE(s.TNS_LOB_QLOCATOR_VERSION),this.writeUInt8(s.TNS_LOB_LOC_FLAGS_VALUE_BASED|s.TNS_LOB_LOC_FLAGS_BLOB|s.TNS_LOB_LOC_FLAGS_ABSTRACT),this.writeUInt8(s.TNS_LOB_LOC_FLAGS_INIT),this.writeUInt16BE(0),this.writeUInt16BE(1),this.writeUInt64BE(t),this.writeUInt16BE(0),this.writeUInt16BE(0),this.writeUInt16BE(0),this.writeUInt64BE(0),this.writeUInt64BE(0)}}}},4583:(t,e,n)=>{"use strict";const r=n(3762),i=n(6621),{WritePacket:s,ReadPacket:o}=n(9827),a=n(8041),u=n(5914);t.exports=class{constructor(t){this._breakInProgress=!1,this.txnInProgress=!1,this.connInProgress=!0,this.nsi=t.nscon,this.sequenceId=1,this.caps=new i(t.nscon),this.writeBuf=new s(t.nscon,this.caps,this),this.readBuf=new o(t.nscon,this.caps),this.callTimeout=0}async _decodeMessage(t){for(t.preProcess(),await this.readBuf.waitForPackets(!0);;){this.nsi.isBreak&&(await this.resetMessage(),delete this.readBuf.savedPackets,await this.readBuf.waitForPackets());try{t.decode(this.readBuf);break}catch(t){if(t instanceof u.OutOfPacketsError){this.nsi.isBreak||(await this.readBuf.waitForPackets(),this.readBuf.restorePoint());continue}throw t}}await t.postProcess()}async _encodeMessage(t){const e=this.nsi.ntAdapter;for(this.writeBuf.startRequest(r.TNS_PACKET_TYPE_DATA);t.encode(this.writeBuf);)await e.pauseWrite();this.writeBuf.endRequest()}async _recoverFromError(t,e){try{this.breakMessage(),this._breakInProgress=!1,await this.resetMessage(),await this.readBuf.waitForPackets(),e.decode(this.readBuf)}catch(e){this.nsi.disconnect();const n=a.getErr(a.ERR_CONNECTION_CLOSED);throw t.message=n.message+"\nError recovery failed: "+e.message+"\nOriginal error: "+t.message,t}}async _processMessage(t){let e,n=!1;try{this.callTimeout>0&&(e=setTimeout((()=>{n=!0,this.breakMessage()}),this.callTimeout)),await this._encodeMessage(t),t.messageType!==r.TNS_MSG_TYPE_ONEWAY_FN&&await this._decodeMessage(t)}catch(e){throw this.connInProgress||e.code===a.ERR_CONNECTION_CLOSED_CODE||await this._recoverFromError(e,t),e}finally{clearTimeout(e)}if(t.flushOutBinds&&await this.flushOutBindMessage(t),this.txnInProgress=Boolean(t.callStatus&r.TNS_EOCS_FLAGS_TXN_IN_PROGRESS),t.callStatus&r.TNS_EOCS_FLAGS_SESS_RELEASE&&t.connection.statementCache.clearCursors(),t.errorOccurred){if(n&&a.throwErr(a.ERR_CALL_TIMEOUT_EXCEEDED,this.callTimeout),t.retry)return t.errorOccurred=!1,await this._processMessage(t);let e=new Error(t.errorInfo.message);throw e.offset=t.errorInfo.pos,e.errorNum=t.errorInfo.num,e=a.transformErr(e),e.code===a.ERR_CONNECTION_CLOSED_CODE&&this.nsi.disconnect(),e}}async flushOutBindMessage(t){this.writeBuf.startRequest(r.TNS_PACKET_TYPE_DATA),this.writeBuf.writeUInt8(r.TNS_MSG_TYPE_FLUSH_OUT_BINDS),this.writeBuf.endRequest(),await this._decodeMessage(t)}breakMessage(){this._breakInProgress=!0,this.nsi.sendBreak()}async resetMessage(){await this.nsi.reset()}}},5914:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(3762),s=n(6982);class o extends Error{}function a(t,e,n,r){for(let s=0;s<n;s++)t[r+n-s-1]=i.TNS_BASE64_ALPHABET_ARRAY[63&e],e>>=6;return r+n}t.exports={encodeRowID:function(t){let e=0;if(0!==t.rba||0!==t.partitionID||0!==t.blockNum||0!=t.slotNum){const n=r.allocUnsafe(i.TNS_MAX_ROWID_LENGTH);return e=a(n,t.rba,6,e),e=a(n,t.partitionID,3,e),e=a(n,t.blockNum,6,e),a(n,t.slotNum,3,e),n.toString("utf8")}},getDeobfuscatedValue:function(t,e){const n=r.from(t);for(let r=0;r<t.length;r++)n[r]=t[r]^e[r];const i=n.toString();return n.fill(0),i},OutOfPacketsError:o,setObfuscatedValue:function(t){const e=r.from(t),n=s.randomBytes(e.length);for(let t=0;t<e.length;t++)e[t]=n[t]^e[t];return{obfuscatedValue:n,value:e}}}},8625:(t,e,n)=>{"use strict";const r=n(9700),i=n(1375),s=n(2752);t.exports=class extends r{async _fetchMoreRows(t){const e=new(this.statement.requiresFullExecute?i:s)(this.connection,this.statement,t,this);await this.connection._protocol._processMessage(e),this.statement.requiresFullExecute=!1}_resultSetNew(t,e,n){this.connection=t,this.statement=e,this._nestedCursorIndices=[],this.options=n,this.prefetchRowsProcessed=!1,this.statement.bufferRowIndex=0}close(){this.connection._returnStatement(this.statement)}_processRows(t){const e=[],n=this.statement.bufferRowIndex;for(let r=n;r<n+t;r++){const t=[];for(let e=0;e<this.statement.numQueryVars;e++)t.push(this.statement.queryVars[e].values[r]);e.push(t)}return this.statement.bufferRowIndex+=t,this.statement.bufferRowIndex===this.statement.bufferRowCount&&(this.statement.bufferRowCount=0,this.statement.bufferRowIndex=0),e}async getRows(t,e){if(e.fetchArraySize=t||this.options.fetchArraySize,e.prefetchRows=this.options.prefetchRows,this.statement.bufferRowCount-this.statement.bufferRowIndex>=e.fetchArraySize)return this._processRows(e.fetchArraySize);{e.fetchArraySize=e.fetchArraySize-(this.statement.bufferRowCount-this.statement.bufferRowIndex);const n=this.statement.bufferRowCount;if(this.statement.moreRowsToFetch&&e.fetchArraySize>0&&await this._fetchMoreRows(e),e.fetchArraySize=t||this.options.fetchArraySize,n===this.statement.bufferRowCount){const t=this.statement.bufferRowCount-this.statement.bufferRowIndex;return this.statement.bufferRowCount=0,t>0?this._processRows(t):[]}}const n=this.statement.bufferRowCount-this.statement.bufferRowIndex;return this._processRows(n)}}},337:(t,e,n)=>{"use strict";const{NavAddress:r,NavAddressList:i,NavDescription:s,NavDescriptionList:o}=n(5104),{createNVPair:a}=n(6450),u=n(8041);class _{constructor(){this.cOpts=new Array}addConnectOption(t){this.cOpts.push(t)}getConnectOptions(){return this.cOpts}}class c{constructor(){this.reset(),this.retryCount=0,this.currentDescription=null,this.descriptionList=new Array,this.sBuf=new Array}reset(){this.nextOptToTry=0,this.lastRetryCounter=0,this.lastRetryConnectDescription=0,this.reorderDescriptionList=0}hasMoreOptions(){let t=0;for(let e=0;e<this.descriptionList.length;++e)t+=this.descriptionList[e].getConnectOptions().length;return this.nextOptToTry<t}newConnectionDescription(){return this.currentDescription=new _,this.currentDescription}getcurrentDescription(){return this.currentDescription}closeDescription(){this.descriptionList.push(this.currentDescription),this.currentDescription=null}async execute(t){null!=t&&0==this.retryCount&&t.retryCount>0&&(this.retryCount=t.retryCount),this.reorderDescriptionList||(this.descriptionList=h.reorderDescriptionList(this.descriptionList),this.reorderDescriptionList=!0);for(let e=this.lastRetryConnectDescription;e<this.descriptionList.length;e++){const n=this.descriptionList[e];let r=new Array;r=n.getConnectOptions();let i=n.delayInMillis;null!=t&&(0==i||null==i)&&t.retryDelay>0&&(i=1e3*t.retryDelay);for(let t=this.lastRetryCounter;t<=this.retryCount;++t){for(0==this.nextOptToTry&&(r=h.reorderAddresses(r));this.nextOptToTry<r.length;){const n=r[this.nextOptToTry];return this.lastRetryCounter=t,this.lastRetryConnectDescription=e,this.nextOptToTry++,n}this.nextOptToTry=0,i>0&&t<this.retryCount&&await l(i)}this.lastRetryCounter=0}throw this.nextOptToTry=1e3,this.lastRetryCounter=1e3,new Error("All options tried")}}function l(t){return new Promise((e=>setTimeout(e,t)))}const h=new class{constructor(){this.DOWN_HOSTS_TIMEOUT=600,this.MIN_TIME_BETWEEN_REFRESH=60,this.downHostsCacheMap=new Map,this.lastRefreshTime=0}markDownHost(t){return this.downHostsCacheMap.set(t,Date.now())}refreshCache(){Date.now()-1e3*this.MIN_TIME_BETWEEN_REFRESH>this.lastRefreshTime&&(this.downHostsCacheMap.forEach(((t,e)=>{const n=t;null!=n&&Date.now()-1e3*this.DOWN_HOSTS_TIMEOUT>n&&this.downHostsCacheMap.delete(e)})),this.lastRefreshTime=Date.now())}reorderAddresses(t){this.refreshCache();let e=0,n=t.length-1;for(;e<n;){for(;e<=n&&!this.isDownHostsCached(t[e]);)e++;for(;n>=e&&this.isDownHostsCached(t[n]);)n--;e<n&&([t[e],t[n]]=[t[n],t[e]])}return t}isDownDescCached(t){const e=t.getConnectOptions();for(let t=0;t<e.length;t++)if(!this.isDownHostsCached(e[t]))return!1;return!0}reorderDescriptionList(t){this.refreshCache();let e=0,n=t.length-1;for(;e<n;){for(;e<=n&&!this.isDownDescCached(t[e]);)e++;for(;n>=e&&this.isDownDescCached(t[n]);)n--;e<n&&([t[e],t[n]]=[t[n],t[e]])}return t}isDownHostsCached(t){return this.downHostsCacheMap.has(t.host)}};t.exports={createNode:async function(t){let e;e="string"==typeof t?a(t):t;const n=e.name.toUpperCase();let _=null;switch(n){case"ADDRESS":_=new r;break;case"ADDRESS_LIST":_=new i;break;case"DESCRIPTION":_=new s;break;case"DESCRIPTION_LIST":_=new o;break;default:u.throwErr(u.ERR_INVALID_CONNECT_STRING_PARAMETERS,`unknown top element ${n}`)}_.initFromNVPair(e);const l=new c;return await _.navigate(l),l},SOLE_INST_DHCACHE:h}},8881:t=>{t.exports={NSPTCN:1,NSPTAC:2,NSPTAK:3,NSPTRF:4,NSPTRD:5,NSPTDA:6,NSPTNL:7,NSPTAB:9,NSPTRS:11,NSPTMK:12,NSPTAT:13,NSPTCNL:14,NSPTDD:15,NSPTHI:19,NSPHDLEN:0,NSPHDPSM:2,NSPHDTYP:4,NSPHDFLGS:5,NSPHDHSM:6,NSPSIZHD:8,NSPFSID:1,NSPFRDS:2,NSPFRDR:4,NSPFLSD:32,NO_HEADER_FLAGS:0,NSPFSRN:8,NSPCNVSN:8,NSPCNLOV:10,NSPCNOPT:12,NSPCNSDU:14,NSPCNTDU:16,NSPCNNTC:18,NSPCNTNA:20,NSPCNONE:22,NSPCNLEN:24,NSPCNOFF:26,NSPCNMXC:28,NSPCNFL0:32,NSPCNFL1:33,NSPCNTMO:50,NSPCNTCK:52,NSPCNADL:54,NSPCNAOF:56,NSPCNLSD:58,NSPCNLTD:62,NSPCNCFL:66,NSPCNCFL2:70,NSPCNDAT:74,NSPMXCDATA:230,NSINAWANTED:1,NSINAINTCHG:2,NSINADISABLEDFORCONNECTION:4,NSINANOSERVICES:8,NSINAREQUIRED:16,NSINAAUTHWANTED:32,NSISUPSECRENEG:128,NSGDONTCARE:1,NSGHDX:2,NSGFDX:4,NSGHDRCHKSUM:8,NSGPAKCHKSUM:16,NSGBROKEN:32,NSGUSEVIO:64,NSGOSAUTHOK:128,NSGSENDATTN:512,NSGRECVATTN:1024,NSGNOATTNPR:2048,NSGRAW:4096,TNS_VERSION_DESIRED:319,TNS_VERSION_MINIMUM:300,TNS_VERSION_MIN_DATA_FLAGS:318,TNS_VERSION_MIN_END_OF_RESPONSE:319,TNS_UUID_OFFSET:45,NSPACVSN:8,NSPACOPT:10,NSPACSDU:12,NSPACTDU:14,NSPACONE:16,NSPACLEN:18,NSPACOFF:20,NSPACFL0:22,NSPACFL1:23,NSPACTMO:24,NSPACTCK:26,NSPACADL:28,NSPACAOF:30,NSPACLSD:32,NSPACLTD:36,NSPACCFL:40,NSPACFL2:41,NSPACV310DAT:32,NSPACV315DAT:41,NSPRFURS:8,NSPRFSRS:9,NSPRFLEN:10,NSPRFDAT:12,NSPACCFON:128,NSPACCFAT:64,NSPACCFNT:2,NSPACOOB:1,NSGPCHKSCMD:16777216,TNS_ACCEPT_FLAG_HAS_END_OF_REQUEST:33554432,TNS_ACCEPT_FLAG_FAST_AUTH:268435456,NSPRDLEN:8,NSPRDDAT:10,NSPDAFLG:8,NSPDADAT:10,NSPDAFEOF:64,NSPMKTYP:8,NSPMKODT:9,NSPMKDAT:10,NSPMKTD0:0,NSPMKTD1:1,NSPMKTAT:2,NIQBMARK:1,NIQRMARK:2,NIQIMARK:3,NSPCTLCMD:8,NSPCTLDAT:10,NSPCTL_SERR:8,NSPCTL_CLRATTN:9,NSPDFSDULN:8192,NSPABSSDULN:2097152,NSPMXSDULN:65535,NSPMNSDULN:512,NSPDFTDULN:2097152,NSPMXTDULN:2097152,NSPMNTDULN:255,NSFIMM:64,DISABLE_OOB_STR:"DISABLE_OOB",EXPIRE_TIME:"EXPIRE_TIME",PEM_WALLET_FILE_NAME:"ewallet.pem",NT_MOREDATA:1,NS_MOREDATA:2,SVCNAME:3,SERVERTYPE:4,REMOTEADDR:5,HEALTHCHECK:6,CONNCLASS:7,PURITY:8,SID:9,NSNOBLOCK:1}},4549:(t,e,n)=>{"use strict";const r=n(8041),i=new RegExp("((?=(?<hostnames>(((\\[[A-z0-9:]+\\])|([A-z0-9][A-z0-9._-]+))[,]?)+)))\\k<hostnames>(:(?<port>\\d+)?)?","g"),s=new RegExp("^(((?<protocol>[A-z0-9]+):)?//)?(?<hostinfo>("+i.source+"(?=([,]|[;]|[/]|[:]|$))([,]|[;])?)+)(/(?<servicename>[A-z0-9][A-z0-9,-.]+)?)?(:(?<servermode>dedicated|shared|pooled))?(/(?<instance>[A-z0-9][A-z0-9]+))?$","ig"),o=["ENABLE","FAILOVER","LOAD_BALANCE","RECV_BUF_SIZE","SEND_BUF_SIZE","SDU","SOURCE_ROUTE","RETRY_COUNT","RETRY_DELAY","CONNECT_TIMEOUT","TRANSPORT_CONNECT_TIMEOUT","RECV_TIMEOUT"];t.exports=class{constructor(t){this.URL_PROPS_ALIAS=this.initializeUrlAlias(),this.url=t,this.resolvedUrl="",this.connectionProps=new Map,this.urlProps=new Map,this.lb=!1}getResolvedUrl(){return this.parse(),this.resolvedUrl}parse(){let t=this.parseExtendedSettings(this.url);0===this.connectionProps.size&&0===this.urlProps.size&&(t=this.url),this.resolvedUrl=this.resolveToLongURLFormat(t)}resolveToLongURLFormat(t){const e=t.replace(/\s/g,"");let n=0,i=null,o=null,a=null,u=null,_=null;for(const t of e.matchAll(s))n=1,i=t.groups.protocol,o=t.groups.hostinfo,a=t.groups.servicename,u=t.groups.servermode,_=t.groups.instance;n||r.throwErr(r.ERR_INVALID_EZCONNECT_SYNTAX,"input string not in easy connect format",e),null==i?t.includes("//")||(i="TCP"):"tcp"!=i.toLowerCase()&&"tcps"!=i.toLowerCase()&&r.throwErr(r.ERR_INVALID_EZCONNECT_SYNTAX,"Unsupported protocol in thin mode",i);const c=this.urlProps.get("HTTPS_PROXY"),l=this.urlProps.get("HTTPS_PROXY_PORT"),h=this.buildAddressList(o,i,c,l),T=this.urlProps.get("CONNECTION_ID_PREFIX"),p=[];return this.lb&&p.push("(LOAD_BALANCE=ON)"),p.push(this.buildDescriptionParams()),p.push(h),p.push(this.buildConnectData(a,u,_,T)),p.push(this.buildSecurityInfo(i)),`(DESCRIPTION=${p.join("")})`}buildConnectData(t,e,n,r){const i=this.urlProps.get("POOL_CONNECTION_CLASS"),s=this.urlProps.get("POOL_PURITY"),o=this.urlProps.get("SERVICE_TAG"),a=this.urlProps.get("POOL_BOUNDARY"),u=[];return t?u.push(`(SERVICE_NAME=${t})`):u.push("(SERVICE_NAME=)"),e&&u.push(`(SERVER=${e})`),n&&u.push(`(INSTANCE_NAME=${n})`),i&&u.push(`(POOL_CONNECTION_CLASS=${i})`),s&&u.push(`(POOL_PURITY=${s})`),o&&u.push(`(SERVICE_TAG=${o})`),r&&u.push(`(CONNECTION_ID_PREFIX=${r})`),a&&u.push(`(POOL_BOUNDARY=${a})`),`(CONNECT_DATA=${u.join("")})`}buildAddressList(t,e,n,r){const s=new Array;let o="";null!=n&&(o=null!=r?`(HTTPS_PROXY=${n})(HTTPS_PROXY_PORT=${r})`:`(HTTPS_PROXY=${n})`),null==e&&(e="TCP");let a=0;const u=t.split(";");for(const t of u){let n=0;const r=new Array;for(const s of t.matchAll(i)){const t=s.groups.hostnames.split(",");let i=s.groups.port;null==i&&(i="1521");for(const s of t)r.push(this.getAddrStr(s,i,e,o)),n++}a+=n;const _=[];u.length>1&&n>1&&_.push("(LOAD_BALANCE=ON)"),_.push(r.join("")),u.length>1?s.push(`(ADDRESS_LIST=${_.join("")})`):s.push(_.join(""))}return u.length<2&&a>1&&(this.lb=!0),s.join("")}getAddrStr(t,e,n,r){let i=t.trim();return i.startsWith("[")&&i.endsWith("]")&&(i=i.substring(1,i.length-1)),`(ADDRESS=(PROTOCOL=${n})(HOST=${i})(PORT=${e})${r})`}buildDescriptionParams(){if(0===this.urlProps.size)return"";const t=new Array;return this.urlProps.forEach((function(e,n){o.includes(n)&&t.push(`(${n}=${e})`)})),t.join("")}buildSecurityInfo(t){const e=new Array;if(null!=t&&"tcps"==t.toLowerCase()){const t=this.urlProps.get("SSL_SERVER_DN_MATCH"),n=this.urlProps.get("SSL_SERVER_CERT_DN"),r=this.urlProps.get("MY_WALLET_DIRECTORY");null!=t&&e.push(`(SSL_SERVER_DN_MATCH=${t})`),null!=n&&e.push(`(SSL_SERVER_CERT_DN=${n}})`),null!=r&&e.push(`(MY_WALLET_DIRECTORY=${r})`)}return 0===e.length?"":`(SECURITY=${e.join("")})`}parseExtendedSettings(t){const e=Array.from(t.trim()),n=this.findExtendedSettingPosition(e);return-1==n?t:(this.parseExtendedProperties(e,n+1),t.substring(0,n))}parseExtendedProperties(t,e){let n=null,i=null;const s=new Array(t.length);let o=0,a="";for(let u=e;u<t.length;u++)if(""!=t[u].trim())switch(t[u]){case'"':a=this.parseQuotedString(u,t,o,s),o=a[1],u=a[0];break;case"=":null!=n&&r.throwErr(r.ERR_INVALID_EZCONNECT_SYNTAX,"unable to parse, invalid syntax",this.url),n=s.join("").substring(0,o).trim(),o=0;break;case"&":null==n&&r.throwErr(r.ERR_INVALID_EZCONNECT_SYNTAX,"unable to parse, invalid syntax",this.url),i=s.join("").substring(0,o).trim(),this.addParam(n,i),n=null,i=null,o=0;break;default:s[o++]=t[u]}null!=n&&(i=s.join("").substring(0,o).trim(),this.addParam(n,i))}parseQuotedString(t,e,n,r){let i=t+1;for(;i<e.length;){const t=e[i];if('"'==t)return[i,n];r[n++]=t,i++}}addParam(t,e){const n=t.toLowerCase(),r=this.URL_PROPS_ALIAS.get(n);null!=r?this.urlProps.set(r,e):this.connectionProps.set(r,e)}findExtendedSettingPosition(t){let e=0;for(let n=0;n<t.length;n++)if("("==t[n])e++;else if(")"==t[n])e--;else if("?"==t[n]&&0==e)return n;return-1}initializeUrlAlias(){const t=new Map;return t.set("enable","ENABLE"),t.set("failover","FAILOVER"),t.set("load_balance","LOAD_BALANCE"),t.set("recv_buf_size","RECV_BUF_SIZE"),t.set("send_buf_size","SEND_BUF_SIZE"),t.set("sdu","SDU"),t.set("source_route","SOURCE_ROUTE"),t.set("retry_count","RETRY_COUNT"),t.set("retry_delay","RETRY_DELAY"),t.set("https_proxy","HTTPS_PROXY"),t.set("https_proxy_port","HTTPS_PROXY_PORT"),t.set("connect_timeout","CONNECT_TIMEOUT"),t.set("transport_connect_timeout","TRANSPORT_CONNECT_TIMEOUT"),t.set("recv_timeout","RECV_TIMEOUT"),t.set("ssl_server_cert_dn","SSL_SERVER_CERT_DN"),t.set("ssl_server_dn_match","SSL_SERVER_DN_MATCH"),t.set("wallet_location","MY_WALLET_DIRECTORY"),t.set("pool_connection_class","POOL_CONNECTION_CLASS"),t.set("pool_purity","POOL_PURITY"),t.set("service_tag","SERVICE_TAG"),t.set("connection_id_prefix","CONNECTION_ID_PREFIX"),t.set("pool_boundary","POOL_BOUNDARY"),t}}},5104:(t,e,n)=>{"use strict";const{findNVPairRecurse:r,createNVPair:i}=n(6450),s=n(8041),o=n(857),a=n(9278),u=n(2250).promises,_=n(2456).CLIENT_INFO;class c{isS(){return 0}initFromString(t){const e=i(t);this.initFromNVPair(e)}initFromNVPair(t){null!=t&&"ADDRESS"==t.name.toUpperCase()||s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);const e=r(t,"protocol"),n=r(t,"port"),i=r(t,"host"),o=r(t,"https_proxy"),a=r(t,"https_proxy_port");n&&(this.port=Number(n.atom)),i&&(this.host=i.atom),e&&(this.prot=e.atom),o&&(this.httpsProxy=o.atom),a&&(this.httpsProxyPort=Number(a.atom)),this.addr=t.toString()}toString(){return this.addr}}class l{constructor(){this.children=new Array,this.sourceRoute=!1,this.loadBalance=!1,this.failover=!0}isS(){return 1}initFromString(t){const e=i(t);this.initFromNVPair(e)}initFromNVPair(t){let e,n;this.children=[];const r=t.getListSize();0==r&&s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let i=0;i<r;i++)e=t.getListElement(i),"SOURCE_ROUTE"==e.name.toUpperCase()?this.sourceRoute="yes"==e.atom.toLowerCase()||"on"==e.atom.toLowerCase()||"true"==e.atom.toLowerCase():"LOAD_BALANCE"==e.name.toUpperCase()?this.loadBalance="yes"==e.atom.toLowerCase()||"on"==e.atom.toLowerCase()||"true"==e.atom.toLowerCase():"FAILOVER"==e.name.toUpperCase()?this.failover="yes"==e.atom.toLowerCase()||"on"==e.atom.toLowerCase()||"true"==e.atom.toLowerCase():"ADDRESS"==e.name.toUpperCase()?(n=new d,n.initFromNVPair(e),this.children.push(n)):"ADDRESS_LIST"==e.name.toUpperCase()?(n=new N,n.initFromNVPair(e),this.children.push(n)):s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);0==this.children.length&&s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX)}toString(){let t=new String("");if(this.children.size()<1)return t;t+="(ADDRESS_LIST=";for(let e=0;e<this.children.size();e++)t+=this.children[e].toString();return this.sourceRoute&&(t+="(SOURCE_ROUTE=yes)"+f.HC),this.loadBalance&&(t+="(LOAD_BALANCE=yes)"),this.failover||(t+="(FAILOVER=false)"),t+=")",t}}class h{constructor(){this.children=new Array,this.sourceRoute=!1,this.loadBalance=!1,this.failover=!0,this.delayInMillis=-1,this.params={}}isS(){return 2}initFromString(t){const e=i(t);this.initFromNVPair(e)}initFromNVPair(t){const e=t.getListSize();let n,r;0==e&&s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let i=0;i<e;i++)if(n=t.getListElement(i),"SOURCE_ROUTE"==n.name.toUpperCase())this.sourceRoute="yes"==n.atom.toLowerCase()||"on"==n.atom.toLowerCase()||"true"==n.atom.toLowerCase();else if("LOAD_BALANCE"==n.name.toUpperCase())this.loadBalance="yes"==n.atom.toLowerCase()||"on"==n.atom.toLowerCase()||"true"==n.atom.toLowerCase();else if("FAILOVER"==n.name.toUpperCase())this.failover="yes"==n.atom.toLowerCase()||"on"==n.atom.toLowerCase()||"true"==n.atom.toLowerCase();else if("ADDRESS_LIST"==n.name.toUpperCase())r=new N,r.initFromNVPair(n),this.children.push(r);else if("ADDRESS"==n.name.toUpperCase())r=new d,r.initFromNVPair(n),this.children.push(r);else if("CONNECT_DATA"==n.name.toUpperCase()){let t;const e=n.getListSize();for(let r=0;r<e;r++)if(t=n.getListElement(r),"CONNECTION_ID_PREFIX"==t.name.toUpperCase()){this.params.connectionIdPrefix=t.atom,n.removeListElement(r);break}this.connectData=n.valueToString()}else if("RETRY_DELAY"==n.name.toUpperCase())n.atom>0&&(this.delayInMillis=1e3*n.atom);else if("RETRY_COUNT"==n.name.toUpperCase())this.retryCount=n.atom;else if("CONNECTION_ID_PREFIX"==n.name.toUpperCase())this.conidPrefix=n.atom;else if("CONNECT_TIMEOUT"==n.name.toUpperCase())n.atom>0&&(this.params.connectTimeout=n.atom);else if("TRANSPORT_CONNECT_TIMEOUT"==n.name.toUpperCase())n.atom>0&&(this.params.transportConnectTimeout=n.atom);else if("ENABLE"==n.name.toUpperCase())this.params.enable=n.atom;else if("RECV_TIMEOUT"==n.name.toUpperCase())n.atom>0&&(this.params.recvTimeout=n.atom);else if("SDU"==n.name.toUpperCase())this.params.sdu=n.atom;else if("EXPIRE_TIME"==n.name.toUpperCase())n.atom>0&&(this.params.expireTime=n.atom);else if("SECURITY"==n.name.toUpperCase()){const t=n.getListSize();let e;for(let r=0;r<t;r++)e=n.getListElement(r),"SSL_SERVER_CERT_DN"==e.name.toUpperCase()?this.params.sslServerCertDN=e.valueToString():"SSL_SERVER_DN_MATCH"==e.name.toUpperCase()?this.params.sslServerDNMatch="yes"==e.atom.toLowerCase()||"on"==e.atom.toLowerCase()||"true"==e.atom.toLowerCase():"SSL_ALLOW_WEAK_DN_MATCH"==e.name.toUpperCase()?this.params.sslAllowWeakDNMatch="yes"==e.atom.toLowerCase()||"on"==e.atom.toLowerCase()||"true"==e.atom.toLowerCase():"WALLET_LOCATION"!=e.name.toUpperCase()&&"MY_WALLET_DIRECTORY"!=e.name.toUpperCase()||(this.params.walletLocation=e.atom)}}toString(){let t,e=new String("");t=new String("");for(let n=0;n<this.children.size();n++)t=this.children[n].toString(),""==!t&&(e+=t);return""==!e&&this.sourceRoute&&(e+="(SOURCE_ROUTE=yes)"),""==!e&&this.loadBalance&&(e+="(LOAD_BALANCE=yes)"),""!=!e||this.failover||(e+="(FAILOVER=false)"),e.equals("")||(e="(DESCRIPTION="+e+")"),e}}class T{constructor(){this.children=new Array,this.sourceRoute=!1,this.loadBalance=!0,this.failover=!0}isS(){return 1}initFromString(t){const e=i(t);this.initFromNVPair(e)}initFromNVPair(t){const e=t.getListSize();let n,r;0==e&&s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let i=0;i<e;i++)r=t.getListElement(i),"SOURCE_ROUTE"==r.name.toUpperCase()?this.sourceRoute="yes"==r.atom.toLowerCase()||"on"==r.atom.toLowerCase()||"true"==r.atom.toLowerCase:"LOAD_BALANCE"==r.name.toUpperCase()?this.loadBalance="yes"==r.atom.toLowerCase()||"on"==r.atom.toLowerCase()||"true"==r.atom.toLowerCase():"FAILOVER"==r.name.toUpperCase()?this.failover="yes"==r.atom.toLowerCase()||"on"==r.atom.toLowerCase()||"true"==r.atom.toLowerCase():"DESCRIPTION"==r.name.toUpperCase()?(n=new S,n.initFromNVPair(r),this.children.push(n)):s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX);0==this.children.length&&s.throwErr(s.ERR_INVALID_CONNECT_STRING_SYNTAX)}toString(){let t=new String("");if(this.children.size()<1)return t;let e=new String("");for(let n=0;n<this.children.size();n++)e=this.children[n].toString(),e.equals("")||(t+=e);return t.equals("")&&this.sourceRoute&&(t+="(SOURCE_ROUTE=yes)"),t.equals("")&&!this.loadBalance&&(t+="(LOAD_BALANCE=no)"),t.equals("")&&!this.failover&&(t+="(FAILOVER=false)"),t.equals("")||(t="(DESCRIPTION_LIST="+t+")"),t}}class p{constructor(){this.CNdata=new Array}}const f={DEBUG:!1,SR:"(SOURCE_ROUTE=yes)",HC:"(HOP_COUNT=0)",LB:"(LOAD_BALANCE=yes)",NFO:"(FAILOVER=false)",CD:"(CONNECT_DATA=",CONID:"(CONNECTION_ID="},E={all:!0};class d extends c{constructor(){super()}async navigate(t){let e,n=0,r=!1;if(!this.host){n=1,this.host=o.hostname();try{await u.lookup(this.host,E)}catch{this.host="localhost"}}if(null==t.getcurrentDescription()&&(t.newConnectionDescription(),r=!0),a.isIP(this.host)){const e=new p;e.hostname=this.host,e.port=this.port,e.protocol=this.prot,e.httpsProxy=this.httpsProxy,e.httpsProxyPort=this.httpsProxyPort,e.desc=t.getcurrentDescription(),e.CNdata.push(t.sBuf.join("")),e.CNdata.push(this.toString()),e.host=this.host,e.addr=this.addr,t.getcurrentDescription().addConnectOption(e)}else try{e=await u.lookup(this.host,E);for(const r of e){const e=new p;e.hostname=this.host,e.port=this.port,e.protocol=this.prot,e.httpsProxy=this.httpsProxy,e.httpsProxyPort=this.httpsProxyPort,e.desc=t.getcurrentDescription(),e.CNdata.push(t.sBuf.join("")),1==n?e.CNdata.push("(address=(protocol="+this.prot+")(host="+this.host+")(port="+this.port+"))"):e.CNdata.push(this.toString()),e.host=r.address,e.addr=this.addr,t.getcurrentDescription().addConnectOption(e)}}catch{}r&&t.closeDescription()}addToString(t){const e=this.toString();let n=new Array;n=t.getcurrentDescription().getConnectOptions();for(let t=0;t<n.length;t++)n[t].done||n[t].CNdata.push(e)}}class N extends l{constructor(){super(),this.activeChildren=new Array,this.sBuflength=0}async navigate(t){await this.navigate2(t,0)}async navigate2(t,e){if(e++,this.sBuflength=t.sBuf.length,t.sBuf.push("(ADDRESS_LIST="),this.sourceRoute){this.activeChildren=this.children,await this.activeChildren[0].navigate(t);for(let e=1;e<this.activeChildren.length;e++)this.activeChildren[e].addToString(t)}else{this.activeChildren=m.setActiveChildren(this.children,this.failover,this.loadBalance);for(let n=0;n<this.activeChildren.length;n++)1==this.getChildrenType(n)?await this.activeChildren[n].navigate2(t,e):await this.activeChildren[n].navigate(t)}this.closeNVPair(t),t.sBuf.length=this.sBuflength}addToString(t){const e=this.toString();let n=new Array;n=t.getcurrentDescription().getConnectOptions();for(let t=0;t<n.length;t++)n[t].done||n[t].CNdata.push(e)}getChildrenSize(){let t=0;for(let e=0;e<this.activeChildren.length;e++)if(1==this.getChildrenType(e)?t+=this.activeChildren[e].getChildrenSize():t++,this.sourceRoute)return t;return t}getChildrenType(t){return this.activeChildren[t].isS()}getChild(t){return this.children[t]}closeNVPair(t){let e=new Array;const n=this.getChildrenSize();if(null!=t.getcurrentDescription()){e=t.getcurrentDescription().getConnectOptions();let r=0,i=null,s=null;for(let t=e.length-1;t>=0&&!e[t].done&&(e[t].hostname==i&&e[t].port==s||r++,i=e[t].hostname,s=e[t].port,!(r>n));t--)this.sourceRoute&&(e[t].CNdata.push(f.SR),e[t].CNdata.push(f.HC),e[t].done=!0),e[t].CNdata.push(")")}}}class S extends h{constructor(){super(),this.activeChildren=new Array,this.descProcessed=0}async navigate(t){t.sBuf.length=0,t.sBuf.push("(DESCRIPTION=");const e=t.newConnectionDescription();if(null!=this.retryCount&&(t.retryCount=this.getIntValue(this.retryCount,t.retryCount),e.retryCount=t.retryCount),-1!=this.delayInMillis&&(e.delayInMillis=this.delayInMillis),e.params=this.params,"connectTimeout"in this.params&&t.sBuf.push("(CONNECT_TIMEOUT="+this.params.connectTimeout+")"),"transportConnectTimeout"in this.params&&t.sBuf.push("(TRANSPORT_CONNECT_TIMEOUT="+this.params.transportConnectTimeout+")"),"recvTimeout"in this.params&&t.sBuf.push("(RECV_TIMEOUT="+this.params.recvTimeout+")"),"sdu"in this.params&&t.sBuf.push("(SDU="+this.params.sdu+")"),"expireTime"in this.params&&t.sBuf.push("(EXPIRE_TIME="+this.params.expireTime+")"),"enable"in this.params&&t.sBuf.push("(ENABLE="+this.params.enable+")"),("sslServerCertDN"in this.params||"sslServerDNMatch"in this.params||"walletLocation"in this.params||"sslAllowWeakDNMatch"in this.params)&&(t.sBuf.push("(SECURITY="),"sslServerCertDN"in this.params&&t.sBuf.push("(SSL_SERVER_CERT_DN="+this.params.sslServerCertDN+")"),"sslServerDNMatch"in this.params&&t.sBuf.push("(SSL_SERVER_DN_MATCH="+this.params.sslServerDNMatch+")"),"sslAllowWeakDNMatch"in this.params&&t.sBuf.push("(SSL_ALLOW_WEAK_DN_MATCH="+this.params.sslAllowWeakDNMatch+")"),"walletLocation"in this.params&&t.sBuf.push("(WALLET_LOCATION="+this.params.walletLocation+")"),t.sBuf.push(")")),"httpsProxyPort"in this.params&&t.sBuf.push("(HTTPS_PROXY_PORT="+this.params.httpsProxyPort+")"),"httpsProxy"in this.params&&t.sBuf.push("(HTTPS_PROXY="+this.params.httpsProxy+")"),this.failover||t.sBuf.push(f.NFO),this.sourceRoute){this.activeChildren=this.children,await this.activeChildren[0].navigate(t);for(let e=1;e<this.activeChildren.length;e++)this.activeChildren[e].addToString(t);this.closeNVPair(t)}else{this.activeChildren=m.setActiveChildren(this.children,this.failover,this.loadBalance);for(let e=0;e<this.activeChildren.length;e++)await this.activeChildren[e].navigate(t);this.closeNVPair(t)}t.closeDescription()}closeNVPair(t){if(null==t.getcurrentDescription())return;let e=new Array;e=t.getcurrentDescription().getConnectOptions();for(let t=0;t<e.length;++t){this.sourceRoute&&e[t].CNdata.push(f.SR),null==this.connectData&&(this.connectData="(SERVICE_NAME=)");const n=`(CID=(PROGRAM=${"\"'"+_.program+"'\""})(HOST=${_.hostName})(USER=${_.userName}))`;e[t].CNdata.push(f.CD),e[t].CNdata.push(this.connectData),e[t].CNdata.push(n),e[t].CNdata.push(")"),null!=this.SID&&(e[t].sid=this.SID),null!=this.serviceName&&(e[t].service_name=this.serviceName),null!=this.instanceName&&(e[t].instance_name=this.instanceName),e[t].CNdata.push(")"),e[t].done=!0}}getIntValue(t,e){try{return parseInt(t)}catch(t){return e}}}class m extends T{constructor(t=new Array,e=0,n=0){super(),this.activeChildren=t,this.descProcessed=e,this.done=n}async navigate(t){for(t.sBuf.push("(DESCRIPTION_LIST="),this.activeChildren=m.setActiveChildren(this.children,this.failover,this.loadBalance);this.descProcessed<this.activeChildren.length;)await this.activeChildren[this.descProcessed].navigate(t),this.descProcessed++}static setActiveChildren(t,e,n){let r;const i=t.length;let s=new Array;const o=Math.floor(10*Math.random()),a=new Array(i).fill(!1);if(e)if(n)for(let e=0;e<i;e++){do{r=Math.abs(Math.floor(10*Math.random()))%i}while(a[r]);a[r]=!0,s.push(t[r])}else s=t;else n?(r=Math.abs(o)%i,s.push(t[r])):s.push(t[0]);return s}}t.exports={NavAddress:d,NavAddressList:N,NavDescription:S,NavDescriptionList:m}},7696:(t,e,n)=>{"use strict";const r=n(4374),i=n(129),s=n(228),o=n(8881),{createNode:a}=n(337),u=n(8041),{findNVPairRecurse:_,createNVPair:c,findValue:l}=n(6450),{Buffer:h}=n(2562),T=n(4549),{NLParamParser:p,tnsnamesFilePath:f}=n(7666),E=n(932),d=n(337).SOLE_INST_DHCACHE,N=new p;async function S(t,e){const n=t.trim();let r=n;if(-1==n.indexOf(")")||0!=n.indexOf("(")){if(-1!=n.indexOf(":")||-1!=n.indexOf("/"))return r=new T(n).getResolvedUrl(),r;{const t=f(e);if(r=(await N.initializeNlpa(t)).get(n.toUpperCase()),r||u.throwErr(u.ERR_TNS_ENTRY_NOT_FOUND,n,e?e+"/tnsnames.ora":E.env.TNS_ADMIN+"/tnsnames.ora"),1==r.rhsType){const t=r.atom;if(-1!=t.indexOf(":")||-1!=t.indexOf("/"))return new T(t).getResolvedUrl()}r=r.getListElement(0)}}return r}async function m(t,e){const n=await S(t,e);return a(n)}function A(t,e,n,r,i){let s;const o=new Promise(((t,o)=>{e>2147483647&&(e=2147483647),s=setTimeout((()=>o(u.getErr(u.ERR_CONNECTION_TIMEDOUT,r.host,r.port,n,e/1e3,i))),e)}));return Promise.race([t,o]).then((t=>(clearTimeout(s),t))).catch((t=>{throw clearTimeout(s),t}))}t.exports={NetworkSession:class{constructor(){this.connected=!1,this.isBreak=!1,this.isReset=!1,this.breakPosted=!1}async getAddress(t,e){const n=await t.execute(e),r=this.sAtts?this.sAtts.uuid:null;this.sAtts=new s(r),this.sAtts.setFrom(e),this.sAtts.setFrom(n.desc.params),await this.sAtts.prepare(n.protocol);const i=c(n.CNdata.join("")),o=_(i,"CONNECT_DATA"),a=`(CONNECTION_ID=${this.sAtts.connectionId})`,u=c(a);return o.addListElement(u),this.cData=h.from(i.toString(),"ascii"),this.cDataNVPair=i,this.sAtts.nt.cDataNVPair=i,n}async transportConnect(t){"TCP"==t.protocol.toUpperCase()&&t.httpsProxy&&u.throwErr(u.ERR_INVALID_CONNECT_STRING_PARAMETERS,"https proxy requires protocol as","tcps "),!t.protocol||"TCP"!=t.protocol.toUpperCase()&&"TCPS"!=t.protocol.toUpperCase()?u.throwErr(u.ERR_INVALID_CONNECT_STRING_PARAMETERS,t.protocol+" protocol not supported"):this.ntAdapter=new i(this.sAtts.nt),await this.ntAdapter.connect(t),this.ntAdapter.startRead(),this.sAtts.ntCha=this.ntAdapter.cha,this.sndDatapkt=new r.DataPacket(this.sAtts.largeSDU),this.rcvDatapkt=new r.DataPacket(this.sAtts.largeSDU)}_sendConnect(t){this._sendPacket(t.buf),t.overflow&&(this._send(t.connectData,0,t.connectDataLen),this.flush())}async connect2(t){if(this.sAtts.sdu?this.sAtts.sdu>o.NSPABSSDULN?this.sAtts.sdu=o.NSPABSSDULN:this.sAtts.sdu<o.NSPMNSDULN&&(this.sAtts.sdu=o.NSPMNSDULN):this.sAtts.sdu=o.NSPDFSDULN,this.sAtts.transportConnectTimeout){const e=this.transportConnect(t);await A(e,this.sAtts.transportConnectTimeout,"transportConnectTimeout",t,this.sAtts.connectionId)}else await this.transportConnect(t);let e=new r.ConnectPacket(this.cData,this.sAtts);for(this._sendConnect(e);;){const n=await this._recvPacket();if(n.type===o.NSPTAC)break;if(n.type===o.NSPTRF){this.refusePkt.overflow&&(await this._recvPacket(),this.refusePkt.dataBuf=this.rcvDatapkt.buf.subarray(this.rcvDatapkt.offset,this.rcvDatapkt.len).toString());const e=c(this.refusePkt.dataBuf);this.refusePkt=null;const n=l(e,["DESCRIPTION","ERR"]);"12514"==n?u.throwErr(u.ERR_INVALID_SERVICE_NAME,this.getOption(o.SVCNAME),t.host,t.port,this.sAtts.connectionId):"12505"==n?u.throwErr(u.ERR_INVALID_SID,this.getOption(o.SID),t.host,t.port,this.sAtts.connectionId):n?u.throwErr(u.ERR_CONNECTION_REFUSED,t.host,t.port,this.sAtts.connectionId,"ORA-"+n):u.throwErr(u.ERR_CONNECTION_REFUSED,t.host,t.port,this.sAtts.connectionId,"refused")}else if(n.type===o.NSPTRS)(n.flags&o.NSPFSRN)==o.NSPFSRN&&(await this.ntAdapter.renegTLS(),this.ntAdapter.startRead()),this._sendConnect(e);else if(n.type===o.NSPTRD){let n,i,s;this.redirectPkt.overflow&&(await this._recvPacket(),this.redirectPkt.dataBuf=this.rcvDatapkt.buf.subarray(this.rcvDatapkt.offset,this.rcvDatapkt.len)),this.redirectPkt.flags&o.NSPFRDS?(n=this.redirectPkt.dataBuf.indexOf("\0",0,"ascii"),i=this.redirectPkt.dataBuf.toString("ascii",0,n),s=this.redirectPkt.dataBuf.subarray(n+1,this.redirectPkt.dataLen)):(i=this.redirectPkt.dataBuf.toString("ascii"),s=this.cData);const a=await m(i),u=t.hostname;if((t=await a.execute()).desc&&this.sAtts.setFrom(t.desc.params),t.originHost=u,this.redirectPkt=null,this.ntAdapter.disconnect(o.NSFIMM),this.sAtts.transportConnectTimeout){const e=this.transportConnect(t);await A(e,this.sAtts.transportConnectTimeout,"transportConnectTimeout",t,this.sAtts.connectionId)}else await this.transportConnect(t);e=new r.ConnectPacket(s,this.sAtts,o.NSPFRDR),this.sndDatapkt=new r.DataPacket(this.sAtts.largeSDU),this._sendConnect(e)}}return this.connected=!0,this.cData=null,this.sndDatapkt=new r.DataPacket(this.sAtts.largeSDU),this.sndDatapkt.createPacket(o.NSPDADAT),this.sndDatapkt.offset=this.sndDatapkt.dataPtr,this.sndDatapkt.len=this.sndDatapkt.bufLen,this.markerPkt=new r.MarkerPacket(this.sAtts.largeSDU),this.controlPkt=new r.ControlPacket,this.ntAdapter.largeSDU=this.sAtts.largeSDU,this.sAtts.nt.wallet=null,this.sAtts.nt.walletPassword=null,!0}async connect1(t,e,n){let r,i;do{try{if(this.sAtts.connectTimeout){const e=this.connect2(t);r=await A(e,this.sAtts.connectTimeout,"connectTimeout",t,this.sAtts.connectionId)}else r=await this.connect2(t)}catch(s){s.message.startsWith("NJS-510")&&!this.ntAdapter.connected&&(d.markDownHost(t.host,Date.now()),this.ntAdapter.connected=!0),this.ntAdapter&&(this.ntAdapter.disconnect(o.NSFIMM),this.ntAdapter=null),r=!1,i=s;try{t=await this.getAddress(e,n)}catch(t){break}}}while(!r);if(!r)throw i}_processPacket(t){switch(t.type){case o.NSPTDA:this.rcvDatapkt.fromPacket(t);break;case o.NSPTMK:this.markerPkt.fromPacket(t,this);break;case o.NSPTCNL:this.controlPkt.fromPacket(t);break;case o.NSPTAC:r.AcceptPacket(t,this.sAtts),this.sAtts.version>=o.TNS_VERSION_MIN_END_OF_RESPONSE&&t.flags&o.TNS_ACCEPT_FLAG_HAS_END_OF_REQUEST&&(this.endOfRequestSupport=!0),t.flags&o.TNS_ACCEPT_FLAG_FAST_AUTH&&(this.supportsFastAuth=!0);break;case o.NSPTRF:this.refusePkt=new r.RefusePacket(t);break;case o.NSPTRS:break;case o.NSPTRD:this.redirectPkt=new r.RedirectPacket(t);break;default:u.throwErr(u.ERR_CONNECTION_INVALID_PACKET)}}async _recvPacket(){for(;;){const t=await this.ntAdapter.receive();if(!t)break;if(this._processPacket(t),t.type!==o.NSPTCNL)return t}}_sendPacket(t){this.ntAdapter.send(t)}sendBreak(){if(!this.isBreak){if(!this.connected)return this.isBreak=!0,void(this.breakPosted=!0);this.isBreak=!0,this.markerPkt.prepare(o.NSPMKTD1,o.NIQIMARK),this._sendPacket(this.markerPkt.buf)}}async reset(){for(this.breakPosted&&(this.markerPkt.prepare(o.NSPMKTD1,o.NIQBMARK),this._sendPacket(this.markerPkt.buf),this.breakPosted=!1),this.markerPkt.prepare(o.NSPMKTD1,o.NIQRMARK),this._sendPacket(this.markerPkt.buf);!this.isReset;)await this._recvPacket();this.sndDatapkt.dataPtr=this.sndDatapkt.dataLen=o.NSPDADAT,this.sndDatapkt.offset=this.sndDatapkt.dataPtr,this.sndDatapkt.len=this.sndDatapkt.bufLen,this.isBreak=this.isReset=!1}async recvPacket(){return await this._recvPacket()}syncRecvPacket(){for(;this.ntAdapter.packets.length>0;){const t=this.ntAdapter.syncReceive();if(!t)break;if(this._processPacket(t),t.type!==o.NSPTCNL)return t}}_send(t,e,n){if(this.isBreak)return;let r=0;for(this.sndDatapkt.dataLen=this.sndDatapkt.offset,(this.sndDatapkt.dataLen<this.sndDatapkt.bufLen||!this.sndDatapkt.bufLen)&&(r=this.sndDatapkt.fillBuf(t,e,n),n-=r,e+=r,this.sndDatapkt.offset=this.sndDatapkt.dataLen);n;){if(this._sendPacket(this.sndDatapkt.dataBuf),this.isBreak)return;this.sndDatapkt.dataLen=this.sndDatapkt.dataPtr,this.sndDatapkt.offset=this.sndDatapkt.dataPtr,r=this.sndDatapkt.fillBuf(t,e,n),n-=r,e+=r,this.sndDatapkt.offset=this.sndDatapkt.dataLen}}flush(){this.isBreak||(this.sndDatapkt.dataLen=this.sndDatapkt.offset,this.sndDatapkt.prepare2Send(),this._sendPacket(h.from(this.sndDatapkt.dataBuf)),this.sndDatapkt.dataLen=this.sndDatapkt.dataPtr,this.sndDatapkt.offset=this.sndDatapkt.dataPtr)}async connect(t){const e=t.connectString?t.connectString:t.connectionString;let n,r;t._connInfo?(n=t._connInfo[5],n.reset()):n=await m(e,t.configDir);try{r=await this.getAddress(n,t)}catch(t){"All options tried"==t.message?u.throwErr(u.ERR_INVALID_CONNECT_STRING_PARAMETERS,"Ensure the ADDRESS parameters have been entered correctly, the most likely incorrect parameter is the host name"):u.throwErr(u.ERR_INVALID_CONNECT_STRING_PARAMETERS,t.message)}await this.connect1(r,n,t)}forceDisconnect(t){this.connected&&(this.ntAdapter.stream.destroy(t),this.connected=!1)}disconnect(t){this.connected&&(t==o.NSFIMM||this.ntAdapter.err||(this.sndDatapkt.dataLen=this.sndDatapkt.offset,this.sndDatapkt.prepare2Send(o.NSPDAFEOF),this._sendPacket(this.sndDatapkt.dataBuf)),this.ntAdapter.disconnect(t),this.ntAdapter=null,this.connected=!1)}getOption(t){switch(t){case o.NS_MOREDATA:return this.ntAdapter.packets.length>0;case o.SVCNAME:return l(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"]);case o.SID:return l(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SID"]);case o.SERVERTYPE:return l(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVER"]);case o.REMOTEADDR:return this.ntAdapter?this.ntAdapter.getOption(t):null;case o.CONNCLASS:return l(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","POOL_CONNECTION_CLASS"]);case o.PURITY:return l(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","POOL_PURITY"]);case o.HEALTHCHECK:return this.connected&&this.ntAdapter.connected&&!this.ntAdapter.err;default:u.throwErr(u.ERR_INTERNAL,"getOption not supported for opcode "+t)}}recvInbandNotif(){let t=0;if(this.controlPkt.errno)return t=this.controlPkt.errno,t;if(this.getOption(o.HEALTHCHECK)){if(this.getOption(o.NS_MOREDATA)){const e=this.ntAdapter.syncReceive();return e.type==o.NSPTCNL?(this.controlPkt.fromPacket(e),t=this.controlPkt.errno,t):(this.ntAdapter.packets.unshift(e),0)}return 0}return u.ERR_CONNECTION_CLOSED}},resolveAddress:m,getConnectionInfo:async function(t){const e=await S(t.connectString,t.configDir),n=await a(e);let r;r="string"==typeof e?c(e):e;const i=l(r,["DESCRIPTION","CONNECT_DATA","SERVER"]),s=l(r,["DESCRIPTION","CONNECT_DATA","POOL_CONNECTION_CLASS"]),o=l(r,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"]),u=l(r,["DESCRIPTION","CONNECT_DATA","SID"]);return[i,s,o,l(r,["DESCRIPTION","CONNECT_DATA","POOL_PURITY"]),u,n]}}},129:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(9278),s=n(932),o=n(4756),a=n(8611),u=n(3557),_=n(8881),c=n(8041),{findValue:l}=n(6450);let h=1;t.exports=class{constructor(t){this.atts=t,this.cha=4878,this.connected=!1,this.err=!1,this.needsDrain=!1,this.numPacketsSinceLastWait=0,this.secure=!1,this.largeSDU=!1,this.streamNum=h++,this.packetNum=1,this.doDNMatch=!0}dnMatch(t,e){if(this.atts.sslServerDNMatch&&this.doDNMatch){const t=t=>t.split(",").map((t=>t.split("=").map((t=>t.trim())))).reduce(((t,e)=>(t[e[0]]=e[1],t)),{});if(this.atts.sslServerCertDN){const n=t(this.atts.sslServerCertDN);if(Object.keys(n).length!=Object.keys(e.subject).length)return c.getErr(c.ERR_TLS_DNMATCH_FAILURE);for(const t in n)if(n[t]!=e.subject[t])return c.getErr(c.ERR_TLS_DNMATCH_FAILURE)}else if(o.checkServerIdentity(this.hostName,e)&&(!this.originHost||o.checkServerIdentity(this.originHost,e))){if(!this.atts.sslAllowWeakDNMatch){const t=this.hostName+" "+(this.originHost?"or "+this.originHost:"");return c.getErr(c.ERR_TLS_HOSTMATCH_FAILURE,t)}if(l(this.atts.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"])!=e.subject.CN)return c.getErr(c.ERR_TLS_DNMATCH_FAILURE)}}}async tlsConnect(t,e){let n;this.stream.removeAllListeners();const r={host:this.host,socket:e,rejectUnauthorized:!0,secureContext:t,enableTrace:!1,checkServerIdentity:this.dnMatch.bind(this)};await new Promise((t=>{this.stream=o.connect(r,(()=>{this.stream.authorized||(n="server certificate unauthorized"),t()})).on("error",(e=>{n=e.message,t()}))})),n&&c.throwErr(c.ERR_TLS_AUTH_FAILURE,this.host,this.port,this.atts.connectionId,n),this.connStream=e}async ntConnect(t){let e,n,r;t.port||(t.port=1521);const s=t.httpsProxy||this.atts.httpsProxy;let o=t.httpsProxyPort||this.atts.httpsProxyPort;await new Promise((u=>{s?(o||(o=80),r=a.request({host:s,port:o,method:"CONNECT",path:t.host+":"+t.port}),r.once("connect",((t,e)=>{200==t.statusCode?(this.connected=!0,this.stream=e):n=t.statusCode,u()})),r.once("error",(t=>{n=t.message,u()})),r.end()):(this.stream=i.connect(t.port,t.host,(()=>{this.connected=!0,u()})),this.stream.once("error",(t=>{e=t.message,u()})))})),r&&r.removeAllListeners(),this.connected||(n?c.throwErr(c.ERR_PROXY_CONNECTION_FAILURE,s,o,this.atts.connectionId,n):c.throwErr(c.ERR_CONNECTION_INCOMPLETE,this.host,this.port,this.atts.connectionId,e))}async connect(t){this.originHost=t.originHost,this.host=t.host,this.hostName=t.hostname,this.port=t.port;try{if(await this.ntConnect(t),(this.atts.expireTime||this.atts.enableDCD)&&(this.atts.expireTime?this.stream.setKeepAlive(!0,this.atts.expireTime):this.stream.setKeepAlive(!0)),this.atts.tcpNoDelay&&this.stream.setNoDelay(!0),"TCPS"==t.protocol.toUpperCase()){let t;this.secure=!0,this.atts.sslAllowWeakDNMatch&&(this.doDNMatch=!1);try{t=o.createSecureContext({cert:this.atts.wallet,key:this.atts.wallet,passphrase:this.atts.walletPassword,ca:this.atts.wallet})}catch(t){c.throwErr(c.ERR_TLS_INIT_FAILURE)}await this.tlsConnect(t,this.stream)}}finally{this.stream&&this.setupEventHandlers()}}disconnect(t){this.connected&&!this.err&&(t==_.NSFIMM?this.stream.destroy():this.stream.end()),this.stream=null,this.connected=!1,this.drainWaiter=null,this.readWaiter=null}getPacketDump(t){const e=[];for(let n=0;n<t.length;n+=8){const r=n.toString().padStart(4,"0"),i=t.slice(n,n+8),s=[],o=[];for(const t of i)s.push(t.toString(16).toUpperCase().padStart(2,"0")),t>32&&t<127?o.push(String.fromCharCode(t)):o.push(".");for(;s.length<8;)s.push(" "),o.push(" ");const a=s.join(" "),u=o.join("");e.push(`${r} : ${a} |${u}|`)}return e.join("\n")}printPacket(t,e){const n=new Date,r=`${n.getFullYear()}-${n.getMonth().toString().padStart(2,"0")}-${n.getDay().toString().padStart(2,"0")} ${n.getHours().toString().padStart(2,"0")}:${n.getMinutes().toString().padStart(2,"0")}:${n.getSeconds().toString().padStart(2,"0")}.${n.getMilliseconds().toString().padStart(3,"0")}`,i=this.getPacketDump(e);console.log(`${r} ${t}:\n${i}\n`)}checkErr(){if(!this.connected||this.err){let t;t=this.savedErr?c.getErr(c.ERR_CONNECTION_LOSTCONTACT,this.host,this.port,this.atts.connectionId,this.savedErr.message):c.getErr(c.ERR_CONNECTION_EOF,this.host,this.port,this.atts.connectionId);const e=c.getErr(c.ERR_CONNECTION_CLOSED);throw e.message=e.message+"\n"+t.message,e}}send(t){this.checkErr(),s.env.NODE_ORACLEDB_DEBUG_PACKETS&&this.printPacket(`Sending packet ${this.packetNum} on stream ${this.streamNum}`,t),this.stream.write(t,(t=>{t&&(this.savedErr=t,this.err=!0,this._notifyWaiters())}))||(this.needsDrain=!0),this.numPacketsSinceLastWait++,this.packetNum++}shouldPauseWrite(){return this.needsDrain||this.numPacketsSinceLastWait>=100}async pauseWrite(){this.checkErr(),this.needsDrain?(await new Promise((t=>{this.drainWaiter=t})),this.checkErr()):await new Promise((t=>u.setImmediate(t))),this.numPacketsSinceLastWait=0}startRead(){let t;this.packets=[],this.stream.on("data",(e=>{for(t=t?r.concat([t,e]):e;t.length>=8;){let e;if(e=this.largeSDU?t.readUInt32BE():t.readUInt16BE(),e>t.length)break;const n={buf:t.subarray(0,e),type:t[4],flags:t[5],num:this.packetNum++};if(this.packets.push(n),this.readWaiter&&(this.readWaiter(),this.readWaiter=null),s.env.NODE_ORACLEDB_DEBUG_PACKETS&&this.printPacket(`Receiving packet ${n.num} on stream ${this.streamNum}`,n.buf),e===t.length){t=null;break}t=t.subarray(e)}}))}syncReceive(){return this.packets.shift()}async receive(){return 0===this.packets.length&&(this.checkErr(),await new Promise((t=>{this.readWaiter=t,this.numPacketsSinceLastWait=0})),this.checkErr()),this.packets.shift()}async renegTLS(){try{this.checkErr(),this.doDNMatch=!0;const t=o.createSecureContext({cert:this.atts.wallet,key:this.atts.wallet,passphrase:this.atts.walletPassword,ca:this.atts.wallet});await this.tlsConnect(t,this.connStream)}finally{this.setupEventHandlers()}}setupEventHandlers(){this.stream.removeAllListeners(),this.stream.on("error",(t=>{this.savedErr=t,this.err=!0,this._notifyWaiters()})),this.stream.on("end",(()=>{this.err=!0,this._notifyWaiters()})),this.stream.on("close",(()=>{this.connected=!1,this._notifyWaiters()})),this.stream.on("drain",(()=>{this.needsDrain=!1,this.drainWaiter&&(this.drainWaiter(),this.drainWaiter=null)}))}getOption(t){switch(this.checkErr(),t){case _.NT_MOREDATA:return this.packets.length>0;case _.REMOTEADDR:{const t=this.secure?this.connStream:this.stream;return t.remoteAddress+":"+t.remotePort}default:c.throwErr(c.ERR_INTERNAL,"getOption not supported for opcode "+t)}}_notifyWaiters(){this.drainWaiter&&(this.drainWaiter(),this.drainWaiter=null),this.readWaiter&&(this.readWaiter(),this.readWaiter=null)}}},6450:(t,e,n)=>{"use strict";const r=n(8041),i=4;class s{constructor(t){this.name=t,this.listType=3,this.rhsType=0}set setAtom(t){this._containsComment(t)&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),this.rhsType=1,this.list=null,this.atom=t}_containsComment(t){for(let e=0;e<t.length;e++)if("#"==t.charAt(e)){if(0!=e){if("\\"==t.charAt(e-1))continue;return!0}return!0}return!1}getListSize(){return null==this.list?0:this.list.length}getListElement(t){return null==this.list?null:this.list[t]}addListElement(t){null==this.list&&(this.rhsType=2,this.list=new Array,this.atom=null),this.list.push(t),t.parent=this}removeListElement(t){null!=this.list&&(this.list.splice(t,1),0==this.getListSize&&(this.list=null,this.rhsType=0))}_space(t){var e="";for(let n=0;n<t;n++)e+=" ";return e}valueToString(){let t="";if(1==this.rhsType)t+=this.atom;else if(2==this.rhsType)if(3==this.listType)for(let e=0;e<this.getListSize();e++)t+=this.getListElement(e).toString();else if(this.listType==i)for(let e=0;e<this.getListSize();e++)t+=this.getListElement(e).name,e!=this.getListSize()-1&&(t+=", ");return t}toString(){let t="("+this.name+"=";if(1==this.rhsType)t+=this.atom;else if(2==this.rhsType)if(3==this.listType)for(let e=0;e<this.getListSize();e++)t+=this.getListElement(e).toString();else if(this.listType==i){t+=" (";for(let e=0;e<this.getListSize();e++)t+=this.getListElement(e).name,e!=this.getListSize()-1&&(t+=", ");t+=")"}return t+=")",t}}const o=1,a=2,u=3,_=4,c=8;class l{constructor(){this.tkType=null,this.tkValue=null,this.numTokens=0,this.tkPos=0}_isWhiteSpace(t){return" "==t||"\t"==t||"\n"==t||"\r"==t}_trimWhiteSpace(t){const e=t.length;let n=0,r=e;for(;n<e&&this._isWhiteSpace(t.charAt(n));)n++;for(;n<r&&this._isWhiteSpace(t.charAt(r-1));)r--;return t.substring(n,r)}parseTokens(t){this.numTokens=0,this.tkPos=0,this.tkType=new Array,this.tkValue=new Array;const e=t.length;let n=!1,r=new Array;r=Array.from(t);let i=0;for(;i<e;){for(;i<e&&this._isWhiteSpace(r[i]);)i++;if(i<e)switch(r[i]){case"(":n=!1,this._addToken(o,"("),i++;break;case"=":n=!0,this._addToken(_,"="),i++;break;case")":n=!1,this._addToken(a,")"),i++;break;case",":n=!1,this._addToken(u,","),i++;break;default:{let s=i,o=-1,a=!1,u='"';for("'"!=r[i]&&'"'!=r[i]||(a=!0,u=r[i],i++,s=i);i<e;)if("\\"!=r[i]){if(a){if(r[i]==u){i++,o=i-1;break}}else if("("==r[i]||")"==r[i]||","==r[i]&&!n||"="==r[i]&&!n){o=i;break}i++}else i+=2;-1==o&&(o=i),this._addToken(c,t.substring(s,o).trim());break}}}return this._addToken(9,"%"),!0}getToken(){if(null==this.tkType&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),this.tkPos<this.numTokens)return Number(this.tkType[this.tkPos]);r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX)}popToken(){let t=0;return null==this.tkType&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),this.tkPos<this.numTokens?t=Number(this.tkType[this.tkPos++]):r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),t}getLiteral(){let t=null;return null==this.tkValue&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),this.tkPos<this.numTokens?t=String(this.tkValue[this.tkPos]):r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),t}popLiteral(){let t=null;return null==this.tkValue&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),this.tkPos<this.numTokens?t=String(this.tkValue[this.tkPos++]):r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),t}eatToken(){this.tkPos<this.numTokens&&this.tkPos++}toString(){if(null==this.tkType)return"*NO TOKENS*";let t="Tokens";for(let e=0;e<this.numTokens;e++)t=t+" : "+this.tkValue[e];return t}_addToken(t,e){this.tkType.push(Number(t)),this.tkValue.push(String(e)),this.numTokens++}}function h(t,e){let n=e.getToken();switch(n){case _:if(e.eatToken(),n=e.getToken(),n==c){const n=T(e);t.setAtom=n}else p(e,t);break;case u:case a:t.setAtom=t.name;break;default:r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX)}return n=e.getToken(),n==a?e.eatToken():n!=u&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),t}function T(t){return t.getToken()!=c&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX),t.popLiteral()}function p(t,e){const n=t.getToken();if(n!=o&&n!=u)return;const a=function(t){const e=t.getToken();t.eatToken(),e!=o&&e!=u&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX);const n=T(t);return h(new s(n),t)}(t);e.addListElement(a),n!=u&&a.name!=a.atom||e.getListType!=i&&(e.setListType=i),p(t,e)}function f(t,e){if(!t)return null;if(1==t.getRHSType)return null;for(let n=0;n<t.getListSize();n++){const r=t.getListElement(n);if(e.toUpperCase()==r.name.toUpperCase())return r}return null}t.exports={findNVPairRecurse:function t(e,n){if(!e)return null;if(n.toUpperCase()==e.name.toUpperCase())return e;if(1==e.getRHSType)return null;for(let r=0;r<e.getListSize();r++){const i=t(e.getListElement(r),n);if(null!==i)return i}return null},createNVPair:function(t){const e=new l;return e.parseTokens(t),function(t){let e=t.getToken();t.eatToken(),e!=o&&r.throwErr(r.ERR_INVALID_CONNECT_STRING_SYNTAX);let n=T(t);const i=new s(n);if((e=t.getToken())==u){for(;e==c||e==u;)n+=t.popLiteral(),e=t.getToken();return i.name=n,h(i,t)}return h(i,t)}(e)},findNVPair:f,findValue:function(t,e){if(!t)return null;if(e[0].toUpperCase()!=t.name.toUpperCase())return null;let n=t;const r=e.length;for(let t=1;t<r;t++)if(n=f(n,e[t]),!n)return null;return null==n.atom?null==n.list?null:n.list.toString():n.atom.toString()}}},4374:(t,e,n)=>{"use strict";const r=n(2562).Buffer,i=n(8881),s=n(8041);t.exports={ConnectPacket:function(t,e,n=0){let s;this.connectData=t,this.connectDataLen=t.length,this.overflow=!1,this.connectDataLen<=230?s=74+this.connectDataLen:(s=74,this.overflow=!0),this.buf=r.allocUnsafe(s).fill(0),this.buf.writeUInt16BE(s,i.NSPHDLEN),this.buf.writeUInt8(n,i.NSPHDFLGS),this.buf.writeUInt8(i.NSPTCN,i.NSPHDTYP),this.buf.writeUInt16BE(i.TNS_VERSION_DESIRED,i.NSPCNVSN),this.buf.writeUInt16BE(i.TNS_VERSION_MINIMUM,i.NSPCNLOV);const o=i.NSGDONTCARE;this.buf.writeUInt16BE(o,i.NSPCNOPT),e.sdu>i.NSPMXSDULN?this.buf.writeUInt16BE(i.NSPMXSDULN,i.NSPCNSDU):this.buf.writeUInt16BE(e.sdu,i.NSPCNSDU),e.tdu>i.NSPMXSDULN?this.buf.writeUInt16BE(i.NSPMXSDULN,i.NSPCNTDU):this.buf.writeUInt16BE(e.tdu,i.NSPCNTDU),this.buf.writeUInt16BE(e.ntCha,i.NSPCNNTC),this.buf.writeUInt16BE(1,i.NSPCNONE),this.buf.writeUInt16BE(this.connectDataLen,i.NSPCNLEN),this.buf.writeUInt16BE(i.NSPCNDAT,i.NSPCNOFF),this.buf.writeUInt8(i.NSISUPSECRENEG|i.NSINADISABLEDFORCONNECTION,i.NSPCNFL0),this.buf.writeUInt8(i.NSISUPSECRENEG|i.NSINADISABLEDFORCONNECTION,i.NSPCNFL1),this.buf.writeUInt16BE(0,i.NSPCNTMO),this.buf.writeUInt16BE(0,i.NSPCNTCK),this.buf.writeUInt16BE(0,i.NSPCNADL),this.buf.writeUInt16BE(0,i.NSPCNAOF),this.buf.writeUInt32BE(e.sdu,i.NSPCNLSD),this.buf.writeUInt32BE(e.tdu,i.NSPCNLTD),this.buf.writeUInt32BE(0,i.NSPCNCFL),this.buf.writeUInt32BE(0,i.NSPCNCFL2),!this.overflow&&this.connectDataLen&&this.buf.write(t.toString("ascii"),i.NSPCNDAT,this.connectDataLen,"ascii")},DataPacket:function(t){this.dataPtr=0,this.dataLen=0,this.offset=0,this.len=0,this.bufLen=0,this.createPacket=function(t){this.dataPtr=i.NSPDADAT,this.dataLen=i.NSPDADAT,this.buf=r.allocUnsafe(t).fill(0),this.buf.writeUInt8(0,i.NSPHDFLGS),this.buf.writeUInt8(i.NSPTDA,i.NSPHDTYP),this.bufLen=t},this.fillBuf=function(t,e,n,r=0){let s;return this.buf||this.createPacket(n+i.NSPDADAT),s=n>this.bufLen-this.dataLen?this.bufLen-this.dataLen:n,s&&t.copy(this.buf,this.dataLen,e,e+s),this.dataLen+=s,this.prepare2Send(r),s},this.prepare2Send=function(e=0){t?this.buf.writeUInt32BE(this.dataLen,i.NSPHDLEN):this.buf.writeUInt16BE(this.dataLen,i.NSPHDLEN),this.buf.writeUInt16BE(e,i.NSPDAFLG),this.dataBuf=this.buf.subarray(0,this.dataLen)},this.fromPacket=function(t){this.buf=t.buf,this.dataLen=t.buf.length,this.dataPtr=i.NSPDADAT,this.offset=this.dataPtr,this.len=this.dataLen,t.dataOffset=this.dataPtr}},AcceptPacket:function(t,e){this.buf=t.buf,this.len=t.buf.length,e.version=t.buf.readUInt16BE(i.NSPACVSN),e.options=t.buf.readUInt16BE(i.NSPACOPT),e.sdu=t.buf.readUInt16BE(i.NSPACSDU),e.tdu=t.buf.readUInt16BE(i.NSPACTDU),e.version>=315&&(e.sdu=t.buf.readUInt32BE(i.NSPACLSD),e.tdu=t.buf.readUInt32BE(i.NSPACLTD),e.largeSDU=!0),this.flag0=t.buf.readUInt8(i.NSPACFL0),this.flag1=t.buf.readUInt8(i.NSPACFL1),e.version>=i.TNS_VERSION_MIN_DATA_FLAGS&&(t.flags=t.buf.readUInt32BE(i.NSPACFL2))},RefusePacket:function(t){this.buf=t.buf,this.len=t.buf.length,this.userReason=t.buf.readUInt8(i.NSPRFURS),this.systemReason=t.buf.readUInt8(i.NSPRFURS),this.dataLen=t.buf.readUInt16BE(i.NSPRFLEN),this.dataOff=i.NSPRFDAT,this.len>this.dataOff?(this.dataBuf=this.buf.toString("ascii",this.dataOff,this.len),this.overflow=!1):this.overflow=!0},RedirectPacket:function(t){this.buf=t.buf,this.len=t.buf.length,this.flags=t.flags,this.dataLen=t.buf.readUInt16BE(i.NSPRDLEN),this.dataOff=i.NSPRDDAT,this.len>this.dataOff?(this.dataBuf=this.buf.subarray(this.dataOff,this.len),this.overflow=!1):this.overflow=!0},MarkerPacket:function(t){this.len=i.NSPMKDAT+1,this.buf=r.allocUnsafe(i.NSPMKDAT+1).fill(0),t?this.buf.writeUInt32BE(this.len,i.NSPHDLEN):this.buf.writeUInt16BE(this.len,i.NSPHDLEN),this.buf.writeUInt8(0,i.NSPHDFLGS),this.buf.writeUInt8(i.NSPTMK,i.NSPHDTYP),this.prepare=function(t,e){this.buf.writeUInt8(t,i.NSPMKTYP),this.buf.writeUInt8(e,i.NSPMKDAT)},this.fromPacket=function(t,e){switch(this.type=t.buf.readUInt8(i.NSPMKTYP),this.type){case i.NSPMKTD0:e.isBreak=!0;break;case i.NSPMKTD1:this.data=t.buf.readUInt8(i.NSPMKDAT),e.isBreak=!0,this.data==i.NIQRMARK&&(e.isReset=!0,e.isBreak=!0);break;default:s.throwErr(s.ERR_INVALID_PACKET)}}},ControlPacket:function(){this.clear=function(){this.errno=0,this.notif=null,this.notifLen=0,this.cmd=0},this.fromPacket=function(t){let e,n,o;this.cmd=t.buf.readUInt16BE(i.NSPCTLCMD),this.cmd===i.NSPCTL_SERR?(e=t.buf.readUInt32BE(i.NSPCTLDAT),n=t.buf.readUInt32BE(i.NSPCTLDAT+4),o=t.buf.readUInt32BE(i.NSPCTLDAT+8),12572==n?this.errno=n:12573==n?(this.errno=n,this.notifLen=o,this.notif=r.allocUnsafe(o+1).fill(0),this.buf.copy(this.notif,0,i.NSPCTLDAT+12,i.NSPCTLDAT+12+o)):(this.errno=n,22==e?s.throwErr(s.ERR_CONNECTION_INBAND,"ORA-"+n):s.throwErr(s.ERR_CONNECTION_INBAND,"TNS-"+n))):s.throwErr(s.ERR_INVALID_PACKET)}}}},7666:(t,e,n)=>{"use strict";const{createNVPair:r,findValue:i}=n(6450),s=n(9896),o=n(932),a=n(3785),u=n(8041);let _=0;t.exports={NLParamParser:class{async initializeNlpa(t){const e=s.statSync(t);if(!(e.mtime-_))return this.ht;const n=a.createInterface({input:s.createReadStream(t),output:o.stdout,terminal:!1});return this.ht=new Map,await(async()=>{let t="";for await(let e of n)if(0!=e.length&&"#"!=e[0])if(" "==e[0]||"\t"==e[0]||")"==e[0]||"("==e[0]){if(e=e.replace(/\s+/g,""),e=this.checkNLPforComments(e),0==e.length)continue;t+=e}else 0==t.length?(e=this.checkNLPforComments(e),t+=e):0!=t.length&&(this.addNLPListElement(t),t="",e=this.checkNLPforComments(e),t+=e);return 0!=t.length&&(this.addNLPListElement(t),t=""),_=e.mtime,this.ht})()}checkNLPforComments(t){const e=new Array(t.length);for(let n=0;n<t.length;n++){const r=t[n];if("#"==r){if(0!=n)break;return""}e.push(r)}return e.join("")}addNLPListElement(t){const e=t.split(/\r?\n/).filter((t=>t));for(let t=0;t<e.length;t++){"("!=e[t].charAt(0)&&(e[t]="("+e[t]+")");const n=r(e[t]),i=n.name.toUpperCase();n.name=i;const s=i.split(",");for(let t=0;t<s.length;t++)this.ht.set(s[t],n)}}toString(){let t="";return this.ht.forEach((e=>{t=t+e.toString()+"\n"})),t}findValueOf(t){const e=t.split("/");return i(this.ht.get(e[0].toUpperCase()),e)}},tnsnamesFilePath:function(t){let e=null;const n=o.env.TNS_ADMIN;return t?(e=t+"/tnsnames.ora",s.existsSync(e)?e:void u.throwErr(u.ERR_TNS_NAMES_FILE_MISSING,t)):(n?(e=n,e+="/tnsnames.ora",s.existsSync(e)||u.throwErr(u.ERR_TNS_NAMES_FILE_MISSING,n)):u.throwErr(u.ERR_NO_CONFIG_DIR),e)}}},228:(t,e,n)=>{"use strict";const r=n(6982),i=n(6928),s=n(8881),o=n(9896);t.exports=class{constructor(t){this.largeSDU=!1,this.tdu=s.NSPDFTDULN,this.nt={},this.nt.tcpNoDelay=!0,this.uuid=t,this.nt.sslServerDNMatch=!0,this.nt.sslAllowWeakDNMatch=!1}setFrom(t){t&&(t.sdu>0&&(this.sdu=parseInt(t.sdu)),"string"==typeof t.walletLocation&&(this.nt.walletFile=i.join(t.walletLocation,s.PEM_WALLET_FILE_NAME)),"string"==typeof t.walletPassword&&(this.nt.walletPassword=t.walletPassword),t.expireTime>0&&(this.nt.expireTime=1e3*t.expireTime*60),t.connectTimeout>0&&(this.connectTimeout=1e3*t.connectTimeout),t.transportConnectTimeout>0&&(this.transportConnectTimeout=1e3*t.transportConnectTimeout),t.recvTimeout>0&&(this.recvTimeout=1e3*t.recvTimeout),t.sendTimeout>0&&(this.sendTimeout=1e3*t.sendTimeout),"string"==typeof t.connectionIdPrefix&&(this.connectionIdPrefix=t.connectionIdPrefix),"boolean"==typeof t.tcpNoDelay&&(this.nt.tcpNoDelay=t.tcpNoDelay),"boolean"==typeof t.sslServerDNMatch&&(this.nt.sslServerDNMatch=t.sslServerDNMatch),"boolean"==typeof t.sslAllowWeakDNMatch&&(this.nt.sslAllowWeakDNMatch=t.sslAllowWeakDNMatch),"string"==typeof t.sslServerCertDN&&(this.nt.sslServerCertDN=t.sslServerCertDN),"string"==typeof t.enable&&"BROKEN"==t.enable.toUpperCase()&&(this.nt.enabledDCD=!0),"string"==typeof t.httpsProxy&&(this.nt.httpsProxy=t.httpsProxy),t.httpsProxyPort>=0&&(this.nt.httpsProxyPort=parseInt(t.httpsProxyPort)))}readWalletFile(){return new Promise(((t,e)=>{o.readFile(this.nt.walletFile,((n,r)=>{n?e(n):t(r)}))}))}async prepare(t){this.uuid||(this.uuid=await async function(){return await new Promise(((t,e)=>{r.randomBytes(16,((n,r)=>{n?e(n):t(r)}))}))}(),this.uuid=this.uuid.toString("base64")),this.connectionIdPrefix?this.connectionId=this.connectionIdPrefix+this.uuid:this.connectionId=this.uuid,this.nt.connectionId=this.connectionId,t&&"TCPS"==t.toUpperCase()&&this.nt.walletFile&&(this.nt.wallet=await this.readWalletFile()),this.connectTimeout||this.transportConnectTimeout||(this.transportConnectTimeout=6e4)}}},3483:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(2269),s=n(8041),o=n(3762);class a{constructor(t,e=!1){this.bindName=t,this.isReturnBind=e,this.maxSize=0,this.numElements=0,this.maxArraySize=0,this.type=null,this.isArray=!1,this.dir=i.BIND_IN,this.bindVar=null}}t.exports.BindInfo=a;class u{constructor(){this.returningKeywordFound=!1,this.pos=0,this.maxPos=0,this.sqlData=""}_parseBindName(t){let e,n,r=!1,i=!1,s=!1,o=0,a=this.pos+1;for(;a<=this.maxPos;){if(n=this.sqlData[a],i){if(s&&!/\p{N}/u.test(n)){this.pos=a-1;break}if(r&&'"'===n){this.pos=a;break}if(!(s||r||/[\p{L}\p{N}]/u.test(n)||["$","_","#"].includes(n))){this.pos=a-1;break}}else{if(/\p{space}/u.test(n)){a+=1;continue}if('"'===n)r=!0;else if(/\p{N}/u.test(n))s=!0;else if(!/\p{Alpha}/u.test(n))break;i=!0,o=a}a+=1}i&&(e=r?t.sql.substring(o+1,a):s?t.sql.substring(o,a):t.sql.substring(o,a).toUpperCase(),t._addBind(e))}_parseMultiLineComment(){let t,e=!1,n=!1,r=this.pos+1;for(;r<=this.maxPos;){if(t=this.sqlData[r],e){if("*"===t)n=!0;else if(n){if("/"===t){this.pos=r;break}n=!1}}else{if("*"!==t)break;e=!0}r+=1}}_parseQstring(){let t,e,n=!1,r=!1;for(this.pos+=1;this.pos<=this.maxPos;){if(e=this.sqlData[this.pos],r)if(n||e!==t){if(n){if("'"===e)break;e!==t&&(n=!1)}}else n=!0;else t="["===e?"]":"{"===e?"}":"("===e?")":"<"===e?">":e,r=!0;this.pos+=1}}_parseQuotedString(t){let e;for(this.pos+=1;this.pos<=this.maxPos&&(e=this.sqlData[this.pos],e!==t);)this.pos+=1}_parseSingleLineComment(){let t,e=!1,n=this.pos+1;for(;n<=this.maxPos;){if(t=this.sqlData[n],e){if("\n"===t)break}else{if("-"!==t)return;e=!0}n+=1}this.pos=n}parse(t){let e,n,r,i,s=!1,o=!1,a="",u="",_=0,c=!1;for(this.pos=0,this.maxPos=t.sql.length-1,this.sqlData=t.sql;this.pos<=this.maxPos;){if(e=this.sqlData[this.pos],r=/\p{L}/u.test(e),r&&!c)_=this.pos,u=e;else if(!r&&c)if(n=this.pos-_,s)!t.isDml||this.returningKeywordFound||9!==n&&6!==n||!["r","R"].includes(u)?this.returningKeywordFound&&4===n&&["i","I"].includes(u)&&(i=t.sql.substring(_,this.pos).toUpperCase(),"INTO"===i&&(t.isReturning=!0)):(i=t.sql.substring(_,this.pos).toUpperCase(),["RETURNING","RETURN"].includes(i)&&(this.returningKeywordFound=!0));else if(i=t.sql.substring(_,this.pos).toUpperCase(),t._determineStatementType(i),s=!0,t.isDdl)break;"'"===e?(o=!0,["q","Q"].includes(a)?this._parseQstring():this._parseQuotedString(e)):/\p{space}/u.test(e)||("-"===e?this._parseSingleLineComment():"/"===e?this._parseMultiLineComment():'"'===e?this._parseQuotedString(e):":"!==e||o||this._parseBindName(t),o=!1),this.pos+=1,c=r,a=e}s||t._determineStatementType(t.sql.toUpperCase())}}class _{constructor(){this.sql="",this.sqlBytes=[],this.sqlLength=0,this.cursorId=0,this.requiresDefine=!1,this.isQuery=!1,this.isPlSql=!1,this.isDml=!1,this.isDdl=!1,this.isReturning=!1,this.bindInfoList=[],this.queryVars=[],this.bindInfoDict=new Map,this.requiresFullExecute=!1,this.noPrefetch=!1,this.returnToCache=!1,this.numColumns=0,this.lastRowIndex,this.lastRowid,this.moreRowsToFetch=!0,this.inUse=!1,this.bufferRowIndex=0,this.bufferRowCount=0,this.pendingClear=!1,this.statementType=i.STMT_TYPE_UNKNOWN}_copy(){const t=new _;t.sql=this.sql,t.sqlBytes=this.sqlBytes,t.sqlLength=this.sqlLength,t.isQuery=this.isQuery,t.isPlSql=this.isPlSql,t.isDml=this.isDml,t.isDdl=this.isDdl,t.isReturning=this.isReturning,t.bindInfoList=[];for(const e of this.bindInfoList){const n=new a(e.bindName,e.isReturnBind);t.bindInfoList.push(n)}const e=t.bindInfoDict=new Map;for(const n of t.bindInfoList)e.has(n.bindName)?e.get(n.bindName).push(n):e.set(n.bindName,[n]);return t.returnToCache=!1,t}_determineStatementType(t){switch(t){case"DECLARE":this.isPlSql=!0,this.statementType=i.STMT_TYPE_DECLARE;break;case"CALL":this.isPlSql=!0,this.statementType=i.STMT_TYPE_CALL;break;case"BEGIN":this.isPlSql=!0,this.statementType=i.STMT_TYPE_BEGIN;break;case"SELECT":this.isQuery=!0,this.statementType=i.STMT_TYPE_SELECT;break;case"WITH":this.isQuery=!0;break;case"INSERT":this.isDml=!0,this.statementType=i.STMT_TYPE_INSERT;break;case"UPDATE":this.isDml=!0,this.statementType=i.STMT_TYPE_UPDATE;break;case"DELETE":this.isDml=!0,this.statementType=i.STMT_TYPE_DELETE;break;case"MERGE":this.isDml=!0,this.statementType=i.STMT_TYPE_MERGE;break;case"ALTER":this.isDdl=!0,this.statementType=i.STMT_TYPE_ALTER;break;case"CREATE":this.isDdl=!0,this.statementType=i.STMT_TYPE_CREATE;break;case"DROP":this.isDdl=!0,this.statementType=i.STMT_TYPE_DROP;break;case"ANALYZE":case"AUDIT":case"COMMENT":case"GRANT":case"REVOKE":case"TRUNCATE":this.isDdl=!0;break;case"COMMIT":this.statementType=i.STMT_TYPE_COMMIT;break;case"ROLLBACK":this.statementType=i.STMT_TYPE_ROLLBACK;break;default:this.statementType=i.STMT_TYPE_UNKNOWN}}_prepare(t){this.sql=t,this.sqlBytes=r.from(this.sql,"utf8"),this.sqlLength=this.sqlBytes.length,(new u).parse(this)}_addBind(t){if(!this.isPlSql||!this.bindInfoDict.has(t)){const e=new a(t,this.isReturning);this.bindInfoList.push(e),this.bindInfoDict.has(e.bindName)?(this.isReturning&&(this.bindInfoDict.get(e.bindName)[0].isReturnBind||s.throwErr(s.ERR_DML_RETURNING_DUP_BINDS,t)),this.bindInfoDict.get(e.bindName).push(e)):this.bindInfoDict.set(e.bindName,[e])}}_setVariable(t,e){e.type._oraTypeNum===o.TNS_DATA_TYPE_CURSOR&&(this.requiresFullExecute=!0),(e.maxSize!==t.maxSize||e.dir!==t.dir||e.isArray!==t.isArray||e.values.length>t.numElements||e.type!=t.type||e.maxArraySize!=t.maxArraySize)&&(t.isArray=e.isArray,t.numElements=e.values.length,t.maxSize=e.maxSize,t.type=e.type,t.dir=e.dir,t.maxArraySize=e.maxArraySize,this.requiresFullExecute=!0),t.bindVar=e}_clearAllState(){this.cursorId=0,this.requiresDefine=!1,this.noPrefetch=!1,this.requiresFullExecute=!1,this.queryVars=[],this.numQueryVars=0,this.bufferRowCount=0,this.bufferRowIndex=0}_clearState(){this.cursorId=0,this.requiresDefine=!1,this.noPrefetch=!1,this.requiresFullExecute=!1}}t.exports.Statement=_},8073:(t,e,n)=>{const r=n(8041),{Statement:i}=n(3483);t.exports=class{constructor(t){this._cachedStatements=new Map,this._maxSize=t,this._cursorsToClose=new Set,this._openCursors=new Set}_addCursorToClose(t){if(this._cursorsToClose.has(t.cursorId)){const e=`attempt to close cursor ${t.cursorId} twice`;r.throwErr(r.ERR_INTERNAL,e)}0!=t.cursorId&&this._cursorsToClose.add(t.cursorId),this._openCursors.delete(t)}_adjustCache(){for(;this._cachedStatements.size>this._maxSize;){const t=this._cachedStatements.keys().next().value,e=this._cachedStatements.get(t);this._cachedStatements.delete(t),e.inUse?e.returnToCache=!1:0!==e.cursorId&&this._addCursorToClose(e)}}clearCursors(){const t=new Set;for(const e of this._openCursors)(e.inUse||e.returnToCache)&&(e.pendingClear=!0,t.add(e)),e._clearState();this._openCursors=t,this._cursorsToClose.clear()}clearPendingStatus(){for(const t of this._openCursors)t.pendingClear&&!t.inUse&&(t._clearAllState(),t.pendingClear=!1)}getStatement(t,e=!1,n=!1){let r=null;return t&&(r=this._cachedStatements.get(t)),r?n||r.inUse?(e||(this._addCursorToClose(r),this._cachedStatements.delete(t)),r=r._copy(),this._openCursors.add(r)):e?(this._cachedStatements.delete(t),this._cachedStatements.set(t,r)):(this._cachedStatements.delete(t),r.returnToCache=!1):(r=new i,t&&r._prepare(t),e&&!r.isDdl&&this._maxSize>0&&(r.returnToCache=!0,this._cachedStatements.set(t,r),this._adjustCache()),this._openCursors.add(r)),this._openCursors.add(r),r.inUse=!0,r}clearCursor(t){this._addCursorToClose(t),t.cursorId=0}returnStatement(t){t.bindInfoList&&t.bindInfoList.forEach((t=>{t.bindVar=null})),t.queryVars&&t.queryVars.forEach((t=>{t.values.fill(null)})),t.returnToCache?t.inUse=!1:this._addCursorToClose(t),this.clearPendingStatus()}writeCursorsToClose(t){t.writeUB4(this._cursorsToClose.size);for(const e of this._cursorsToClose.keys())t.writeUB4(e);this._cursorsToClose.clear()}}},2456:(t,e,n)=>{"use strict";const r=n(2269),i=n(8041),s=n(857),o=new function(){this.program=process.argv0,this.terminal="unknown",this.pid=process.pid.toString();try{this.userName=s.userInfo().username}catch{this.userName="unknown"}this.hostName=s.hostname()};function a(t,e){const n=void 0===t[0].name,r=n?[]:{};for(let i=0;i<t.length;i++)n?r.push(t[i].values[e]):r[t[i].name]=t[i].values[e];return r}t.exports={getMetadataMany:function(t){const e=[];for(const n of t)e.push(n.fetchInfo);return e},CLIENT_INFO:o,getOutBinds:function(t,e,n){const i=t.bindInfoList.map((t=>t.bindVar)).filter((t=>t.dir!==r.BIND_IN));if(i.length>0){if(n){const t=new Array(e);for(let n=0;n<e;n++)t[n]=a(i,n);return t}return a(i,0)}},checkProxyUserValidity:function(t){let e="",n="",r=!1,i=!1,s=0;const o={status:-1,proxyUser:"",schemaUser:""},a=t.length;let u,_,c=0;for(;c<a;){if('"'===t.charAt(c)&&(r=!r,s=c),"["===t.charAt(c)&&!r){if(i=!0,0!=s){for(u=s+1;u<c;u++)if(" "!==t.charAt(u))return o;for(u=0;u<=s;u++)n+=t.charAt(u)}else for(u=0;u<c&&" "!==t.charAt(u);u++)n+=t.charAt(u);break}c++}if(0===n.length)return o;o.proxyUser=n,c+=1,r=!1;const l=c;for(s=0;c<a;){if('"'===t.charAt(c)&&(r=!r,s=c),"["===t.charAt(c)&&!r&&i)return o;if("]"===t.charAt(c)&&!r){if(s!=l&&0!=s){for(u=l;u<=s;u++)e+=t.charAt(u);for(u=s+1;u<c;u++)if(" "!=t.charAt(u))return o}else{for(u=l;u<c&&" "==t.charAt(u);u++);if(u==c)return o;for(_=u;_<c;_++)e+=t[_]}for(u=c+1;u<a;u++)if(" "!=t[u])return o}c++}return 0===e.length||(o.schemaUser=e,o.status=0),o},checkCredentials:function(t){void 0===t.token&&(!0===t.externalAuth&&i.throwErr(i.ERR_NOT_IMPLEMENTED,"External Authentication"),void 0===t.password&&i.throwErr(i.ERR_MISSING_CREDENTIALS))},normalizePrivateKey:function(t){return"-----BEGIN PRIVATE KEY-----\n"+t+"\n-----END PRIVATE KEY-----"}}},7207:(t,e,n)=>{"use strict";const r=n(7647),{Buffer:i}=n(2562),s=n(2733),o=n(9891),a=n(2269),u=n(8041),_=n(9023),c=n(6893),l=n(6770);function h(t,e){if(void 0===t.type&&arguments.length>2)t.type=arguments[2];else{let n=!1;for(let e=2;e<arguments.length;e++)if(t.type===arguments[e]){n=!0;break}n||(t.attrName?u.throwErr(u.ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR,t.attrName,t.fqn):t.fqn?u.throwErr(u.ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM,t.fqn):t.isArray&&t.name?u.throwErr(u.ERR_INCOMPATIBLE_TYPE_ARRAY_BIND,e.pos,t.name):t.isArray?u.throwErr(u.ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND,e.pos,t.pos):u.throwErr(u.ERR_BIND_VALUE_AND_TYPE_MISMATCH))}}function T(t){if(null==t||"number"==typeof t||"string"==typeof t||"boolean"==typeof t||i.isBuffer(t)||_.types.isDate(t)||l.isVectorValue(t))return t;if(Array.isArray(t)){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=T(t[n]);return e}if(t instanceof r)return{fields:[],values:[]};if(t instanceof c.JsonId)return t;const e={};e.fields=Object.getOwnPropertyNames(t),e.values=new Array(e.fields.length);for(let n=0;n<e.fields.length;n++)e.values[n]=T(t[e.fields[n]]);return e}t.exports={transformJsonValue:T,transformValueIn:function t(e,n,l){if(null!=n){if(e.type===c.DB_TYPE_OBJECT){let t=n;return n instanceof r||(t=new e.typeClass(n)),t._impl}if(e.type===c.DB_TYPE_JSON)return T(n);if("string"==typeof n){if(h(e,l,c.DB_TYPE_VARCHAR,c.DB_TYPE_NVARCHAR,c.DB_TYPE_CHAR,c.DB_TYPE_NCHAR,c.DB_TYPE_CLOB,c.DB_TYPE_NCLOB),e.type!==c.DB_TYPE_CLOB&&e.type!==c.DB_TYPE_NCLOB){const t=i.byteLength(n);(void 0===e.maxSize||t>e.maxSize)&&(e.checkSize&&u.throwErr(u.ERR_MAX_SIZE_TOO_SMALL,e.maxSize,t,l.pos),e.maxSize=t)}return n}if("number"==typeof n||"bigint"==typeof n)return h(e,l,c.DB_TYPE_NUMBER,c.DB_TYPE_BINARY_INTEGER,c.DB_TYPE_BINARY_FLOAT,c.DB_TYPE_BINARY_DOUBLE),Number.isNaN(n)&&e.type===c.DB_TYPE_NUMBER&&u.throwErr(u.ERR_NAN_VALUE),n;if("boolean"==typeof n)return h(e,l,c.DB_TYPE_BOOLEAN),n;if(_.types.isDate(n))return h(e,l,c.DB_TYPE_TIMESTAMP,c.DB_TYPE_TIMESTAMP_TZ,c.DB_TYPE_TIMESTAMP_LTZ,c.DB_TYPE_DATE),n;if(i.isBuffer(n))return h(e,l,c.DB_TYPE_RAW,c.DB_TYPE_BLOB),e.type===c.DB_TYPE_RAW&&(void 0===e.maxSize||n.length>e.maxSize)&&(e.checkSize&&u.throwErr(u.ERR_MAX_SIZE_TOO_SMALL,e.maxSize,n.length,l.pos),e.maxSize=n.length),n;if(n instanceof o)return h(e,l,c.DB_TYPE_CURSOR),n._impl;if(n instanceof s)return h(e,l,n.type),n._impl;if(n instanceof r)return h(e,l,c.DB_TYPE_OBJECT),n._impl;if(n instanceof Float32Array||n instanceof Float64Array||n instanceof Int8Array)return h(e,l,c.DB_TYPE_VECTOR),n;if(e.type===c.DB_TYPE_VECTOR&&Array.isArray(n))return new Float64Array(n);if(l.allowArray&&Array.isArray(n)){e.isArray=!0,e.dir===a.BIND_IN?e.maxArraySize=n.length||1:void 0===e.maxArraySize?u.throwErr(u.ERR_REQUIRED_MAX_ARRAY_SIZE):n.length>e.maxArraySize&&u.throwErr(u.ERR_INVALID_ARRAY_SIZE),l.allowArray=!1;const r=new Array(n.length);for(let i=0;i<n.length;i++)l.pos=i,r[i]=t(e,n[i],l);return r}void 0===e.type&&u.throwErr(u.ERR_INVALID_BIND_DATA_TYPE,2),h(e,l)}}}},6893:(t,e,n)=>{"use strict";const r=n(2269),i=n(8041),s=n(9023),o=new Map,a=new Map,u=new Map;class _{constructor(t,e,n,r){this.num=t,this.name=e,this.columnTypeName=n,this._bufferSizeFactor=r.bufferSizeFactor||0,this._oraTypeNum=r.oraTypeNum||0,this._csfrm=r.csfrm||0,o.set(t,this);const i=256*(r.csfrm||0)+r.oraTypeNum;a.set(i,this),u.set(n,this)}[Symbol.toPrimitive](t){return"number"===t?this.num:this.toString()}[s.inspect.custom](){return this.toString()}toString(){return`[DbType ${this.name}]`}}const c=new _(2020,"DB_TYPE_BFILE","BFILE",{oraTypeNum:114,bufferSizeFactor:112}),l=new _(2008,"DB_TYPE_BINARY_DOUBLE","BINARY_DOUBLE",{oraTypeNum:101,bufferSizeFactor:8}),h=new _(2007,"DB_TYPE_BINARY_FLOAT","BINARY_FLOAT",{oraTypeNum:100,bufferSizeFactor:4}),T=new _(2009,"DB_TYPE_BINARY_INTEGER","BINARY_INTEGER",{oraTypeNum:3,bufferSizeFactor:22}),p=new _(2019,"DB_TYPE_BLOB","BLOB",{oraTypeNum:113,bufferSizeFactor:112}),f=new _(2022,"DB_TYPE_BOOLEAN","BOOLEAN",{oraTypeNum:252,bufferSizeFactor:4}),E=new _(2003,"DB_TYPE_CHAR","CHAR",{oraTypeNum:96,csfrm:r.CSFRM_IMPLICIT,bufferSizeFactor:4}),d=new _(2017,"DB_TYPE_CLOB","CLOB",{oraTypeNum:112,csfrm:r.CSFRM_IMPLICIT,bufferSizeFactor:112}),N=new _(2021,"DB_TYPE_CURSOR","CURSOR",{oraTypeNum:102,bufferSizeFactor:4}),S=new _(2011,"DB_TYPE_DATE","DATE",{oraTypeNum:12,bufferSizeFactor:7}),m=new _(2015,"DB_TYPE_INTERVAL_DS","INTERVAL DAY TO SECOND",{oraTypeNum:183,bufferSizeFactor:11}),A=new _(2016,"DB_TYPE_INTERVAL_YM","INTERVAL YEAR TO MONTH",{oraTypeNum:182}),P=new _(2027,"DB_TYPE_JSON","JSON",{oraTypeNum:119}),g=new _(2024,"DB_TYPE_LONG","LONG",{oraTypeNum:8,csfrm:r.CSFRM_IMPLICIT,bufferSizeFactor:2**31-1}),y=new _(2031,"DB_TYPE_LONG_NVARCHAR","LONG",{oraTypeNum:8,csfrm:r.CSFRM_NCHAR,bufferSizeFactor:2**31-1}),R=new _(2025,"DB_TYPE_LONG_RAW","LONG RAW",{oraTypeNum:24,bufferSizeFactor:2**31-1}),I=new _(2004,"DB_TYPE_NCHAR","NCHAR",{oraTypeNum:96,csfrm:r.CSFRM_NCHAR,bufferSizeFactor:4}),D=new _(2018,"DB_TYPE_NCLOB","NCLOB",{oraTypeNum:112,csfrm:r.CSFRM_NCHAR,bufferSizeFactor:112}),O=new _(2010,"DB_TYPE_NUMBER","NUMBER",{oraTypeNum:2,bufferSizeFactor:22}),C=new _(2002,"DB_TYPE_NVARCHAR","NVARCHAR2",{oraTypeNum:1,csfrm:r.CSFRM_NCHAR,bufferSizeFactor:4}),b=new _(2023,"DB_TYPE_OBJECT","OBJECT",{oraTypeNum:109}),v=new _(2006,"DB_TYPE_RAW","RAW",{oraTypeNum:23,bufferSizeFactor:1}),w=new _(2005,"DB_TYPE_ROWID","ROWID",{oraTypeNum:11,bufferSizeFactor:18}),L=new _(2012,"DB_TYPE_TIMESTAMP","TIMESTAMP",{oraTypeNum:180,bufferSizeFactor:11}),B=new _(2014,"DB_TYPE_TIMESTAMP_LTZ","TIMESTAMP WITH LOCAL TIME ZONE",{oraTypeNum:231,bufferSizeFactor:11}),Y=new _(2013,"DB_TYPE_TIMESTAMP_TZ","TIMESTAMP WITH TIME ZONE",{oraTypeNum:181,bufferSizeFactor:13}),U=new _(2030,"DB_TYPE_UROWID","UROWID",{oraTypeNum:208}),M=new _(2001,"DB_TYPE_VARCHAR","VARCHAR2",{oraTypeNum:1,csfrm:r.CSFRM_IMPLICIT,bufferSizeFactor:4}),x=new _(2032,"DB_TYPE_XMLTYPE","XMLTYPE",{oraTypeNum:109,csfrm:r.CSFRM_IMPLICIT,bufferSizeFactor:2147483647}),V=new _(2033,"DB_TYPE_VECTOR","VECTOR",{oraTypeNum:127}),F=new Map([[l,new Map([[M,M]])],[h,new Map([[M,M]])],[p,new Map([[v,R],[R,R]])],[E,new Map([[M,M]])],[d,new Map([[M,g],[g,g]])],[S,new Map([[M,M],[B,B]])],[P,new Map([[M,M]])],[g,new Map([[M,g]])],[R,new Map([[v,R]])],[I,new Map([[E,I],[M,C],[C,C]])],[D,new Map([[M,y],[C,y],[g,y],[y,y]])],[O,new Map([[M,M]])],[C,new Map([[E,I],[I,I],[M,C]])],[v,new Map([[M,M]])],[w,new Map([[M,w]])],[L,new Map([[M,M],[B,B]])],[B,new Map([[M,M],[Y,Y]])],[Y,new Map([[M,M],[B,B]])],[U,new Map([[M,w]])],[V,new Map([[M,g],[g,g],[d,d]])]]),k=new Map([[c,c],[l,l],[h,h],[T,T],[p,p],[f,f],[E,E],[d,d],[N,N],[S,S],[m,m],[A,A],[P,P],[g,g],[y,y],[R,R],[I,I],[D,D],[O,O],[C,C],[b,b],[v,v],[w,w],[L,L],[B,Y],[Y,Y],[U,U],[M,M],[x,x],[V,V]]);u.set("DOUBLE PRECISION",O),u.set("FLOAT",O),u.set("INTEGER",O),u.set("PL/SQL BOOLEAN",f),u.set("PL/SQL BINARY INTEGER",T),u.set("PL/SQL PLS INTEGER",T),u.set("REAL",O),u.set("SMALLINT",O),u.set("TIMESTAMP WITH LOCAL TZ",B),u.set("TIMESTAMP WITH TZ",Y);class j extends Uint8Array{toJSON(){return Buffer.from(this.buffer).toString("hex")}}t.exports={DbType:_,DB_TYPE_BFILE:c,DB_TYPE_BINARY_DOUBLE:l,DB_TYPE_BINARY_FLOAT:h,DB_TYPE_BINARY_INTEGER:T,DB_TYPE_BLOB:p,DB_TYPE_BOOLEAN:f,DB_TYPE_CHAR:E,DB_TYPE_CLOB:d,DB_TYPE_CURSOR:N,DB_TYPE_DATE:S,DB_TYPE_INTERVAL_DS:m,DB_TYPE_INTERVAL_YM:A,DB_TYPE_JSON:P,DB_TYPE_LONG:g,DB_TYPE_LONG_NVARCHAR:y,DB_TYPE_LONG_RAW:R,DB_TYPE_NCHAR:I,DB_TYPE_NCLOB:D,DB_TYPE_NUMBER:O,DB_TYPE_NVARCHAR:C,DB_TYPE_OBJECT:b,DB_TYPE_RAW:v,DB_TYPE_ROWID:w,DB_TYPE_TIMESTAMP:L,DB_TYPE_TIMESTAMP_LTZ:B,DB_TYPE_TIMESTAMP_TZ:Y,DB_TYPE_UROWID:U,DB_TYPE_VARCHAR:M,DB_TYPE_VECTOR:V,DB_TYPE_CONVERSION_MAP:F,DB_TYPE_FETCH_TYPE_MAP:k,DB_TYPE_XMLTYPE:x,getTypeByColumnTypeName:function(t){const e=u.get(t);return e||i.throwErr(i.ERR_UNKNOWN_COLUMN_TYPE_NAME,t),e},getTypeByNum:function(t){const e=o.get(t);return e||i.throwErr(i.ERR_INVALID_TYPE_NUM,t),e},getTypeByOraTypeNum:function(t,e){const n=256*(e||0)+t,r=a.get(n);return r||i.throwErr(i.ERR_INVALID_ORACLE_TYPE_NUM,t,e),r},JsonId:j}},6770:(t,e,n)=>{"use strict";const{Buffer:r}=n(2562),i=n(8041),s=n(932),o=n(9023),a=n(6893),u=n(2269);let _;try{_=n(15)}catch(t){i.throwErr(i.ERR_MISSING_FILE,"package.json")}const c=_.version,l="oracledb-"+c+"-"+s.platform+"-"+s.arch+".node";function h(t){const e=function(){if("function"!=typeof arguments[arguments.length-1])return t.apply(this,arguments).catch((function t(e){throw i.transformErr(e,t)}));const e=Array.prototype.slice.call(arguments,0,arguments.length-1),n=arguments[arguments.length-1];t.apply(this,e).then((function(t){n(null,t)}),(function t(e){n(i.transformErr(e,t))}))};return t.name&&Object.defineProperty(e,"name",{value:t.name}),e}function T(t){return async function(){let e;this._impl&&(e=this._impl._getConnImpl(),await e._acquireLock());try{return await t.apply(this,arguments)}finally{e&&e._releaseLock()}}}function p(t,e){return async function(){this._isActive&&i.throwErr(e),this._isActive=!0;try{return await t.apply(this,arguments)}finally{this._isActive=!1}}}function f(t){return null!==t&&"object"==typeof t}function E(t){return null!=t&&t._sodaDocumentMarker}function d(t){i.assert("string"==typeof t,i.ERR_TOKEN_BASED_AUTH),void 0===t.split(".")[1]&&i.throwErr(i.ERR_TOKEN_BASED_AUTH);const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=r.from(e,"base64").toString("ascii");let s=JSON.parse(n).exp;return i.assert(null!=s,i.ERR_TOKEN_BASED_AUTH),s*=1e3,(new Date).getTime()>s}t.exports={BINARY_FILE:l,BUILD_FILE:"oracledb.node",PACKAGE_JSON_VERSION:c,RELEASE_DIR:"build/Release",STAGING_DIR:"package/Staging",addTypeProperties:function(t,e){const n=e+"Name",r=t[e+"Class"];let i=t[e];"number"==typeof i&&(i=t[e]=a.getTypeByNum(i)),r?t[n]=r.prototype.fqn:i&&(t[n]=i.columnTypeName)},callbackify:h,denormalizePrivateKey:function(t){return(t=(t=t.replace(/\n/g,"")).replace("-----BEGIN PRIVATE KEY-----","")).replace("-----END PRIVATE KEY-----","")},getInstallURL:function(){return"Node-oracledb installation instructions: https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html"},getInstallHelp:function(){let t,e,n="Node-oracledb installation instructions: https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html\n";return"linux"===s.platform?("x64"===s.arch?(e="https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html\n",t="64-bit"):"x32"===s.arch?(e="https://www.oracle.com/database/technologies/instant-client/linux-x86-32-downloads.html\n",t="32-bit"):(e="https://www.oracle.com/database/technologies/instant-client.html\n",t=s.arch),n+="You must have Linux "+t+" Oracle Client libraries configured with ldconfig, or in LD_LIBRARY_PATH.\n",n+="If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from \n",n+=e):"darwin"===s.platform?("x64"===s.arch?(e="https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html\n",t="64-bit"):(e="https://www.oracle.com/database/technologies/instant-client.html\n",t=s.arch),n+="You must have macOS "+t+" Oracle Instant Client Basic or Basic Light package libraries in\n",n+='/usr/local/lib or set by calling oracledb.initOracleClient({libDir: "/my/instant_client_directory"}).\n',n+="Oracle Instant Client can be downloaded from "+e):"win32"===s.platform?("x64"===s.arch?(e="https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html\n",t="64-bit"):"x32"===s.arch?(e="https://www.oracle.com/database/technologies/instant-client/microsoft-windows-32-downloads.html\n",t="32-bit"):(e="https://www.oracle.com/database/technologies/instant-client.html\n",t=s.arch),n+="You must have Windows "+t+" Oracle Client libraries in your PATH environment variable.\n",n+="If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from\n",n+=e,n+="A Microsoft Visual Studio Redistributable suitable for your Oracle client library version must be available.\n"):(e="https://www.oracle.com/database/technologies/instant-client.html\n",n+="You must have "+s.arch+" Oracle Client libraries in your operating system library search path.\n",n+="If you do not have Oracle Database on this computer, then install an Instant Client Basic or Basic Light package from: \n",n+=e),n},isArrayOfStrings:function(t){if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if("string"!=typeof t[e])return!1;return!0},isObject:f,isObjectOrArray:function(t){return null!==t&&"object"==typeof t||Array.isArray(t)},isPrivilege:function(t){return t&u.SYSPRELIM&&(t^=u.SYSPRELIM),t===u.SYSASM||t===u.SYSBACKUP||t===u.SYSDBA||t===u.SYSDG||t===u.SYSKM||t===u.SYSOPER||t===u.SYSRAC},isShardingKey:function(t){if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++){const n=t[e];if("string"!=typeof n&&"number"!=typeof n&&!r.isBuffer(n)&&!o.types.isDate(n))return!1}return!0},isSodaDocument:E,isTokenExpired:d,isTokenValid:function(t){switch(typeof t){case"string":return""===t&&i.throwErr(i.ERR_TOKEN_BASED_AUTH),!d(t);case"object":return void 0!==t.token&&""!==t.token&&void 0!==t.privateKey&&""!==t.privateKey||i.throwErr(i.ERR_TOKEN_BASED_AUTH),!d(t.token);default:i.throwErr(i.ERR_TOKEN_BASED_AUTH)}},isVectorValue:function(t){return t instanceof Float32Array||t instanceof Float64Array||t instanceof Int8Array},isXid:function(t){return f(t)&&Number.isInteger(t.formatId)&&(r.isBuffer(t.globalTransactionId)||"string"==typeof t.globalTransactionId)&&(r.isBuffer(t.branchQualifier)||"string"==typeof t.branchQualifier)},makeDate:function(t,e,n,r,i,s,o,a,u){return t?new Date(e,n-1,r,i,s,o,a):new Date(Date.UTC(e,n-1,r,i,s,o,a)-6e4*u)},preventConcurrent:p,serialize:T,verifySodaDoc:function(t){return E(t)?t._impl:(i.assertParamValue(f(t),1),r.from(JSON.stringify(t)))},wrapFns:function(t){let e,n=1;"number"==typeof arguments[1]&&(n=2,e=arguments[1]);for(let r=n;r<arguments.length;r++){const n=arguments[r],i=t[n];t[n]=h(e?p(T(i),e):T(i))}}}},8196:t=>{t.exports={VERSION_MAJOR:6,VERSION_MINOR:5,VERSION_PATCH:1,VERSION_SUFFIX:""}},7342:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=7342,t.exports=e},9140:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createLogger=e.logLevelNumbers=e.logLevelNames=void 0;class n{constructor(t){this.config={targets:(null==t?void 0:t.targets)||[{type:"console",level:"info"}],base:(null==t?void 0:t.base)||{},getConfig:null==t?void 0:t.getConfig}}trace(t,n){this.log(this.packRecord(e.logLevelNumbers.trace,t,n))}debug(t,n){this.log(this.packRecord(e.logLevelNumbers.debug,t,n))}info(t,n){this.log(this.packRecord(e.logLevelNumbers.info,t,n))}warn(t,n){this.log(this.packRecord(e.logLevelNumbers.warn,t,n))}error(t,n){this.log(this.packRecord(e.logLevelNumbers.error,t,n))}fatal(t,n){this.log(this.packRecord(e.logLevelNumbers.fatal,t,n))}packRecord(t,e,n){const r=this.config.getConfig?this.config.getConfig():this.config;return n?Object.assign(Object.assign(Object.assign({},r.base),e),{level:t,msg:n,time:(new Date).getTime()}):Object.assign(Object.assign({},r.base),{level:t,msg:e,time:(new Date).getTime()})}log(t){const n=this.config.getConfig?this.config.getConfig():this.config;for(const r of n.targets)if(!(t.level<e.logLevelNames[r.level]))switch(r.type){case"console":console.log(JSON.stringify(t));break;case"stream":r.stream.write(JSON.stringify(t)+"\n")}}child(t){return new n(Object.assign(Object.assign({},this.config),{base:Object.assign(Object.assign({},this.config.base),t)}))}}function r(t){return new n(t)}e.logLevelNames={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"},e.logLevelNumbers={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},e.createLogger=r,e.default=r},1778:(t,e,n)=>{"use strict";var r=n(5894),i=n(4356),s=n(7553)(),o=n(3906),a=n(4002),u=r("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||u(e)!==e)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,_=!0;if("length"in t&&o){var c=o(t,"length");c&&!c.configurable&&(r=!1),c&&!c.writable&&(_=!1)}return(r||_||!n)&&(s?i(t,"length",e,!0,!0):i(t,"length",e)),t}},6090:t=>{for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);t.exports=function(t,n){var r=n||0,i=e;return[i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]]].join("")}},1070:(t,e,n)=>{var r=n(6982);t.exports=function(){return r.randomBytes(16)}},482:(t,e,n)=>{var r,i,s=n(1070),o=n(6090),a=0,u=0;t.exports=function(t,e,n){var _=e&&n||0,c=e||[],l=(t=t||{}).node||r,h=void 0!==t.clockseq?t.clockseq:i;if(null==l||null==h){var T=s();null==l&&(l=r=[1|T[0],T[1],T[2],T[3],T[4],T[5]]),null==h&&(h=i=16383&(T[6]<<8|T[7]))}var p=void 0!==t.msecs?t.msecs:(new Date).getTime(),f=void 0!==t.nsecs?t.nsecs:u+1,E=p-a+(f-u)/1e4;if(E<0&&void 0===t.clockseq&&(h=h+1&16383),(E<0||p>a)&&void 0===t.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=p,u=f,i=h;var d=(1e4*(268435455&(p+=122192928e5))+f)%4294967296;c[_++]=d>>>24&255,c[_++]=d>>>16&255,c[_++]=d>>>8&255,c[_++]=255&d;var N=p/4294967296*1e4&268435455;c[_++]=N>>>8&255,c[_++]=255&N,c[_++]=N>>>24&15|16,c[_++]=N>>>16&255,c[_++]=h>>>8|128,c[_++]=255&h;for(var S=0;S<6;++S)c[_+S]=l[S];return e||o(c)}},6836:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpSqlCommand=e.dumpSqlInsert=e.dumpSqlDelete=e.dumpSqlUpdate=e.dumpSqlSelect=void 0;const r=n(1227),i=n(9784),s=n(3040);function o(t,e){t.put("^select "),e.distinct&&t.put("^distinct "),e.topRecords&&(t.dialect.rangeSelect&&!t.dialect.offsetFetchRangeSyntax||t.put("^top %s ",e.topRecords)),e.selectAll&&t.put("* "),e.columns&&(e.selectAll&&t.put("&n,"),t.put("&>&n"),t.putCollection(",&n",e.columns,(e=>{(0,r.dumpSqlExpression)(t,e),e.alias&&t.put(" ^as %i",e.alias)})),t.put("&n&<")),t.put("^from "),(0,i.dumpSqlFromDefinition)(t,e.from),e.where&&(t.put("&n^where "),(0,s.dumpSqlCondition)(t,e.where),t.put("&n")),e.groupBy&&(t.put("&n^group ^by "),t.putCollection(", ",e.groupBy,(e=>(0,r.dumpSqlExpression)(t,e))),t.put("&n")),e.having&&(t.put("&n^having "),(0,s.dumpSqlCondition)(t,e.having),t.put("&n")),e.orderBy&&(t.put("&n^order ^by "),t.putCollection(", ",e.orderBy,(e=>{(0,r.dumpSqlExpression)(t,e),t.put(" %k",e.direction)})),t.put("&n")),e.range&&(t.dialect.offsetFetchRangeSyntax?t.put("^offset %s ^rows ^fetch ^next %s ^rows ^only",e.range.offset,e.range.limit):t.put("^limit %s ^offset %s ",e.range.limit,e.range.offset)),e.topRecords&&t.dialect.rangeSelect&&!t.dialect.offsetFetchRangeSyntax&&t.put("^limit %s ",e.topRecords)}function a(t,e){t.put("^update "),(0,i.dumpSqlSourceRef)(t,e.from),t.put("&n^set "),t.put("&>"),t.putCollection(", ",e.fields,(e=>{t.put("%i=",e.targetColumn),(0,r.dumpSqlExpression)(t,e)})),t.put("&<"),e.where&&(t.put("&n^where "),(0,s.dumpSqlCondition)(t,e.where),t.put("&n"))}function u(t,e){t.put("^delete ^from "),(0,i.dumpSqlSourceRef)(t,e.from),e.where&&(t.put("&n^where "),(0,s.dumpSqlCondition)(t,e.where),t.put("&n"))}function _(t,e){t.put("^insert ^into %f (%,i) ^values (",e.targetTable,e.fields.map((t=>t.targetColumn))),t.putCollection(",",e.fields,(e=>(0,r.dumpSqlExpression)(t,e))),t.put(")")}e.dumpSqlSelect=o,e.dumpSqlUpdate=a,e.dumpSqlDelete=u,e.dumpSqlInsert=_,e.dumpSqlCommand=function(t,e){switch(e.commandType){case"select":o(t,e);break;case"update":a(t,e);break;case"delete":u(t,e);break;case"insert":_(t,e);break;case"allowIdentityInsert":t.allowIdentityInsert(e.targetTable,e.allow)}}},3040:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpSqlCondition=void 0;const r=n(1227),i=n(6836);e.dumpSqlCondition=function t(e,n){switch(n.conditionType){case"binary":(0,r.dumpSqlExpression)(e,n.left),e.put(" %s ",n.operator),(0,r.dumpSqlExpression)(e,n.right);break;case"isNull":(0,r.dumpSqlExpression)(e,n.expr),e.put(" ^is ^null");break;case"isNotNull":(0,r.dumpSqlExpression)(e,n.expr),e.put(" ^is ^not ^null");break;case"isEmpty":e.put("^trim("),(0,r.dumpSqlExpression)(e,n.expr),e.put(") = ''");break;case"isNotEmpty":e.put("^trim("),(0,r.dumpSqlExpression)(e,n.expr),e.put(") <> ''");break;case"and":case"or":e.putCollection(` ^${n.conditionType} `,n.conditions,(n=>{e.putRaw("("),t(e,n),e.putRaw(")")}));break;case"like":(0,r.dumpSqlExpression)(e,n.left),e.put(e.dialect.ilike?" ^ilike ":" ^like "),(0,r.dumpSqlExpression)(e,n.right);break;case"notLike":(0,r.dumpSqlExpression)(e,n.left),e.put(" ^not ^like "),(0,r.dumpSqlExpression)(e,n.right);break;case"not":e.put("^not ("),t(e,n.condition),e.put(")");break;case"exists":e.put("^exists ("),(0,i.dumpSqlSelect)(e,n.subQuery),e.put(")");break;case"notExists":e.put("^not ^exists ("),(0,i.dumpSqlSelect)(e,n.subQuery),e.put(")");break;case"between":(0,r.dumpSqlExpression)(e,n.expr),e.put(" ^between "),(0,r.dumpSqlExpression)(e,n.left),e.put(" ^and "),(0,r.dumpSqlExpression)(e,n.right);break;case"in":(0,r.dumpSqlExpression)(e,n.expr),e.put(" ^in (%,v)",n.values);break;case"rawTemplate":let s=!1;for(const t of n.templateSql.split("$$"))s&&(0,r.dumpSqlExpression)(e,n.expr),e.putRaw(t),s=!0}}},1227:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpSqlExpression=void 0;const r=n(9784);e.dumpSqlExpression=function t(e,n){switch(n.exprType){case"column":n.source&&(0,r.dumpSqlSourceRef)(e,n.source)&&e.put("."),e.put("%i",n.columnName);break;case"placeholder":e.putRaw("{PLACEHOLDER}");break;case"value":e.put("%v",n.value);break;case"raw":e.put("%s",n.sql);break;case"unaryRaw":n.beforeSql&&e.putRaw(n.beforeSql),t(e,n.expr),n.afterSql&&e.putRaw(n.afterSql);break;case"call":e.put("%s(",n.func),n.argsPrefix&&e.put("%s ",n.argsPrefix),e.putCollection(",",n.args,(n=>t(e,n))),e.put(")");break;case"methodCall":t(e,n.thisObject),e.put(".%s(",n.method),e.putCollection(",",n.args,(n=>t(e,n))),e.put(")");break;case"transform":e.transform(n.transform,(()=>t(e,n.expr)));break;case"rowNumber":e.put(" ^row_number() ^over (^order ^by "),e.putCollection(", ",n.orderBy,(n=>{t(e,n),e.put(" %k",n.direction)})),e.put(")")}}},9784:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpSqlFromDefinition=e.dumpSqlRelation=e.dumpSqlSourceRef=e.dumpSqlSourceDef=void 0;const r=n(6836),i=n(3040);function s(t,e){let n=0;if(null!=e.name&&n++,null!=e.subQuery&&n++,null!=e.subQueryString&&n++,1!=n)throw new Error("sqltree.Source should have exactly one source");null!=e.name&&t.put("%f",e.name),e.subQuery&&(t.put("("),(0,r.dumpSqlSelect)(t,e.subQuery),t.put(")")),e.subQueryString&&(t.put("("),t.putRaw(e.subQueryString),t.put(")")),e.alias&&t.put(" %i",e.alias)}function o(t,e){t.put("&n %k ",e.joinType),s(t,e),e.conditions&&e.conditions.length>0&&(t.put(" ^on "),t.putCollection(" ^and ",e.conditions,(e=>(0,i.dumpSqlCondition)(t,e))))}e.dumpSqlSourceDef=s,e.dumpSqlSourceRef=function(t,e){return e.alias?(t.put("%i",e.alias),!0):!!e.name&&(t.put("%f",e.name),!0)},e.dumpSqlRelation=o,e.dumpSqlFromDefinition=function(t,e){s(t,e),t.put(" "),e.relations&&e.relations.forEach((e=>o(t,e)))}},311:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.evaluateCondition=void 0;const i=r(n(3402)),s=r(n(4099)),o=n(610);function a(t){return null==t||""==t.toString().trim()}function u(t,e){if(!t)return!1;if(!e)return!1;const n=new RegExp(`^${(0,s.default)(e).replace(/%/g,".*")}$`,"i");return!!t.toString().match(n)}e.evaluateCondition=function t(e,n){switch(e.conditionType){case"binary":const r=(0,o.evaluateExpression)(e.left,n),s=(0,o.evaluateExpression)(e.right,n);switch(e.operator){case"=":return r==s;case"!=":case"<>":return r!=s;case"<=":return r<=s;case">=":return r>=s;case"<":return r<s;case">":return r>s}break;case"isNull":return null==(0,o.evaluateExpression)(e.expr,n);case"isNotNull":return null!=(0,o.evaluateExpression)(e.expr,n);case"isEmpty":return a((0,o.evaluateExpression)(e.expr,n));case"isNotEmpty":return!a((0,o.evaluateExpression)(e.expr,n));case"and":return e.conditions.every((e=>t(e,n)));case"or":return e.conditions.some((e=>t(e,n)));case"like":return u((0,o.evaluateExpression)(e.left,n),(0,o.evaluateExpression)(e.right,n));case"notLike":return!u((0,o.evaluateExpression)(e.left,n),(0,o.evaluateExpression)(e.right,n));case"not":return!t(e.condition,n);case"anyColumnPass":return Object.keys(n).some((r=>t((0,i.default)(e.placeholderCondition,(t=>{if("placeholder"==t.exprType)return{exprType:"column",columnName:r}})),n)))}}},610:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.evaluateExpression=void 0;const i=r(n(613));e.evaluateExpression=function(t,e){switch(t.exprType){case"column":return(0,i.default)(e,t.columnName);case"placeholder":return e.__placeholder;case"value":return t.value;case"raw":return t.sql;case"call":case"methodCall":case"transform":return null}}},1759:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(7574),e),i(n(6836),e),i(n(7427),e),i(n(9784),e),i(n(3040),e),i(n(311),e),i(n(610),e)},7574:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7427:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeConditions=e.scriptToSql=e.treeToSql=void 0;const r=n(6836);e.treeToSql=function(t,e,n){const r=t.createDumper();return n(r,e),r.s},e.scriptToSql=function(t,e){const n=t.createDumper();for(const t of e)(0,r.dumpSqlCommand)(n,t),n.endCommand();return n.s},e.mergeConditions=function(t,e){return t?e?"and"==t.conditionType&&"and"==e.conditionType?{conditionType:"and",conditions:[...t.conditions,...e.conditions]}:"and"==t.conditionType?{conditionType:"and",conditions:[...t.conditions,e]}:"and"==e.conditionType?{conditionType:"and",conditions:[t,...e.conditions]}:{conditionType:"and",conditions:[t,e]}:t:e}},8098:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DatabaseAnalyser=void 0;const s=i(n(220)),o=i(n(2535)),a=i(n(8644)),u=i(n(7120)),_=(0,n(8852).getLogger)("dbAnalyser"),c=["tables","collections","views","matviews","functions","procedures","triggers"],l=t=>e=>(0,a.default)(e,t);class h{constructor(t,e,n){this.pool=t,this.driver=e,this.singleObjectId=null,this.dialect=(null==e?void 0:e.dialectByVersion)&&(null==e?void 0:e.dialectByVersion(n))||(null==e?void 0:e.dialect),this.logger=_}_runAnalysis(){return r(this,void 0,void 0,(function*(){return h.createEmptyStructure()}))}_getFastSnapshot(){return r(this,void 0,void 0,(function*(){return null}))}_computeSingleObjectId(){return r(this,void 0,void 0,(function*(){}))}addEngineField(t){var e;if(null===(e=this.driver)||void 0===e?void 0:e.engine){for(const e of c)if(t[e])for(const n of t[e])n.engine=this.driver.engine;return t.engine=this.driver.engine,t}}fullAnalysis(){return r(this,void 0,void 0,(function*(){return this.addEngineField(yield this._runAnalysis())}))}singleObjectAnalysis(t,e){var n,i;return r(this,void 0,void 0,(function*(){this.singleObjectFilter=Object.assign(Object.assign({},t),{typeField:e}),yield this._computeSingleObjectId();const r=this.addEngineField(yield this._runAnalysis());return 1==(null===(n=r[e])||void 0===n?void 0:n.length)?r[e][0]:null===(i=r[e])||void 0===i?void 0:i.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName))}))}incrementalAnalysis(t){return r(this,void 0,void 0,(function*(){this.structure=t;const e=yield this.getModifications();if(null==e)return this.structure=null,this.addEngineField(yield this._runAnalysis());const n=e.filter((t=>"setTableRowCounts"!=t.action)),r=e.find((t=>"setTableRowCounts"==t.action));let i=null;if(r){const e=(s=t,o=r.rowCounts,Object.assign(Object.assign({},s),{tables:(s.tables||[]).map((t=>{var e,n;return Object.assign(Object.assign({},t),{tableRowCount:null!==(n=null===(e=o.find((e=>e.objectId==t.objectId)))||void 0===e?void 0:e.tableRowCount)&&void 0!==n?n:t.tableRowCount})}))}));(function(t,e){for(const n of t.tables||[]){const t=(e.tables||[]).find((t=>t.objectId==n.objectId));if((null==n?void 0:n.tableRowCount)!==(null==t?void 0:t.tableRowCount))return!0}return!1})(t,e)&&(i=e)}var s,o;return 0==n.length?i?this.addEngineField(i):null:(this.modifications=n,i&&(this.structure=i),_.info({modifications:this.modifications},"DB modifications detected:"),this.addEngineField(this.mergeAnalyseResult(yield this._runAnalysis())))}))}mergeAnalyseResult(t){if(null==this.structure)return Object.assign(Object.assign({},h.createEmptyStructure()),t);const e={};for(const n of c){const r=this.modifications.filter((t=>"remove"==t.action&&t.objectTypeField==n)).map((t=>t.objectId)),i=t[n]||[],o=[...r,...i.map((t=>t.objectId))];e[n]=(0,s.default)([...(this.structure[n]||[]).filter((t=>!o.includes(t.objectId))),...i],(t=>t.pureName));for(const t of e[n]){const e=(this.structure[n]||[]).find((e=>e.objectId==t.objectId));if(e)for(const n in e)t[n]||(t[n]=e[n])}}return e}getRequestedObjectPureNames(t,e){if(this.singleObjectFilter){const{typeField:e,pureName:n}=this.singleObjectFilter;if(e==t)return[n]}return this.modifications?this.modifications.filter((e=>e.objectTypeField==t)).filter((t=>t.newName)).map((t=>t.newName.pureName)):e}createQuery(t,e,n={}){return this.createQueryCore(this.processQueryReplacements(t,n),e)}processQueryReplacements(t,e){for(const n in e)t=t.replaceAll(n,e[n]);return t}createQueryCore(t,e){if(this.singleObjectFilter){const{typeField:n}=this.singleObjectFilter;return this.singleObjectId&&e&&e.includes(n)?t.replace(/=OBJECT_ID_CONDITION/g,` = '${this.singleObjectId}'`):null}if(!this.modifications||!e||0==this.modifications.length)return t.replace(/=OBJECT_ID_CONDITION/g," is not null");if(this.modifications.some((t=>e.includes(t.objectTypeField)&&"all"==t.action)))return t.replace(/=OBJECT_ID_CONDITION/g," is not null");const n=this.modifications.filter((t=>e.includes(t.objectTypeField)&&("add"==t.action||"change"==t.action))).map((t=>t.objectId));return 0==n.length?null:t.replace(/=OBJECT_ID_CONDITION/g,` in (${n.map((t=>`'${t}'`)).join(",")})`)}getDeletedObjectsForField(t,e){const n=t[e];return n&&this.structure[e]?this.structure[e].filter((t=>!n.find((e=>t.objectId==e.objectId)))).map((t=>({oldName:(0,a.default)(t,["schemaName","pureName"]),objectId:t.objectId,action:"remove",objectTypeField:e}))):[]}getDeletedObjects(t){return[...this.getDeletedObjectsForField(t,"tables"),...this.getDeletedObjectsForField(t,"collections"),...this.getDeletedObjectsForField(t,"views"),...this.getDeletedObjectsForField(t,"matviews"),...this.getDeletedObjectsForField(t,"procedures"),...this.getDeletedObjectsForField(t,"functions"),...this.getDeletedObjectsForField(t,"triggers")]}feedback(t){this.pool.feedback&&this.pool.feedback(t),t&&t.analysingMessage&&_.debug(t.analysingMessage)}getModifications(){return r(this,void 0,void 0,(function*(){const t=yield this._getFastSnapshot();if(!t)return null;const e=[];for(const n in t){const r=t[n];if(null!==r){if(void 0!==r)for(const t of r){const{objectId:r,schemaName:i,pureName:s,contentHash:o}=t,u=this.structure[n].find((t=>t.objectId==r));if(u&&o&&u.contentHash==o)continue;const _=u?{newName:{schemaName:i,pureName:s},oldName:(0,a.default)(u,["schemaName","pureName"]),action:"change",objectTypeField:n,objectId:r}:{newName:{schemaName:i,pureName:s},action:"add",objectTypeField:n,objectId:r};e.push(_)}}else e.push({objectTypeField:n,action:"all"})}const n=(t.tables||[]).filter((t=>null!=t.tableRowCount)).map((t=>({objectId:t.objectId,tableRowCount:t.tableRowCount})));return n.length>0&&e.push({action:"setTableRowCounts",rowCounts:n}),[...(0,u.default)(e),...this.getDeletedObjects(t)]}))}analyserQuery(t,e,n={}){return r(this,void 0,void 0,(function*(){const r=this.createQuery(t,e,n);if(!r)return{rows:[]};try{const e=yield this.driver.query(this.pool,r);return this.logger.debug({rows:e.rows.length,template:t},"Loaded analyser query"),e}catch(t){return _.error({err:t},"Error running analyser query"),{rows:[]}}}))}static createEmptyStructure(){return{tables:[],collections:[],views:[],matviews:[],functions:[],procedures:[],triggers:[],schemas:[]}}static byTableFilter(t){return e=>e.pureName==t.pureName&&e.schemaName==e.schemaName}static extractPrimaryKeys(t,e){const n=e.filter(h.byTableFilter(t));if(0!=n.length)return Object.assign(Object.assign({},(0,a.default)(n[0],["constraintName","schemaName","pureName"])),{constraintType:"primaryKey",columns:n.map(l("columnName"))})}static extractForeignKeys(t,e){const n=(0,o.default)(e.filter(h.byTableFilter(t)),"constraintName");return Object.keys(n).map((t=>Object.assign(Object.assign({constraintName:t,constraintType:"foreignKey"},(0,a.default)(n[t][0],["constraintName","schemaName","pureName","refSchemaName","refTableName","updateAction","deleteAction"])),{columns:n[t].map(l(["columnName","refColumnName"]))})))}}e.DatabaseAnalyser=h},8926:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.jsonScriptToJavascript=e.ScriptWriterJson=e.ScriptWriter=void 0;const i=r(n(5116)),s=n(1421);class o{constructor(t="0"){this.s="",this.packageNames=[],this.varCount=0,this.varCount=parseInt(t)||0}allocVariable(t="var"){return this.varCount+=1,`${t}${this.varCount}`}_put(t=""){this.s+=t,this.s+="\n"}endLine(){this._put()}assignCore(t,e,n){this._put(`const ${t} = await ${e}(${JSON.stringify(n)});`)}assign(t,e,n){this.assignCore(t,(0,s.extractShellApiFunctionName)(e),n),this.packageNames.push(...(0,s.extractShellApiPlugins)(e,n))}assignValue(t,e){this._put(`const ${t} = ${JSON.stringify(e)};`)}requirePackage(t){this.packageNames.push(t)}copyStream(t,e,n=null){n?this._put(`await dbgateApi.copyStream(${t}, ${e}, {columns: ${n}});`):this._put(`await dbgateApi.copyStream(${t}, ${e});`)}dumpDatabase(t){this._put(`await dbgateApi.dumpDatabase(${JSON.stringify(t)});`)}importDatabase(t){this._put(`await dbgateApi.importDatabase(${JSON.stringify(t)});`)}dataDuplicator(t){this._put(`await dbgateApi.dataDuplicator(${JSON.stringify(t)});`)}comment(t){this._put(`// ${t}`)}getScript(t=null){const e=this.packageNames;let n=(0,i.default)(e).map((t=>`// @require ${t}\n`)).join("");return t&&(n+=`// @schedule ${t}`),n&&(n+="\n"),n+this.s}}e.ScriptWriter=o,e.ScriptWriterJson=class{constructor(t="0"){this.s="",this.packageNames=[],this.varCount=0,this.commands=[],this.varCount=parseInt(t)||0}allocVariable(t="var"){return this.varCount+=1,`${t}${this.varCount}`}endLine(){this.commands.push({type:"endline"})}assign(t,e,n){this.commands.push({type:"assign",variableName:t,functionName:(0,s.extractShellApiFunctionName)(e),props:n}),this.packageNames.push(...(0,s.extractShellApiPlugins)(e,n))}assignValue(t,e){this.commands.push({type:"assignValue",variableName:t,jsonValue:e})}copyStream(t,e,n=null){this.commands.push({type:"copyStream",sourceVar:t,targetVar:e,colmapVar:n})}comment(t){this.commands.push({type:"comment",text:t})}dumpDatabase(t){this.commands.push({type:"dumpDatabase",options:t})}importDatabase(t){this.commands.push({type:"importDatabase",options:t})}dataDuplicator(t){this.commands.push({type:"dataDuplicator",options:t})}getScript(t=null){return{type:"json",schedule:t,commands:this.commands,packageNames:this.packageNames}}},e.jsonScriptToJavascript=function(t){const{schedule:e,commands:n,packageNames:r}=t,i=new o;for(const t of r){if(!/^dbgate-plugin-.*$/.test(t))throw new Error("Unallowed package name:"+t);i.packageNames.push(t)}for(const t of n)switch(t.type){case"assign":i.assignCore(t.variableName,t.functionName,t.props);break;case"assignValue":i.assignValue(t.variableName,t.jsonValue);break;case"copyStream":i.copyStream(t.sourceVar,t.targetVar,t.colmapVar);break;case"endLine":i.endLine();break;case"comment":i.comment(t.text);break;case"dumpDatabase":i.dumpDatabase(t.options);break;case"importDatabase":i.importDatabase(t.options);break;case"dataDuplicator":i.dataDuplicator(t.options)}return i.getScript(e)}},7117:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SqlDumper=void 0;const i=r(n(5076)),s=r(n(7072)),o=r(n(2164)),a=r(n(6241)),u=r(n(9464)),_=r(n(6446)),c=r(n(482));class l{static convertKeywordCase(t){var e,n;return"lowerCase"==this.keywordsCase?null===(e=null==t?void 0:t.toString())||void 0===e?void 0:e.toLowerCase():null===(n=null==t?void 0:t.toString())||void 0===n?void 0:n.toUpperCase()}constructor(t){this.s="",this.indentLevel=0,this.driver=t,this.dialect=t.dialect}endCommand(){this.putRaw(";\n")}putRaw(t){this.s+=t}escapeString(t){const e=this.dialect.stringEscapeChar;let n="";for(let r=0;r<t.length;r++){const i=t[r];i!=e&&"'"!=i||(n+=e),n+=i}return n}putStringValue(t){this.putRaw("'"),this.putRaw(this.escapeString(t)),this.putRaw("'")}putByteArrayValue(t){this.put("^null")}putValue(t){null===t?this.put("^null"):!0===t?this.putRaw("1"):!1===t?this.putRaw("0"):(0,s.default)(t)?this.putStringValue(t):(0,o.default)(t)?this.putRaw(t.toString()):(0,a.default)(t)?this.putStringValue(new Date(t).toISOString()):"Buffer"==(null==t?void 0:t.type)&&(0,u.default)(null==t?void 0:t.data)?this.putByteArrayValue(null==t?void 0:t.data):(0,_.default)(t)||(0,u.default)(t)?this.putStringValue(JSON.stringify(t)):this.put("^null")}putCmd(t,...e){this.put(t,...e),this.endCommand()}putFormattedValue(t,e){switch(t){case"s":null!=e&&this.putRaw(e.toString());break;case"i":this.putRaw(this.dialect.quoteIdentifier(e));break;case"k":e&&this.putRaw(l.convertKeywordCase(e));break;case"f":{const{schemaName:t,pureName:n}=e;t&&(this.putRaw(this.dialect.quoteIdentifier(t)),this.putRaw(".")),this.putRaw(this.dialect.quoteIdentifier(n))}break;case"v":this.putValue(e);break;case"c":e(this)}}putFormattedList(t,e){e&&this.putCollection(", ",e,(e=>this.putFormattedValue(t,e)))}put(t,...e){let n=0,r=0;const i=t.length;for(;n<i;){let s=t[n];switch(n++,s){case"^":for(;n<i&&t[n].match(/[a-z0-9_]/i);)this.putRaw(l.convertKeywordCase(t[n])),n++;break;case"%":switch(s=t[n],n++,s){case"%":this.putRaw("%");break;case",":s=t[n],n++,this.putFormattedList(s,e[r]);break;default:this.putFormattedValue(s,e[r])}r++;break;case"&":switch(s=t[n],n++,s){case"&":this.putRaw("&");break;case">":this.indentLevel++;break;case"<":this.indentLevel--;break;case"n":this.putRaw("\n"),this.putRaw(" ".repeat(2*this.indentLevel))}break;default:this.putRaw(s)}}}autoIncrement(){this.put(" ^auto_increment")}createDatabase(t){this.putCmd("^create ^database %i",t)}dropDatabase(t){this.putCmd("^drop ^database %i",t)}specialColumnOptions(t){}selectScopeIdentity(t){}columnType(t){const e=t||this.dialect.fallbackDataType,n=e.match(/([^(]+)(\(.+[^)]\))/);(null==n?void 0:n.length)?(n.shift(),this.putRaw(l.convertKeywordCase(n.shift())),this.putRaw(n)):this.putRaw(l.convertKeywordCase(e))}columnDefinition(t,{includeDefault:e=!0,includeNullable:n=!0,includeCollate:r=!0}={}){var i;if(t.computedExpression)return this.put("^as %s",t.computedExpression),void(t.isPersisted&&this.put(" ^persisted"));this.columnType(t.dataType),t.autoIncrement&&this.autoIncrement(),this.putRaw(" "),this.specialColumnOptions(t),n&&this.put(t.notNull?"^not ^null":"^null"),e&&(null===(i=t.defaultValue)||void 0===i?void 0:i.trim())&&this.columnDefault(t)}columnDefault(t){null!=t.defaultConstraint?this.put(" ^constraint %i ^default %s ",t.defaultConstraint,t.defaultValue):this.put(" ^default %s ",t.defaultValue)}putCollection(t,e,n){if(!e)return;let r=!0;for(const i of e)r||this.put(t),r=!1,n(i)}createTable(t){this.put("^create ^table %f ( &>&n",t),this.putCollection(",&n",t.columns,(t=>{this.put("%i ",t.columnName),this.columnDefinition(t)})),this.createTablePrimaryKeyCore(t),(t.foreignKeys||[]).forEach((t=>{this.put(",&n"),this.createForeignKeyFore(t)})),(t.uniques||[]).forEach((t=>{this.put(",&n"),this.createUniqueCore(t)})),(t.checks||[]).forEach((t=>{this.put(",&n"),this.createCheckCore(t)})),this.put("&<&n)"),this.endCommand(),(t.indexes||[]).forEach((t=>{this.createIndex(t)}))}createTablePrimaryKeyCore(t){t.primaryKey&&(this.put(",&n"),t.primaryKey.constraintName&&this.put("^constraint %i",t.primaryKey.constraintName),this.put(" ^primary ^key (%,i)",t.primaryKey.columns.map((t=>t.columnName))))}createForeignKeyFore(t){null!=t.constraintName&&this.put("^constraint %i ",t.constraintName),this.put("^foreign ^key (%,i) ^references %f (%,i)",t.columns.map((t=>t.columnName)),{schemaName:t.refSchemaName,pureName:t.refTableName},t.columns.map((t=>t.refColumnName))),t.deleteAction&&this.put(" ^on ^delete %k",t.deleteAction),t.updateAction&&this.put(" ^on ^update %k",t.updateAction)}transform(t,e){e()}allowIdentityInsert(t,e){}enableConstraints(t,e){}comment(t){if(t)for(const e of t.split("\n"))this.put(" -- %s",e.trimRight())}createView(t){this.putRaw(t.createSql),this.endCommand()}dropView(t,{testIfExists:e=!1}){this.putCmd("^drop ^view %f",t)}alterView(t){this.putRaw(t.createSql.replace(/create\s+view/i,"ALTER VIEW")),this.endCommand()}changeViewSchema(t,e){}renameView(t,e){}createMatview(t){this.putRaw(t.createSql),this.endCommand()}dropMatview(t,{testIfExists:e=!1}){this.putCmd("^drop ^materialized ^view %f",t)}alterMatview(t){this.putRaw(t.createSql.replace(/create\s+view/i,"ALTER VIEW")),this.endCommand()}changeMatviewSchema(t,e){}renameMatview(t,e){}createProcedure(t){this.putRaw(t.createSql),this.endCommand()}dropProcedure(t,{testIfExists:e=!1}){this.putCmd("^drop ^procedure %f",t)}alterProcedure(t){this.putRaw(t.createSql.replace(/create\s+procedure/i,"ALTER PROCEDURE")),this.endCommand()}changeProcedureSchema(t,e){}renameProcedure(t,e){}createFunction(t){this.putRaw(t.createSql),this.endCommand()}dropFunction(t,{testIfExists:e=!1}){this.putCmd("^drop ^function %f",t)}alterFunction(t){this.putRaw(t.createSql.replace(/create\s+function/i,"ALTER FUNCTION")),this.endCommand()}changeFunctionSchema(t,e){}renameFunction(t,e){}createTrigger(t){this.putRaw(t.createSql),this.endCommand()}dropTrigger(t,{testIfExists:e=!1}){this.putCmd("^drop ^trigger %f",t)}alterTrigger(t){this.putRaw(t.createSql.replace(/create\s+trigger/i,"ALTER TRIGGER")),this.endCommand()}changeTriggerSchema(t,e){}renameTrigger(t,e){}dropConstraintCore(t){this.putCmd("^alter ^table %f ^drop ^constraint %i",t,t.constraintName)}dropConstraint(t){switch(t.constraintType){case"primaryKey":this.dropPrimaryKey(t);break;case"foreignKey":this.dropForeignKey(t);break;case"unique":this.dropUnique(t);break;case"check":this.dropCheck(t);break;case"index":this.dropIndex(t)}}createConstraint(t){switch(t.constraintType){case"primaryKey":this.createPrimaryKey(t);break;case"foreignKey":this.createForeignKey(t);break;case"unique":this.createUnique(t);break;case"check":this.createCheck(t);break;case"index":this.createIndex(t)}}changeConstraint(t,e){}dropForeignKey(t){this.dialect.explicitDropConstraint?this.putCmd("^alter ^table %f ^drop ^foreign ^key %i",t,t.constraintName):this.dropConstraintCore(t)}createForeignKey(t){this.put("^alter ^table %f ^add ",t),this.createForeignKeyFore(t),this.endCommand()}dropPrimaryKey(t){this.dialect.explicitDropConstraint?this.putCmd("^alter ^table %f ^drop ^primary ^key",t):this.dropConstraintCore(t)}createPrimaryKey(t){this.putCmd("^alter ^table %f ^add ^constraint %i ^primary ^key (%,i)",t,t.constraintName,t.columns.map((t=>t.columnName)))}dropIndex(t){this.put("^drop ^index %i",t.constraintName),this.dialect.dropIndexContainsTableSpec&&this.put(" ^on %f",t),this.endCommand()}createIndex(t){this.put("^create"),t.isUnique&&this.put(" ^unique"),this.put(" ^index %i &n^on %f (&>&n",t.constraintName,t),this.putCollection(",&n",t.columns,(t=>{this.put("%i %k",t.columnName,1==t.isDescending?"DESC":"ASC")})),this.put("&<&n)"),this.endCommand()}dropUnique(t){this.dropConstraintCore(t)}createUniqueCore(t){this.put("^constraint %i ^unique (%,i)",t.constraintName,t.columns.map((t=>t.columnName)))}createUnique(t){this.put("^alter ^table %f ^add ",t),this.createUniqueCore(t),this.endCommand()}dropCheck(t){this.dropConstraintCore(t)}createCheckCore(t){this.put("^constraint %i ^check (%s)",t.constraintName,t.definition)}createCheck(t){this.put("^alter ^table %f ^add ",t),this.createCheckCore(t),this.endCommand()}renameConstraint(t,e){}createColumn(t,e){this.put("^alter ^table %f ^add %i ",t,t.columnName),this.columnDefinition(t),this.inlineConstraints(e),this.endCommand()}inlineConstraints(t){if(null!=t)for(const e of t)"primaryKey"==e.constraintType&&(null==e.constraintName||this.dialect.anonymousPrimaryKey||this.put(" ^constraint %i",e.constraintName),this.put(" ^primary ^key "))}dropColumn(t){this.putCmd("^alter ^table %f ^drop ^column %i",t,t.columnName)}renameColumn(t,e){}changeColumn(t,e,n){}dropTable(t,{testIfExists:e=!1}={}){this.putCmd("^drop ^table %f",t)}changeTableSchema(t,e){}renameTable(t,e){}beginTransaction(){this.putCmd("^begin ^transaction")}commitTransaction(){this.putCmd("^commit")}rollbackTransaction(){this.putCmd("^rollback")}alterProlog(){}alterEpilog(){}selectTableIntoNewTable(t,e){this.putCmd("^select * ^into %f ^from %f",e,t)}truncateTable(t){this.putCmd("^truncate ^table %f",t)}dropConstraints(t,e=!1){e&&this.dialect.dropForeignKey&&t.dependencies.forEach((t=>this.dropConstraint(t))),this.dialect.dropIndex&&t.indexes.forEach((t=>this.dropIndex(t))),this.dialect.dropForeignKey&&t.foreignKeys.forEach((t=>this.dropForeignKey(t))),this.dialect.dropPrimaryKey&&t.primaryKey&&this.dropPrimaryKey(t.primaryKey)}recreateTable(t,e){if(!t.pairingId||!e.pairingId||t.pairingId!=e.pairingId)throw new Error("Recreate is not possible: oldTable.paringId != newTable.paringId");const n=`temp_${(0,c.default)()}`,r=t.columns.map((t=>({oldcol:t,newcol:e.columns.find((e=>e.pairingId==t.pairingId))}))).filter((t=>t.newcol));this.dropConstraints(t,!0),this.renameTable(t,n),this.createTable(e);const i=e.columns.find((t=>t.autoIncrement));i&&this.allowIdentityInsert(e,!0),this.putCmd("^insert ^into %f (%,i) select %,s ^from %f",e,r.map((t=>t.newcol.columnName)),r.map((t=>t.oldcol.columnName)),Object.assign(Object.assign({},t),{pureName:n})),i&&this.allowIdentityInsert(e,!1),this.dialect.dropForeignKey&&e.dependencies.forEach((t=>this.createConstraint(t))),this.dropTable(Object.assign(Object.assign({},t),{pureName:n}))}createSqlObject(t){this.putCmd(t.createSql)}getSqlObjectSqlName(t){switch(t){case"procedures":return"PROCEDURE";case"views":return"VIEW";case"functions":return"FUNCTION";case"triggers":return"TRIGGER";case"matviews":return"MATERIALIZED VIEW"}}dropSqlObject(t){this.putCmd("^drop %s %f",this.getSqlObjectSqlName(t.objectTypeField),t)}fillPreloadedRows(t,e,n,r,s){let o=!1;for(const a of n){const n=null==e?void 0:e.find((t=>r.every((e=>t[e]==a[e])))),u=i.default.keys(a);if(n){const e=[];for(const t of u)a[t]==n[t]||(null==s?void 0:s.includes(t))||e.push(t);e.length>0&&(o&&this.put(";\n"),o=!0,this.put("^update %f ^set ",t),this.putCollection(", ",e,(t=>this.put("%i=%v",t,a[t]))),this.put(" ^where "),this.putCollection(" ^and ",r,(t=>this.put("%i=%v",t,a[t]))))}else o&&this.put(";\n"),o=!0,this.put("^insert ^into %f (%,i) ^values (%,v)",t,u,u.map((t=>a[t])))}o&&this.endCommand()}}e.SqlDumper=l,l.keywordsCase="upperCase"},9587:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SqlGenerator=void 0;const s=i(n(9607)),o=i(n(4557)),a=n(8852),u=n(7058),_=(0,a.getLogger)("sqlGenerator");e.SqlGenerator=class{constructor(t,e,n,r,i,s){this.options=e,this.objects=n,this.dmp=r,this.driver=i,this.pool=s,this.isTruncated=!1,this.isUnhandledException=!1,this.handleException=t=>{_.error({error:t},"Unhandled error"),this.isUnhandledException=!0},this.dbinfo=(0,u.extendDatabaseInfo)(t),this.tables=this.extract("tables"),this.views=this.extract("views"),this.matviews=this.extract("matviews"),this.procedures=this.extract("procedures"),this.functions=this.extract("functions"),this.triggers=this.extract("triggers")}dump(){return r(this,void 0,void 0,(function*(){try{if(process.on("uncaughtException",this.handleException),this.dropObjects(this.procedures,"Procedure"),this.checkDumper())return;if(this.dropObjects(this.functions,"Function"),this.checkDumper())return;if(this.dropObjects(this.views,"View"),this.checkDumper())return;if(this.dropObjects(this.matviews,"Matview"),this.checkDumper())return;if(this.dropObjects(this.triggers,"Trigger"),this.checkDumper())return;if(this.dropTables(),this.checkDumper())return;if(this.createTables(),this.checkDumper())return;if(this.truncateTables(),this.checkDumper())return;if(yield this.insertData(),this.checkDumper())return;if(this.createForeignKeys(),this.checkDumper())return;if(this.createObjects(this.procedures,"Procedure"),this.checkDumper())return;if(this.createObjects(this.functions,"Function"),this.checkDumper())return;if(this.createObjects(this.views,"View"),this.checkDumper())return;if(this.createObjects(this.matviews,"Matview"),this.checkDumper())return;if(this.createObjects(this.triggers,"Trigger"),this.checkDumper())return}finally{process.off("uncaughtException",this.handleException)}}))}createForeignKeys(){const t=[];this.options.createForeignKeys&&t.push(...(0,s.default)(this.tables.map((t=>t.foreignKeys||[])))),this.options.createReferences&&t.push(...(0,s.default)(this.tables.map((t=>t.dependencies||[]))));for(const e of(0,o.default)(t,"constraintName"))if(this.dmp.createForeignKey(e),this.checkDumper())return}truncateTables(){if(this.options.truncate)for(const t of this.tables)if(this.dmp.truncateTable(t),this.checkDumper())return}createTables(){if(this.options.createTables)for(const t of this.tables)if(this.dmp.createTable(Object.assign(Object.assign({},t),{foreignKeys:[],dependencies:[],indexes:[]})),this.checkDumper())return;if(this.options.createIndexes)for(const t of(0,s.default)(this.tables.map((t=>t.indexes||[]))))this.dmp.createIndex(t)}insertData(){return r(this,void 0,void 0,(function*(){if(this.options.insert){this.enableConstraints(!1);for(const t of this.tables)if(yield this.insertTableData(t),this.checkDumper())return;this.enableConstraints(!0)}}))}checkDumper(){return this.dmp.s.length>4e6&&(this.isTruncated||(this.dmp.putRaw("\n"),this.dmp.comment(" *************** SQL is truncated ******************"),this.dmp.putRaw("\n")),this.isTruncated=!0,!0)}dropObjects(t,e){if(this.options[`drop${e}s`])for(const n of t)if(this.dmp[`drop${e}`](n,{testIfExists:this.options[`checkIf${e}Exists`]}),this.checkDumper())return}createObjects(t,e){if(this.options[`create${e}s`])for(const n of t)if(this.dmp[`create${e}`](n),this.checkDumper())return}dropTables(){if(this.options.dropReferences)for(const t of(0,s.default)(this.tables.map((t=>t.dependencies||[]))))this.dmp.dropForeignKey(t);if(this.options.dropTables)for(const t of this.tables)this.dmp.dropTable(t,{testIfExists:this.options.checkIfTableExists})}insertTableData(t){return r(this,void 0,void 0,(function*(){const e=this.driver.createDumper();e.put("^select * ^from %f",t);const n=t.columns.find((t=>t.autoIncrement));n&&!this.options.skipAutoincrementColumn&&this.dmp.allowIdentityInsert(t,!0);const r=yield this.driver.readQuery(this.pool,e.s,t);yield this.processReadable(t,r),n&&!this.options.skipAutoincrementColumn&&this.dmp.allowIdentityInsert(t,!1)}))}processReadable(t,e){const n=(this.options.skipAutoincrementColumn?t.columns.filter((t=>!t.autoIncrement)):t.columns).map((t=>t.columnName));let r=!1,i=!1;return new Promise((s=>{e.on("data",(o=>{if(r)return;if(!i)return void(i=!0);if(this.checkDumper())return r=!0,s(void 0),void e.destroy();const a=this.options.omitNulls?n.filter((t=>null!=o[t])):n;this.dmp.put("^insert ^into %f (%,i) ^values (%,v);&n",t,a,a.map((t=>o[t])))})),e.on("end",(()=>{s(void 0)}))}))}extract(t){return this.dbinfo[t].filter((e=>this.objects.find((n=>e.pureName==n.pureName&&e.schemaName==n.schemaName&&n.objectTypeField==t))))}enableConstraints(t){if(this.options.disableConstraints)if(this.driver.dialect.enableConstraintsPerTable)for(const e of this.tables)this.dmp.enableConstraints(e,t);else this.dmp.enableConstraints(null,t)}}},1619:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.runAlterOperation=e.AlterPlan=void 0;const i=r(n(5076)),s=n(8654),o=n(7356),a=n(8098);function u(t,e){switch(t.operationType){case"createTable":e.createTable(t.newObject);break;case"changeColumn":e.changeColumn(t.oldObject,t.newObject);break;case"createColumn":e.createColumn(t.newObject,[]);break;case"dropColumn":e.dropColumn(t.oldObject);break;case"dropTable":e.dropTable(t.oldObject);break;case"changeConstraint":e.changeConstraint(t.oldObject,t.newObject);break;case"createConstraint":e.createConstraint(t.newObject);break;case"dropConstraint":e.dropConstraint(t.oldObject);break;case"renameColumn":e.renameColumn(t.object,t.newName);break;case"renameTable":e.renameTable(t.object,t.newName);break;case"renameConstraint":e.renameConstraint(t.object,t.newName);break;case"createSqlObject":e.createSqlObject(t.newObject);break;case"dropSqlObject":e.dropSqlObject(t.oldObject);break;case"fillPreloadedRows":e.fillPreloadedRows(t.table,t.oldRows,t.newRows,t.key,t.insertOnly);break;case"recreateTable":{const n=(0,s.generateTablePairingId)(t.table),r=i.default.cloneDeep(n),_=a.DatabaseAnalyser.createEmptyStructure();_.tables.push(r),t.operations.forEach((t=>u(t,new o.DatabaseInfoAlterProcessor(_)))),e.recreateTable(n,r)}}}e.AlterPlan=class{constructor(t,e,n,r){this.wholeOldDb=t,this.wholeNewDb=e,this.dialect=n,this.opts=r,this.recreates={tables:0,constraints:0,sqlObjects:0},this.operations=[]}createTable(t){this.operations.push({operationType:"createTable",newObject:t})}dropTable(t){this.operations.push({operationType:"dropTable",oldObject:t})}createSqlObject(t){this.operations.push({operationType:"createSqlObject",newObject:t})}dropSqlObject(t){this.operations.push({operationType:"dropSqlObject",oldObject:t})}createColumn(t){this.operations.push({operationType:"createColumn",newObject:t})}changeColumn(t,e){this.operations.push({operationType:"changeColumn",oldObject:t,newObject:e})}dropColumn(t){this.operations.push({operationType:"dropColumn",oldObject:t})}createConstraint(t){this.operations.push({operationType:"createConstraint",newObject:t})}changeConstraint(t,e){this.operations.push({operationType:"changeConstraint",oldObject:t,newObject:e})}dropConstraint(t){this.operations.push({operationType:"dropConstraint",oldObject:t})}renameTable(t,e){this.operations.push({operationType:"renameTable",object:t,newName:e})}renameColumn(t,e){this.operations.push({operationType:"renameColumn",object:t,newName:e})}renameConstraint(t,e){this.operations.push({operationType:"renameConstraint",object:t,newName:e})}recreateTable(t,e){this.operations.push({operationType:"recreateTable",table:t,operations:e}),this.recreates.tables+=1}fillPreloadedRows(t,e,n,r,i){this.operations.push({operationType:"fillPreloadedRows",table:t,oldRows:e,newRows:n,key:r,insertOnly:i})}run(t){for(const e of this.operations)u(e,t)}_getDependendColumnConstraints(t,e){const n=this.wholeOldDb.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));return n?[...(null==e?void 0:e.includes("dependencies"))?n.dependencies.filter((e=>e.columns.find((e=>e.refColumnName==t.columnName)))):[],...i.default.compact([(null==e?void 0:e.includes("primaryKey"))?n.primaryKey:null,...(null==e?void 0:e.includes("foreignKeys"))?n.foreignKeys:[],...(null==e?void 0:e.includes("indexes"))?n.indexes:[],...(null==e?void 0:e.includes("uniques"))?n.uniques:[]]).filter((e=>e.columns.find((e=>e.columnName==t.columnName))))]:[]}_addLogicalDependencies(){const t=this.operations.map((t=>{if("dropColumn"==t.operationType){const e=this._getDependendColumnConstraints(t.oldObject,this.dialect.dropColumnDependencies);return e.length>0&&this.opts.noDropConstraint?[]:[...e.map((t=>({operationType:"dropConstraint",oldObject:t}))),t]}if("changeColumn"==t.operationType){const e=this._getDependendColumnConstraints(t.oldObject,this.dialect.changeColumnDependencies);if(e.length>0&&this.opts.noDropConstraint)return[];const n=[...e.map((t=>({operationType:"dropConstraint",oldObject:t}))),t,...i.default.reverse([...e]).map((t=>({operationType:"createConstraint",newObject:t})))];return e.length>0&&(this.recreates.constraints+=1),n}return"dropTable"==t.operationType?[...this.dialect.dropReferencesWhenDropTable?(t.oldObject.dependencies||[]).map((t=>({operationType:"dropConstraint",oldObject:t}))):[],t]:"changeConstraint"==t.operationType?this.opts.noDropConstraint?[]:(this.recreates.constraints+=1,[{operationType:"dropConstraint",oldObject:t.oldObject},{operationType:"createConstraint",newObject:t.newObject}]):[t]}));return i.default.flatten(t)}_transformToImplementedOps(){const t=this.operations.map((t=>this._testTableRecreate(t,"createColumn",this.dialect.createColumn,"newObject")||this._testTableRecreate(t,"dropColumn",this.dialect.dropColumn,"oldObject")||this._testTableRecreate(t,"createConstraint",(t=>this._canCreateConstraint(t)),"newObject")||this._testTableRecreate(t,"dropConstraint",(t=>this._canDropConstraint(t)),"oldObject")||this._testTableRecreate(t,"changeColumn",this.dialect.changeColumn,"newObject")||[t]));return i.default.flatten(t)}_canCreateConstraint(t){return"primaryKey"==t.constraintType?this.dialect.createPrimaryKey:"foreignKey"==t.constraintType?this.dialect.createForeignKey:"index"==t.constraintType?this.dialect.createIndex:"unique"==t.constraintType?this.dialect.createUnique:"check"==t.constraintType?this.dialect.createCheck:null}_canDropConstraint(t){return"primaryKey"==t.constraintType?this.dialect.dropPrimaryKey:"foreignKey"==t.constraintType?this.dialect.dropForeignKey:"index"==t.constraintType?this.dialect.dropIndex:"unique"==t.constraintType?this.dialect.dropUnique:"check"==t.constraintType?this.dialect.dropCheck:null}_testTableRecreate(t,e,n,r){if(t.operationType==e){if(i.default.isFunction(n)){if(n(t[r]))return null}else if(n)return null;if(this.opts.noDropTable)return[];const e=this.wholeNewDb.tables.find((e=>e.pureName==t[r].pureName&&e.schemaName==t[r].schemaName));return this.recreates.tables+=1,[{operationType:"recreateTable",table:e,operations:[t]}]}return null}_groupTableRecreations(){const t=[],e={};for(const n of this.operations)if("recreateTable"==n.operationType&&n.table){const r=e[`${n.table.schemaName}||${n.table.pureName}`];if(r)r.operations.push(...n.operations);else{const r=Object.assign(Object.assign({},n),{operations:[...n.operations]});t.push(r),e[`${n.table.schemaName}||${n.table.pureName}`]=r}}else{const r=n.oldObject;if(r){const t=e[`${r.schemaName}||${r.pureName}`];if(t){t.operations.push(n);continue}}t.push(n)}return t}_moveForeignKeysToLast(){if(!this.dialect.createForeignKey)return this.operations;const t=[];return[...this.operations.map((e=>"createTable"==e.operationType?(t.push(...e.newObject.foreignKeys||[]),Object.assign(Object.assign({},e),{newObject:Object.assign(Object.assign({},e.newObject),{foreignKeys:[]})})):e)),...t.map((t=>({operationType:"createConstraint",newObject:t})))]}_filterAllowedOperations(){return this.operations.filter((t=>!(this.opts.noDropColumn&&"dropColumn"==t.operationType||this.opts.noDropTable&&"dropTable"==t.operationType||this.opts.noDropTable&&"recreateTable"==t.operationType||this.opts.noDropConstraint&&"dropConstraint"==t.operationType||this.opts.noDropSqlObject&&"dropSqlObject"==t.operationType)))}transformPlan(){this.operations=this._addLogicalDependencies(),this.operations=this._transformToImplementedOps(),this.operations=this._groupTableRecreations(),this.operations=this._moveForeignKeysToLast(),this.operations=this._filterAllowedOperations()}},e.runAlterOperation=u},1592:(t,e)=>{"use strict";function n(t){return t&&/int/i.test(t)}function r(t){return t&&/numeric|decimal/i.test(t)}function i(t){return t&&/float|single|double/i.test(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isTypeDateTime=e.isTypeLogical=e.isTypeString=e.isTypeNumber=e.isTypeFloat=e.isTypeNumeric=e.isTypeInteger=void 0,e.isTypeInteger=n,e.isTypeNumeric=r,e.isTypeFloat=i,e.isTypeNumber=function(t){return n(t)||i(t)||r(t)},e.isTypeString=function(t){return t&&/char|binary/i.test(t)},e.isTypeLogical=function(t){return t&&/bit|boolean/i.test(t)},e.isTypeDateTime=function(t){return t&&/date|time|timestamp/i.test(t)}},7441:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getCreateObjectScript=e.computeTableDiffColumns=e.computeDbDiffRows=e.DbDiffCompareDefs=e.computeDiffRowsCore=void 0;const i=n(8654),s=r(n(5076));function o(t,e,n){const r=[];for(const i of t){const t=e.find((t=>t.pairingId==i.pairingId));if(t){const e=n(i,t);r.push({source:i,target:t,state:e?"equal":"changed",__isChanged:!e})}else r.push({source:i,state:"added",__isAdded:!0})}for(const n of e)t.find((t=>t.pairingId==n.pairingId))||r.push({target:n,state:"removed",__isDeleted:!0});return r}e.computeDiffRowsCore=o,e.DbDiffCompareDefs={tables:{test:i.testEqualTables,name:"Table",plural:"Tables",icon:"img table"},views:{test:i.testEqualSqlObjects,name:"View",plural:"Views",icon:"img view"},matviews:{test:i.testEqualSqlObjects,name:"Materialized view",plural:"Materialized views",icon:"img view"},procedures:{test:i.testEqualSqlObjects,name:"Procedure",plural:"Procedures",icon:"img procedure"},functions:{test:i.testEqualSqlObjects,name:"Function",plural:"Functions",icon:"img function"}},e.computeDbDiffRows=function(t,n,r,i){if(!t||!n||!i)return[];const a=[];for(const u of["tables","views","procedures","matviews","functions"]){const _=e.DbDiffCompareDefs[u];a.push(...s.default.sortBy(o(t[u],n[u],((e,s)=>_.test(e,s,r,t,n,i))).map((t=>{var e,n,r,i,s,o,a,c;return Object.assign(Object.assign({},t),{sourceSchemaName:null===(e=null==t?void 0:t.source)||void 0===e?void 0:e.schemaName,sourcePureName:null===(n=null==t?void 0:t.source)||void 0===n?void 0:n.pureName,targetSchemaName:null===(r=null==t?void 0:t.target)||void 0===r?void 0:r.schemaName,targetPureName:null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.pureName,typeName:_.name,typeIcon:_.icon,identifier:`${(null===(s=null==t?void 0:t.source)||void 0===s?void 0:s.schemaName)||(null===(o=null==t?void 0:t.target)||void 0===o?void 0:o.schemaName)}.${(null===(a=null==t?void 0:t.source)||void 0===a?void 0:a.pureName)||(null===(c=null==t?void 0:t.target)||void 0===c?void 0:c.pureName)}`,objectTypeField:u})})),"identifier"))}return a},e.computeTableDiffColumns=function(t,e,n,r){return r?o((null==t?void 0:t.columns)||[],(null==e?void 0:e.columns)||[],((t,e)=>(0,i.testEqualColumns)(t,e,!0,!0,n))).map((t=>{var e,n,r,i,s,o;return Object.assign(Object.assign({},t),{sourceColumnName:null===(e=null==t?void 0:t.source)||void 0===e?void 0:e.columnName,targetColumnName:null===(n=null==t?void 0:t.target)||void 0===n?void 0:n.columnName,sourceDataType:null===(r=null==t?void 0:t.source)||void 0===r?void 0:r.dataType,targetDataType:null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.dataType,sourceNotNull:null===(s=null==t?void 0:t.source)||void 0===s?void 0:s.notNull,targetNotNull:null===(o=null==t?void 0:t.target)||void 0===o?void 0:o.notNull})})):[]},e.getCreateObjectScript=function(t,e){if(!t||!e)return"";if("tables"==t.objectTypeField){const n=e.createDumper();return n.createTable(t),n.s}return t.createSql||""}},6637:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncWriteStream=void 0,(0,n(8852).getLogger)("asyncWriteStream"),e.createAsyncWriteStream=function(t,e){const n=new t.Writable({objectMode:!0});return n._write=(t,n,i)=>r(this,void 0,void 0,(function*(){try{yield e.processItem(t),i(null)}catch(t){i(t)}})),n}},1862:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createBulkInsertStreamBase=void 0;const s=i(n(4200)),o=n(8852),a=n(7265),u=(0,o.getLogger)("bulkStreamBase");e.createBulkInsertStreamBase=function(t,e,n,i,o){const _=i.schemaName?`${t.dialect.quoteIdentifier(i.schemaName)}.${t.dialect.quoteIdentifier(i.pureName)}`:t.dialect.quoteIdentifier(i.pureName),c=new e.Writable({objectMode:!0});return c.buffer=[],c.structure=null,c.columnNames=null,c.requireFixedStructure=t.databaseEngineTypes.includes("sql"),c.addRow=t=>r(this,void 0,void 0,(function*(){c.structure?c.buffer.push(t):(c.structure=t,yield c.checkStructure())})),c.checkStructure=()=>r(this,void 0,void 0,(function*(){let e=yield t.analyseSingleTable(n,i);if(e&&o.dropIfExists&&(u.info(`Dropping table ${_}`),yield t.script(n,`DROP TABLE ${_}`)),o.createIfNotExists&&(!e||o.dropIfExists)){const r=t.createDumper();r.createTable((0,a.prepareTableForImport)(Object.assign(Object.assign({},c.structure),i))),u.info({sql:r.s},`Creating table ${_}`),yield t.script(n,r.s),e=yield t.analyseSingleTable(n,i)}o.truncate&&(yield t.script(n,`TRUNCATE TABLE ${_}`)),c.columnNames=(0,s.default)(e.columns.map((t=>t.columnName)),c.structure.columns.map((t=>t.columnName)))})),c.send=()=>r(this,void 0,void 0,(function*(){const e=c.buffer;if(c.buffer=[],t.dialect.allowMultipleValuesInsert){const r=t.createDumper();r.putRaw(`INSERT INTO ${_} (`),r.putCollection(",",c.columnNames,(e=>r.putRaw(t.dialect.quoteIdentifier(e)))),r.putRaw(")\n VALUES\n");let i=!1;for(const t of e)i&&r.putRaw(",\n"),r.putRaw("("),r.putCollection(",",c.columnNames,(e=>r.putValue(t[e]))),r.putRaw(")"),i=!0;r.putRaw(";"),yield t.query(n,r.s,{discardResult:!0})}else for(const r of e){const e=t.createDumper();e.putRaw(`INSERT INTO ${_} (`),e.putCollection(",",c.columnNames,(n=>e.putRaw(t.dialect.quoteIdentifier(n)))),e.putRaw(")\n VALUES\n"),e.putRaw("("),e.putCollection(",",c.columnNames,(t=>e.putValue(r[t]))),e.putRaw(")"),yield t.query(n,e.s,{discardResult:!0})}if(o.commitAfterInsert){const e=t.createDumper();e.commitTransaction(),yield t.query(n,e.s,{discardResult:!0})}})),c.sendIfFull=()=>r(this,void 0,void 0,(function*(){c.buffer.length>100&&(yield c.send())})),c._write=(t,e,n)=>r(this,void 0,void 0,(function*(){yield c.addRow(t),yield c.sendIfFull(),n()})),c._final=t=>r(this,void 0,void 0,(function*(){yield c.send(),t()})),c}},7356:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DatabaseInfoAlterProcessor=void 0;const i=r(n(5076));e.DatabaseInfoAlterProcessor=class{constructor(t){this.db=t}createTable(t){this.db.tables.push(t)}dropTable(t){i.default.remove(this.db.tables,(e=>e.pureName==t.pureName&&e.schemaName==t.schemaName))}createSqlObject(t){this.db[t.objectTypeField].push(t)}dropSqlObject(t){i.default.remove(this.db[t.objectTypeField],(e=>e.pureName==t.pureName&&e.schemaName==t.schemaName))}createColumn(t){const e=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));if(!e)throw new Error(`createColumn error, cannot find table: ${t.schemaName}.${t.pureName}`);e.columns.push(t)}changeColumn(t,e){const n=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));if(!n)throw new Error(`changeColumn error, cannot find table: ${t.schemaName}.${t.pureName}`);n.columns=n.columns.map((n=>n.columnName==t.columnName?e:n))}dropColumn(t){const e=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));if(!e)throw new Error(`dropColumn error, cannot find table: ${t.schemaName}.${t.pureName}`);i.default.remove(e.columns,(e=>e.columnName==t.columnName))}createConstraint(t){const e=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));switch(t.constraintType){case"primaryKey":e.primaryKey=t;break;case"foreignKey":e.foreignKeys.push(t);break;case"index":e.indexes.push(t);break;case"unique":e.uniques.push(t);break;case"check":e.checks.push(t)}}changeConstraint(t,e){this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName))}dropConstraint(t){const e=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));switch(t.constraintType){case"primaryKey":e.primaryKey=null;break;case"foreignKey":e.foreignKeys=e.foreignKeys.filter((e=>e.constraintName!=t.constraintName));break;case"index":e.indexes=e.indexes.filter((e=>e.constraintName!=t.constraintName));break;case"unique":e.uniques=e.uniques.filter((e=>e.constraintName!=t.constraintName));break;case"check":e.checks=e.checks.filter((e=>e.constraintName!=t.constraintName))}}renameTable(t,e){this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName)).pureName=e}renameColumn(t,e){this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName)).columns.find((e=>e.columnName==t.columnName)).columnName=e}renameConstraint(t,e){}recreateTable(t,e){throw new Error("recreateTable not implemented for DatabaseInfoAlterProcessor")}fillPreloadedRows(t,e,n,r,i){const s=this.db.tables.find((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName));s.preloadedRows=n,s.preloadedRowsKey=r,s.preloadedRowsInsertOnly=i}}},8654:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.modelCompareDbDiffOptions=e.matchPairedObjects=e.getAlterDatabaseScript=e.getAlterTableScript=e.createAlterDatabasePlan=e.createAlterTablePlan=e.testEqualSqlObjects=e.testEqualTables=e.testEqualTypes=e.testEqualColumns=e.generateDbPairingId=e.removeTablePairingId=e.generateTablePairingId=void 0;const i=r(n(482)),s=n(1619),o=r(n(4558)),a=r(n(1972)),u=r(n(1454)),_=r(n(4169)),c=r(n(8644));function l(t){var e,n,r,s,o;return t?t.pairingId?t:Object.assign(Object.assign({},t),{columns:null===(e=t.columns)||void 0===e?void 0:e.map((t=>Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}))),foreignKeys:null===(n=t.foreignKeys)||void 0===n?void 0:n.map((t=>Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}))),checks:null===(r=t.checks)||void 0===r?void 0:r.map((t=>Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}))),indexes:null===(s=t.indexes)||void 0===s?void 0:s.map((t=>Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}))),uniques:null===(o=t.uniques)||void 0===o?void 0:o.map((t=>Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}))),pairingId:t.pairingId||(0,i.default)()}):t}function h(t){return t.objectTypeField?Object.assign(Object.assign({},t),{pairingId:t.pairingId||(0,i.default)()}):t}function T(t,e,n){return n.ignoreCase?(t||"").toLowerCase()==(e||"").toLowerCase():t==e}function p(t,e,n){return null==t||null==e?t==e:function(t,e,n){return"ignore"==n.schemaMode&&(t=null),"ignoreImplicit"==n.schemaMode&&t==n.leftImplicitSchema&&(t=null),"ignore"==n.schemaMode&&(e=null),"ignoreImplicit"==n.schemaMode&&e==n.rightImplicitSchema&&(e=null),T(t,e,n)}(t.schemaName,e.schemaName,n)&&T(t.pureName,e.pureName,n)}function f(t,e,n,r,i={}){if(n&&!T(t.columnName,e.columnName,i))return!1;if(t.computedExpression!=e.computedExpression)return console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different computed expression: ${t.computedExpression}, ${e.computedExpression}`),!1;if(null!=t.computedExpression)return!0;if(r){if(null==t.defaultValue){if(t.defaultValue!=e.defaultValue)return console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different default value: ${t.defaultValue}, ${e.defaultValue}`),!1}else if(t.defaultValue!=e.defaultValue)return console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different default value: ${t.defaultValue}, ${e.defaultValue}`),!1;if(t.defaultConstraint!=e.defaultConstraint)return console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different default constraint: ${t.defaultConstraint}, ${e.defaultConstraint}`),!1}return(t.notNull||!1)!=(e.notNull||!1)?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different nullability: ${t.notNull}, ${e.notNull}`),!1):(t.autoIncrement||!1)!=(e.autoIncrement||!1)?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different autoincrement: ${t.autoIncrement}, ${e.autoIncrement}`),!1):(t.isSparse||!1)!=(e.isSparse||!1)?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different is_sparse: ${t.isSparse}, ${e.isSparse}`),!1):(t.isUnsigned||!1)!=(e.isUnsigned||!1)?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different unsigned: ${t.isUnsigned}, ${e.isUnsigned}`),!1):(t.isZerofill||!1)!=(e.isZerofill||!1)?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different zerofill: ${t.isZerofill}, ${e.isZerofill}`),!1):(t.columnComment||"")!=(e.columnComment||"")?(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different comment: ${t.columnComment}, ${e.columnComment}`),!1):!!E(t,e,i)}function E(t,e,n={}){return!!n.ignoreDataTypes||(t.dataType||"").toLowerCase()==(e.dataType||"").toLowerCase()||(console.debug(`Column ${t.pureName}.${t.columnName}, ${e.pureName}.${e.columnName}: different data type: ${t.dataType}, ${e.dataType}`),!1)}function d(t){const e=[];return t.primaryKey&&e.push(t.primaryKey),t.foreignKeys&&e.push(...t.foreignKeys),t.indexes&&e.push(...t.indexes),t.uniques&&e.push(...t.uniques),t.checks&&e.push(...t.checks),e}function N(t,e,n=null){const r=[];for(const i of t){const t=e.find((t=>t.pairingId==i.pairingId||n&&n(i,t)));t?r.push([i,t]):r.push([i,null])}for(const t of e)r.find((e=>e[1]==t))||r.push([null,t]);return r}function S(t,e,n){var r,i,s;const o=n.preloadedRowsKey||(null===(i=null===(r=n.primaryKey)||void 0===r?void 0:r.columns)||void 0===i?void 0:i.map((t=>t.columnName)));(null===(s=n.preloadedRows)||void 0===s?void 0:s.length)>0&&(null==o?void 0:o.length)>0&&t.fillPreloadedRows(n,null==e?void 0:e.preloadedRows,n.preloadedRows,o,n.preloadedRowsInsertOnly)}function m(t,e,n,r){const i=N(e.columns,n.columns),s=N(d(e),d(n),((t,e)=>"primaryKey"==t.constraintType&&"primaryKey"==e.constraintType));r.noDropConstraint||s.filter((t=>null==t[1])).forEach((e=>t.dropConstraint(e[0]))),r.noDropColumn||i.filter((t=>null==t[1])).forEach((e=>t.dropColumn(e[0]))),p(e,n,r)||r.noRenameTable||t.renameTable(e,n.pureName),i.filter((t=>null==t[0])).forEach((e=>t.createColumn(e[1]))),i.filter((t=>t[0]&&t[1])).forEach((e=>{f(e[0],e[1],!0,!0,r)||(f(e[0],e[1],!1,!0,r)&&!r.noRenameColumn?t.renameColumn(e[0],e[1].columnName):t.changeColumn(e[0],e[1]))})),s.filter((t=>t[0]&&t[1])).forEach((e=>{(function(t,e,n={}){const r=[];return n.ignoreForeignKeyActions&&(r.push("updateAction"),r.push("deleteAction")),n.ignoreConstraintNames&&r.push("constraintName"),"ignore"==n.schemaMode&&(r.push("schemaName"),r.push("refSchemaName")),(0,o.default)((0,a.default)(t,r))==(0,o.default)((0,a.default)(e,r))})(e[0],e[1],r)||t.changeConstraint(e[0],e[1])})),s.filter((t=>null==t[0])).forEach((e=>t.createConstraint(e[1]))),S(t,e,n)}function A(t,e,n){return t.createSql==e.createSql}function P(t,e,n,r,i,o){const a=new s.AlterPlan(r,i,o.dialect,n);return null==t?(a.createTable(e),S(a,null,e)):null==e?a.dropTable(t):m(a,t,e,n),a.transformPlan(),a}function g(t,e,n,r,i,o){const a=new s.AlterPlan(r,i,o.dialect,n);for(const r of["tables","views","procedures","matviews","functions"]){for(const i of t[r]||[]){const t=(e[r]||[]).find((t=>t.pairingId==i.pairingId));"tables"==r?null==t?n.noDropTable||a.dropTable(i):m(a,i,t,n):null==t?n.noDropSqlObject||a.dropSqlObject(i):A(i.createSql,t.createSql)||(a.recreates.sqlObjects+=1,n.noDropSqlObject||a.dropSqlObject(i),a.createSqlObject(t))}for(const n of e[r]||[]){const e=(t[r]||[]).find((t=>t.pairingId==n.pairingId));"tables"==r?null==e&&(a.createTable(n),S(a,null,n)):null==e&&a.createSqlObject(n)}}return a.transformPlan(),a}e.generateTablePairingId=l,e.removeTablePairingId=function(t){var e,n,r,i,s;return t?Object.assign(Object.assign({},t),{columns:null===(e=t.columns)||void 0===e?void 0:e.map((t=>Object.assign(Object.assign({},t),{pairingId:void 0}))),foreignKeys:null===(n=t.foreignKeys)||void 0===n?void 0:n.map((t=>Object.assign(Object.assign({},t),{pairingId:void 0}))),checks:null===(r=t.checks)||void 0===r?void 0:r.map((t=>Object.assign(Object.assign({},t),{pairingId:void 0}))),indexes:null===(i=t.indexes)||void 0===i?void 0:i.map((t=>Object.assign(Object.assign({},t),{pairingId:void 0}))),uniques:null===(s=t.uniques)||void 0===s?void 0:s.map((t=>Object.assign(Object.assign({},t),{pairingId:void 0}))),pairingId:void 0}):t},e.generateDbPairingId=function(t){var e,n,r,i,s,o;return t?Object.assign(Object.assign({},t),{tables:null===(e=t.tables)||void 0===e?void 0:e.map(l),views:null===(n=t.views)||void 0===n?void 0:n.map(h),procedures:null===(r=t.procedures)||void 0===r?void 0:r.map(h),functions:null===(i=t.functions)||void 0===i?void 0:i.map(h),triggers:null===(s=t.triggers)||void 0===s?void 0:s.map(h),matviews:null===(o=t.matviews)||void 0===o?void 0:o.map(h)}):t},e.testEqualColumns=f,e.testEqualTypes=E,e.testEqualTables=function(t,e,n,r,i,o){const a=new s.AlterPlan(r,i,o.dialect,n);return m(a,t,e,n),0==a.operations.length},e.testEqualSqlObjects=A,e.createAlterTablePlan=P,e.createAlterDatabasePlan=g,e.getAlterTableScript=function(t,e,n,r,i,s){if(!t&&!e||!s)return{sql:"",recreates:[]};const o=P(t,e,n,r,i,s),a=s.createDumper({useHardSeparator:!0});return o.run(a),{sql:a.s,recreates:o.recreates}},e.getAlterDatabaseScript=function(t,e,n,r,i,s){const o=g(t,e,n,r,i,s),a=s.createDumper({useHardSeparator:!0});return o.run(a),{sql:a.s,recreates:o.recreates,isEmpty:0==o.operations.length}},e.matchPairedObjects=function(t,e,n){if(!t||!e)return null;const r=(0,u.default)(e);for(const e of["tables","views","procedures","matviews","functions"])for(const i of r[e]||[]){const r=t[e].find((t=>p(t,i,n)));if(r&&(i.pairingId=r.pairingId,"tables"==e)){for(const t of i.columns){const e=r.columns.find((e=>T(e.columnName,t.columnName,n)));e&&(t.pairingId=e.pairingId)}for(const t of i.foreignKeys){const e=r.foreignKeys.find((e=>T(e.refTableName,t.refTableName,n)&&(0,_.default)(e.columns.map((t=>(0,c.default)(t,["columnName","refColumnName"]))),t.columns.map((t=>(0,c.default)(t,["columnName","refColumnName"]))))));e&&(t.pairingId=e.pairingId)}for(const t of i.uniques){const e=r.uniques.find((e=>(0,_.default)(e.columns.map((t=>(0,c.default)(t,["columnName"]))),t.columns.map((t=>(0,c.default)(t,["columnName"]))))));e&&(t.pairingId=e.pairingId)}for(const t of i.indexes){const e=r.indexes.find((e=>T(e.constraintName,t.constraintName,n)));e&&(t.pairingId=e.pairingId)}}}return r},e.modelCompareDbDiffOptions={ignoreCase:!0,schemaMode:"ignore",ignoreConstraintNames:!0,ignoreForeignKeyActions:!0,ignoreDataTypes:!0}},8925:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.driverBase=e.runQueryOnDriver=e.runCommandOnDriver=void 0;const s=i(n(7120)),o=n(7117),a=n(3716),u=n(1759);function _(t,e,n){return r(this,void 0,void 0,(function*(){const r=e.createDumper();n(r),yield e.query(t,r.s,{discardResult:!0})}))}e.runCommandOnDriver=_,e.runQueryOnDriver=function(t,e,n){return r(this,void 0,void 0,(function*(){const r=e.createDumper();return n(r),yield e.query(t,r.s)}))},e.driverBase={analyserClass:null,dumperClass:o.SqlDumper,dialect:{limitSelect:!0,rangeSelect:!0,offsetFetchRangeSyntax:!0,stringEscapeChar:"'",fallbackDataType:"nvarchar(max)",quoteIdentifier:t=>t,columnProperties:{isSparse:!1,isPersisted:!1},defaultSchemaName:null},databaseEngineTypes:["sql"],supportedCreateDatabase:!0,analyseFull(t,e){return r(this,void 0,void 0,(function*(){return new this.analyserClass(t,this,e).fullAnalysis()}))},analyseSingleObject(t,e,n="tables"){return r(this,void 0,void 0,(function*(){return new this.analyserClass(t,this).singleObjectAnalysis(e,n)}))},analyseSingleTable(t,e){return this.analyseSingleObject(t,e,"tables")},analyseIncremental(t,e,n){return r(this,void 0,void 0,(function*(){return new this.analyserClass(t,this,n).incrementalAnalysis(e)}))},createDumper(t=null){return new this.dumperClass(this,t)},script(t,e,n){return r(this,void 0,void 0,(function*(){(null==n?void 0:n.useTransaction)&&_(t,this,(t=>t.beginTransaction()));for(const r of(0,a.splitQuery)(e,this.getQuerySplitterOptions("script")))try{yield this.query(t,r,{discardResult:!0})}catch(e){throw(null==n?void 0:n.useTransaction)&&_(t,this,(t=>t.rollbackTransaction())),e}(null==n?void 0:n.useTransaction)&&_(t,this,(t=>t.commitTransaction()))}))},getNewObjectTemplates(){return this.databaseEngineTypes.includes("sql")?[{label:"New view",sql:"CREATE VIEW myview\nAS\nSELECT * FROM table1"}]:[]},loadFieldValues(t,e,n,i){return r(this,void 0,void 0,(function*(){const r=this.createDumper(),o={commandType:"select",distinct:!0,topRecords:100,from:{name:e},columns:[{exprType:"column",columnName:n,alias:"value"}],orderBy:[{exprType:"column",columnName:n}]};if(i){const t=(0,s.default)(i.split(" ").map((t=>t.trim())));t.length>0&&(o.where={conditionType:"and",conditions:t.map((t=>({conditionType:"like",left:{exprType:"column",columnName:n},right:{exprType:"value",value:`%${t}%`}})))})}return(0,u.dumpSqlSelect)(r,o),(yield this.query(t,r.s)).rows}))},readJsonQuery(t,e,n){const r=this.createDumper();return(0,u.dumpSqlSelect)(r,e),this.readQuery(t,r.s,n)},showConnectionField:(t,e)=>!1,showConnectionTab:t=>!0}},4411:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.filterName=void 0;const i=r(n(7120)),s=r(n(7072)),o=r(n(4093));function a(t,e){if(!e)return!1;if(!t)return!0;if(0==t.replace(/[A-Z]/g,"").length){const n=(0,o.default)(e).replace(/[^A-Z]/g,""),r=".*"+t.split("").join(".*")+".*";return new RegExp(r).test(n)}return e.toUpperCase().includes(t.toUpperCase())}e.filterName=function(t,...e){if(!t)return!0;const n=t.split(" ").map((t=>t.trim())),r=(0,i.default)(e),o=r.filter((t=>(0,s.default)(t))),u=r.filter((t=>t.childName)).map((t=>t.childName));for(const t of n)if(t.startsWith("#")){if(!u.find((e=>a(t.substring(1),e))))return!1}else if(!o.find((e=>a(t,e))))return!1;return!0}},8852:function(t,e,n){"use strict";var r,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getLogger=e.setLoggerName=e.setLogConfig=void 0;const s=i(n(9140));let o,a=null;const u={base:{pid:null===(r=null===global||void 0===global?void 0:global.process)||void 0===r?void 0:r.pid},targets:[{type:"console",level:"info"}]};e.setLogConfig=function(t){o=t},e.setLoggerName=function(t){a=t},e.getLogger=function(t){return(0,s.default)({getConfig:()=>{const e=o||u;if(t){const n={caller:t};return a&&(n.name=a),Object.assign(Object.assign({},e),{base:Object.assign(Object.assign({},e.base),n)})}return e}})}},7096:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(1592),e),i(n(3690),e),i(n(7265),e),i(n(1421),e),i(n(1862),e),i(n(6637),e),i(n(8098),e),i(n(8925),e),i(n(7117),e),i(n(3637),e),i(n(9587),e),i(n(7058),e),i(n(2898),e),i(n(4411),e),i(n(8654),e),i(n(369),e),i(n(518),e),i(n(3968),e),i(n(7441),e),i(n(5350),e),i(n(8926),e),i(n(8852),e)},3690:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.fillConstraintNames=e.makeUniqueColumnNames=e.findForeignKeyForColumn=e.findObjectLike=e.equalFullName=e.equalStringLike=e.quoteFullName=e.fullNameToLabel=e.fullNameToString=e.fullNameFromString=void 0;const i=r(n(1454)),s=r(n(7072));function o(t,e){return(t||"").toLowerCase().trim()==(e||"").toLowerCase().trim()}function a(t,e,n){return`${t}_${e.pureName}_${n.map((t=>t.columnName.replace(" ","_"))).join("_")}`}e.fullNameFromString=function(t){const e=t.match(/\[([^\]]+)\]\.\[([^\]]+)\]/);return e?{schemaName:e[1],pureName:e[2]}:{schemaName:null,pureName:t}},e.fullNameToString=function({schemaName:t,pureName:e}){return t?`[${t}].[${e}]`:e},e.fullNameToLabel=function({schemaName:t,pureName:e}){return t?`${t}.${e}`:e},e.quoteFullName=function(t,{schemaName:e,pureName:n}){return e?`${t.quoteIdentifier(e)}.${t.quoteIdentifier(n)}`:`${t.quoteIdentifier(n)}`},e.equalStringLike=o,e.equalFullName=function(t,e){return t&&e?t.pureName==e.pureName&&t.schemaName==e.schemaName:t==e},e.findObjectLike=function({pureName:t,schemaName:e},n,r){var i,s;return n?e?null===(i=n[r])||void 0===i?void 0:i.find((n=>o(n.pureName,t)&&o(n.schemaName,e))):null===(s=n[r])||void 0===s?void 0:s.find((e=>o(e.pureName,t))):null},e.findForeignKeyForColumn=function(t,e){return(0,s.default)(e)?(t.foreignKeys||[]).find((t=>t.columns.find((t=>t.columnName==e)))):(t.foreignKeys||[]).find((t=>t.columns.find((t=>t.columnName==e.columnName))))},e.makeUniqueColumnNames=function(t){const e=new Set;for(let n=0;n<t.length;n++){if(e.has(t[n].columnName)){let r=2;for(;e.has(`${t[n].columnName}${r}`);)r++;t[n].columnName=`${t[n].columnName}${r}`}e.add(t[n].columnName)}},e.fillConstraintNames=function(t,e){if(!t)return t;const n=(0,i.default)(t);!n.primaryKey||n.primaryKey.constraintName||e.anonymousPrimaryKey||(n.primaryKey.constraintName=`PK_${n.pureName}`);for(const t of n.foreignKeys||[])t.constraintName||(t.constraintName=a("FK",n,t.columns));for(const t of n.indexes||[])t.constraintName||(t.constraintName=a("IX",n,t.columns));for(const t of n.uniques||[])t.constraintName||(t.constraintName=a("UQ",n,t.columns));return n}},1421:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.findEngineDriver=e.extractShellApiFunctionName=e.extractPackageName=e.extractShellApiPlugins=void 0;const i=r(n(3039)),s=r(n(7072)),o=r(n(6446));e.extractShellApiPlugins=function(t,e){const n=[],r=t.match(/^([^@]+)@([^@]+)/);if(r&&n.push(r[2]),e&&e.connection&&e.connection.engine){const t=e.connection.engine.match(/^([^@]+)@([^@]+)/);t&&n.push(t[2])}return n},e.extractPackageName=function(t){if(!t)return null;const e=t.match(/^([^@]+)@([^@]+)/);return e?e[2]:null},e.extractShellApiFunctionName=function(t){const e=t.match(/^([^@]+)@([^@]+)/);return e?`${(0,i.default)(e[2])}.shellApi.${e[1]}`:`dbgateApi.${t}`},e.findEngineDriver=function(t,e){if((0,s.default)(t))return e.drivers.find((e=>e.engine==t));if((0,o.default)(t)){const{engine:n}=t;if(n)return e.drivers.find((t=>t.engine==n))}return null}},5350:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function a(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.enrichWithPreloadedRows=void 0;const s=i(n(5076));e.enrichWithPreloadedRows=function(t,e,n,i){var o,a,u;return r(this,void 0,void 0,(function*(){const r={};for(const s of e.tables){const e=t.tables.find((t=>t.pairingId==s.pairingId));if(0==((null===(o=null==e?void 0:e.preloadedRows)||void 0===o?void 0:o.length)||0))continue;const _=e.preloadedRowsKey||(null===(u=null===(a=e.primaryKey)||void 0===a?void 0:a.columns)||void 0===u?void 0:u.map((t=>t.columnName)));if(0==((null==_?void 0:_.length)||0))continue;const c=i.createDumper();1==_.length?c.putCmd("^select * ^from %f ^where %i ^in (%,v)",s,_[0],e.preloadedRows.map((t=>t[_[0]]))):(c.put("^select * ^from %f ^where",s),c.putCollection(" ^or ",e.preloadedRows,(t=>{c.put("("),c.putCollection(" ^and ",_,(e=>c.put("%i=%v",e,t[e]))),c.put(")")})),c.endCommand());const l=yield i.query(n,c.s);r[s.pairingId]=Object.assign(Object.assign({},s),{preloadedRows:l.rows,preloadedRowsKey:_})}return s.default.isEmpty(r)?e:Object.assign(Object.assign({},e),{tables:e.tables.map((t=>r[t.pairingId]||t))})}))}},369:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.editorDeleteConstraint=e.editorModifyConstraint=e.editorAddConstraint=e.editorDeleteColumn=e.editorModifyColumn=e.editorAddColumn=e.processJsonDataUpdateCommands=e.fillEditorColumnInfo=void 0;const i=r(n(482)),s=r(n(1972)),o=r(n(5076)),a=n(3968);function u(t,e){var n,r;return Object.assign({isPrimaryKey:!!(null===(r=null===(n=null==e?void 0:e.primaryKey)||void 0===n?void 0:n.columns)||void 0===r?void 0:r.find((e=>e.columnName==t.columnName))),dataType:o.default.isEmpty(t)?"int":void 0},t)}function _(t,e,n){if(!(null==e?void 0:e.isPrimaryKey)&&(null==n?void 0:n.isPrimaryKey)){let e=null==t?void 0:t.primaryKey;return e||(e={constraintType:"primaryKey",pureName:t.pureName,schemaName:t.schemaName,columns:[]}),Object.assign(Object.assign({},t),{primaryKey:Object.assign(Object.assign({},e),{columns:[...e.columns,{columnName:n.columnName}]})})}if((null==e?void 0:e.isPrimaryKey)&&!(null==n?void 0:n.isPrimaryKey)){let n=null==t?void 0:t.primaryKey;if(n)return n=Object.assign(Object.assign({},n),{columns:t.primaryKey.columns.filter((t=>t.columnName!=e.columnName))}),0==n.columns.length?Object.assign(Object.assign({},t),{primaryKey:null}):Object.assign(Object.assign({},t),{primaryKey:n})}return t}function c(t,e){t.__addDataCommands=[...t.__addDataCommands||[],e()]}e.fillEditorColumnInfo=u,e.processJsonDataUpdateCommands=function(t,e=[]){for(const n of e)switch(n.type){case"deleteField":delete(t=Object.assign({},t))[n.oldField];break;case"renameField":(t=Object.assign({},t))[n.newField]=t[n.oldField],delete t[n.oldField];break;case"setField":(t=Object.assign({},t))[n.newField]=n.value;break;case"setFieldIfNull":null==(t=Object.assign({},t))[n.newField]&&(t[n.newField]=n.value)}return t},e.editorAddColumn=function(t,e,n){let r=Object.assign(Object.assign({},t),{columns:[...(null==t?void 0:t.columns)||[],Object.assign(Object.assign({},e),{pairingId:(0,i.default)()})]});return r=_(r,null,e),n&&e.defaultValue&&c(r,(()=>({type:"setField",newField:e.columnName,value:(0,a.parseSqlDefaultValue)(e.defaultValue)}))),r},e.editorModifyColumn=function(t,e,n){var r;const i=null===(r=null==t?void 0:t.columns)||void 0===r?void 0:r.find((t=>t.pairingId==e.pairingId));let o=Object.assign(Object.assign({},t),{columns:t.columns.map((t=>t.pairingId==e.pairingId?(0,s.default)(e,["isPrimaryKey"]):t))});return o=_(o,u(i,t),e),n&&i.columnName!=e.columnName&&c(o,(()=>({type:"renameField",oldField:i.columnName,newField:e.columnName}))),n&&!i.defaultValue&&e.defaultValue&&c(o,(()=>({type:"setFieldIfNull",newField:e.columnName,value:(0,a.parseSqlDefaultValue)(e.defaultValue)}))),o},e.editorDeleteColumn=function(t,e,n){let r=Object.assign(Object.assign({},t),{columns:t.columns.filter((t=>t.pairingId!=e.pairingId))});return r=_(r,e,null),n&&c(r,(()=>({type:"deleteField",oldField:e.columnName}))),r},e.editorAddConstraint=function(t,e){const n=Object.assign({},t);return"primaryKey"==e.constraintType&&(n.primaryKey=Object.assign({pairingId:(0,i.default)()},e)),"foreignKey"==e.constraintType&&(n.foreignKeys=[...n.foreignKeys||[],Object.assign({pairingId:(0,i.default)()},e)]),"index"==e.constraintType&&(n.indexes=[...n.indexes||[],Object.assign({pairingId:(0,i.default)()},e)]),"unique"==e.constraintType&&(n.uniques=[...n.uniques||[],Object.assign({pairingId:(0,i.default)()},e)]),n},e.editorModifyConstraint=function(t,e){const n=Object.assign({},t);return"primaryKey"==e.constraintType&&(n.primaryKey=Object.assign(Object.assign({},n.primaryKey),e)),"foreignKey"==e.constraintType&&(n.foreignKeys=t.foreignKeys.map((t=>t.pairingId==e.pairingId?Object.assign(Object.assign({},t),e):t))),"index"==e.constraintType&&(n.indexes=t.indexes.map((t=>t.pairingId==e.pairingId?Object.assign(Object.assign({},t),e):t))),"unique"==e.constraintType&&(n.uniques=t.uniques.map((t=>t.pairingId==e.pairingId?Object.assign(Object.assign({},t),e):t))),n},e.editorDeleteConstraint=function(t,e){const n=Object.assign({},t);return"primaryKey"==e.constraintType&&(n.primaryKey=null),"foreignKey"==e.constraintType&&(n.foreignKeys=t.foreignKeys.filter((t=>t.pairingId!=e.pairingId))),"index"==e.constraintType&&(n.indexes=t.indexes.filter((t=>t.pairingId!=e.pairingId))),"unique"==e.constraintType&&(n.uniques=t.uniques.filter((t=>t.pairingId!=e.pairingId))),n}},2898:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.extractBoolSettingsValue=e.extractIntSettingsValue=void 0;const i=r(n(2168)),s=r(n(2164));e.extractIntSettingsValue=function(t,e,n,r=null,o=null){const a=parseInt(t[e]);return(0,i.default)(a)?n:(0,s.default)(a)?null!=r&&a<r?r:null!=o&&a>o?o:a:n},e.extractBoolSettingsValue=function(t,e,n){const r=t[e];return null==r?n:!!r}},3968:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseSqlDefaultValue=e.getAsImageSrc=e.arrayBufferToBase64=e.isWktGeometry=e.getIconForRedisType=e.isJsonLikeLongString=e.safeJsonParse=e.stringifyCellValue=e.parseCellValue=e.hexStringToArray=e.arrayToHexString=void 0;const i=r(n(7072)),s=r(n(9464)),o=r(n(6446));function a(t){return t.reduce(((t,e)=>t+("0"+e.toString(16)).slice(-2)),"").toUpperCase()}function u(t){for(var e=t.toString(),n=[],r=0;r<e.length;r+=2)n.push(parseInt(e.substr(r,2),16));return n}function _(t){var e="";return[].slice.call(new Uint8Array(t)).forEach((t=>e+=String.fromCharCode(t))),btoa(e)}e.arrayToHexString=a,e.hexStringToArray=u,e.parseCellValue=function(t){if(!(0,i.default)(t))return t;if("(NULL)"==t)return null;if(t.match(/^0x([0-9a-fA-F][0-9a-fA-F])+$/))return{type:"Buffer",data:u(t.substring(2))};const e=t.match(/^ObjectId\("([0-9a-f]{24})"\)$/);return e?{$oid:e[1]}:t},e.stringifyCellValue=function(t){return null===t?"(NULL)":void 0===t?"(NoField)":"Buffer"==(null==t?void 0:t.type)&&(0,s.default)(t.data)?"0x"+a(t.data):(null==t?void 0:t.$oid)?`ObjectId("${null==t?void 0:t.$oid}")`:(0,o.default)(t)||(0,s.default)(t)?JSON.stringify(t):t},e.safeJsonParse=function(t,e,n=!1){if((0,s.default)(t)||(0,o.default)(t))return t;try{return JSON.parse(t)}catch(r){return n&&console.error(`Error parsing JSON value "${t}"`,r),e}},e.isJsonLikeLongString=function(t){return(0,i.default)(t)&&t.length>100&&t.match(/^\s*\{.*\}\s*$|^\s*\[.*\]\s*$/)},e.getIconForRedisType=function(t){switch(t){case"dir":return"img folder";case"string":return"img type-string";case"hash":return"img type-hash";case"set":return"img type-set";case"list":return"img type-list";case"zset":return"img type-zset";case"stream":return"img type-stream";case"binary":return"img type-binary";case"ReJSON-RL":return"img type-rejson";default:return null}},e.isWktGeometry=function(t){return!!(0,i.default)(t)&&!!t.match(/^POINT\s*\(|^LINESTRING\s*\(|^POLYGON\s*\(|^MULTIPOINT\s*\(|^MULTILINESTRING\s*\(|^MULTIPOLYGON\s*\(|^GEOMCOLLECTION\s*\(|^GEOMETRYCOLLECTION\s*\(/)},e.arrayBufferToBase64=_,e.getAsImageSrc=function(t){return"Buffer"==(null==t?void 0:t.type)&&(0,s.default)(null==t?void 0:t.data)?`data:image/png;base64, ${_(null==t?void 0:t.data)}`:(0,i.default)(t)&&(t.startsWith("http://")||t.startsWith("https://"))?t:null},e.parseSqlDefaultValue=function(t){if(t&&(0,i.default)(t))return t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):isNaN(t)||isNaN(parseFloat(t))?void 0:parseFloat(t)}},7058:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.isCollectionInfo=e.isViewInfo=e.isTableInfo=e.isTableColumnUnique=e.extendDatabaseInfoFromApps=e.extendDatabaseInfo=e.extendTableInfo=e.addTableDependencies=void 0;const i=r(n(9607));function s(t){if(!t.tables)return t;const e=(0,i.default)(t.tables.map((t=>t.foreignKeys||[])));return Object.assign(Object.assign({},t),{tables:t.tables.map((t=>Object.assign(Object.assign({},t),{dependencies:e.filter((e=>e.refSchemaName==t.schemaName&&e.refTableName==t.pureName))})))})}function o(t){return Object.assign(Object.assign({},t),{objectTypeField:"tables",columns:(t.columns||[]).map((e=>Object.assign({pureName:t.pureName,schemaName:t.schemaName},e))),primaryKey:t.primaryKey?Object.assign(Object.assign({},t.primaryKey),{pureName:t.pureName,schemaName:t.schemaName,constraintType:"primaryKey"}):void 0,foreignKeys:(t.foreignKeys||[]).map((e=>Object.assign(Object.assign({},e),{pureName:t.pureName,schemaName:t.schemaName,constraintType:"foreignKey"}))),indexes:(t.indexes||[]).map((e=>Object.assign(Object.assign({},e),{pureName:t.pureName,schemaName:t.schemaName,constraintType:"index"}))),checks:(t.checks||[]).map((e=>Object.assign(Object.assign({},e),{pureName:t.pureName,schemaName:t.schemaName,constraintType:"check"}))),uniques:(t.uniques||[]).map((e=>Object.assign(Object.assign({},e),{pureName:t.pureName,schemaName:t.schemaName,constraintType:"unique"})))})}e.addTableDependencies=s,e.extendTableInfo=o,e.extendDatabaseInfo=function(t){return function(t){return Object.assign(Object.assign({},t),{tables:(t.tables||[]).map(o),collections:(t.collections||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"collections"}))),views:(t.views||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"views"}))),matviews:(t.matviews||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"matviews"}))),procedures:(t.procedures||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"procedures"}))),functions:(t.functions||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"functions"}))),triggers:(t.triggers||[]).map((t=>Object.assign(Object.assign({},t),{objectTypeField:"triggers"})))})}(s(t))},e.extendDatabaseInfoFromApps=function(t,e){return t&&e?s(Object.assign(Object.assign({},t),{tables:t.tables.map((t=>Object.assign(Object.assign({},t),{foreignKeys:[...t.foreignKeys||[],...(0,i.default)(e.map((t=>t.virtualReferences||[]))).filter((e=>e.pureName==t.pureName&&e.schemaName==t.schemaName)).map((t=>Object.assign(Object.assign({},t),{constraintType:"foreignKey",isVirtual:!0})))]})))})):t},e.isTableColumnUnique=function(t,e){return!(!t.primaryKey||1!=t.primaryKey.columns.length||t.primaryKey.columns[0].columnName!=e)||!![...t.uniques||[],...(t.indexes||[]).filter((t=>t.isUnique))].find((t=>1==t.columns.length&&t.columns[0].columnName==e))},e.isTableInfo=function(t){return"tables"==t.objectTypeField},e.isViewInfo=function(t){return"views"==t.objectTypeField},e.isCollectionInfo=function(t){return"collections"==t.objectTypeField}},7265:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.transformRowUsingColumnMap=e.prepareTableForImport=void 0;const i=r(n(1454)),s=r(n(4584)),o=r(n(613));e.prepareTableForImport=function(t){const e=(0,i.default)(t);return e.foreignKeys=[],e.indexes=[],e.uniques=[],e.checks=[],e.primaryKey&&(e.primaryKey.constraintName=null),e},e.transformRowUsingColumnMap=function(t,e){return(0,s.default)(e.map((e=>[e.dst,(0,o.default)(t,e.src)])))}},3637:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.testPermission=e.compilePermissions=void 0;const i=r(n(4099)),s=r(n(7072)),o=r(n(7120)),a=r(n(9607));function u(t){return 0==t.length?null:new RegExp(t.map((t=>"^"+(0,i.default)(t).replace(/\\\*/g,".*")+"$")).join("|"))}e.compilePermissions=function(t){if(!t)return null;t=(0,s.default)(t)?t.split(/,|;|\||\s/):(0,a.default)(t.map((t=>t.split(/,|;|\||\s/)))),t=(0,o.default)(t.map((t=>t.trim())));let e=null,n=[];const r={levels:[]};for(const i of t){const t=i.startsWith("~")?"deny":"allow",s=i.startsWith("~")?i.substring(1):i;null!=e&&t!=e&&(r.levels.push({re:u(n),type:e}),n=[]),n.push(s),e=t}return n.length>0&&r.levels.push({re:u(n),type:e}),r},e.testPermission=function(t,e){let n=!0;if(!e)return!0;for(const r of e.levels)t.match(r.re)&&("allow"==r.type&&(n=!0),"deny"==r.type&&(n=!1));return n}},518:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.databaseInfoFromYamlModel=e.tableInfoFromYaml=e.tableInfoToYaml=void 0;const i=r(n(1454)),s=r(n(7120)),o=n(8098);function a(t,e){const n={pureName:t.name,columns:t.columns.map((e=>function(t,e){return{pureName:e.name,columnName:t.name,dataType:t.length?`${t.type}(${t.length})`:t.type,autoIncrement:t.autoIncrement,notNull:t.notNull||e.primaryKey&&e.primaryKey.includes(t.name),defaultValue:t.default}}(e,t))),foreignKeys:(0,s.default)(t.columns.filter((t=>t.references)).map((n=>function(t,e,n){const r=n.find((e=>e.name==t.references));return r&&r.primaryKey?{constraintType:"foreignKey",pureName:e.name,refTableName:t.references,columns:[{columnName:t.name,refColumnName:r.primaryKey[0]}]}:null}(n,t,e))))};return t.primaryKey&&(n.primaryKey={pureName:t.name,constraintType:"primaryKey",columns:t.primaryKey.map((t=>({columnName:t})))}),n.preloadedRows=t.data,n.preloadedRowsKey=t.insertKey,n.preloadedRowsInsertOnly=t.insertOnly,n}e.tableInfoToYaml=function(t){const e=(0,i.default)(t),n={name:e.pureName,columns:e.columns.map((t=>function(t,e){const n={name:t.columnName,type:t.dataType,default:t.defaultValue};t.autoIncrement&&(n.autoIncrement=!0),t.notNull&&(n.notNull=!0);const r=e.foreignKeys&&e.foreignKeys.find((e=>1==e.columns.length&&e.columns[0].columnName==t.columnName));return!r||r.deleteAction&&"NO ACTION"!=r.deleteAction||r.updateAction&&"NO ACTION"!=r.updateAction||(n.references=r.refTableName,r._dumped=!0),n}(t,e)))};return e.primaryKey&&!e.primaryKey._dumped&&(n.primaryKey=e.primaryKey.columns.map((t=>t.columnName))),n},e.tableInfoFromYaml=a,e.databaseInfoFromYamlModel=function(t){const e=o.DatabaseAnalyser.createEmptyStructure(),n=[];for(const r of t)(r.name.endsWith(".table.yaml")||r.name.endsWith(".sql"))&&(r.name.endsWith(".table.yaml")&&n.push(r.json),r.name.endsWith(".view.sql")&&e.views.push({pureName:r.name.slice(0,-9),createSql:r.text,columns:[]}),r.name.endsWith(".matview.sql")&&e.matviews.push({pureName:r.name.slice(0,-12),createSql:r.text,columns:[]}),r.name.endsWith(".proc.sql")&&e.procedures.push({pureName:r.name.slice(0,-9),createSql:r.text}),r.name.endsWith(".func.sql")&&e.functions.push({pureName:r.name.slice(0,-9),createSql:r.text}),r.name.endsWith(".trigger.sql")&&e.triggers.push({pureName:r.name.slice(0,-12),createSql:r.text}));return e.tables=n.map((t=>a(t,n))),e}},4688:(t,e,n)=>{n(3671);const r=n(5076),i=n(5926),{DatabaseAnalyser:s}=n(7096),{isTypeString:o,isTypeNumeric:a}=n(7096);function u({is_nullable:t,column_name:e,data_type:n,char_max_length:r,numeric_precision:i,numeric_ccale:s,default_value:u},_=void 0){const c="character varying"==(l=n)?"varchar":"timestamp without time zone"==l?"timestamp":l;var l;let h=c;r&&o(c)&&(h=`${c}(${r})`),i&&s&&a(c)&&(h=`${c}(${i},${s})`);const T=!(!u||!u.endsWith(".nextval"));return{columnName:e,dataType:h,notNull:"N"==t,defaultValue:T?void 0:u,autoIncrement:T}}t.exports=class extends s{constructor(t,e,n){super(t,e,n)}createQuery(t,e,n={}){return super.createQuery(i[t],e,n)}async _computeSingleObjectId(){const{typeField:t,pureName:e}=this.singleObjectFilter;this.singleObjectId=`${t}:${e}`}async _runAnalysis(){this.feedback({analysingMessage:"Loading tables"});const t=await this.analyserQuery("tableList",["tables"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading columns"});const e=await this.analyserQuery("columns",["tables","views"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading primary keys"});const n=await this.analyserQuery("primaryKeys",["tables"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading foreign keys"});const i=await this.analyserQuery("foreignKeys",["tables"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading views"});const o=await this.analyserQuery("views",["views"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading materialized views"});const a=this.driver.dialect.materializedViews?await this.analyserQuery("matviews",["matviews"],{$owner:this.pool._schema_name}):null;this.feedback({analysingMessage:"Loading routines"});const _=await this.analyserQuery("routines",["procedures","functions"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading indexes"});const c=await this.analyserQuery("indexes",["tables"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Loading unique names"});const l=await this.analyserQuery("uniqueNames",["tables"],{$owner:this.pool._schema_name});this.feedback({analysingMessage:"Finalizing DB structure"});const h=i.rows.map((t=>({pureName:t.pure_name,constraintSchema:t.constraint_schema,constraintName:t.constraint_name,columnName:t.column_name,refColumnName:t.ref_column_name,updateAction:t.update_action,deleteAction:t.delete_action,refTableName:t.ref_table_name}))),T=n.rows.map((t=>({pureName:t.pure_name,constraintSchema:t.constraint_schema,constraintName:t.constraint_name,columnName:t.column_name}))),p=t=>`${t.schema_name}||${t.pure_name}`,f=r.groupBy(e.rows,p),E={tables:t.rows.map((t=>{const e={pureName:t.pure_name,objectId:`tables:${t.pure_name}`,contentHash:t.hash_code_columns?`${t.hash_code_columns}-${t.hash_code_constraints}`:null};return{...e,columns:(f[p(t)]||[]).map((t=>u(t,e))),primaryKey:s.extractPrimaryKeys(e,T),foreignKeys:s.extractForeignKeys(e,h),indexes:r.uniqBy(c.rows.filter((t=>t.tableName==e.pureName&&!l.rows.find((e=>e.constraintName==t.constraintName)))),"constraintName").map((t=>({...r.pick(t,["constraintName","indexType"]),isUnique:"UNIQUE"===t.Unique,columns:c.rows.filter((e=>e.tableName==t.tableName&&e.constraintName==t.constraintName)).map((t=>({...r.pick(t,["columnName"]),isDescending:"DESC"==t.descending})))}))),uniques:r.uniqBy(c.rows.filter((t=>t.tableName==e.pureName&&l.rows.find((e=>e.constraintName==t.constraintName)))),"constraintName").map((t=>({...r.pick(t,["constraintName"]),columns:c.rows.filter((e=>e.tableName==t.tableName&&e.constraintName==t.constraintName)).map((t=>({...r.pick(t,["columnName"])})))})))}})),views:o.rows.map((t=>({objectId:`views:${t.pure_name}`,pureName:t.pure_name,contentHash:t.hash_code,createSql:`CREATE VIEW "${t.pure_name}"\nAS\n${t.create_sql}`,columns:(f[p(t)]||[]).map((t=>u(t)))}))),matviews:a?a.rows.map((t=>({objectId:`matviews:${t.pure_name}`,pureName:t.pure_name,contentHash:t.hash_code,createSql:`CREATE MATERIALIZED VIEW "${t.pure_name}"\nAS\n${t.definition}`,columns:(f[p(view)]||[]).map((t=>u(t)))}))):void 0,procedures:_.rows.filter((t=>"PROCEDURE"==t.object_type)).map((t=>({objectId:`procedures:${t.pure_name}`,pureName:t.pure_name,createSql:`CREATE PROCEDURE "${t.pure_name}"() LANGUAGE ${t.language}\nAS\n$$\n${t.definition}\n$$`,contentHash:t.hash_code}))),functions:_.rows.filter((t=>"FUNCTION"==t.object_type)).map((t=>({objectId:`functions:${t.pure_name}`,createSql:`CREATE FUNCTION "${t.pure_name}"() RETURNS ${t.data_type} LANGUAGE ${t.language}\nAS\n$$\n${t.definition}\n$$`,pureName:t.pure_name,contentHash:t.hash_code})))};return this.feedback({analysingMessage:null}),E}}},4866:(t,e,n)=>{const{createBulkInsertStreamBase:r}=n(7096),i=n(5076);t.exports=function(t,e,n,s,o){const a=s.schemaName?`${t.dialect.quoteIdentifier(s.schemaName)}.${t.dialect.quoteIdentifier(s.pureName)}`:t.dialect.quoteIdentifier(s.pureName),u=r(t,e,n,s,{...o,commitAfterInsert:!0});return u.send=async()=>{const e=t.createDumper();e.putRaw(`INSERT INTO ${a} (`),e.putCollection(",",u.columnNames,(n=>e.putRaw(t.dialect.quoteIdentifier(n)))),e.putRaw(")\n VALUES (\n"),e.put("%,s",u.columnNames.map(((t,e)=>`:C${e}`))),e.putRaw(")");const r=u.buffer.map((t=>i.mapKeys(t,((t,e)=>`c${u.columnNames.indexOf(e)}`))));await n.executeMany(e.s,r,{autoCommit:!0}),u.buffer=[]},u}},5378:(t,e,n)=>{const r=n(5076),i=n(2203),s=n(4293),o=n(4688),a=n(2988),{createBulkInsertStreamBase:u,makeUniqueColumnNames:_}=n(7096),c=n(4866);function l(t){if(!t)return[];const e=t.map((t=>({columnName:t.name})));return _(e),e}function h(t,e){return r.zipObject(e.map((t=>t.columnName)),t)}const T=s.map((t=>({...t,analyserClass:o,connect:async({engine:t,server:e,port:n,user:r,password:i,database:s,databaseUrl:o,useDatabaseUrl:u,serviceName:_,ssl:c,isReadOnly:l,authType:h,socketPath:T})=>(client=await a.getConnection({user:r,password:i,connectString:u?o:n?`${e}:${n}/${_}`:e}),s&&await client.execute(`ALTER SESSION SET CURRENT_SCHEMA = ${s}`),client._schema_name=s,client),close:async t=>t.end(),async query(t,e){if("COMMIT;"==e.trim()&&(e="COMMIT"),null==e)return{rows:[],columns:[]};try{const n=await t.execute(e),r=l(n.metaData);return{rows:(n.rows||[]).map((t=>h(t,r))),columns:r}}catch(t){console.log("Error query",t,e)}},stream(t,e,n){if(e.trim().toLowerCase().startsWith("select")){const i=t.queryStream(e);let s=!1;i.on("metadata",(t=>{s||(columns=l(t),columns&&columns.length>0&&n.recordset(columns),s=!0)})),i.on("data",(t=>{s||(columns=l(t),columns&&columns.length>0&&n.recordset(columns),s=!0),n.row(h(t,columns))})),i.on("end",(()=>{const{command:t,rowCount:e}=i._result||{};"SELECT"!=t&&r.isNumber(e)&&n.info({message:`${e} rows affected`,time:new Date,severity:"info"}),s||(columns=l(i._result),columns&&columns.length>0&&n.recordset(columns),s=!0),n.done()})),i.on("error",(t=>{console.log("ERROR",t);const{message:e,lineNumber:r,procName:i}=t;n.info({message:e,line:r,procedure:i,time:new Date,severity:"error"}),n.done()})),i.on("close",(function(){}))}else t.execute(e,((t,r)=>{if(t)console.log("Error query",t,e),n.info({message:t.message,time:new Date,severity:"error"});else{const{rowsAffected:t,metaData:e,rows:i}=r||{};if(i&&e){const t=l(e);n.recordset(t);for(const e of i)n.row(h(e,t))}else t&&n.info({message:`${t} rows affected`,time:new Date,severity:"info"})}n.done()}))},async getVersionCore(t){try{const{rows:e}=await this.query(t,"SELECT product || ' ' || version_full as \"version\" FROM product_component_version WHERE product LIKE 'Oracle%Database%'");return e[0].version.replace(" "," ")}catch(e){const{rows:n}=await this.query(t,'SELECT banner as "version" FROM v$version');return n[0].version}},async getVersion(t){try{const e=await this.getVersionCore(t),n=e.match(/(\d+[a-z])\s+(\w+).*(\d+)\.(\d+)/);let r=null,i=null,s=null;return n&&(r=`Oracle ${n[1]} ${n[2]}`,n[3]&&(i=parseInt(n[3])),n[4]&&(s=parseInt(n[4]))),{version:e,versionText:r,versionMajor:i,versionMinor:s}}catch(t){return{version:"???",versionText:"Oracle ???",versionMajor:null,versionMinor:null}}},async readQuery(t,e,n){const r=await t.queryStream(e);let s=!1,o=null;const a=new i.PassThrough({objectMode:!0,highWaterMark:100});return r.on("metadata",(t=>{s||(o=l(t),o&&o.length>0&&a.write({__isStreamHeader:!0,...n||{columns:o}}),s=!0),a.write(h(t,o))})),r.on("data",(t=>{a.write(h(t,o))})),r.on("end",(()=>{a.end()})),r.on("error",(t=>{console.error(t),a.end()})),a},async writeTable(t,e,n){return c(this,i,t,e,n)},async listDatabases(t){const{rows:e}=await this.query(t,'SELECT username as "name" from all_users order by username');return e},getAuthTypes:()=>[{title:"Host and port",name:"hostPort"},{title:"Socket",name:"socket"}]})));t.exports=T},5237:(t,e,n)=>{const r=n(5378);t.exports={packageName:"dbgate-plugin-oracle",drivers:r}},6925:t=>{t.exports='\nselect\n -- owner as "schema_name",\n table_name as "pure_name",\n column_name as "column_name",\n nullable as "is_nullable",\n data_type as "data_type",\n data_length as "char_max_length",\n data_precision as "numeric_precision",\n data_scale as "numeric_scale",\n data_default as "default_value"\n FROM all_tab_columns av\n where OWNER=\'$owner\' AND \'tables:\' || TABLE_NAME =OBJECT_ID_CONDITION\norder by column_id\n'},4958:t=>{t.exports='\nselect fk.constraint_name as "constraint_name",\n -- fk.owner as "constraint_schema",\n fk.table_name as "pure_name",\n -- fk.owner as "schema_name",\n fk.delete_rule as "update_action",\n fk.delete_rule as "delete_action",\n ref.table_name as "ref_table_name",\n -- ref.owner as "ref_schema_name",\n basecol.column_name as "column_name",\n refcol.column_name as "ref_column_name"\nfrom all_cons_columns refcol, all_cons_columns basecol, all_constraints ref, all_constraints fk\nwhere fk.OWNER = \'$owner\' AND fk.constraint_type = \'R\'\nand ref.owner = fk.r_owner\nand ref.constraint_name = fk.r_constraint_name\nand basecol.owner = fk.owner\nand basecol.constraint_name = fk.constraint_name\nand basecol.table_name = fk.table_name\nand refcol.owner = ref.owner\nand refcol.constraint_name = ref.constraint_name\nand refcol.table_name = ref.table_name\nAND \'tables:\' || fk.table_name =OBJECT_ID_CONDITION\norder by basecol.position\n'},5926:(t,e,n)=>{const r=n(6925),i=n(382),s=n(2916),o=n(4958),a=n(6864),u=n(7124),_=n(5701),c=n(4474),l=n(9171);t.exports={columns:r,tableList:i,primaryKeys:s,foreignKeys:o,views:a,routines:_,matviews:u,indexes:c,uniqueNames:l}},4474:t=>{t.exports='\nselect i.table_name as "tableName",\n -- i.table_owner as "schemaName",\n i.index_name as "constraintName",\n i.index_type as "indexType",\n i.uniqueness as "Unique",\n ic.column_name as "columnName",\n ic.descend as "descending"\nfrom all_ind_columns ic, all_indexes i\nwhere INDEX_OWNER = \'$owner\' AND ic.index_owner = i.owner\nand ic.index_name = i.index_name\nand \'tables:\' || i.table_name =OBJECT_ID_CONDITION\norder by i.table_owner,\n i.table_name,\n i.index_name,\n ic.column_position\n'},7124:t=>{t.exports="\nSELECT -- owner as schema_name,\n mview_name pure_name,\n container_name,\n '' || trim(\n extractvalue(\n dbms_xmlgen.getxmltype('SELECT query\n FROM all_mviews\n WHERE mview_name=''' ||\n MVIEW_NAME || ''' AND\n owner = ''' ||\n owner || ''''\n ),\n '//text()'\n )) definition\nFROM all_mviews\nwhere OWNER = '$owner' AND 'matviews:' || mview_name=OBJECT_ID_CONDITION\norder by owner, mview_name\n"},2916:t=>{t.exports='\nselect\n -- pk.owner as "constraint_schema",\n pk.constraint_name as "constraint_name",\n -- pk.owner as "schema_name",\n pk.table_name as "pure_name",\n basecol.column_name as "column_name"\nfrom all_cons_columns basecol,\n all_constraints pk\nwhere constraint_type = \'P\'\nand basecol.owner = pk.owner\nand basecol.constraint_name = pk.constraint_name\nand basecol.table_name = pk.table_name\nand \'tables:\' || basecol.table_name =OBJECT_ID_CONDITION\nand pk.owner = \'$owner\'\norder by basecol.position\n'},5701:t=>{t.exports="\nselect\n routine_name as \"pure_name\",\n -- routine_schema as \"schema_name\",\n routine_definition as \"definition\",\n standard_hash(routine_definition, 'MD5') as \"hash_code\",\n routine_type as \"object_type\",\n 'fixme_data_type' as \"data_type\",\n 'fixme_external_language' as \"language\"\nfrom (select\n sys_context('userenv', 'DB_NAME') routine_catalog,\n sys_context('userenv', 'DB_NAME') specific_catalog,\n ap.owner specific_schema,\n ap.owner routine_schema,\n decode( ap.procedure_name, null, ap.object_name || ap.procedure_name, ap.procedure_name ) specific_name,\n decode( ap.procedure_name, null, ap.object_name || ap.procedure_name, ap.procedure_name ) routine_name,\n ao.object_type routine_type,\n decode(impltypeowner, null, to_char(null), SYS_CONTEXT('userenv', 'DB_NAME')) type_udt_catalog,\n --to_clob(get_proc_text(ap.owner, ap.object_name, ao.object_type, 32767)) routine_body,\n 'fixme_routine_body.' || ap.owner || '.' || decode( ap.procedure_name, null, ap.object_name || ap.procedure_name, ap.procedure_name ) routine_body,\n --to_clob(get_proc_text(ap.owner, ap.object_name, ao.object_type, 4000)) routine_definition,\n 'fixme_routine_definition.' || ap.owner || '.' || decode( ap.procedure_name, null, ap.object_name || ap.procedure_name, ap.procedure_name ) routine_definition,\n sys_context('userenv', 'DB_NAME') character_set_catalog,\n 'SYS' character_set_schema,\n sys_context('userenv', 'DB_NAME') collation_catalog,\n 'SYS' collation_schema,\n deterministic is_deterministic,\n pipelined is_pipelined ,\n aggregate is_aggregate,\n authid is_definer\n from\n all_procedures ap,\n all_objects ao\n where\n ap.owner = '$owner' and\n ap.owner = ao.owner and\n ap.object_name = ao.object_name and\n ao.object_type in ('PACKAGE', 'PROCEDURE', 'FUNCTION')\n and ao.object_name =OBJECT_ID_CONDITION\n ) routines\n"},382:t=>{t.exports="\nselect\n -- owner \"schema_name\",\n table_name \"pure_name\"\n from\n all_tables\n where OWNER='$owner' AND 'tables:' || TABLE_NAME =OBJECT_ID_CONDITION\n"},9171:t=>{t.exports="\nselect constraint_name as \"constraintName\"\nfrom all_constraints\nwhere owner='$owner' and constraint_type = 'U'\n and 'tables:' || table_name =OBJECT_ID_CONDITION\n"},6864:t=>{t.exports='\nselect avv.*,\n ora_hash("create_sql") as "hash_code"\nfrom (select\n view_name as "pure_name",\n -- owner as "schema_name",\n SUBSTR(text_vc, 1, 3900) AS "create_sql"\n from all_views av\n where owner = \'$owner\' and text_vc is not null\n ) avv\n where \'views:\' || "pure_name" =OBJECT_ID_CONDITION\n'},6197:t=>{const{SqlDumper:e,arrayToHexString:n,testEqualTypes:r}=global.DBGATE_TOOLS;t.exports=class extends e{createDatabase(t){this.putCmd(`CREATE USER c##${t}\n IDENTIFIED BY ${t}\n DEFAULT TABLESPACE users\n TEMPORARY TABLESPACE temp\n QUOTA 10M ON users;`,t)}beginTransaction(){}columnDefinition(t,e){if(t.autoIncrement)return super.columnType(t.dataType),void this.put(" ^generated ^by ^default ^on ^null ^as ^identity");super.columnDefinition(t,e)}}},4293:(t,e,n)=>{const{driverBase:r}=global.DBGATE_TOOLS,i=n(6197),{oracleSplitterOptions:s}=n(5994),o=["GEOGRAPHY"],a={rangeSelect:!0,limitSelect:!1,offsetFetchRangeSyntax:!0,ilike:!0,stringEscapeChar:"'",fallbackDataType:"varchar",anonymousPrimaryKey:!0,enableConstraintsPerTable:!0,dropColumnDependencies:["dependencies"],quoteIdentifier:t=>'"'+t+'"',createColumn:!0,dropColumn:!0,changeColumn:!0,createIndex:!0,dropIndex:!0,createForeignKey:!0,dropForeignKey:!0,createPrimaryKey:!0,dropPrimaryKey:!0,createUnique:!0,dropUnique:!0,createCheck:!0,dropCheck:!0,dropReferencesWhenDropTable:!0,predefinedDataTypes:["VARCHAR2","NUMBER","DATE","CLOB","BLOB","INTEGER","BFILE","BINARY_DOUBLE","BINARY_FLOAT","CHAR","FLOAT","INTERVAL DAY","INTERVAL YEAR","LONG","LONG RAW","NCHAR","NCLOB","NVARCHAR2","RAW","ROWID","TIMESTAMP","UROWID"],createColumnViewExpression(t,e,n,r){if(e&&o.includes(e.toUpperCase()))return{exprType:"call",func:"ST_AsText",alias:r||t,args:[{exprType:"column",columnName:t,source:n}]}}},u={...{...r,dumperClass:i,dialect:a,getQuerySplitterOptions:()=>s,readOnlySessions:!0,databaseUrlPlaceholder:"e.g. localhost:1521/orcl",showConnectionField:(t,e)=>"useDatabaseUrl"==t||(e.useDatabaseUrl?["databaseUrl","user","password"].includes(t):["user","password","server","port","serviceName"].includes(t)),getNewObjectTemplates:()=>[{label:"New view",sql:"CREATE VIEW myview\nAS\nSELECT * FROM table1"},{label:"New materialized view",sql:"CREATE MATERIALIZED VIEW myview\nAS\nSELECT * FROM table1"},{label:"New procedure",sql:"CREATE PROCEDURE myproc (arg1 INT)\nLANGUAGE SQL\nAS $$\n SELECT * FROM table1;\n$$"},{label:"New function (plpgsql)",sql:"CREATE FUNCTION myfunc (arg1 INT)\nRETURNS INT\nAS $$\nBEGIN\n RETURN 1;\nEND\n$$ LANGUAGE plpgsql;"}]},engine:"oracle@dbgate-plugin-oracle",title:"OracleDB",defaultPort:1521,dialect:{...a,materializedViews:!0},dialectByVersion:t=>t?{...a,materializedViews:t&&null!=t.versionMajor&&null!=t.versionMinor&&(t.versionMajor>9||9==t.versionMajor||t.versionMinor>=3)}:a,showConnectionTab:t=>"sshTunnel"==t};t.exports=[u]},2562:t=>{"use strict";t.exports=require("buffer")},6982:t=>{"use strict";t.exports=require("crypto")},2250:t=>{"use strict";t.exports=require("dns")},4434:t=>{"use strict";t.exports=require("events")},9896:t=>{"use strict";t.exports=require("fs")},8611:t=>{"use strict";t.exports=require("http")},9278:t=>{"use strict";t.exports=require("net")},857:t=>{"use strict";t.exports=require("os")},6928:t=>{"use strict";t.exports=require("path")},932:t=>{"use strict";t.exports=require("process")},3785:t=>{"use strict";t.exports=require("readline")},2203:t=>{"use strict";t.exports=require("stream")},3557:t=>{"use strict";t.exports=require("timers")},4756:t=>{"use strict";t.exports=require("tls")},9023:t=>{"use strict";t.exports=require("util")},15:t=>{"use strict";t.exports=JSON.parse('{"name":"oracledb","version":"6.5.1","description":"A Node.js module for Oracle Database access from JavaScript and TypeScript","license":"(Apache-2.0 OR UPL-1.0)","homepage":"http://oracle.github.io/node-oracledb/","keywords":["Oracle","Database","official","DB","SQL","JSON","PL/SQL","SODA","OCI","API","client","library","driver","add-on","extension","binding","interface","adapter","module"],"repository":{"type":"git","url":"git://github.com/oracle/node-oracledb.git"},"scripts":{"install":"node package/install.js","prune":"node package/prunebinaries.js"},"engines":{"node":">=14.6"},"maintainers":[{"name":"Oracle Corp."}],"bugs":{"url":"https://github.com/oracle/node-oracledb/issues"},"main":"./index.js"}')}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r=n(5237);module.exports=r})();
|